[asterisk-users] detecting which party hung up
Lenz
lenz-ml at loway.it
Thu Jun 5 10:57:23 CDT 2008
Hello list,
I have a problem that looks quite simple but I cannot find a way to fix.
I have a Dial() command and want to detect which party of the call hung up
- if it was the caller or the callee.
In the dialplan, I have the folllowing commands...
exten => ....
exten => _9XXX.,n,Dial(${MY_TECH}${MY_NUM}||M(call-answer))
; Trapping call termination here
exten => h,1,NoOp( "Call exiting: status ${GLOBAL(${GM})} DS:
${DIALSTATUS} HU: ${HANGUPCAUSE} " )
I set the ${GLOBAL(${GM})} variable through a macro 'call-answer', and it
works fine for detecting if the call was answered or not (I have other
logic to run at answer time so it fits me okay).
I thought that there would be a way for me to know on the calling channel
if the 'h' was enetered because this channel hung or because the other
bridged party hung, so I tried ${DIALSTATUS} and ${HANGUPCAUSE}, but they
are always the same no matter who hangs up. Am I missing something here?
Thanks
l.
--
Loway Research - Home of QueueMetrics
http://queuemetrics.com
More information about the asterisk-users
mailing list