<div dir="ltr"><div>Hi Jim,<br><br></div>get the variables from the session:<br><br><a href="https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:getVariable">https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:getVariable</a><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 30, 2015 at 10:21 PM, Jim Lynch <span dir="ltr"><<a href="mailto:jim@k4gvo.com" target="_blank">jim@k4gvo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a line in my dialplan that looks like this:<br>
<action application="lua" data="cid.lua ${caller_id_name}<br>
${caller_id_number}" /><br>
<br>
However when the program is executed and the caller_id_name has a space<br>
in it, the number gets lost.<br>
I can't figure out a way to add delimiters that get passed to the<br>
shell. None of these work:<br>
<br>
<action application="lua" data="cid.lua \"${caller_id_name}\"<br>
\"${caller_id_number}\"" /><br>
or<br>
<action application="lua" data="cid.lua ''${caller_id_name}''<br>
''${caller_id_number}''" /><br>
or<br>
<action application="lua" data="cid.lua \"\"${caller_id_name}\"\"<br>
\"\"${caller_id_number}\"\"" /><br>
<br>
None of those work. The quotes are all stripped off when running this test<br>
<br>
lua file:<br>
tmp_file = "/tmp/cidtest.txt";<br>
local file = assert(io.open(tmp_file, "a"));<br>
local m_name=argv[1];<br>
local m_number=argv[2];<br>
file:write("j cid is ",m_name," number is ",m_number,"\n");<br>
<br>
Any suggestions?<br>
<br>
Thanks,<br>
Jim.<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Sincerely,<br><br>Giovanni Maruzzelli<br>Cell : +39-347-2665618<br></div>
</div>