Trunk 2 asterisk boxes

i have 2 asterisk boxes
box1: extensions 500x , ip 10.1.1.51
box2: 600x , ip 10.1.1.52

how can i call from box1 to box2’s extensions?!

thx.

Hi, You can do it a few ways here is how I have it setup for SIP.

Let me know how it goes.

On the 5XX box

extensions.conf

;Local Office Extensions
exten => _5XX,1,Dial(SIP/${EXTEN},30,t)
exten => _5XX,n,GotoIf($["${DIALSTATUS}" = “BUSY”]?busy:unavail)
exten => _5XX,n(unavail),Voicemail(${EXTEN},u)
exten => _5XX,n,Hangup()
exten => _5XX,n(busy),VoiceMail(${EXTEN},b)
exten => _5XX,n,Hangup()

;SIP For Inter-Office Calls
exten => _[5-6]XX,1,Set(SIPTRUNK=${EXTEN:0:-2}"-SIP-TRUNK")
exten => _[5-6]XX,2,Dial(SIP/${SIPTRUNK}/${EXTEN},60)
exten => _[5-6]XX,3,Hangup()

sip.conf
[6-sip-trunk]
type=peer
context=internal
host=10.1.1.52
disallow=all
allow=g729
nat=no
canreinvite=yes
qualify=no

On the 6XX box

extensions.conf
;Local Office Extensions
exten => _6XX,1,Dial(SIP/${EXTEN},30,t)
exten => _6XX,n,GotoIf($["${DIALSTATUS}" = “BUSY”]?busy:unavail)
exten => _6XX,n(unavail),Voicemail(${EXTEN},u)
exten => _6XX,n,Hangup()
exten => _6XX,n(busy),VoiceMail(${EXTEN},b)
exten => _6XX,n,Hangup()

;SIP For Inter-Office Calls
exten => _[5-6]XX,1,Set(SIPTRUNK=${EXTEN:0:-2}"-SIP-TRUNK")
exten => _[5-6]XX,2,Dial(SIP/${SIPTRUNK}/${EXTEN},60)
exten => _[5-6]XX,3,Hangup()

sip.conf
[5-sip-trunk]
type=peer
context=internal
host=10.1.1.51
disallow=all
allow=g729
canreinvite=yes
qualify=no

Brett

didn’t work, neither one register ?
thx

Hi, It doesn’t register it does not need to. Can you post the output of the CLI when you try to call?

Brett

Hi, Just another thought you will need to adjust the context to suite yours mine is context=internal.

Brett