Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Building Telephony Systems with OpenSIPS Second Edition
  • Table Of Contents Toc
Building Telephony Systems with OpenSIPS Second Edition

Building Telephony Systems with OpenSIPS Second Edition - Second Edition

By : Flavio E. Goncalves, Flavio E Goncalves, Bogdan-Andrei Iancu
4.1 (8)
close
close
Building Telephony Systems with OpenSIPS Second Edition

Building Telephony Systems with OpenSIPS Second Edition

4.1 (8)
By: Flavio E. Goncalves, Flavio E Goncalves, Bogdan-Andrei Iancu

Overview of this book

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.
Table of Contents (16 chapters)
close
close
15
Index

Locating the SIP servers

Similar to e-mail servers, you will need to specify which server would serve a specific domain. The location of the SIP servers is described in RFC 3263. The first objective of location is to determine the IP, port, and transport protocol for the server based on the domain name. The second objective is to determine the address of a backup for the first proxy.

To perform these objectives, we will use a Domain Name System, more specifically, Name Authority Pointer (NAPTR) and Service (SRV) records. NAPTR records are employed to determine the transport protocol. To specify a transport protocol, you should insert the DNS records in the zone file of your DNS server. (Check the documentation of your DNS server on how to do it.) In the following code, we are enabling three protocols for this domain, TLS, TCP, and UDP. If the client supports TLS and UDP, TLS will be chosen because of the defined order in the records:

Order  pref   flags service regexp replacement
IN NAPTR   10   50    "s"   "SIPS+D2T" "" _sips._tcp.opensips.org.
IN NAPTR   20   50    "s"   "SIP+D2T"  "" _sip._tcp.opensips.org.
IN NAPTR   30   50    "s"   "SIP+D2U"  "" _sip._udp.opensips.org.

After selecting the transport protocol, it is time to select the preferred server, which is done as follows:

Service         TTL     Class P/W   Port Server
_sips._tcp.opensips.org. 86400 IN SRV 0 5 5060 sipA.opensips.org.
_sips._tcp.opensips.org. 86400 IN SRV 0 5 5060 sipB.opensips.org.
_sip._udp.opensips.org.  86400 IN SRV 0 5 5060 sipA.opensips.org.
_sip._udp.opensips.org.  86400 IN SRV 0 5 5060 sipB.opensips.org.

The terms in the preceding code are described as follows:

  • Service: The symbolic name of the desired service
  • TTL: The standard DNS time to live field
  • Class: The standard DNS class field (this is always IN)
  • Priority: The priority of the target host; a lower value means more preferred
  • Weight: A relative weight for the records with the same priority
  • Port: The TCP or UDP port on which the service is to be found
  • Target: The canonical hostname of the machine providing the service

The configuration of the SRV records is often used to provide failovers and load sharing between the SIP servers. It is one of the easiest ways to get geographical redundancy in a SIP project.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Building Telephony Systems with OpenSIPS Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon