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