Open mguerrieri opened 7 years ago
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?
Of course, I would love to be wrong on this if we can figure out what the issue is.
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.
I've just tested this and it seems to work. I'll keep this issue open while we test at $dayJob.
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.
Never mind- user error. Seeing the COMPLETE event now.
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.
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:notifications@github.com] Sent: Tuesday, September 20, 2016 4:52 AM To: danbarua/NEventSocket NEventSocket@noreply.github.com Cc: Mark Guerrieri mguerrieri@jmbtech.net; Author author@noreply.github.com 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
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.