Detect sip busy

Hello folks,
I have a problem with incoming calls. I have several external lines connected to my asterisk and it’s dial to internal peer 99. The problem is if first call coming from one external line and is connected to peer 99 and another call coming from other external line, it dosen’t give busy tone but free tone.
I tried to detect status of SIP/99 but it dosen’t working
What’s wrong with my config?


exten => _X.,1,NoOP(CALL_NUMBER${CALLERID(all)})
exten => _X.,2,Set({CALLERID(number)}="123456") exten => _X.,3,Background(intro) exten => _X.,4,Ringing exten => _X.,5,Wait(2) exten => _X.,6,ExecIf(["${DEVICE_STATE(SIP/99)}" = “INUSE” ]?busy:dial)
exten => _X.,n(dial),Dial(SIP/99)
exten => _X.,n(busy),Busy(10)
exten => _X.,n,Hangup()

You need this option uncommenting in sip.conf:

;callcounter = yes              ; Enable call counters on devices. This can be set per
                                ; device too.

For future reference the forum software effectively requires you to mark all configuration and log file extracts as preformatted, using the </> button. This is a long standing bug which trips up nearly every new poster.

1 Like

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