[Freeswitch-users] Message: global name 'varnum' is not defined

Michael Jerris mike at jerris.com
Fri Jun 27 01:29:48 MSD 2014


in the line:

consoleLog("info",varnum) 

you are referencing a variable varnum that you never define


On Jun 26, 2014, at 4:58 PM, Aqs Younas <aqsyounas at gmail.com> wrote:

> when i try to run this python script.
> 
> def handler(session, args):
>         while (session.ready() == True):
>                 session.answer()
>                 number=session.getVariable("caller_id_number")
>                 consoleLog("info",number)
>                 session.setVariable("varnum", "hammer");
>                 consoleLog("info",varnum) 
> 
> i encounter with this message and call is hangup.
> 
> "Message: global name 'varnum' is not defined
> Exception: None"
> 
> Any help in this regard would be much appreciated.
> 
> Thanks.
>                                               
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.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




Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list