VoIP Cookbook: Trunk Peering in Asterisk
One of the main reasons why we use VoIP is to have free long distance or international calls. Imagine that if you're having a branch office or working partners who often communicate with you. You have to establish a private network between office branches or those working partners so you can bypass the PSTN. There are a number ways you can do this through Asterisk.
- DUNDi, Distributed Universal Number Discovery protocol.
- Centralized directory, such as VoIP Rakyat
On this occasion, you will be shown a trunk peering process using VoIP Rakyat. The same mechanism can be applied to other SIP proxy across the world.
In addition, we will also discuss the real problems we face in configuring network involving NAT/Proxy Server, as most networks are protected by firewall that blocks VoIP signal.
We presume that we already have an account in VoIP Rakyat. In this sense, the given number and password are:
number 2012345 password abcdef number 2055555 password 123456
Next we will do a comprehensive configuration of file sip.conf and extensions.conf, including providing the facilities required for testing.
In general, there are several important things in configuring trunk in Asterisk
- Registration to SIP account in voiprakyat (sip.conf)
- Creating username & password for various extensions (sip.conf)
- Configuring Dialout for a variety of configurations (extensions.conf)
- Configuration for inbound call (extensions.conf [inbound-sip])
With this configuration, we can now place outgoing calls using various available lines. In addition, we can also receive calls dialed from voiprakyat and the internet through inbound-sip module. The detail of each of a variety of configurations is available in the enclosed configuration.