Page 1 of 1

Dialplan to distribute calls over 2 VOIP carriers

PostPosted: Tue Jan 12, 2016 2:32 pm
by Rubal
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

Re: Dialplan to distribute calls over 2 VOIP carriers

PostPosted: Tue Jan 12, 2016 8:15 pm
by rrb555
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

Re: Dialplan to distribute calls over 2 VOIP carriers

PostPosted: Sat Jan 16, 2016 6:48 am
by striker
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