Hello everyone,
I’m setting up a new Asterisk server at home for the first time and using DIDLogic as my Sip Provider.
Can someone take a look at my Sip.conf and Extensions.conf files as I’m not sure they are correct.
When dialing out, it works fine, When dialing in, the phone rings for about 1 minute then nothing.
Would appreciate any help. Thanks!!!
FYI I have replaced several lines from both text files removing names, users, and passwords to protect my accounts.
## Sip.conf
----------
[general]
context=provider ; Default context for incoming calls. Defaults to 'default'
allow=ulaw
allow=alaw
allow=gsm
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
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)
transport=udp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
qualify=yes
register => USER:PASS@sip.didlogic.net
[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
[PHONE1]
type=friend
context=phones
allow=ulaw,alaw
username=PHONE1
secret=PASS
host=dynamic
dtmfmode=rfc2833
nat=no
canreinvite=no
callerid="PHONE1"
[PHONE2]
type=friend
context=phones
allow=ulaw,alaw
secret=PHONE2
host=dynamic
dtmfmode=rfc2833
[PHONE3]
type=friend
context=phones
allow=ulaw,alaw
username=PHONE3
secret=PASS
host=dynamic
dtmfmode=rfc2833
nat=no
canreinvite=no
callerid="PHONE3"
[DIDLOGIC]
host=sip.didlogic.net
secret=PASS
type=friend
context=provider
username=PASS
qualify=yes
fromuser=DIDLOGIC
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
insecure=port,invite
## Extensions.conf
----------
[phones]
exten => 100,1,NoOp(First Line)
same => n,NoOp(Second Line)
same => n,Hangup
exten => 1260,1,NoOp(Call to PHONE1)
same => n,Dial(SIP/PHONE1)
same => n,HangUp
exten => 1261,1,NoOp(Call to PHONE2)
same => n,Dial(SIP/PHONE2)
same => n,HangUp
exten => 1262,1,NoOp(Call to PHONE3)
same => n,Playback(one-moment-please)
same => n,Dial(SIP/PHONE3)
same => n,HangUp
exten => _0X.,1,NoOp(${EXTEN:1})
same => n,Goto(outgoing,${EXTEN:1},1)
[provider]
;exten => _X.,1,Goto(phones,1260,1)
exten => s,1,Log(NOTICE, Incoming call from ${CALLERID(all)})
exten => s,n,Dial(SIP/PHONE1)
exten => s,n,Hangup()
; End of the "provider" context
[outgoing]
exten => _X.,1,Dial(SIP/PROVIDER/${EXTEN})