Hello,
I tried to configure Asterisk to use the SIP Trunk from my ISP (SFR in France).
The SIP Truck appeared as registered with the command sip show registry:
Host dnsmgr Username Refresh State Reg.Time
corbas.p-cscf.sfr.net:5062 N ***** 105 Registered Tue, 14 Sep 2021 08:45:43
1 SIP registrations.
My problem is that I didn’t receive incoming calls.
Here are my sip.conf file:
[general]
websocket_enabled = false
context=from-sfr
udpbindaddr=0.0.0.0
udpbindport=5080
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
language=fr
register => ***@ims.mnc010.mcc208.3gppnetwork.org:***:***.IZU.THD@sfr.fr@corbas.p-cscf.sfr.net:5062
allowguest=no
alwaysauthreject=yes
contactpermit=0.0.0.0/0.0.0.0 ;Only for tests. I will configure my local network when everything will be ok.
media_address=MY_PUBLIC_IP_ADDRESS
disallow=all
allow=ulaw
allow=alaw
nat=force_rport
[authentication]
[basic-options](!) ; a template
dtmfmode=rfc2833
context=from-office
type=friend
[natted-phone](!,basic-options) ; another template inheriting basic-options
directmedia=no
host=dynamic
[public-phone](!,basic-options) ; another template inheriting basic-options
directmedia=yes
[my-codecs](!) ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
[ulaw-phone](!) ; and another one for ulaw-only
disallow=all
allow=ulaw
My extensions.conf
file:
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
[from-sfr]
exten => s,1,Dial(SIP/6001)
Outgoing calls are working so I removed concerned piece of code to focus on my issue.
Asterisk is installed on a RaspberryPi, which is behind my OpenWrt router.
I think it is a NAT-related and/or firewall-related issue.
Thanks in advance