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?
[IVR]
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()