To make sure that the data you are looking for is even available I recommend adding an info app before calling the Lua script:<br><action application="info"/><br><br>Watch the console and it will spit out a bunch of information. Find the data field that contains the information you seek. Check out this page for more information on the different channel variables:<br>
<a href="http://wiki.freeswitch.org/wiki/Channel_Variables">http://wiki.freeswitch.org/wiki/Channel_Variables</a><br><br>Once you know which channel var has the data you're looking for then it's easy to get it with session:getVariable("var_name")<br>
<br>-MC<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 12:55 PM, Uzo Uzo <span dir="ltr"><<a href="mailto:uzoechi@yahoo.com">uzoechi@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div style="font-family: 'times new roman','new york',times,serif; font-size: 12pt;"><div>I placed the script in the public context and tried that, but it shows nothing. In the default context, it will show 1002. But in public, it shows nothing. </div>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> David Ponzone <<a href="mailto:david.ponzone@gmail.com" target="_blank">david.ponzone@gmail.com</a>><br>
<b><span style="font-weight: bold;">To:</span></b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a></font></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<font face="Tahoma" size="2"><b><span style="font-weight: bold;">Sent:</span></b> Mon, April 5, 2010 12:58:03 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] how do I get my DID number from lua script<span style="white-space: pre;">        </span>with session:getvariable<br>
</font><br><span style="font-family: 'Times New Roman'; font-size: medium;"><pre>try rdnis
But you could put your lua script in your public context, where the
calls are handled first.
I dont really see the point to do that in default.
David Ponzone Direction Technique
email: <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">david.ponzone at ipeva.fr</a><span>
tel: 01 74 03 18 97
gsm: 06 66 98 76 34
Service Client IPeva
tel: 0811 46 26 26
<a href="http://www.ipeva.fr" target="_blank">www.ipeva.fr</a> - <a href="http://www.ipeva-studio.com" target="_blank">www.ipeva-studio.com</a></span></pre></span>
</div></div><div></div>
</div><br>
</div><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>
<br></blockquote></div><br>