Hello,
I have a dial plan which uses ${EXTENSION_STATE($EXTEN)} to checking for INUSE or NOT_INUSE and then sends the plan to a label based on a negative match to NOT_INUSE which skips a hangup. Tried many different ways but I get hung up on no matter how I try to skip the hangup. Hoping another set of eyes will catch what I’m doing wrong.
[scott-test-2]
exten => do_playback,1,Answer()
exten => do_playback,n,Wait(0.3)
exten => do_playback,n,Playback(${WhatToPlay})
exten => do_playback,n,Log(NOTICE, Before queue result bbb: ${EXTENSION_STATE($EXTEN)})
;exten => do_playback,n,GotoIf($["${EXTENSION_STATE(614)} = “NOT_INUSE”] ?hang )
exten => do_playback,n,Set(USE=${EXTENSION_STATE($EXTEN)})
;THIS is not working
exten => do_playback,n,GotoIf($["${USE}" != “NOT_INUSE”] ?allgood )
exten => do_playback,n(hang),10,Hangup()
exten => do_playback,n(allgood),Log(NOTICE, Call back queue result: ${USE})
exten => do_playback,n,DIAL(DAHDI/i2/xxxxxxxxx,gT)
;exten => do_playback,n.NoOp(DS INUSE)
Thanks in advance for your time