This 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 metaphor of a VoIP provider to explain OpenSIPS. The idea is to have a simple but complete running VoIP provider by the end of the book.
Chapter 1, Introduction to SIP teaches you the SIP protocol and its functionality along with SIP components, the SIP architecture and describes its main messages and processes.
Chapter 2, Introduction to OpenSIPS explains about OpenSIPS and its main characteristics and features. You will see the configuration file, its modules, the configuration blocks, and so forth.
Chapter 3, OpenSIPS Installation shows you how to install and prepare Linux for installing OpenSIPS with RADIUS and MySQL modules and getting started with OpenSIPS.
Chapter 4, Scripting and Routing Basics discusses the basics needed to construct a working routing script. It explains the global configuration parameters for scripting, the modules, and the routing statements available.
Chapter 5, Adding Authentication with MySQL teaches you how to integrate MySQL with OpenSIPS to authenticate users and handle inbound and outbound calls.
Chapter 6, Graphical User Interfaces for OpenSIPS explains the need for user and administration portals. It will teach you how to configure access, handle domains, and customize portals.
Chapter 7, Connectivity to PSTN teaches you how to connect SIP gateways with PSTN, build dynamic dialplans, and apply permissions.
Chapter 8, Media Services Integration teaches you how to connect OpenSIPS to external media servers for implementing user preferences like call forwarding, and integrating databases for simplified administration.
Chapter 9, SIP NAT Traversal describes various NAT types and devices. Here we will learn how to implement the Media Proxy solution to solve the NAT traversal problem.
Chapter 10, OpenSIPS Accounting and Billing teaches you how to implement the accounting feature with MySQL and RADIUS.
Chapter 11, Monitoring Tools discusses how to use built-in monitoring tools and implement testing techniques for OpenSIPS.
This book targets 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.
Our objective of writing this book is to take the user from the basics up to the level required to run an OpenSIPS server in a VoIP provider, in an enterprise. Some interesting topics have not been covered. This is because we consider them to be a bit advanced for an introductory book. We hope to cover them soon in another title to be announced.
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 OpenSIPS.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "You have to use www_authorize
when your server is the endpoint of the request."A block of code is set as follows:
if (is_method("REGISTER")) { # Uncomment this if you want to use digest authentication if (!www_authorize("", "subscriber")) { www_challenge("", "0"); exit; }; save("location"); };
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/serMyAdmin">
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/opensips_MySQL" type="javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/opensips" username="opensips" password="opensipsrw"/>
</Context>
Any command-line input or output is written as follows:
tar –xzvf sermyadmin-install-2.x.tar.gz
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Now, choose Finish partitioning and write changes to disk".
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <[email protected]>
.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Tip
Downloading the example code for the book
Visit http://www.packtpub.com/files/code/0745_Code.zip to directly download the example code.
The downloadable files contain instructions on how to use them.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration, and help us to improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or web site name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.