In BangkokÅ› side, we edit the file sip.conf and we add the following - changing ip for your host's one, trunk name, favorite codecs and context. That that last one I left it by default, so calling between PABX is enabled by default in both places (lazy way :)
- In Bangkok's sip.conf:
[Singapore]
host = 10.9.9.1
username =
secret =
trunkname = singapore
group = null
hasexten = no
hasiax = no
hassip = yes
registeriax = no
registersip = yes
trunkstyle = voip
disallow = all
allow = g729,ulaw,gsm
insecure = port,invite
nat = no
qualify = yes
context = defaultDialPlan
careinvite = no
- In Singapore's sip.conf:
[Bangkok]
host = 10.8.9.1
username =
secret =
trunkname = bangkok
group = null
hasexten = no
hasiax = no
hassip = yes
registeriax = no
registersip = yes
trunkstyle = voip
disallow = all
allow = g729,ulaw,gsm
insecure = port,invite
nat = no
qualify = yes
context = defaultDialPlan
careinvite = no
Now we have the sip trunk configured, we will create a digit map to be able to call.
- Edit Bangkok's extensions.conf:
[InterPABX]
exten => _5XXX,1,DIAL(SIP/Singapore/${EXTEN})
- Edit Singapore's extensions.conf:
[InterPABX]
exten => _6XXX,1,DIAL(SIP/Singapore/${EXTEN})
[defaultDialPlan]
...
[InterPABX]
We are done. Now we reload the sip and dialplan:
- asterisk -rv
- BKK-asterisk-001*CLI>sip reload
- BKK-asterisk-001*CLI>dialplan reload
- BKK-asterisk-001*CLI>exit
Now we can grab a phone and make our first free call between our two places.