Hello,
I am new to FreePBX. I have tried searching the forums but cannot seem to get the right settings set on my system.
I have a trunk with Twilio for outbound service. Dialing NANP numbers right now works fine. Dialing international numbers is giving the following message in the logs following by “The number you have dialed is not in service.”
-- Executing [1@macro-dialout-trunk:1] Goto("SIP/17976-00000052", "s-INVALIDNMBR,1") in new stack
First, I am in US so the format I am dialing is 011+country code+area code+number. For this test, I am using the Hilton London number of +442074938000. It is being dialed on my handset as the following 011442074938000.
Second, dialing this number on a standard POTS line dials fine using the above number as I wrote it.
Third, My Outbound Routes are as follows:
prepend,prefix,“match pattern”,callerid
,011.,
,1800NXXXXXX,
,1833NXXXXXX,
,1844NXXXXXX,
,1855NXXXXXX,
,1866NXXXXXX,
,1877NXXXXXX,
,1888NXXXXXX,
,1NXXNXXXXXX,
1,NXXNXXXXXX,
Lastly, Twilio requires ALL dialed calls to be in E.164 format. This was fairly easy to accomplish by adding a + in the Outbound Dial Prefix field under Dialed Number Manipulation Field.
This is where I think I have a problem. No matter what I enter for trying to rewrite the 011 rule, it always sends the call to Twilio as follows:
== Spawn extension (from-trunk-sip-TwilioTrunk, 011442074938000, 1) exited non-zero on ‘SIP/TwilioTrunk-0000005b’
– SIP/TwilioTrunk-0000005b Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
– Called SIP/TwilioTrunk/+011442074938000
I have confirmed this by going thru the “Debugger” and the logs in my account. I have added a rule for 011. putting 011 in the prefix, I have tried 011X., 011N., 011[0-9]. all of which don’t drop the 011. Is there something special about the 011 that I haven’t figured out yet? I can’t seem to figure out why some rules appear to work and others don’t.
If I add a rule to match “.” and prepend + and remove + from the Outbound Dial Prefix, it works. But if I add a rule that matches 1NXXNXXXX and prepends + it doesn’t. If I have something set in Outbound Route and I not allowed to modify it under the Trunk?
I’ve beat my ahead against the wall and was hoping someone could offer some assistance.
–
Edit: I uploaded a screenshot of my Dial Manipulation Rules. The ones for 7 and 10 digit work, the one for 011 does not.
Edit 2: Upload showing log from Twilio showing the number they received has 011 and is not formatted correctly. i (dot) imgur (dot) com/7oimK04.png (you’ll have to copy/paste)