http://wiki.freeswitch.org/wiki/Talk:Event_Socket http://wiki.freeswitch.org/wiki/Event_Socket On 5/24/07, Anthony Minessale <anthmct@yahoo.com> wrote:
We do have mod_event_socket's "socket" app which is similar to the network based fast-agi (FAGI). This application makes an outbound tcp connection to the specified ip:port and the other end can control the call in similar ways to an agi only the dialect is much different and it supports async operations e.g. telling the call to play foo.wav and getting an immediate return to listen for dtmf as the file plays rather than block till the file is over.
there is an example perl script in tree:
"scripts/socket/sock.pl"
The data syntax from the dialplan is <ip>:<port> [<keywords>]
keywords:
async:
The "async" keyword indicates that all commands will return instantly making it possible to monitor the socket for events etc while the stack of commands are executing.
If the async keyword is absent then all calls will block until the command has finished.
full:
The "full" keyword indicates that the other end will have the full command set for event_socket this is the same command set an inbound connection to event_socket has so you can execute api commands, get global events etc.
If the "full" keyword is absent the command set and events are limited to that paticular call
Here are examples of how to use it in the dialplan.
<action application="socket" data="127.0.0.1:8084"/> <action application="socket" data="127.0.0.1:8084 async"/> <action application="socket" data="127.0.0.1:8084 full"/> <action application="socket" data="127.0.0.1:8084 async full"/>
I think if wasim's angel want's to implement it a good idea is to write it as a separate application and use this interface to control the call then let the forked processes in the remote application provide the AGI emulation.
We have someone working on a C library to use as an event socket library also. but in the meantime there is also a crude C example with no client library but just inline commands in "scripts/socket/socket2me" this small C program demonstrates how you can use the interface to not only control the call but to also request a 2 way media stream and process the data. This application uses spandsp to implement a fax send/recv similar to asterisk's rxfax txfax only over the loopback interface.
/me hopes somone makes a wiki page out of this info =D
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
----- Original Message ---- From: Wasim Baig <wasim@convergence.pk> To: freeswitch-users@lists.freeswitch.org Sent: Thursday, May 24, 2007 7:13:24 AM Subject: Re: [Freeswitch-users] Does FS handle remote NATed phones?
On 5/24/07, Fred <codecomplete@free.fr> wrote:
Hopefully, the AGI interface works the same, so that existing scripts will still work in FS.
nope, not as yet, but i'm convincing an angel to write up a mod_agi that would allow using most if not all of the AGI functions in freeswitch (atleast SetVar and GetVar, if not Dial)
imho thats one of the main bottlenecks for people who have existing asterisk deployments on AGI from switching to FS, lets see if we can get some good news on this shortly
-- wasim h. baig | principal consultant | convergence pk | +92 300 8508070 _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
________________________________ Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org