Busy here on asterisk 13

hello

i would like when a calee reject the call asterisk dont re call
my context “principe is call with channel”
exten => _0[23456789].,1,dial(SIP/gsm1/1${EXTEN})
exten => _0[23456789].,n,dial(SIP/gsm2/2${EXTEN})
exten => _0[23456789].,n,dial(SIP/gsm3/3${EXTEN})
exten => _0[23456789].,n,Hangup()
how can i do this plz hlp

Check ${HANGUPCAUSE} for the value 17.

hi
i would like
like call status if busy do somthing “like dialstatus” for outbound
Thks

DIALSTATUS is wrote only to Asterisk itself and basically just a summary of HANGUPCAUSE. It doesn’t do anything other then provide information for your dialplan code (HANGUPCAUSE. As such, I don’t understand your latest respohse.

If you are asking how to write code conditional on either of these, please see the sample configuration file. This is is not the place for free tutoring on basics like that. and nor is it a service for providing free custom code.

Try this
exten => _0[23456789].,1,dial(SIP/gsm1/1${EXTEN})
exten => _0[23456789].,n,GotoIf($["${HANGUPCAUSE}" = “17”]?dial1)
exten => _0[23456789].,n,Hangup()
exten => _0[23456789].,n(dial1),dial(SIP/gsm2/2${EXTEN})
exten => _0[23456789].,n,GotoIf($["${HANGUPCAUSE}" = “17”]?dial2)
exten => _0[23456789].,n,Hangup()
exten => _0[23456789].,n(dial2),dial(SIP/gsm3/3${EXTEN})
exten => _0[23456789].,n,Hangup()

read this

may be this will help you

I think you got the test upside down.

my idea if Dial receive Busy code 17 , goto second trunk marker (dial1).
If return code is different from 17 Hangup()

The OP wants “busy here” to stop the call. I think he is assuming other failures are network related. Your code only tries calling through the other SIMs if it does get “busy here”.

(You can also do it in significantly fewer lines.)

I just noticed the reference to Asterisk 13. Although what I’ve said is true of Asterisk 1.6, or even earlier, Asterisk 13, is no longer supported, not even for security fixes.

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