On Thu, Jun 5, 2008 at 6:57 PM, Lenz <[EMAIL PROTECTED]> wrote:
>
> 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.
>

Hi,

add g flag to Dial app, that way Dial will continue to next priority
when ANSWERED but called party hanged up. However if caller will hang
up, channel will jump to h extension.

Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to