[Freeswitch-users] Socket inbound or outbound with PHP?
Anthony Minessale
anthony.minessale at gmail.com
Thu Oct 23 06:07:24 PDT 2008
On Thu, Oct 23, 2008 at 6:45 AM, Dennis <odermann at googlemail.com> wrote:
> 2008/10/22 Anthony Minessale <anthony.minessale at gmail.com>:
>
> > event socket has the command sendmsg which lets you send a message to a
> > specific channel. This can be any message but the one you are familiar
> with
> > is the one that tells the session to execute an application. Think of it
> as
> > you are sending an instant message to the channel saying, please execute
> > this dialplan application.
> > The caveat to this is that it will only listen to you if you have first
> > parked the call which is a mutual agreement between you and the call that
> > you are allowed to control it. The outbound event socket to your program
> > explicitly puts the call into park and the originated sessions that
> execute
> > park also fall into this category.
>
> If you talk about "event socket", do you mean "event socket inbound",
> "event socket outbound" or both?
> When I use sendmsg <uuid> in socket outbound to handle the current
> process, everything works fine (I do not even need the uuid). But it
> does not help to use sendmsg <uuid> to send commands to other
> processes, although I know the uuid of the target.
>
What messages do you want to send? Be Specific.
Like i said you CANNOT blindly call sendmsg on any channel that was not
first parked to indicate you should be controlling it.
Also like I already said, if you open a new inbound event socket connection
and isssue "myevents <uuid>"
it is identical to as if that was an outbound event socket from the desired
channel. It's new in latest trunk.
Probably if you explain *exactly* what you want to accomplish there is some
simple way to do it.
Don't fret about the difference between inbound and outbound there is no
difference besides you cant control calls that
were not in park.
>
> It could be so easy (for me), if sendmsg would work to control another
> process and not just the current or api would be able to send the same
> commands as sendmsg...
>
I'll tell you what, i'll lift that restriction in latest trunk and you tell
me if it breaks anything or if it makes your life
easier since it's not really doing much but protecting you from yourself. So
with latest code you can use your one socket
to send messages to the other leg too.
>
> It seems as if I HAVE to use event socket inbound if I want to be able
> to send a playback command from one process or leg to the other.
>
> Or do I have to use event socket inbound AND socket event outbound? So
> that fs connects to one PHP script and another PHP script connects to
> the fs?
> You wrote: "you can call inbound to event_socket and once
> authenticated you can issue the command myevents <uuid>". This seems
> to tell me, that I have to connect to the fs, right?
>
> _______________________________________________
> 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
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081023/9ac155e1/attachment-0002.html
More information about the FreeSWITCH-users
mailing list