[Freeswitch-users] ESL socket outbound: clean way to close a session?

Anthony Minessale anthony.minessale at gmail.com
Sat Feb 26 01:20:04 MSK 2011


Its not you it's me.

commit 0444626b721fdd3a5400a86883d5668fa8678cd8
Author: Anthony Minessale <anthm at freeswitch.org>
Date:   Fri Feb 25 16:13:16 2011 -0600

There was a bug in the client code introduce when we tried doing clean
shutdown by detecting the disconnect message.
It was necessary to check for the linger content disposition and not
auto-disconnect.

Note, when you update and use this feature, it will be up to you to
disconnect the client when you send the linger command.


On Fri, Feb 25, 2011 at 12:16 PM, Stephen Wilde <wstephen80 at gmail.com> wrote:
> I have problem to clean close an outbound session.
> I'm using the "esl_oop.h/esl_oop.cpp" files and my application is developed
> in c++ and at startup I do a "linger" command.
> My event consuming loop is:
> while (run)
> {
>     ESLevent * event = connection.recvEventTimed(sleeptime);
>
>    ... event processing ...
> }
> This application handle an inbound call (legA), originate an outbound call
> (legB) and bridge the two calls.
> The problem is present when the legA hangup the call: sometimes is received
> the content-type="text/disconnect-notice" (without receiving
> "CHANNEL_HANGUP") and the "recvEventTimed" exits with event=NULL.
> In this case it's not possible to receive any event or send any other
> message to Freeswitch because the "connection.execute" fails.
> In this situation, if I have originated (with '& park') an outbound call,
> this call remain in parked state and the application cannot hangup it.
> What I'm doing wrong?
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



More information about the FreeSWITCH-users mailing list