Date created: Tuesday, February 5, 2013 12:23:58 PM. Last modified: Tuesday, February 24, 2015 11:42:43 AM

Basic SIP Trunk

Local PBX - extensions.conf

[general]
autofallthrough=yes

[callers]
include => main-extensions
include => external

[main-extensions]
exten => 5555,1,Dial(SIP/james)

[external]
exten => _5XX!,1,Log(NOTICE, Caller ${CALLERID(all)} calling ${EXTEN} from ${CHANNEL} in ${CONTEXT})
exten => _5XX!,n,Dial(SIP/remote-pbx/${EXTEN},60)
exten => _5XX!,n,Playtones(congestion)
exten => _5XX!,n,Hangup()

[from-remote-pbx]
include => main-extensions

Local PBX - sip.conf

[james]
type=friend
username=james
secret=supersafe
host=dynamic
context=callers

[remote-pbx]
type=peer
nat=no
host=1.2.3.4
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=alaw
insecure=port,invite
context=from-remote-pbx
qualify=yes

Remote PBX - extensions.conf

[general]
autofallthrough=yes

[callers]
include => main-extensions
include => external

[main-extensions]
exten => 580,1,Dial(SIP/bensley)

[external]
exten => _5XXX!,1,Log(NOTICE, Caller ${CALLERID(all)} is calling ${EXTEN} from ${CHANNEL} in ${CONTEXT})
exten => _5XXX!,n,Dial(SIP/local-pbx/${EXTEN},60)
exten => _5XXX!,n,Playtones(congestion)
exten => _5XXX!,n,Hangup()

[from-local-pbx]
include => main-extensions

Remote PBX - sip.conf

[bensley]
type=friend
username=bensley
secret=0650413322548888
host=dynamic
context=callers

[local-pbx]
type=peer
nat=no
host=10.224.85.213
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=alaw
insecure=port,invite
context=from-local-pbx
qualify=yes

Reload configs on both PBXs;

sip reload
dialplan reload

Make a call from remote PBX to local PBX, from remote extension 580 to local extension 5555;

remote*CLI>
  == Using SIP RTP CoS mark 5
    -- Executing [5555@callers:1] Log("SIP/bensley-00000010", "NOTICE, Caller "bensley (580)"  is calling 5555 from SIP/bensley-00000010 in callers") in new stack
[Feb  5 15:40:46] NOTICE[25500]: Ext. 5555:1 @ callers:  Caller "bensley (580)"  is calling 5555 from SIP/bensley-00000010 in callers
    -- Executing [5555@callers:2] Dial("SIP/bensley-00000010", "SIP/vm-pbx/5555,60") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/vm-pbx/5555
    -- SIP/vm-pbx-00000011 is ringing

Previous page: .Call Files Intro
Next page: Call Recording With Pause