[Freeswitch-users] Socket inbound or outbound with PHP?

Anthony Minessale anthony.minessale at gmail.com
Wed Oct 22 09:00:55 PDT 2008


You have to learn and understand the terminology and structure.

FSAPI is the name of the interface that allows the registration of arbitrary
commands which can be executed by cli, xml-rpc and event socket, they are
not tied to a specific channel at all.

APPLICATION is the name of the interface that provides applications to be
executed by individual calls
they are designed with the concept that you have a channel and you want to
make the channel do something these are the things you execute in the
dialplan in the <action> tags.

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.

the "api" event socket command is a way to execute FSAPI commands from the
socket (anything you can type from the cli like "show channels")  There are
several FSAPI commands that can manipulate calls but rather than sending
them a message to execte some app you are specifiying the uuid to gain acces
to the channel in order to carry out your command.  Most of these commands
begin with uuid_ so there are things like
uuid_bridge, uuid_kill, uuid_transfer etc.

So in short, the answer is, yes, it's because you only started last week.
Everything you want to be able to do is there for you you just have to shift
your paradigm or as like Doc Brown likes to say "learn to think 4th
dimensionally!"


You may find it useful to join irc irc.freenode.net #freeswitch or use the
applet on our homeage by looking for the chat login box on the right side of
the page towards the bottom.  There are over one hundered people in there
who can offer advice etc.










On Wed, Oct 22, 2008 at 10:23 AM, Dennis <odermann at googlemail.com> wrote:

> Ahh, help, I found something out about my question and would like to
> know, if I am really in trouble...
> The problem is, when one does not read every single word.
>
> Till now I always worked with socket outbound and a PHP script, which
> forks the different processes. Everything seemed to work great (in my
> little test environment) and I am at the point, where I could do most
> if not all of the things I wanted to do with fs.
>
> Today I made an originate over api, passed the inbound uuid to the
> outbound and could control different things - I also could bridge both
> calls. Great, I thought. Then I wanted to start the next little test:
> Start a playfile from the outbound, so that the inbound can hear it...
> Negative!
> It seems to be impossible to send a playfile or hangup (and more) over
> api. Both command seem only to be available with sendmsg. But sendmsg
> <uuid> does not work with socket outbound, at least not from the
> outbound to the inbound.
>
> show application and show api tell a lot and I do know, when I stopped
> thinking :-( Perhaps my mistakes came up, because I started to use fs
> one and a half week ago - I don't know.
>
> So do I have to switch completely to socket inbound or is there a way
> to continue using socket outbound? Or will I perhaps find out, that I
> can not do some things with socket inbound, which I could do with
> socket outbound?
>
> In the moment I just do not know which way to go...
>
> Dennis
>
> _______________________________________________
> 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/20081022/fae1236d/attachment-0002.html 


More information about the FreeSWITCH-users mailing list