[Freeswitch-users] ESL: phpmod

Helmut Kuper helmut.kuper at ewetel.de
Wed Jun 23 01:26:49 PDT 2010


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 at 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 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
> 
> 



More information about the FreeSWITCH-users mailing list