Book Image

Building Telephony Systems with OpenSIPS 1.6

By : Flavio E. Goncalves
Book Image

Building Telephony Systems with OpenSIPS 1.6

By: Flavio E. Goncalves

Overview of this book

<p>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.<br /><br />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.<br /><br />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.&nbsp;</p>
Table of Contents (17 chapters)
Building Telephony Systems with OpenSIPS 1.6
Credits
About the Author
About the Reviewers
Preface
Index

Flags


Very often you will see the use of script flags. These flags are used to trigger some processes such as accounting, dialog control, NAT handling, and others. There are three types of flags—message flags, script flags, and branch flags. See the following table:

Type

Persistence

Function

Purpose

Message flag

Transaction

setflag(flag_idx)

To activate some functions in the transaction level

Branch flag

Branch

setbflag(flag_idx)

To activate some functions in the branch level

Script flag

Top-level Routing

setsflag(flag_idx)

Used to save the other flags, valid only for scripting

You can check the decimal values of the flags set using the pseudo-variables—$mf (message flags), $bf (branch flags), and $sf (script flags).

The module GFLAGS

The module GFLAGS allow the use of external flags. These flags can be set using the MI commands. GFLAGS can be set using the functions set_gflag(), is_gflag(), and reset using reset_gflag() inside the script or from an external program...