sip.conf:-
[general]
context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port for unencrypted UDP
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
realm=202.164.x.x
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
transport=udp
;rtpkeepalive=5
localnet=192.168.79.51/255.255.255.0
localnet=192.168.79.52/255.255.255.0
localnet=192.168.79.53/255.255.255.0
localnet=192.168.79.54/255.255.255.0
localnet=192.168.79.55/255.255.255.0
localnet=192.168.79.56/255.255.255.0
localnet=192.168.79.57/255.255.255.0
localnet=192.168.79.58/255.255.255.0
localnet=192.168.79.59/255.255.255.0
localnet=192.168.79.60/255.255.255.0
localnet=192.168.79.61/255.255.255.0
localnet=192.168.79.62/255.255.255.0
localnet=192.168.79.63/255.255.255.0
localnet=192.168.79.64/255.255.255.0
localnet=192.168.79.65/255.255.255.0
canreinvite=no
externip=202.164.x.x
;media_address =202.164.x.x
;media_address =192.168.79.1
;externip=spicetalk.in
;externip=122.252.232.5
nat=yes ; Always ignore info and assume NAT
qualify=yes
;rtptimeout=15
;rtpkeepalive=15
;registerattempts=10
;stunaddr=stun.callwithus.com
[authentication]
basic-options ; a template
dtmfmode=rfc2833
context=from-office
type=friend
natted-phone ; another template inheriting basic-options
nat=yes
canreinvite=no
host=dynamic
public-phone ; another template inheriting basic-options
nat=yes
canreinvite=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
[1060] ; This will be WebRTC client
type=friend
username=1060 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=password ; The SIP Password for SIP.js
encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is dialing
directmedia=no ; Asterisk will relay media for this peer
transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS
nat=force_rport,comedia
;externip=202.164.x.x
[1061] ; This will be the legacy SIP client
type=friend
username=1061
host=dynamic
secret=password
context=default
directmedia=no
;nat=no
;icesupport=yes
;localnet=192.168.79.0/255.255.255.0
;externip=202.164.x.x
[1062] ; This will be the legacy SIP client
type=friend
username=1062
host=dynamic
secret=password
context=default
directmedia=no
;nat=no
icesupport=yes