Building Telephony Systems with OpenSIPS - Second Edition
eBook - ePub

Building Telephony Systems with OpenSIPS - Second Edition

Flavio E. Goncalves, Bogdan-Andrei Iancu

Share book
  1. 384 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Building Telephony Systems with OpenSIPS - Second Edition

Flavio E. Goncalves, Bogdan-Andrei Iancu

Book details
Book preview
Table of contents
Citations

About This Book

Build high-speed and highly scalable telephony systems using OpenSIPS

About This Book

  • Install and configure OpenSIPS to authenticate, route, bill, and monitor VoIP calls
  • Gain a competitive edge using the most scalable VoIP technology
  • Discover the latest features of OpenSIPS with practical examples and case studies

Who This Book Is For

If you want to understand how to build a SIP provider from scratch using OpenSIPS, then this book is ideal for you. It is beneficial for VoIP providers, large enterprises, and universities. This book will also help readers who were using OpenSER but are now confused with the new OpenSIPS.

Telephony and Linux experience will be helpful to get the most out of this book but is not essential. Prior knowledge of OpenSIPS is not assumed.

What You Will Learn

  • Learn to prepare and configure a Linux system for OpenSIPS
  • Familiarise yourself with the installation and configuration of OpenSIPS
  • Understand how to set a domain and create users/extensions
  • Configure SIP endpoints and make calls between them
  • Make calls to and from the PSTN and create access control lists to authorize calls
  • Install a graphical user interface to simplify the task of provisioning user and system information
  • Implement an effective billing system with OpenSIPS
  • Monitor and troubleshoot OpenSIPS to keep it running smoothly

In Detail

OpenSIPS is a multifunctional, multipurpose signalling SIP server. SIP (Session Initiation Protocol) is nowadays the most important VoIP protocol and OpenSIPS is the open source leader in VoIP platforms based on SIP. OpenSIPS is used to set up SIP Proxy servers. The purpose of these servers is to receive, examine, and classify SIP requests. The whole telecommunication industry is changing to an IP environment, and telephony as we know it today will completely change 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.

Starting with an introduction to SIP and OpenSIPS, you will begin by installing and configuring OpenSIPS. You will be introduced to OpenSIPS Scripting language and OpenSIPS Routing concepts, followed by comprehensive coverage of Subscriber Management. Next, you will learn to install, configure, and customize the OpenSIPS control panel and explore dialplans and routing. You will discover how to manage the dialog module, accounting, NATTraversal, and other new SIP services. The final chapters of the book are dedicated to troubleshooting tools, SIP security, and advanced scenarios including TCP/TLS support, load balancing, asynchronous processing, and more.

A fictional VoIP provider is used to explain OpenSIPS and by the end of the book, you will have a simple but complete system to run a VoIP provider.

Style and approach

This book is a step-by-step guide based on the example of a VoIP provider. You will start with OpenSIPS installation and gradually, your knowledge depth will increase.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Building Telephony Systems with OpenSIPS - Second Edition an online PDF/ePUB?
Yes, you can access Building Telephony Systems with OpenSIPS - Second Edition by Flavio E. Goncalves, Bogdan-Andrei Iancu in PDF and/or ePUB format, as well as other popular books in Informatik & Computernetzwerke. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781785280610
Edition
2

Building Telephony Systems with OpenSIPS Second Edition


Table of Contents

Building Telephony Systems with OpenSIPS Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Introduction to SIP
Understanding the SIP architecture
The SIP registration process
Types of SIP servers
The proxy server
The redirect server
The B2BUA server
SIP request messages
The SIP dialog flow
SIP transactions and dialogs
Locating the SIP servers
SIP services
The SIP identity
The RTP protocol
Codecs
DTMF-relay
Session Description Protocol
The SIP protocol and OSI model
The VoIP provider's big picture
The SIP proxy
The user administration and provisioning portal
The PSTN gateway
The media server
The media proxy or RTP proxy for NAT traversal
Accounting and CDR generation
Monitoring tools
Additional references
Summary
2. Introducing OpenSIPS
Understanding OpenSIPS
OpenSIPS capabilities
An overview of the OpenSIPS project
OpenSIPS knowledge transfer and support
Usage scenarios for OpenSIPS
The ingress side
The core side
The egress side
Who's using OpenSIPS?
The OpenSIPS design
The OpenSIPS core
The OpenSIPS modules
Summary
3. Installing OpenSIPS
Hardware and software requirements
Installing Linux for OpenSIPS
Downloading and installing OpenSIPS v2.1.x
Generating OpenSIPS scripts
Running OpenSIPS at the Linux boot time
The OpenSIPS v2.1.x directory structure
The configuration files
Modules
Working with the log files
Startup options
Summary
4. OpenSIPS Language and Routing Concepts
An overview of OpenSIPS scripting
The OpenSIPS configuration file
Global parameters
The modules section
Scripting routes
The request route
The branch route
The failure route
The reply route
The local route
The start up route
The timer route
The event route
The error route
Scripting capabilities
The scripting functions
The scripting variables
The reference variables
The AVP variables
The script variables
Scripting transformations
Scripting flags
Scripting operators
Script statements
SIP routing in OpenSIPS
Mapping SIP traffic over the routing script
Stateless and stateful routing
In-dialog SIP routing
Summary
5. Subscriber Management
Modules
The AUTH_DB module
The REGISTER authentication sequence
The REGISTER sequence
The INVITE authentication sequence
The INVITE sequence packet capture
The INVITE code snippet
Digest authentication
The authorization request header
Quality of protection
Plaintext or prehashed passwords
Installing MySQL support
Analysis of the opensips.cfg file
The REGISTER requests
The non-REGISTER requests
The opensipsctl shell script
Configuring the opensipsctl utility
Using OpenSIPS with authentication
The registration process
Enhancing the opensips.cfg routing script
Managing multiple domains
Using aliases
Handling the CANCEL requests and retransmissions
Lab – multidomain support
Lab – using aliases
IP authentication
Summary
6. OpenSIPS Control Panel
The OpenSIPS control panel
Installation of OpenSIPS-CP
Configuring the OpenSIPS-CP
Installing Monit
Configuring administrators
Adding and removing domains
Manage the access control lists or groups
Managing aliases
Managing subscribers
Verifying the subscriber registration
Managing permissions and IP authentication
Sending commands to the management interface
A generic table viewer
Summary
7. Dialplan and Routing
The dialplan module
PSTN routing
Receiving calls from PSTN
Gateway authentication
The permissions module
Caller identification
Sending calls to PSTN
Identifying PSTN calls
Authorizing PSTN calls
The group module
Access Control Lists
Caller ID in PSTN calls
Routing to PSTN GWs
The dynamic routing module
Routing entities
The selection algorithm
Probing and disabling gateways
Advanced features
Script samples
Summary
8. Managing Dialogs
Enabling the dialog module
Creating a dialog
Dialog matching
Dialog states
Dialog timeout and call disconnection
Dialog variables and flags
Setting and reading the dialog variables
Setting and reading the dialog flags
Profiling a dialog
Counting calls from the MI interface
Disconnecting calls
Disconnecting a call using the MI interface
Topology hiding
Initial request before topology hiding
Initial request after topology hiding
Sequential request before topology hiding
Sequential request after topology hiding
Topology hiding limitations
Validating a dialog and fixing broken dialogs
Displaying the dialog statistics
Description of the statistics
SIP session timers
How the SIP session timer works
Summary
9. Accounting
Progress check
Selecting a backend
The accounting configuration
Automatic accounting
Manual accounting
Extra accounting
Multi-leg accounting
Lab - accounting using MySQL
Using the dialog module to obtain the duration
Call end reason
Generating CDRs
Lab – generating CDRs
CDRviewer and extra accounting
Account...

Table of contents