Hello,
I’m trying to configure a new asterisk server (20.3.0). It’s the first time for me and I’m sure I have done some mistakes.
My asterisk server is a Linux/Devuan in a DMZ. All packets from WAN are redirected to this server.
WAN----modem(192.168.15.20)-----server(DMZ:192.168.15.18)----several SPA112’s
My ISP provides a SIP trunk.
In a first time, I have configured users.conf
[general]
hasvoicemail=yes
hassip=yes
hasiax=no
hasmanager=no
callwaiting=yes
threewaycalling=yes
callwaitingcallerid=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
callgroup=1
pickupgroup=1
[SDA112](!)
type=friend
context=User-internal
host=dynamic
qualify=yes
dtmfmode=auto
disallow=all
allow=alaw
allow=g722
nat=force_rport,comedia
directmedia=update
fromdomain=aaaa.com
defaultexpirey=3600
[6001](SDA112)
fullname=<>
description=SDA112
context=User-standard
secret=<>
email=<>
[6002](SDA112)
fullname=<>
description=SDA112
context=User-standard
secret=<>
email=<>
and sip.conf:
[general]
context=public
allowoverlap=no
udpbindaddr=192.168.1.1:5060
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
language=fr
register=> <registration>
localnet=192.168.0.0/255.255.0.0
directmedia=update,nonat
nat=force_rport,comedia
qualify=yes
externrefresh=15
directmediapermit=192.168.0.0/255.255.0.0
externaddr=xxx.yyy.zzz.ttt
externtlsport=5060
[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
[my-codecs](!) ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=alaw
All SPA112 are connected to my server, and server itself is registered to my SIP trunk.
I have add a extensions.conf:
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=yes
priorityjumping=no
[globals]
dial_opts=g
my_dial_status=answer
timeout=45
[User-standard]
exten => 6001,1,Dial(SIP/6001)
exten => 6002,1,Dial(SIP/6002)
[public]
exten => myexternalphonenumber1,1,Dial(SIP/6001)
exten => myexternalphonenumber2,1,Dial(SIP/6002)
With this configuration, all local communications runs as expected. But inbound and outbound communications abort. In a first time, I only tried to establish a communication between a cellular phone and one of the local phones.
When I try to establish a communication from wan to internal phone (with myexternalphonenumber1), local phone rings but RTP packets only go from my server to WAN:
17:42:51.561774 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
17:42:51.591797 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
17:42:51.591820 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
17:42:51.622185 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
17:42:51.651741 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
17:42:51.651763 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
17:42:51.681767 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
17:42:51.711795 IP rayleigh.systella.fr.14186 > 37.97.65.116.47638: UDP, length 172
37.97.65.116 never sends packet to my server. Of course, I have tried without firewall. Same result. I suppose I have done a mistake somewhere. Help will be welcome.
Best regards,
JB