Hi everyone.
I’m having problems with my trunks. Look I have 2 asterisk servers 1.4.x and i use the server A, to storage the SIP TRUNKS CREDENTIALS, and the Server B just to register in the Server A.
The Problem: My Server B display both SIP Trunks are registrered, that’s OK but when i recive a call via Trunk1 (0001) (Look Down) my server B recive the call in the incorrect context, in this case from-trunk2 (Look down), and when I RECIVE A CALL VIA Trunk2 (0007) (Look down) my Server B recive the call in the correct context in this case (from-trunk2) (Look down)
NOTE*: In my Opinion, my Server B have this problem because i’m registrering more than one SIP trunk to the same IP, in this case (To Server A)
But i don’t know what to do. I just want to recive each call from trunks in the correct context.
Please post your suggestions, Here more details!
Asterisk IP of Server B: 10.0.1.200
Server A have this sip info:
[0001]
type=friend
username=0001
secret=1234
host=dynamic
fromuser=0001
allow=all
canreinvite=yes
context=free-calls
[0007]
type=friend
username=0007
secret=1234
host=dynamic
fromuser=0007
allow=all
canreinvite=yes
context=free-calls
In the extension of this server i have this part:
[free-calls]
exten=>_000.,1,Dial(SIP/${EXTEN})
NOW…
Server B have this config in sip.conf
[general]
register=>0001:1234@10.0.1.200:5060
register=>0007:1234@10.0.1.200:5060
[Trunk1]
type=friend
username=0001
secret=1234
host=10.0.1.200
canreinvite=yes
allow=all
context=from-trunk1
[Trunk2]
type=friend
username=0007
secret=1234
host=10.0.1.200
canreinvite=yes
allow=all
context=from-trunk2