PacktLib: Building Telephony Systems with OpenSIPS 1.6

Building Telephony Systems with OpenSIPS 1.6


About the Author

About the Reviewers


Introduction to SIP

SIP basics

SIP operation theory

SIP registering process

Server operating as a SIP proxy

Server operating as a SIP redirect

Basic messages

SIP dialog flow

SIP transactions and dialogs

The RTP protocol

Session Description Protocol (SDP)

The SIP protocol and the OSI model

VoIP provider, the big picture

Where you can find more information


Introduction to OpenSIPS

Where we are

What is OpenSIPS?

OpenSIPS history

Main characteristics

OpenSIPS configuration file

SIP proxy—expected behavior

Stateful operation


OpenSIPS Installation

Hardware requirements

Software requirements

Lab—installing Linux for OpenSIPS

Downloading and installing OpenSIPS v1.6.x

OpenSIPS console

Lab—running OpenSIPS at the Linux boot

OpenSIPS v1.6.x directory structure

Log files

Redirecting OpenSIPS log files

Startup options


Script and Routing Basics

Where we are

Scripting OpenSIPS

Modules and their parameters

Scripting basics



Routing basics

Using the standard configuration

Common issues


Adding Authentication with MySQL

Where we are

The AUTH_DB module

The REGISTER authentication sequence

The INVITE authentication sequence

Digest authentication

Plaintext or hashed passwords

Installing MySQL support

Analysis of the opensips.cfg file

The opensipsctl shell script

Handling CANCEL request and retransmissions

Full script with all the resources above

Lab—multi-domain support

Lab—using aliases


Graphical User Interfaces for OpenSIPS

OpenSIPS Control Panel

Installation of opensips-cp


Basic tasks

Comparing OpenSIPS-CP and SerMyAdmin


Connectivity to the PSTN

The big picture

The group module

The module permissions


Using Asterisk as a PSTN gateway

Dynamic routing

DIALPLAN transformations

Blacklists and "473/Filtered Destination" messages


Media Services Integration

Playing announcements

Call forwarding

Implementing call forward on busy or unanswered

Inspecting the configuration file

Lab—testing the call forward feature


SIP NAT Traversal

Why NAT breaks SIP

Where NAT breaks SIP

NAT types

Solving the SIP NAT traversal challenge

RTP Proxy installation and configuration

Analysis of the file opensips.cfg

Determining if the client is behind NAT

Handling REGISTER requests behind NAT

Handling INVITE messages behind NAT

Handling the responses

Invite diagram

Lab—using the RTP Proxy for NAT traversal


OpenSIPS Accounting and Billing


Where we are

Lab—accounting using a FreeRADIUS server

Solving the problem with missing BYEs

Prepaid and postpaid billing


Monitoring Tools

Where we are

Built-in tools

Trace tools