[Freeswitch-users] Socket inbound or outbound with PHP?
odermann at googlemail.com
Sat Oct 18 01:50:57 PDT 2008
>> When using socket outbound, freeswitch connects to the PHP-script, the
>> PHP-script forks and is registered to "myevents" (events all seems to
>> give me all events from all connections).
>> One of the problems I have with "outbound" is, that I won't get all
>> events. For example I do not get "hangup", because the socket
>> connection seems to die, before freeswitch sends the last command when
>> hanging up. With "ringing" the problem seems to be the same.
>> I only get a "hangup", when I register to "events all" and have to
>> active calls. When one of the two calls hangs up, i can see it by
>> printing out all events in the PHP-script.
> Good point. I fixed latest release to linger on the socket until you get
> the channel_hangup
> event providing you did "myevents"
Anthony, that is so cool! It works exactly as I whished now. As far as
I can see, I get all needed events thanks to your changes. Thanks a
lot for the great support!
>> Another thing ist the events "heartbeat". Will I get the "heartbeat"
>> for every single call or just one heartbeat for all calls?
> The regular heartbeat event is for the whole system in case you are managing
> a connection
> to several boxes or you want to be sure the box is up.
> There is a per call heartbeat you can enable at a desired interval for calls
> with media flowing through FS.
A per call heartbeat is exactly what I am looking for (as far, as I
get it, when registering to myevents). What does "calls with media
flowing" mean? What makes them different from other calls?
Where can I aktivate a per call heartbeat and where can I set the interval?
A more precise question about inbound/outbound: I want to read out the
events from freeswitch with my PHP-script and then tell freeswitch,
what to do next. I have the feeling, that "outbound" is the way to go.
But of course I also want to be able to start calls. Can I do this by
If I want to start a call without bridging two sides, is "originate"
the command to use? I have problems to understand, when to use
"sendmsg" and when to use "api". Like "bridge" works with "sendmsg"
and "originate" seems only to work with the "api" command.
More information about the FreeSWITCH-users