I want to call from a mobile phone with the DID number provided by a sip provider into my asterisk server. I can make an outbound call from the asterisk server to my mobile phone just fine.
[ SBC (asterisk 172.16.5.58) ] <--- [ PSTN ]
Following are my configuration files
sip.conf
[general]
register=user:password@sip provider url/user
; outbound settings. I can call to pstn with exten = _.,1, Dial(SIP/${EXTEN}@Hosted01)
[user]
username=user
type=user
secret=password
context=from-trunk-sip-Hosted01
[Hosted01]
type=friend
username=user
secret=xxx
port=xxx
insecure=port,invite
nat=force_rport,comedia
host=<sip provider@sip provider.com>
context=from-trunk-sip-Hosted01
fromuser=user
sendrpid=yes
trustrpid=yes
canreinvite=yes
fromdomain=<sip provider@sip provider.com>
dtmfmode=rfc2833
allow=alaw
allow=ulaw
; inbound settings
[provider]
type=peer
username=xxx
secret=xxx
insecure=port,invite
nat=force_rport,comedia
host=<sip provider@sip provider.com>
context=from-sip-external-Hosted01
extensions.conf
[from-trunk-sip-Hosted01]
exten = 1000,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
sip show peers
shows
CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
Hosted01/user xxx.xx.xxx.xx Yes Yes 5060 OK (1 ms)
phone3/phone3 yy.yy.yy.yy D Yes Yes 4007 OK (7 ms)
phone4/phone4 yy.yy.yy.yy D Yes Yes 4007 OK (5 ms)
provider xxx.xx.xxx.xx Yes Yes 5060 OK (1 ms)
Both redacted (xxx.xx.xxx.xx) IPs are the same.
I expect when I call the DID on my mobile phone, I will get a hello-world
response. However, I am getting a busy line.
note: there are two asterisk servers on 172.16.5.56 at two different ports connected with a trunk each. phone3 and phone4 are connected with Jami softphone in the office, and I can make a call from the softphone to this SBC.
Log with sip set debug on
and core set verbose 500
as attached.inbound-002.txt (23.8 KB)