[Freeswitch-users] Message: global name 'varnum' is not defined
Aqs Younas
aqsyounas at gmail.com
Fri Jun 27 01:35:58 MSD 2014
Actually i was setting variable in freeswitch but my python script was
treating its on variable that's why i got this message.
Resolved the issue by using session.getvariable() in my script.
Anyway thanks for you reply
On 27 June 2014 02:29, Michael Jerris <mike at jerris.com> wrote:
> 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
>
>
> _________________________________________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140627/ce2c223f/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list