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@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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.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