PacktLib: Building Telephony Systems with OpenSIPS 1.6

Building Telephony Systems with OpenSIPS 1.6

Credits

About the Author

About the Reviewers

Preface

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

Summary

Introduction to OpenSIPS

Where we are

What is OpenSIPS?

OpenSIPS history

Main characteristics

OpenSIPS configuration file

SIP proxy—expected behavior

Stateful operation

Summary

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

Summary

Script and Routing Basics

Where we are

Scripting OpenSIPS

Modules and their parameters

Scripting basics

Flags

Statements

Routing basics

Using the standard configuration

Common issues

Summary

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

Summary

Graphical User Interfaces for OpenSIPS

OpenSIPS Control Panel

Installation of opensips-cp

SerMyAdmin

Basic tasks

Comparing OpenSIPS-CP and SerMyAdmin

Summary

Connectivity to the PSTN

The big picture

The group module

The module permissions

Example

Using Asterisk as a PSTN gateway

Dynamic routing

DIALPLAN transformations

Blacklists and "473/Filtered Destination" messages

Summary

Media Services Integration

Playing announcements

Call forwarding

Implementing call forward on busy or unanswered

Inspecting the configuration file

Lab—testing the call forward feature

Summary

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

Summary

OpenSIPS Accounting and Billing

Objectives

Where we are

Lab—accounting using a FreeRADIUS server

Solving the problem with missing BYEs

Prepaid and postpaid billing

Summary

Monitoring Tools

Where we are

Built-in tools

Trace tools

Summary

Index