Busy number will continue call on another trunk

Hi All,

My outbound route having 2 trunk to make call. When 1 trunk is out of service, then will use another trunk to call out. My problem now is when I call to cell phone with this outbound route, cell phone not answer the call and it will automatically use another trunk to call again. how can I stop this continue call on another trunk when cell phone busy or not answer the call?

How about on trunk setting parameter “Continue if Busy “

Normally the next trunk is only tried upon a trunk being ‘Congested’ in some form, or unavailable. Checking this box will force a failed call to always continue to the next configured trunk or destination even when the channel reports BUSY or INVALID NUMBER.

I has been disable this check box, but the call still will call on another trunk. my outbound route as below.

[outrt-1] ; outside
include => outrt-1-custom
exten => _.,1,Macro(user-callerid,LIMIT,EXTERNAL,)
exten => _.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _.,n,Set(_NODEST=)
exten => _.,n,Gosub(sub-record-check,s,1(out,${EXTEN},))
exten => _.,n,Macro(dialout-trunk,3,${EXTEN},off)
exten => _.,n,Macro(dialout-trunk,2,${EXTEN},off)
exten => _.,n,Macro(outisbusy,)

this is my dialout-trunk context.

You need to determine what status the first trunk is reporting on the failed call.
At the Asterisk command prompt, type
pjsip set logger on
for a pjsip trunk or
sip set debug on
for a chan_sip trunk.
If the trunk is something else, provide details.

Make a failing call, paste the Asterisk log for the call (which will now include a SIP trace) at pastebin.freepbx.org and post the link here.


Line 95:
-- Got SIP response 406 "Not Acceptable" back from
Your first trunk appears to be a local GSM gateway that sent an unusual status code, which Asterisk is interpreting as a trunk failure.

If this number were called from a normal landline or mobile, what would happen (goes to voicemail, announcement from carrier, busy signal, etc.)?

Possibly, there is a configuration setting in the gateway that would send a 486 or other normal status for this call. Post details of gateway make/model.

If it can’t be fixed in the gateway, but you never get 406 on calls that should be retried on another trunk, you could add a little custom dialplan that detects the 406 and treats it as busy.

There may be more useful info in the SIP trace, but that somehow did not appear in your log. When you type
sip set debug on
at the Asterisk command prompt, there should be a
SIP Debugging enabled
response. Did you see that?

yes. the message is the SIM card provider pass to my GSM gateway and GSM gateway pass to my PABX sip response 406. I have try to switch the 2nd trunk as 1st priority ( other SIP provider company), it will pass the message SIP response 500 “Internal Server Error” back from XXXX and then use another trunk to call again also.

how can we hard code this response code 406 and 500 as no answer call in my dial plan?

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