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

Jamie McClelland jm at mayfirst.org
Mon Sep 2 10:13:55 MSD 2013

On Sun Sep 01, Stanislav Sinyagin wrote:
> 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

Thanks for the pointer. I was able to get the digits with the onDtmf
event, but eventually I finally found a cleaner solution. The
onCommandExecuteComplete returns the variable specified in the read (or
play_and_get_digits) command, but with 'variable_' prepended (using the
eventsocket python implementation, if your variable is foobar, you get a
dictionary with a key variable_foobar, e.g ev['variable_foobar']).

thanks for the help!

May First/People Link
Growing networks to build a just world

OpenPGP Key: http://current.workingdirectory.net/pages/identity/ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130902/968e04f6/attachment.bin 

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