NEventSocket icon indicating copy to clipboard operation
NEventSocket copied to clipboard

ChannelHangupComplete event

Open mguerrieri opened this issue 9 years ago • 8 comments

I would like to propose that a HangupCompleteCallback handler be added to the Channel API, moving the Dispose() call here from the HangupCallback() handler. The reason being, in my particular application I need to log CDR data from within the app, and this data is presented during the ChannelHangupComplete event. Unfortunately, as currently coded, the channel is disposed when the ChannelHangup event is detected which causes the channel to be disposed before the ChannelHangupComplete event can be handled.

mguerrieri avatar Sep 18 '16 07:09 mguerrieri

Hi,

We're not entirely clear on the scenarios where this occurs, but certainly in my testing I've found that I never received the CHANNEL_HANGUP_COMPLETE event reliably, which is why I use CHANNEL_HANGUP instead.

Related #52

http://lists.freeswitch.org/pipermail/freeswitch-users/2014-January/102397.html http://lists.freeswitch.org/pipermail/freeswitch-users/2013-June/096224.html

is it possible to use a dedicated InboundSocket to do the CDR logging, or is this intertwined with your call flow logic?

danbarua avatar Sep 18 '16 09:09 danbarua

Of course, I would love to be wrong on this if we can figure out what the issue is.

danbarua avatar Sep 18 '16 22:09 danbarua

Well I probably could use an inbound socket- I have one open for originating calls. But I will do some testing and see if I can find scenarios where the COMPLETE event doesn't arrive. Given that the FreeSWITCH docs all indicate that handling CDR via ESL should be done by handling this even, you would hope that the even is actually sent consistently.

mguerrieri avatar Sep 19 '16 00:09 mguerrieri

I've just tested this and it seems to work. I'll keep this issue open while we test at $dayJob.

danbarua avatar Sep 19 '16 09:09 danbarua

Hmm... in my testing it does NOT seem to work- I am not seeing the COMPLETE event on the outbound socket regardless of whether I drop the call from FS or the remote end.

mguerrieri avatar Sep 20 '16 07:09 mguerrieri

Never mind- user error. Seeing the COMPLETE event now.

mguerrieri avatar Sep 20 '16 07:09 mguerrieri

Would you mind sharing what the user error was? There's at least myself and one other who've had a similar experience with the COMPLETE event.

danbarua avatar Sep 20 '16 08:09 danbarua

Was working off a local copy of the source and applied your changes manually, but missed the line in the change subscribed to the COMPLETE event. Once I added that, I received the COMPLETE event in all of my tests (few as they were…)

From: Dan Barua [mailto:[email protected]] Sent: Tuesday, September 20, 2016 4:52 AM To: danbarua/NEventSocket [email protected] Cc: Mark Guerrieri [email protected]; Author [email protected] Subject: Re: [danbarua/NEventSocket] ChannelHangupComplete event (#60)

Would you mind sharing what the user error was? There's at least myself and one other who've had a similar experience with the COMPLETE event.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danbarua/NEventSocket/issues/60#issuecomment-248242679 , or mute the thread https://github.com/notifications/unsubscribe-auth/AEGPVQlE_JVW5GHL-lccPTmRNxZS7ebTks5qr56rgaJpZM4J_1Pj . https://github.com/notifications/beacon/AEGPVWrzP7Pl3q2nKwYeRbIZlrfCbun8ks5qr56rgaJpZM4J_1Pj.gif

mguerrieri avatar Sep 20 '16 09:09 mguerrieri