[Freeswitch-dev] accessing key presses with outbound event socket

Stanislav Sinyagin ssinyagin at yahoo.com
Mon Sep 2 01:37:02 MSD 2013


why so complicated?
You can launch a Lua or Javascript script when the user is in the call, collect the needed digits, and then you can do all kinds of database lookup if needed. 

If you really need to use the outbound socket, make sure you use the "full" mode -- then you can collect the digits from your event socket application. In this case, you would only need one port, and you would be able to execute the API call to collect the digits:
https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_play_and_get_digits






________________________________
 From: Jamie McClelland <jm at mayfirst.org>
To: freeswitch-dev at lists.freeswitch.org 
Sent: Sunday, September 1, 2013 11:03 PM
Subject: Re: [Freeswitch-dev] accessing key presses with outbound event	socket
 

Hi all,

I'm still curious if it's possible to query a user in an outbound event
soekct, but in the meantime I came up with a work around.

I've configured the event socket application to listen on ports 50,001 -
50,999.

Then, I prompt for the conference number (between 1 and 999) in the
freeswitch configuration (which is trivial) *before* sending the user to
the event socket application. I add 50,000 to the number and then use
that port number when connecting to the event socket application.

The event socket app simply checks what the incoming port is being used,
subtracts 50,000 and set the conference number accordingly.

jamie


On Tue Aug 27, Jamie McClelland wrote:
> Hi all,
> 
> Thanks again for your help in completing our simulataneous
> interpretation system using freeswitch[0].
> 
> I'm now trying to add the ability for users to enter the conference
> number they would like to join.
> 
> I see lots of examples for doing this, but none that are using an
> outbound event socket.
> 
> With event socket, I can capture dtmf digit events *after* the user
> enters the conference call. But I am having trouble first prompting the
> user to enter the conference number and then capturing their output and
> using it to determine which conference room to sent them to.
> 
> I'm using fiorix's python event socket code [1]. So far I've been
> experimenting with the read command[2].
> 
> However, I'm not sure how to retrieve the digits pressed after calling
> this command. Is their a command that can query freeswitch to get the
> value of the variable I set with the read command? 
> 
> Any help would be greatly appreciated.
> 
> jamie
> 
> 0. http://lists.freeswitch.org/pipermail/freeswitch-dev/2013-February/006406.html
> 1. https://github.com/fiorix/eventsocket
> 2. http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_read
> 
> -- 
> May First/People Link
> Growing networks to build a just world
> http://www.mayfirst.org
> https://support.mayfirst.org
> 
> OpenPGP Key: http://current.workingdirectory.net/pages/identity/ 



> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org


-- 
-- 
May First/People Link
Growing networks to build a just world
http://www.mayfirst.org
https://support.mayfirst.org

OpenPGP Key: http://current.workingdirectory.net/pages/identity/ 
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-dev mailing list
FreeSWITCH-dev at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130901/5ac1fa6c/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-dev mailing list