Book Image

Building Telephony Systems with OpenSER

Book Image

Building Telephony Systems with OpenSER

Overview of this book

Table of Contents (18 chapters)
Building Telephony Systems with OpenSER
Credits
About the Author
About the Reviewers
Preface
6
Building the User Portal with SerMyAdmin
Index

The VoIP Provider "Big Picture"


Before we start to dig in the SIP proxy it is important to understand all the components for a VoIP provider solution. A VoIP provider usually consists of several servers and services. The services described here could be installed in a single server or multiple servers depending on the dimensioning.

In this book we will cover each one of these components, from left to right, in the chapters ahead. We are going to use this picture in all chapters to help you to know where you are.

SIP Proxy

The SIP proxy is the central component of our solution. It is responsible for registering the users and for keeping the location database (which maps IP to SIP addresses). The entire SIP routing and signaling is handled by the SIP proxy and it is responsible too for end user services such as call forwarding, white/blacklist, speed dialing, and others. This component never handles the media (RTP packets); all media-related packets are routed directly from the user agent clients, servers, and PSTN gateways.

User, Administration, and Provisioning Portal

One important component is the user administration and provisioning portal. In the portal, the user may subscribe to the service and should be able to buy credits, change passwords, and verify his or her account. On the other hand, administrators should be able to remove users, change user credits, grant, and remove privileges. Provisioning is the process used to make it easier, for administrators, to provide automatic installation of user agents such as IP phones, analog telephony adapters, and softphones.

PSTN Gateway

To communicate to the public switched telephone network, a PSTN gateway is required. Usually this gateway will interface to the PSTN using E1 or T1 trunks. The most common products in this arena are gateways from Cisco, AudioCodes, and Quintum. Aste risk is gaining market in this area, because of its price per port cost, sometimes 75% less than the competitors. To evaluate a good gateway, check the support of SIP extensions such as RFC3515 (REFER), RFC3891 (Replaces), and RFC3892 (Referred by). These protocols will allow unattended transfers behind the SIP proxy; without them in the gateway it might be impossible to transfer calls.

Media Server

The SIP proxy never handles the media. Services such as IVRs, voicemail, conference, or anything related to media should be implemented in a media server. SEMS SIP Express media server, developed by iptel, has some nice features such as conference, voicemail, and announcements. Once again, Asterisk can be used as a wildcard to provide these services.

Media Proxy or RTP Proxy for Nat Traversal

Any SIP provider will have to handle NAT traversal for its customers. The media proxy is an RTP bridge that helps the users behind symmetric firewalls to access the SIP provider. Without proxies it won't be possible to serve as much as 35% of the users. You can implement a universal NAT traversal technique using these components. The media proxy can help you too in the accounting correction for unfinished SIP dialogs, which, for some reason, didn't receive the BYE message.

RADIUS Accounting

A server with RADIUS installed will be fundamental for accounting the calls. A SIP provider should take maximum care of accounting records. OpenSER can be configured to send the accounting to a RADIUS server such as Radiator or FreeRADIUS. SIP calls can be accounted to a database as well. However, accounting to a database generates two records that need to be correlated manually.

CDRTool Rating

The RADIUS server has information about call duration, but does not have information about the rates and prices for the call. Applying prices to calls can be very tricky. We will use for our provider a GPL tool called CDRTool developed by AG projects (cdrtool.agprojects.com). It will be responsible for applying rates to calls.

Monitoring Tools

Finally we will need monitoring, troubleshooting, and testing tools to help debug any problems occurring in the SIP server. The first tool is the protocol analyzer and we will see how to use ngrep, ethereal, and tethereal. OpenSER has a module called SIP trace, which we will use too.