[Freeswitch-users] how do I get my DID number from lua script with session:getvariable

Michael Collins msc at freeswitch.org
Tue Apr 6 13:55:04 PDT 2010


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

On Tue, Apr 6, 2010 at 12:55 PM, Uzo Uzo <uzoechi at yahoo.com> wrote:

> 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.
>
> ------------------------------
> *From:* David Ponzone <david.ponzone at gmail.com>
> *To:* freeswitch-users at lists.freeswitch.org
> *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 <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> tel:      01 74 03 18 97
> gsm:   06 66 98 76 34
>
> Service Client IPeva
> tel:      0811 46 26 26www.ipeva.fr  -   www.ipeva-studio.com
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100406/d572d04a/attachment.html 


More information about the FreeSWITCH-users mailing list