Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] detecting which party hung up


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
lenz-ml at loway.it
Guest





PostPosted: Thu Jun 05, 2008 10:57 am    Post subject: [asterisk-users] detecting which party hung up Reply with quote

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
Back to top
atis at iq-labs.net
Guest





PostPosted: Thu Jun 05, 2008 10:59 am    Post subject: [asterisk-users] detecting which party hung up Reply with quote

On Thu, Jun 5, 2008 at 6:57 PM, Lenz <lenz-ml at loway.it> wrote:
Quote:

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,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services