PacktLib: Building Telephony Systems with OpenSER

Building Telephony Systems with OpenSER


About the Author

About the Reviewers


Introduction to SIP

SIP Basics

Server Operating as a SIP Proxy

Server Operating as a SIP Redirect

Basic Messages

SIP Transactions and Dialogs

The SIP Protocol and the OSI Model

The VoIP Provider "Big Picture"

Where You Can Find More Information


The SIP Express Router

Where Are We?

What is the SIP Express Router?

What Software to Use, SER or OpenSER?

Usage Scenarios

OpenSER Architecture

SIP Proxy—Expected Behavior

Stateful Operation

Differences between Strict Routing and Loose Routing

Understanding SIP and RTP

OpenSER Installation

Hardware Requirements

Software Requirements

Lab—Installing Linux for OpenSER

Downloading and Installing OpenSER v1.2

Lab—Running OpenSER at the Linux Boot

OpenSER v1.2 Directory Structure

Log Files

Startup Options


OpenSER Standard Configuration

Where Are We?

Analyzing the Standard Configuration

Using the Standard Configuration

Routing Basics


Adding Authentication with MySQL

Where Are We?

The AUTH_DB Module

The REGISTER Authentication Sequence

The Openserctl Shell Script

The Functions check_to() and check_from()

Using Aliases

Handling CANCEL requests and retransmissions

Full Script with All the Resources Above

Lab—Enhancing the Security

Lab—Using Aliases


Building the User Portal with SerMyAdmin


Basic Tasks


Connectivity to the PSTN

Where Are We?

Lab—Using Asterisk as a PSTN Gateway

Using LCR (Least Cost Routes)

Securing re-INVITES

Blacklists and "473/Filtered Destination" messages


Call Forward and Voice Mail

Call Forwarding

Implementing Call Forward on Busy or nanswered

Inspecting the Configuration File

Lab—Testing the Call Forward Feature

SIP NAT Traversal

NAT Types

Solving the SIP NAT Traversal Challenge

Handling REGISTER Requests behind NAT

Handling INVITE Messages behind NAT

Handling the Responses

MediaProxy Installation and Configuration

openser.cfg Analysis

Invite Diagram

Lab Using MediaProxy for NAT Traversal

OpenSER Accounting and Billing


Where Are We?

Installation of FreeRADIUS and CDRTool

Using CDRTool for Rating

CDRTool Architecture

How CDRTool Rates a Call


Troubleshooting Tools


Built-in Tools

Packet Capture and Trace Tools


After Words

What's New in Version 1.2.3

Migration from 1.2.2 to 1.2.3 and 1.3.1

Migrating the Script from Chapter 10 to openser 1.3.1


Areas for Further Investigation

SIP Peering

TLS Transport Layer Security


Common Mistakes

Forum and Training