Book Image

Building Telephony Systems with OpenSER

Book Image

Building Telephony Systems with OpenSER

Overview of this book

Table of Contents (18 chapters)
Building Telephony Systems with OpenSER
Credits
About the Author
About the Reviewers
Preface
6
Building the User Portal with SerMyAdmin
Index

Where Are We?


The VoIP provider solution has many components. To avoid loosing the perspective, we will show this picture on every chapter. In this chapter, we are working with the SIP proxy component together with the PSTN Gateway.

After this chapter our VoIP provider will be able to send calls to the PSTN using a SIP gateway.

Requests Sent to the Gateway

In the requests addressed to the gateway, we have to verify to which group a certain user belongs to check if he or she is allowed to use the PSTN.

For this purpose we are going to use the 'group' module. This module exports the function is_user_in ("credentials", "group") to check if a user belongs to a specified group. In the above example we had created three groups: local for local calls, ld for long distance, and int for international calls. In the script we use regular expressions to check if the calls are local, long distance, or international.

You have to insert the groups in the MySQL table called group before to use it. You can easily...