[Freeswitch-users] ESL: phpmod
Sergey Okhapkin
sos at sokhapkin.dyndns.org
Tue Jun 22 12:02:49 PDT 2010
Do not use async "bg" commands. Use their sync counterparts. Anyway you need
to complete one command before issuing the next one.
What you are doing now looks like event-based GUI window programming style.
Switch your mind to procedural-style actions sequence programing model which
is more suitable for the task you need to accomplish.
On Tuesday 22 June 2010, Helmut Kuper 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.
>
> I need to have two channels controlled. The originating caller channel
> and the 2nd channel originated by my deamon. I have to playback some
> files to caller while searching for a free callee. Once callee has
> answered the call the deamon bridges both channels.
>
> On 22.06.2010 20:02, Sergey Okhapkin wrote:
> > Why not analyze the return code of "api" call? Without events loop?
> >
> > On Tuesday 22 June 2010, Helmut Kuper wrote:
> >> Hi Sergey,
> >>
> >> On 22.06.2010 18:14, Sergey Okhapkin wrote:
> >>> What is the reason to use "bgapi" instead of "api"? Your code just
> >>> waits for the connection completion.
> >>
> >> Well, bgapi allows my code *not* to wait until originate connected or
> >> fails. Instead I want to get events about connect or failure...
> >>
> >>> Also you code doesn't take into account that the connection could fail
> >>> for some reason.
> >>
> >> yes, I know, the code sippet is only for demonstrating the problem.
> >>
> >>
> >> 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