Asterisk Dialing Plan

Hello We are using Vicidial version 2.6-381a with Asterisk 1.4.44-VICI, I am trying to set up my dialplan entry so we can call out from Canada to Irland and Trinidad, our current Dialplan allow us to call only witin north america but not outside,
Here I have the country and area codes that need to be called out from Canada
Irland 353-287-xxx-xxxx
Trinidad 868-788-xxxx

Here I have my Dailplan that i have made up to call out but no luck can someone please guide me correct dialplan please

exten => _9353NXXXXXXXXX,1,AGI(agi://
exten => _91868NXXXXXX,1,AGI(agi://
exten => _9353NXXXXXXXXX,2,Dial(SIP/${EXTEN:1}@modulis-outbound2)
exten => _91868NXXXXXX,2,Dial(SIP/${EXTEN:1}@modulis-outbound2)
exten => _9353NXXXXXXXXX,3,Hangup
exten => _91868NXXXXXX,3,Hangup

Here is the call_log but no luck (last 4 digits of phone number being modified to xxxx)

[Nov 1 13:48:07] == Using SIP RTP CoS mark 5
[Nov 1 13:48:07] -- Executing [1868788xxxx@defaultlog:1] AGI("SIP/298-00017de5", "agi-NVA_recording.agi,BOTH------Y---Y---Y") in new stack
[Nov 1 13:48:07] -- Launched AGI Script /usr/share/asterisk/agi-bin/agi-NVA_recording.agi
[Nov 1 13:48:07] -- AGI Script Executing Application: (Monitor) Options: (wav,/var/spool/asterisk/monitor/MIX/20171101134807_298_1868788xxxx)
[Nov 1 13:48:07] -- <SIP/298-00017de5>AGI Script agi-NVA_recording.agi completed, returning 0
[Nov 1 13:48:07] -- Executing [1868788xxxx@defaultlog:2] Goto("SIP/298-00017de5", "default,1868788xxxx,1") in new stack
[Nov 1 13:48:07] -- Goto (default,1868788xxxx,1)
[Nov 1 13:48:07] -- Executing [1868788xxxx@default:1] Dial("SIP/298-00017de5", "SIP/1868788xxxx@nexco-outbound,,To") in new stack
[Nov 1 13:48:07] == Using SIP RTP CoS mark 5
[Nov 1 13:48:07] -- Called SIP/1868788xxxx@nexco-outbound
[Nov 1 13:48:07] -- SIP/nexco-outbound-00017de6 answered SIP/298-00017de5
[Nov 1 13:48:07] > 0x7f4ae821a087 -- Probation passed - setting RTP source address to
[Nov 1 13:48:07] > 0x7f4ae80ca542 -- Probation passed - setting RTP source address to
[Nov 1 13:48:37] -- Executing [h@default:1] AGI("SIP/298-00017de5", "agi://") in new stack
[Nov 1 13:48:37] -- <SIP/298-00017de5>AGI Script agi:// ... -30-----30 completed, returning 0
[Nov 1 13:48:37] == Spawn extension (default, 1868788xxxx, 1) exited non-zero on 'SIP/298-00017de5'
Yasir ArfatJunior System AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Yasir ArfatJunior System AdministratorAuthor Commented:
Here is the answer i found and it worked for me
Recommended options that worked for me is just enter the code below in to your outbound carrier dial plan settings in vicidial by substituting the carrier name in my case it is nexco-outbound, also i have mentioned the overseas route 011 and country code 353 this just to narrow down the outbound calls to specific country to make it enable for worldwide you can substitute _011353. with  _011NXXXXXXXXXXX,
exten => _011353.,1,Dial(SIP/${EXTEN}@nexco-outbound)

Please try it with "011" exit code and dial prefix "9" in campaign setting and after that without exit code.

Just for testing purpose use this one (but only for testing purposes because its not safe to allow all extensions, e.g. fraud, hack):

with campaign dial prefix "9":
exten => _9.,1,AGI(agi://
exten => _9.,2,Dial(SIP/${EXTEN:1}@modulis-outbound2)
exten => _9.,3,Hangup

or without prefix or "X" in campaign setting:
exten => _X.,1,AGI(agi://
exten => _X.,2,Dial(SIP/${EXTEN}@modulis-outbound2)
exten => _X.,3,Hangup

dial something like: "011 353 087721xxxx" or other combinations only "353 087721xxxx" and so on.
Now look if there is a connection and send us your asterisk CLI log.


solution below may also help some users depending on their asterisk dial plan settings
On the basis of default prefix "9" and not necessary to dial "011" (US exit code) in conjunction with your voip provider your dialplan could look like this (no guarantee ):
For calling to Trinidad there should be also the country code prefix "1" which is missing here (+1868) ?

exten => _9353NXXXXXXXXX,1,AGI(agi://
exten => _91868NXXXXXX,1,AGI(agi://
exten => _9353NXXXXXXXXX,2,Dial(SIP/${EXTEN:1}@modulis-outbound2)
exten => _91868NXXXXXX,2,Dial(SIP/${EXTEN:1}@modulis-outbound2)
exten => _9353NXXXXXXXXX,3,Hangup
exten => _91868NXXXXXX,3,Hangup

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.