O'Reilly logo

Building Telephony Systems with OpenSER by Flavio E. Goncalves

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lab—Using Asterisk as a PSTN Gateway

Using the sketch provided in this chapter, write a script to send PSTN calls to a PSTN Gateway. You can use phpMyAdmin, or the MySQL command line to insert data on the database.

Step 1—Add the gateway address in the trusted table using SerMyAdmin:

Lab—Using Asterisk as a PSTN Gateway

If desired or convenient, you can instead use the MySQL command line interface to achieve the same result.

#mysql –u openser –p
-- enter your mysql password --
mysql> use openser;
mysql> INSERT INTO trusted ( src_ip, proto, from_pattern ) VALUES ( '10.1.30.22', 'any', '^sip:.*$');

The records above tell the OpenSER script to allow requests coming from the IP address ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required