Building Telephony Systems with OpenSIPS 1.6

Build scalable and robust telephony systems using SIP

Building Telephony Systems with OpenSIPS 1.6

Starting
Flavio E. Goncalves

Build scalable and robust telephony systems using SIP
$10.00
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781849510745
Paperback284 pages

About This Book

 

  • Build a VoIP Provider based on the SIP Protocol
  • Cater to scores of subscribers efficiently with a robust telephony system based in pure SIP
  • Gain a competitive edge using the most scalable VoIP technology
  • Learn how to avoid pitfalls using precise billing
  • Packed with rich practical examples and case studies on the latest OpenSIPS version 1.6

Who This Book Is For

This book is for readers who want to understand how to build a SIP provider from scratch using OpenSIPS. It is suitable for VoIP providers, large enterprises, and universities.

Telephony and Linux experience will be helpful but is not essential. Readers need not have prior knowledge of OpenSIPS. This book will also help readers who were using OpenSER but are now confused with the new OpenSIPS.

Table of Contents

Chapter 1: 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
Chapter 2: Introduction to OpenSIPS
Where we are
What is OpenSIPS?
OpenSIPS history
Main characteristics
OpenSIPS configuration file
SIP proxy—expected behavior
Stateful operation
Summary
Chapter 3: 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
Chapter 4: 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
Chapter 5: 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
Chapter 6: Graphical User Interfaces for OpenSIPS
OpenSIPS Control Panel
Installation of opensips-cp
SerMyAdmin
Basic tasks
Comparing OpenSIPS-CP and SerMyAdmin
Summary
Chapter 7: 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
Chapter 8: 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
Chapter 9: 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
Chapter 10: 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
Chapter 11: Monitoring Tools
Where we are
Built-in tools
Trace tools
Summary

What You Will Learn

 

  • Identify how SIP transactions are routed including initial and sequential requests
  • Accelerate the processing of SIP sequential requests with the help of Loose Routing
  • Install OpenSIPS in a Linux platform and integrate a media server such as Asterisk
  • Acquire authentication and persistency by enabling a MySQL back-end for OpenSIPS
  • Administer the server with the help of graphical web interfaces such as OpenSIPS control panel and serMyAdmin
  • Connect to a PSTN gateway to send and receive calls
  • Enable dynamic dial plans and routing by using the DIALPLAN module DROUTING module
  • Traverse NAT using STUN and TURN
  • Bill your costumers or simply check your expenses by generating CDRs (Call Detail Records)
  • Monitor your SIP infrastructure to keep it running smoothly

In Detail

SIP is the most important VoIP protocol and OpenSIPS is clearly the open source leader in VoIP platforms based on pure SIP. The whole telecommunication industry is changing to an IP environment, and telephony in the way we know today will disappear in less than ten years. SIP is the protocol leading this disruptive revolution and it is one of the main protocols on next-generation networks. While a VoIP provider is not the only kind of SIP infrastructure created using OpenSIPS, it is certainly one of the most difficult to implement.

This book will give you a competitive edge by helping you to create a SIP infrastructure capable of handling tens of thousands of subscribers. You can extend the examples given in this book easily to other applications such as a SIP router, load balancing, IP PBX, and Hosted PBX as well. This book is an update of the title Building Telephony Systems with OpenSER.

The book starts with the simplest configuration and evolves chapter by chapter teaching you how to add new features and modules. It will first teach you the basic concepts of SIP and SIP routing. Then, you will start applying the theory by installing OpenSIPS and creating the configuration file. You will learn about features such as authentication, PSTN connectivity, user portals, media server integration, billing, NAT traversal, and monitoring. The book uses a fictional VoIP provider to explain OpenSIPS. The idea is to have a simple but complete running VoIP provider by the end of the book. 

Authors

Table of Contents

Chapter 1: 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
Chapter 2: Introduction to OpenSIPS
Where we are
What is OpenSIPS?
OpenSIPS history
Main characteristics
OpenSIPS configuration file
SIP proxy—expected behavior
Stateful operation
Summary
Chapter 3: 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
Chapter 4: 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
Chapter 5: 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
Chapter 6: Graphical User Interfaces for OpenSIPS
OpenSIPS Control Panel
Installation of opensips-cp
SerMyAdmin
Basic tasks
Comparing OpenSIPS-CP and SerMyAdmin
Summary
Chapter 7: 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
Chapter 8: 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
Chapter 9: 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
Chapter 10: 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
Chapter 11: Monitoring Tools
Where we are
Built-in tools
Trace tools
Summary

Book Details

ISBN 139781849510745
Paperback284 pages
Read More

Recommended for You

Building Telephony Systems with OpenSIPS - Second Edition
$ 10.00
NHibernate 2 Beginner's Guide
$ 10.00