<div dir="ltr"><div><div>Actually i was setting variable in freeswitch but my python script was treating its on variable that&#39;s why i got this message.<br></div>Resolved the issue by using session.getvariable() in my script.<br>
</div>Anyway thanks for you reply<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 27 June 2014 02:29, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">in the line:<br>
<br>
consoleLog(&quot;info&quot;,varnum)<br>
<br>
you are referencing a variable varnum that you never define<br>
<div><div class="h5"><br>
<br>
On Jun 26, 2014, at 4:58 PM, Aqs Younas &lt;<a href="mailto:aqsyounas@gmail.com">aqsyounas@gmail.com</a>&gt; wrote:<br>
<br>
&gt; when i try to run this python script.<br>
&gt;<br>
&gt; def handler(session, args):<br>
&gt;         while (session.ready() == True):<br>
&gt;                 session.answer()<br>
&gt;                 number=session.getVariable(&quot;caller_id_number&quot;)<br>
&gt;                 consoleLog(&quot;info&quot;,number)<br>
&gt;                 session.setVariable(&quot;varnum&quot;, &quot;hammer&quot;);<br>
&gt;                 consoleLog(&quot;info&quot;,varnum)<br>
&gt;<br>
&gt; i encounter with this message and call is hangup.<br>
&gt;<br>
&gt; &quot;Message: global name &#39;varnum&#39; is not defined<br>
&gt; Exception: None&quot;<br>
&gt;<br>
&gt; Any help in this regard would be much appreciated.<br>
&gt;<br>
&gt; Thanks.<br>
&gt;<br>
</div></div>&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>