Trunk sequence logic

Hello,
On the same outbound route, if i have a trunk sequence with two Trunks, when asterisk Will use the second trunk? It Will use the second trunk if It receive “480 Temporary unavailable” from sip trunk? Which error should receive asterisk to make It choose the next trunk on trunk sequence?

I’m pretty sure that it uses ${HANGUPCAUSE}, which is the ISDN nearest equivalent of the SIP status and will try the next trunk for all causes that don’t imply the call failed at the final destination, so it is more a question of which values will abort the hunt over the trunks.

How can i see the hangup cause?

Depending on what your provider returns, try allowing ‘continue if busy’ in the trunk.

You should see a line in the log that looks something like this:

[2020-07-23 10:23:32] VERBOSE[12926][C-0000002a] pbx.c: Executing [[email protected]:35] NoOp("PJSIP/204-0000002e", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack

Can i choose when asterisk should try to the next trunk?
The sip trunk i use does not forward correctly the errors, for example if a Number Is busy, It send me 480 Temporary not available hangup cause 41 . I want that asterisk use the second trunk only of the First has max channel =used outbound channels

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.