Page 1 of 1

route unreacheable calls to backup

PostPosted: Tue Dec 12, 2017 10:12 am
by ed123
Hi,

What is the right dial prefix for those calls tag as unreacheable by primary voip and should route to secondary voip?




VERSION: 2.14-617a
BUILD: 170529-2320
© 2017 ViciDial Group

Re: route unreacheable calls to backup

PostPosted: Tue Dec 12, 2017 10:25 am
by williamconley
that depends entirely on your dialplan entries. some methods just put a second "dial" line in the dialplan entry for simplicity.

Code: Select all
exten=>_91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten=>_91NXXNXXXXXX,n,Dial(${CARRIER1}/${EXTEN:1},,To)
exten=>_91NXXNXXXXXX,n,Dial(${CARRIER2}/${EXTEN:1},,To)
exten=>_91NXXNXXXXXX,n,Hangup


Note that if the call is answered in the first "dial" entry, it will never reach the second dial entry.

Re: route unreacheable calls to backup

PostPosted: Wed Dec 13, 2017 10:12 am
by ed123
Hi,

Thanks for the reply, so if carrier 1 return like unreacheable number the call will route to carrier 2 right?

Re: route unreacheable calls to backup

PostPosted: Wed Dec 13, 2017 11:02 am
by williamconley
ed123 wrote:Hi,

Thanks for the reply, so if carrier 1 return like unreacheable number the call will route to carrier 2 right?

"route to" is an interesting description. But there is no call to route. Only an "Invite" which won't be a call until someone answers.

How about "if the Dial Attempt at carrier 1 fails (for any reason), the next thing that happens will be a Dial Attempt at carrier 2".

Re: route unreacheable calls to backup

PostPosted: Wed Dec 13, 2017 6:32 pm
by blackbird2306
There is another possible way to define more precisely, when to use the next/failover carrier. Because the above dialplan would call next carrier even when there is a simple e.g. "BUSY":
Code: Select all
exten =>_91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten =>_91NXXNXXXXXX,n,Dial(${CARRIER1}/${EXTEN:1},,To)
exten =>_91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}"="CHANUNAVAIL"|"${DIALSTATUS}"="CONGESTION"|"${HANGUPCAUSE}"="19"|"${HANGUPCAUSE}"="34"]?fail:end)
exten =>_91NXXNXXXXXX,n(fail),Dial(${CARRIER2}/${EXTEN:1},,To)
exten =>_91NXXNXXXXXX,n(end),Hangup

Re: route unreacheable calls to backup

PostPosted: Wed Dec 13, 2017 6:59 pm
by williamconley
There are many ways. Many of which have been posted on this forum in the past (and various other Asterisk forums as well).

But the question is this:

If you call and get a busy signal with one carrier, and then you call and get a busy signal with another carrier and Vicidial receives "Busy" and you don't get charged ... why do you care that the "busy" happened twice?

The client was not bothered. Vicidial load was not notably impacted (seriously: negligible load). You were not billed. Where's the problem? (food for thought.) 8-)

Re: route unreacheable calls to backup

PostPosted: Wed Dec 13, 2017 8:43 pm
by blackbird2306
Why you should start another "busy" call, when it's possible to prevent it? People sometimes don't want to talk to the agent and reject the call, then your carrier will also send "BUSY" signal. So you call the same number twice without a break and it does annoy the customer just more. Further you will increase your short-call rate with the second carrier (it's always the second "trash" carrier, with almost zero chance for answer), which might be billed well. Maybe the load is negligible, but there is a preventable small impact 8)

Re: route unreacheable calls to backup

PostPosted: Wed Dec 13, 2017 9:00 pm
by williamconley
Then I strongly suggest you hone your likely formidable Google Skills and find those other methods. Many of them have been posted here which allow branching based on each possible outcome. Certainly possible to micromanage those calls.

Our clients usually use failover for "rejected by carrier" calls.

When using a seriously cheap carrier for their primary, that carrier will often refuse certain types of calls ... so a failure from the primary carrier is usually due to rejection. This is useful for those whose daily carrier invoice is astronomical (every penny counts, so cheapest carrier wins ... until they reject a call and then we go to the more expensive "connect all calls" carriers).

Re: route unreacheable calls to backup

PostPosted: Wed Dec 13, 2017 9:42 pm
by blackbird2306
Thank you for your statement. Maybe I'm not a pro like you, but I'm here for help and not to stand your unfriendliness. However you should filter at least "BUSY" out

Re: route unreacheable calls to backup

PostPosted: Thu Dec 14, 2017 3:17 am
by ed123
Hi Guys,

Thanks for your inputs, I will take note of that,

@William,

something like this would be fine.

How about "if the Dial Attempt at carrier 1 fails (for any reason), the next thing that happens will be a Dial Attempt at carrier 2".

this one right?
exten=>_91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten=>_91NXXNXXXXXX,n,Dial(${CARRIER1}/${EXTEN:1},,To)
exten=>_91NXXNXXXXXX,n,Dial(${CARRIER2}/${EXTEN:1},,To)
exten=>_91NXXNXXXXXX,n,Hangup