Asterisk Busy Signal

Hello all, I have one doubt in configuration in dialplan.

When I receive a call I would like to verify if the extension already on a call. If you are on a call I want to send a busy signal. What is wrong in this configuration ?

my extensions.conf
exten => s-BUSY,1,Busy()
exten => s,1,Answer()
exten => s,2,Dial(${ARG1},30,r)
exten => s,3,Goto(s-${DIALSTATUS},1)
exten => s-CHANUNAVAIL,1,Dial(Local/4444)
exten => _s-.,1,Hangup()

best Regards.


${DIALSTATUS} contains the result of last ‘Dial’ application execution: … DIALSTATUS … ation_Dial … +Variables

You can use it after last ‘Dial’ attempt and do some interesting stuff according to the result.

But you can not use it to understand if some device which is directly connected to your Asterisk (like SIP/phone1) is already used at certain time or not.

You need to use the EXTENSION_STATE function instead.

This was a multi-post, and has been answered on the more correct forum. The problem is not that he isn’t getting a BUSY status, but rather that he has already told the caller that the call has succeeded, by using Answer, and SIP doesn’t let you change your mind once you have done that, not that it says SIP anywhere and not that any other technology allows you to downgrade from answered to busy.