HI,
Thanks for reply.
What happening here is, call is received at the destination 1001 on server 3 but after i pick up the call it gets disconnected, but on the phone from which i dialed PRI number call gets answered and runs for exact 1 min.
what i have done so far is as below,
On server1(172.16.15.151),
I am making call on PRI number 0XX XXX88021 which in turn through dialplan calls the the sip trunk registered with server2(172.16.14.104).
[0XXXXX88021]
type = peer
username = 0XXXXX88021
secret = 0XXXXX88021
fromuser = 0XXXXX88021
host = 172.16.14.104
fromdomain = 172.16.14.104
nat = force_rport,comedia
disallow = all
;allow= g729
allow = ulaw,alaw
callerID=
insecure = very
context = default
directmedia = yes
port = 5060
On server2(172.16.14.104)
I have created peer with same username just to enter the dialplan,
[0XXXXX88021]
type = peer
username=0XXXXX88021
secret=0XXXXX88021
type=friend
host=dynamic
context=webinbound
Dialplan to call the trunk registered with server3
[webinbound]
exten => _X.,1,Dial(SIP/XXX88021,30,t)
same => n,Hangup()
Here trunk is created with the cloud server,
[XXX88021]
type = peer
username = XXX88021
secret = XXX88021
fromuser = XXX88021
host = (some_public_IP)
fromdomain = (some_public_IP)
nat = force_rport,comedia
disallow = all
allow= g729
allow = ulaw
callerID=
insecure = very
context = from-pstn
directmedia = yes
port = 5060
On Server3 (public IP cloud server)
Peer is created to execute the dialplan,
[68388021]
type=endpoint
transport=transport-udp-main
context=default
disallow=all
allow=ulaw,alaw
aors=68388021
auth=68388021
[68388021]
type=auth
auth_type=userpass
username=68388021
password=68388021
[68388021]
type=aor
max_contacts=5
Agent registered on sipml5 demo web application to receive call,
[3000]
type=aor
max_contacts=1
remove_existing=yes
[3000]
type=auth
auth_type=userpass
username=3000
password=web@123
[3000]
type=endpoint
aors=3000
auth=3000
dtls_auto_generate_cert=yes
webrtc=yes
context=inbound
disallow=all
allow=ulaw,alaw
Dialplan on server3 to call agent is,
[default]
exten => _XX.,1,Answer()
exten => _XX.,n,Dial(PJSIP/3000,60,T)
exten => _XX.,n,Hangup()