Hai Everyone,
I have two asterisk servers installed with Asterisk 16.
Asterisk Server 1: 10.10.10.10
Asterisk server 2: 10.10.10.11
I have created two SIP extensions on Server 1 and registred those extensions on Server 2. And I have also given different context name fo both. Below are my details.
On Server 1 SIP.conf
[test]
username=test
secret=123456
type=friend
context=from-test
host=dynamic
dtmfmode=rfc2833
qualify=yes
deny=255.255.255.255/255.255.255.255
permit=10.10.10.10/255.255.255.0
insecure=port,invite
canreinvite=no
disallow=all
allow=alaw
[test1]
username=test1
secret=1234567
type=friend
context=from-test1
host=dynamic
dtmfmode=rfc2833
qualify=yes
deny=255.255.255.255/255.255.255.255
permit=10.10.10.10/255.255.255.0
insecure=port,invite
canreinvite=no
disallow=all
allow=alaw
And I have registered the same on Server 2
SIP.conf
register =>test:123456@192.168.50.3:5060/1234
register =>test1:1234567@192.168.50.3:5060/12345
Also added the below line to make the call from Server2 to Server1
[test]
disallow=all
allow=ulaw,alaw
type=friend
username=test
secret=123456
;host=192.168.50.3
host=dynamic
context=from-test
port=5060
dtmfmode=rfc2833
insecure=port,invite
qualify=yes
[test1]
disallow=all
allow=ulaw,alaw
type=peer
username=test1
secret=1234567
context=from-test1
host=dynamic
port=5060
dtmfmode=rfc2833
insecure=port,invite
qualify=yes
The problem which is facing: While making the call from server 2 to Server1 using any trunk its always getting answered on context from-test1.
I want to dial to different contexts with both SIP trunk. Like
1.While making the call from server 2 using test it should get an answer on server 1 context from-test,
2.and while making the call from server 2 using test1 it should get an answer on server 1 context from-test1.
Can anyone help with this.