To make sure that the data you are looking for is even available I recommend adding an info app before calling the Lua script:
<action application="info"/>
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:
http://wiki.freeswitch.org/wiki/Channel_Variables
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")
-MC
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.Sent: Mon, April 5, 2010 12:58:03 PM
Subject: Re: [Freeswitch-users] how do I get my DID number from lua script with session:getvariable
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: david.ponzone at ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org