try running the "linger" command. that tells FS to not disconnect when the channel hangs up and instead wait for you to disconnect. On Wed, Jun 23, 2010 at 3:26 AM, Helmut Kuper <helmut.kuper@ewetel.de>wrote:
Hi again,
I added now an inbound esl socket back to FS through which I execute the originate command. And this way it works. When caller hang up during originate ringing I get the HANGUP event and I can uuid_kill the originate session. :)
hmmm... So bgapi originate seems so stick with the channel's outbound socket when it is called via outbound socket.
regards helmut
On 23.06.2010 08:57, Helmut Kuper wrote:
Hi Michael,
On 22.06.2010 20:41, Michael Collins wrote:
On Tue, Jun 22, 2010 at 11:34 AM, Helmut Kuper <helmut.kuper@ewetel.de wrote:
Hi,
hm well, yes, indeed that works, too. Maybe even better.
But I still have the problem of a hanging command which doesn't comes back until timeout, answer, cancel, ... on callee's side.
Which command doesn't come back? I'm assuming you mean the "originate" itself and not the bgapi. I don't see how you can avoid a "hang" while you wait for the 2nd channel (the callee) to be contacted since you have to wait for him/her to answer. In any case, this should be quite doable either with api or with bgapi. The difference with bgapi is that you can do other stuff in your script (if you need to) while api will wait for the result of the originate before it returns.
What I currently do is this:
1. caller calls in 2. FS calls my deamon via socket app (async full) 3. Deamon connects the call via ESLconnection 4. executing answer 5. executing playback 6. subscribing to all events 7. originate b-leg via bgapi 9. waiting for events (this is a loop using esl->recvEventsTimed(1000)) 9.1 replaying caller's playback 9.2 checking for caller's Hangup 9.3 checking for esl->connected=false 9.4 checking for b-leg's result (Answer or deny) 9.4.1 bridge both legs 9.4.2 release esl-socket 9.4.3 done
When caller hangs up somewhere after step 7 I got sometimes a HANGUP event but more often nothing. Trying to write into the esl->socket then seems to block until originate has finished.
I guess FS has torn down the socket half way or so in this state.
regards Helmut
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@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@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900