Sonny Rajagopalan
2015-Dec-02 14:00 UTC
[asterisk-users] Issues with Twilio number incoming call and context matching
Hello, I am running Asterisk 13.6.0 in an AWS instance, and I set it up with Twilio SIP trunk using pjsip_wizard.conf (nice feature!). I see that the calls actually "reach" the PBX, but for some reason, they are not caught by any of my extensions context. Here's what I observe when I test this from a non-PBX connected E164 number (a landline), say 555-666-1212. My Twilio number is 777-555-1212 Situation 1: ========extensions.conf: [from-external] exten => _.,1,Log(WARNING, TWILIO) [from-internal] ... Calling 555-666-1212 to Twilio number 777-555-1212: On Asterisk CLI (core set debug on, logger set level WARNING on): No logs at all. Call just ends. No friendly message saying why it will hangup. Situation 2: ==========extensions.conf: [from-external] exten => 17775551212,1,Log(WARNING, TWILIO) same => n,Hangup() On Asterisk CLI: Call from 'from-twilio' (UDP:mysillyapp.pstn.twilio.com:5060) to extension '+17775551212' rejected because extension not found in context 'from-external'. However, clearly, the extension is there (in extensions.conf). The call hangs up, but with Twilio's "The number you dialed is not a working number...." message. What am I missing here? How do I fix this issue with the call not being "caught" with my extensions.conf? Any help is appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151202/fff6f6ef/attachment.html>
Annus Fictus
2015-Dec-02 14:23 UTC
[asterisk-users] Issues with Twilio number incoming call and context matching
Hello, try to change: exten => 17775551212,1,Log(WARNING, TWILIO) same => n,Hangup() with: exten => +17775551212,1,Log(WARNING, TWILIO) same => n,Hangup() Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151202/60bdba4c/attachment.html>
Sonny Rajagopalan
2015-Dec-02 15:22 UTC
[asterisk-users] Issues with Twilio number incoming call and context matching
Yes, I have tried that too (i.e, exten => +17775551212,1,Log(WARNING, TWILIO)). It does not work and NO error message in CLI. I have also tried http://orourketech.com/elastix-plus-sign-caller-id-messing-things/ since I first emailed this group, but that does not seem to work either. Here is my log: [Dec 2 15:09:28] NOTICE[26464]: res_pjsip_session.c:1920 new_invite: Call from 'from-twilio' (UDP:mysillyApp.pstn.twilio.com:5060) to extension '+17775551212' rejected because extension not found in context 'from-twilio-remove-plus'. [Dec 2 15:09:29] NOTICE[26464]: res_pjsip_session.c:1920 new_invite: Call from 'from-twilio' (UDP:mysillyApp.pstn.twilio.com:5060) to extension '+17775551212' rejected because extension not found in context 'from-twilio-remove-plus'. ip-xxxx*CLI> dialplan show from-twilio-remove-plus [ Context 'from-twilio-remove-plus' created by 'pbx_config' ] '_[+1]XXXXXXXXXX' => 1. GotoIf($["${CALLERID(num):0:2}" !"+1"]?noplusatstart) [pbx_config] 2. Log(WARNING,TWILIO) [pbx_config] 3. Set(CALLERID(num)=${CALLERID(num):1}) [pbx_config] [noplusatstart] 4. Goto(from-external,${EXTEN},1) [pbx_config] ip-xxxx*CLI> dialplan show from-external [ Context 'from-external' created by 'pbx_config' ] '17775551212' => 1. Log(WARNING,TWILIO) [pbx_config] 2. Hangup() [pbx_config] On Wed, Dec 2, 2015 at 9:23 AM, Annus Fictus <annusfictus at gmail.com> wrote:> Hello, > > try to change: > > exten => 17775551212,1,Log(WARNING, TWILIO) > same => n,Hangup() > > with: > > exten => +17775551212,1,Log(WARNING, TWILIO) > same => n,Hangup() > > Regards > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151202/ec69db20/attachment.html>
Amit Patkar
2015-Dec-03 05:23 UTC
[asterisk-users] Issues with Twilio number incoming call and context matching
Hi Your extensions.conf should have +17775551212 extension and not 17775551212 Add + sign before your number. This should solve your issue. [from-external] exten => +17775551212,1,Log(WARNING, TWILIO) same => n,Hangup() *Thanks & Regards,* Amit Patkar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151203/13e714b4/attachment.html>
Sonny Rajagopalan
2015-Dec-03 15:17 UTC
[asterisk-users] Issues with Twilio number incoming call and context matching
Thanks Annus, Amit. Yes, Amit, the plus sign in front is necessary. I was able to get this to work by changing the codecs that the SIP trunk will use. I had to set up wireshark on my Asterisk instance, gather that it didn't work for a 488 SIP "No acceptable here" message, which led me to discovering the codec problem. On Thu, Dec 3, 2015 at 12:23 AM, Amit Patkar <amit at avhan.com> wrote:> Hi > > Your extensions.conf should have +17775551212 extension and not > 17775551212 > > Add + sign before your number. This should solve your issue. > > [from-external] > exten => +17775551212,1,Log(WARNING, TWILIO) > same => n,Hangup() > > *Thanks & Regards,* > Amit Patkar > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151203/887d34eb/attachment.html>