Hello,
This seems like a no brainer but I;m stuck. We have aa asterisk 13.14.1 with a Twilio elastic trunk. We have a couple of test phones using Zoiper registered successfully with the asterisk box. Having some difficulty getting the dial plan correct. I can either get calls out to work or by changing the dial plan get extension to extension working but not both. Calls into the system using the Twilio numbers get a 404 not found with either setup.
Any help appreciated.
sip show peers
415/415 192.168.52.219 D Auto (No) No 50741 Unmonitored
667/667 192.168.50.215 D Auto (No) No 5061 Unmonitored
707/707 192.168.52.15 D Auto (No) No 43201 Unmonitored
prospector 10.138.0.3 Auto (No) No 5060 Unmonitored
twilio0/trunkuser 54.244.51.2 Auto (No) No 5060 Unmonitored
twilio1 54.172.60.2 Auto (No) No 5060 Unmonitored
twilio2 54.172.60.0 Auto (No) No 5060 Unmonitored
twilio3 54.172.60.1 Auto (No) No 5060 Unmonitored
twilio4 54.172.60.3 Auto (No) No 5060 Unmonitored
sip.conf
[general]
udpenable=yes
localnet=x.x.x.x
externaddr=x.x.x.x
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=yes ; Enable server for incoming TCP connections (default is no)
udpenable=yes ; 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
preferred_codec_only=yes ; Respond to a SIP invite with the single most preferred codec
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=gsm
sipdebug =yes ; Turn on SIP debugging by default, from
twilio-trunk
type=peer
context=from-twilio ;Which dialplan to use for incoming calls
dtmfmode=rfc2833
canreinivite=no
insecure=port,invite
twilio0
host=ih-prospector.pstn.us2.twilio.com
remotesecret=
defaultuser=trunkuser
twilio1
host=54.172.60.2
twilio2
host=54.172.60.0
twilio3
host=54.172.60.1
twilio4
host=54.172.60.3
office-phone
type=friend
context=from-phones
host=dynamic
secret=
dtmfmode=auto
disallow=all
allow=ulaw
allowguest=no
soft-phone
type=friend
context=from-phones
host=dynamic
secret=
;regexten=1003
dtmfmode=auto
disallow=all
allow=ulaw
allowguest=no
[415]
regexten=4159688518
type=friend
context=from-phones
host=dynamic
secret=
;regexten=1003
dtmfmode=auto
disallow=all
allow=ulaw
allowguest=no
;soft-phone-925
;regexten=925
916
regexten=916
[707]
regexten=7075023078
type=friend
context=from-phones
host=dynamic
secret=
;regexten=1003
dtmfmode=auto
disallow=all
allow=ulaw
allowguest=no
extensions.conf
[general]
static=yes
writeprotect=no
clearglobalvars=no
[from-twilio]
exten => _+1NXXNXXXXXX,1,NoOp(Dialing TWILIO from ${CALLERID(all)} to ${EXTEN} with DID ${DID})
exten => _+1NXXNXXXXXX,n,Dial(SIP/${EXTEN})
exten => _XXX,n,Dial(SIP/${EXTEN})
same => n,Hangup
[from-phones]
exten => _NXXNXXXXXX,1,NoOp(Dialing out from ${CALLERID(all)} to ${EXTEN} with DID ${DID})
exten => _NXXNXXXXXX,n,Dial(SIP/twilio0/+1${EXTEN})
; test
exten => _XXX,n,Dial(SIP/${EXTEN})
exten => 707,1,NoOp()
same => n,Dial(SIP/twilio0/+1${EXTEN})
same => n,Hangup
exten => 415,1,NoOp()
same => n,Dial(SIP/twilio0/+1${EXTEN})
same => n,Hangup
exten => 667,1,NoOp()
same => n,Dial(SIP/twilio0/+1${EXTEN})
same => n,Hangup
[from-phones-internal]
exten => _XXX,1,NoOp(Dialing out from ${CALLERID(all)} to ${EXTEN} with DID ${DID})
exten => _XXX,n,Dial(SIP/${EXTEN})
Thanks in advance for your time