How to get ANSWER status by DIALSTATUS?
[macro-dial]
exten => s,1,Dial(${ARG1},’ ',g)
exten => s,n,NoOp(${DIALSTATUS})
exten => s,n,Hangup()
I can get BUSY or NOANSWER STATUS but i cannot get ANSWER. func NoOp dont work when two phone connected.
Thanks a lot
‘’ isn’t a valid timeout value.
You will only get an ANSWER status when the call completes, and only if it is cleared by the second party. The actual call runs inside the Dial application.
can I run application when 2 phone connected? Example : del DB(VIP/${EXTEN}) when 2 phone connected
core show application dial
You can run a macro (deprecated), run a subroutine, or have both sides go to different dialplan sections (from where they can call Bridge to complete the connection).
@ David : Thanks a lot. I insert application on Dial. Dial(SIP/${EXTEN},20,M(x)). M(x) runs when answered. But i want to get CANCEL status, M(x) still runs ?
Thanks
No. You will have to do that after the call ends.
exten => s,n,Set(DB(VIP/${CALLNUMBER})=${CALLERID(num)})
exten => s,n,Dial(${ARG1},20,M(delDB,${CALLNUMBER}))
exten => s,n,Dbdel(VIP/${CALLNUMBER}) ; Don’t run
exten => s,n,Hangup()
[macro-delDB]
exten => s,1,Dbdel(VIP/${ARG1})
M(x) don’t run when caller cancel ?
Only the h extension runs when the caller cancels.
thanks a lot. try to use h extension
how to use h extension in this cases? Thanks.