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

David Ponzone david.ponzone at gmail.com
Mon Apr 5 16:58:03 PDT 2010


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

Ce message et toutes les pièces jointes sont confidentiels et établis  
à l'intention exclusive de ses destinataires. Toute utilisation ou  
diffusion non autorisée est interdite. Tout message électronique est  
susceptible d'altération. IPeva décline toute responsabilité au  
titre de ce message s'il a été altéré, déformé ou falsifié. Si  
vous n'êtes pas destinataire de ce message, merci de le détruire  
immédiatement et d'avertir l'expéditeur.




Le 05/04/2010 à 17:00, Uzo Uzo a écrit :

> I probably am doing this wrong, but here is what I have.
> I have a bunch of DID's.  I want my lua script to intercept all  
> calls then
> handle them based on which DID was called.
>
> What I have done is create my lua script foo.lua
>
> then in the dialplan/default.xml
>
> I have
> <extension name="mylua">
>  <condition field="destination_number" "expression="^1002$">
>  <action application="lua" data="/usr/local/freeswitch/scripts/ 
> foo.lua"/>
> </condition>
> </extension>
>
> then i forward all my DIDs to extension 1002 at myfreeswitchbox
>
> when I get a call to the DID the lua script intercepts it, is this  
> the best way?
>
> from the lua script,  I can do session:getVariable("caller_id_number")
>
> but that gives me the caller id of the incoming number, which is cool.
> which variable can i examine to get the DID number?
>
> thanks.
>
>
>
>
>
> _______________________________________________
> 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/98aa6b1e/attachment-0001.html 


More information about the FreeSWITCH-users mailing list