<div dir="ltr">Perfect - thanks very much.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 12, 2014 at 3:52 AM, Борисов, Дмитрий <span dir="ltr">&lt;<a href="mailto:bordmi@rarus.ru" target="_blank">bordmi@rarus.ru</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oh, sorry, not <b>io.write(result)</b> but <b>stream:write(result)</b></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2014-12-12 9:59 GMT+03:00 Борисов, Дмитрий <span dir="ltr">&lt;<a href="mailto:bordmi@rarus.ru" target="_blank">bordmi@rarus.ru</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">change<div>return result</div><div>to</div><div>io.write(result)</div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">2014-12-12 0:32 GMT+03:00 Phillip Jones <span dir="ltr">&lt;<a href="mailto:pjintheusa@gmail.com" target="_blank">pjintheusa@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yeah - thanks - I realize I can do that - but it just drives me crazy I can not get in-line expansion to work. I can&#39;t see what I am missing.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 11, 2014 at 3:46 PM, Chad Phillips <span dir="ltr">&lt;<a href="mailto:chad@apartmentlines.com" target="_blank">chad@apartmentlines.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                    how about setting the channel var directly in the script?
                </div><div><br></div><div>session:setVariable(&quot;VUM_SAY_CID&quot;, result);</div><div><br></div><div>although for what you’re doing, i really think there’s a cleaner way to do it straight from the dialplan XML...</div><div><div>
                <div></div>
                 
                <p style="color:#a0a0a8">On Thursday, December 11, 2014 at 1:35 PM, Phillip Jones wrote:</p>
                </div></div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
                    <span><div><div><div><div><div dir="ltr">I am going crazy - please tell me what I am missing:<div><br></div><div>I have a dialplan:</div><div><br></div><div>&lt;action application=&quot;set&quot; data=&quot;VUM_SAY_CID=${lua(util_get10digits.lua ${VUM_Outgoing_CallerID_Number})}&quot; inline=&quot;true&quot;/&gt;<br></div><div><br></div><div><br></div><div>I have a lua script:</div><div><br></div><div><br></div><div><div>freeswitch.consoleLog(&quot;NOTICE&quot;,&quot;util_get10digits.lua \n&quot;)</div><div>freeswitch.consoleLog(&quot;NOTICE&quot;,&quot;Argument passed [&quot; .. argv[1] ..&quot;]\n&quot;)</div><div>local result = &quot;none&quot;<br></div><div><b>result = string.sub(argv[1], -10)</b><br></div><div>freeswitch.consoleLog(&quot;NOTICE&quot;, &quot;Result: [&quot; .. result ..&quot;]\n&quot;)<br></div><div><b>return result</b><br></div></div><div><br></div><div><br></div><div>I run the dialplan:</div><div><br></div><div><div>Dialplan: sofia/Carrier/<a href="mailto:2154791697@64.158.162.74" target="_blank">2154791697@64.158.162.74</a> Action set(VUM_SAY_CID=${lua(util_get10digits.lua ${VUM_Outgoing_CallerID_Number})}) I</div><div>2014-12-11 15:20:21.795274 [NOTICE] switch_cpp.cpp:1328 util_get10digits.lua</div><div>2014-12-11 15:20:21.795274 [NOTICE] switch_cpp.cpp:1328 Argument passed <a href="tel:%5B%2B12154791697" value="+12154791697" target="_blank">[+12154791697</a>]</div><div><b>2014-12-11 15:20:21.795274 [NOTICE] switch_cpp.cpp:1328 Result: <a href="tel:%5B2154791697" value="+12154791697" target="_blank">[2154791697</a>]</b></div><div>2014-12-11 15:20:21.795274 [DEBUG] switch_cpp.cpp:1075 sofia/Carrier/<a href="mailto:2154791697@64.158.162.74" target="_blank">2154791697@64.158.162.74</a> destroy/unlink session from object</div><div>EXECUTE sofia/Carrier/<a href="mailto:2154791697@64.158.162.74" target="_blank">2154791697@64.158.162.74</a> set(VUM_SAY_CID=)</div><div><b>2014-12-11 15:20:21.795274 [DEBUG] mod_dptools.c:1435 sofia/Carrier/<a href="mailto:2154791697@64.158.162.74" target="_blank">2154791697@64.158.162.74</a> SET [VUM_SAY_CID]=[UNDEF]</b></div></div><div><br></div><div><br></div><div>The lua script runs correctly - how ever the result is not returned the VUM_SAY_CID variable in the dialplan</div><div><br></div><div><br></div><div>The work around is to set the session variable in the script. But I wondering what I am missing. Is &quot;return result&quot; not how you return a result from Lua?</div><div><br></div><div><br></div><div>Thanks for any help.</div><div><br></div><div><br></div><div>Phil</div></div>
</div></div></div><div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services: </div><div><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></div><div><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></div><div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div><div><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a></div><div><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></div><div><br></div><div>FreeSWITCH-users mailing list</div><div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></div><div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></div><div><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>
            <br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" target="_blank">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></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" target="_blank">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"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>with best regards,</div><div>Dmitriy Borisov</div></div></div></div></div></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>with best regards,</div><div>Dmitriy Borisov</div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></div><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></div>