Dialplan to distribute calls over 2 VOIP carriers

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Dialplan to distribute calls over 2 VOIP carriers

Postby Rubal » Tue Jan 12, 2016 2:32 pm

Hi,

I currently use following ext and dialplan to dial Indian nos.

exten => _32910X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _32910X.,2,Dial(SIP/voip1/${EXTEN:4},,tToR)
exten => _32910X.,3,Hangup

exten => _3291X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _3291X.,2,Dial(SIP/voip1/0${EXTEN:4},,tToR)
exten => _3291X.,3,Hangup

I have one more carrier setup voip2

i want all nos ending 0-4 uses voip1 and all nos ending 5-9 uses voip2. What adjustments do i need to make in dial plan to accomplish this?

Thanks
Rubal
 
Posts: 16
Joined: Mon Jun 27, 2011 2:09 pm

Re: Dialplan to distribute calls over 2 VOIP carriers

Postby rrb555 » Tue Jan 12, 2016 8:15 pm

You should have like ninja like skill to do it. LOL just kidding

what i can see here is change this 32910X. from something like 32910XXXXXXXXX0
X has 9 digits and the last 0 is one for voip 1 (im thinking US 10 digits numbers)
then for the 2nd voip 32910XXXXXXXXX1
One server that I am managing | Single Server | ViciBox Redux 6.0 | VERSION: 2.12-549a | BUILD: 160404-0940 | revision 2508| No other hardware
For help you can send me a direct email info@support.com.ph
rrb555
 
Posts: 585
Joined: Tue Feb 08, 2011 4:24 pm
Location: Quezon City, Philippines

Re: Dialplan to distribute calls over 2 VOIP carriers

Postby striker » Sat Jan 16, 2016 6:48 am

If you know the exact length of the dialling digits then you can mention the last digits in [ ] like below
for eg : if the dialing no is 12 digit (with country code ie 91)

exten => _3191XXXXXXXXX[0-4],1,AGI(agi://127.0.0.1:4577/call_log)
exten => _3191XXXXXXXXX[0-4],2,Dial(SIP/voip1/${EXTEN:4},,tToR)
exten => _3191XXXXXXXXX[0-4],3,Hangup()

exten => _3191XXXXXXXXX[5-9],1,AGI(agi://127.0.0.1:4577/call_log)
exten => _3191XXXXXXXXX[5-9],2,Dial(SIP/voip2/${EXTEN:4},,tToR)
exten => _3191XXXXXXXXX[5-9],3,Hangup(0
www.striker24x7.com www.youtube.com/c/striker24x7 Telegram/skype id : striker24x7
striker
 
Posts: 962
Joined: Sun Jun 06, 2010 10:25 am


Return to Support

Who is online

Users browsing this forum: No registered users and 97 guests