Debian Buster 10
Asterisk 16.2.1~dfsg-1+deb10u2
Twilio Trunk Provider
Hello Everyone,
Anyone who works with Twilio knows that when you build a trunk you build all the settings in that trunk with Elastic SIP Trunking. Then you add phone numbers and each number gets its settings from the trunk profile. Twilio is not being helpful with this whatsoever. All day support emails back and forth and they just dont get it. So I am here in the community asking for a bit of advise (other than dumping Twilio).
I have 1 phone number in my trunk that works perfect 100% of the time. I have a second number that was ported in and said port is status “COMPLETE” with that being said the second number will not work unless it is from another Twilio trunk. ex: Location1–>Asterisk–>Twilio Trunk–>PSTN then back again PSTN–>Twilio Trunk–Asterisk–>Location2 (THIS EXAMPLE WORKS!)
Twilio claims unable to communicate with my SIP infrastructure. However if they are both on the same trunk how is it one number can communicate and the other cannot?
;SANITIZED
[incoming]
;LOCATION TEMP - REMOVE AFTER PORT CONFIRMED - LOOSING CARRIER FORWARDED HERE
exten => +13601111111,1,SipAddHeader(Alert-Info: <Bellcore-dr2>)
same => n,dial(SIP/7302&SIP/7303&SIP/7308&SIP/7305,20,i)
same => n,Dial(SIP/CORPOFFICE_VOIP/4570) ;WORKING LOCATION
same => n,Hangup()
;LOCATION PERMANENT
exten => +13602222222,1,SipAddHeader(Alert-Info: <Bellcore-dr2>)
same => n,dial(SIP/7302&SIP/7303&SIP/7308&SIP/7305,25,i)
same => n,Dial(SIP/CORPOFFICE_VOIP/4570) ;WORKING LOCATION
same => n,Hangup()
This is my trunk setup:
[twilio-trunk](!)
type=peer
context=incoming
canreinivite=no
insecure=port,invite
dtmfmode=rfc2833
[twilio0](twilio-trunk)
host=MyPrivateURI.pstn.umatilla.twilio.com ;Our Termination URI
defaultuser=MyAwesomeUsername
remotesecret=MySuperSecretPassword
; [twilio1](twilio-trunk)
; host=54.172.60.2
; [twilio2](twilio-trunk)
; host=54.172.60.0
; [twilio3](twilio-trunk)
; host=54.172.60.1
; [twilio4](twilio-trunk)
; host=54.172.60.3
; [twilio5](twilio-trunk)
; host=54.172.51.0
; [twilio6](twilio-trunk)
; host=54.172.51.1
; [twilio7](twilio-trunk)
; host=54.172.51.2
; [twilio8](twilio-trunk)
; host=dynamic ;THIS DOESNT SEEM TO WORK CAN SOMEONE CONFIRM?
[twilio9](twilio-trunk)
host=54.244.51.0
[twilio10](twilio-trunk)
host=54.244.51.1
[twilio11](twilio-trunk)
host=54.244.51.2
[twilio12](twilio-trunk)
host=54.244.51.3
Several of the Twilio lines are commented out but they are for regions that we do not have piped into the Asterisk box. I would be willing to just allow everything as in my little test example above and just use the firewall to manage the inbound traffic.