Hi guys!
Does anyone have some experience or kind of “best practice” how to configure a failover trunk over PRI networks?
F.e. I have 2 port Dgium card and two PSTN providers, and both of them can handle calls to same destinations, but one of them should be used only if the first provider is out of service.
My only idea is to do some checks in dialplan like:
You will never get CANCEL in that context, as the channel will have gone down.
${HANGUPCAUSE} will give you the ISDN clearing cause code, which is about as much detail as you will get. For technologies other than ISDN, Asterisk will try to generate a code that best matches the native code. Recent versions have mechanisms for finding the native code, for SIP.
Some of your conditions will trigger for all circuits busy, and if that is all you want, simply putting them all in the same group should be enough.
Seems that I’ll have to find all “normal” ${HANGUPCAUSE} values and route call to a backup provider in case ${HANGUPCAUSE} is not equal to “normal” values.