Zhang Shukun
2010-May-17 08:46 UTC
[asterisk-users] identify caller hangup or callee hangup?
Hello, you know , when a call setup, either caller hangup first or callee hangup first , the hangupcause will set to 16(means Call Clearing Causes) My question is how could i identify whether the caller or callee hangup the phone first? Best Regards! -- Thanks for your supporting, have a nice day. Sucan
Klaus Darilion
2010-May-17 09:05 UTC
[asterisk-users] identify caller hangup or callee hangup?
Am 17.05.2010 10:46, schrieb Zhang Shukun:> Hello, > > you know , when a call setup, either caller hangup first or callee > hangup first , the hangupcause will set to 16(means Call Clearing > Causes) > > My question is how could i identify whether the caller or callee > hangup the phone first?AFAIK you can not.
Gareth Blades
2010-May-17 09:21 UTC
[asterisk-users] identify caller hangup or callee hangup?
Klaus Darilion wrote:> > Am 17.05.2010 10:46, schrieb Zhang Shukun: >> Hello, >> >> you know , when a call setup, either caller hangup first or callee >> hangup first , the hangupcause will set to 16(means Call Clearing >> Causes) >> >> My question is how could i identify whether the caller or callee >> hangup the phone first? > > AFAIK you can not. >The only way I can think of doing it is that if one end involves the use of ISDN then in the console logs you do get messages like "-- Channel 0/11, span 1 got hangup request, cause 16" but there is no timestamp so it would be tricky matching up to the corresponding call Maybe you can try using the manager interface. The hangup event seems to mention the channel so perhaps this is the one which initiated the hangup http://www.voip-info.org/wiki/view/asterisk+manager+events#HangupEvent
I think You can do this if you use local channel. For example, you do two context AEL example context Incoming { _X. => { ...... Dial(Local/${EXTEN}@Outgoing/n); }; h => { Noop(Hangup in Incoming); } }; context Outgoing { _X. => { .......... Dial(SIP/dd at dd); }; h => { Noop(Hangup in Outgoing); }; }; I think this is must work. I have like so, but use with callout files. Vardan Gareth Blades wrote:> Klaus Darilion wrote: >> >> Am 17.05.2010 10:46, schrieb Zhang Shukun: >>> Hello, >>> >>> you know , when a call setup, either caller hangup first or callee >>> hangup first , the hangupcause will set to 16(means Call Clearing >>> Causes) >>> >>> My question is how could i identify whether the caller or callee >>> hangup the phone first? >> >> AFAIK you can not. >> > The only way I can think of doing it is that if one end involves the use > of ISDN then in the console logs you do get messages like > "-- Channel 0/11, span 1 got hangup request, cause 16" > but there is no timestamp so it would be tricky matching up to the > corresponding call > > Maybe you can try using the manager interface. The hangup event seems to > mention the channel so perhaps this is the one which initiated the hangup > http://www.voip-info.org/wiki/view/asterisk+manager+events#HangupEvent >
Have you looked at Dial's g option ? "*g*: When the called party hangs up, exit to execute more commands in the current context." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100517/c0cd770f/attachment.htm