<div dir="ltr">Without seeing logs and all that it's hard to know exactly what's going on, however could you try doing an export as opposed to a set and see if your custom variable shows up where you want?<br><br>-MC<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 3, 2015 at 10:12 PM, David Villasmil Govea <span dir="ltr"><<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Update:<div><br></div><div>I execute 2 scripts.</div><div><br></div><div>I set an execute_on_answer lua script (lua2), and execute another (lua1).</div><div>like so:</div><div><br></div><div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">        </span><extension name="wholesale" continue="true"></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                </span><condition field="destination_number" expression="^1.*$"></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span><action application="info"/></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span><action application="set" data="hangup_after_bridge=false"/><br></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span><action application="set" data="execute_on_answer=lua lua2"/></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span><action application="log" data="INFO EXECUTING SCRIPT NOW"/></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span><action application="lua" data="lua1"/></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span><action application="hangup" data="NORMAL_CLEARING"/></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                </span></condition></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">        </span></extension></font></div></div><div><br></div><div><br></div><div>Now, the lua1 executes, i set a variable "custom_dur" which is the duration for the call.</div><div>When lua3 executes on answer, the variable custom_duration is still there, no problems. Then I transfer the call to "9999", which is:</div><div><br></div><div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">        </span><extension name="9999"></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                </span><condition field="destination_number" expression="^9999$"></font></div><div><span style="font-family:monospace,monospace;font-size:x-small;white-space:pre-wrap">                        </span><span style="font-family:monospace,monospace;font-size:x-small"><action application="lua" data="lua3"/></span><br></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span><action application="hangup" data="NORMAL_CLEARING"/></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">                </span></condition></font></div><div><font size="1" face="monospace, monospace"><span style="white-space:pre-wrap">        </span></extension></font></div></div><div><br></div><div>Now, on lua3 I try to get the variable and it's not there anymore!</div><div><br></div><div>I also tried the following: On lua1 I create a new variable, which is seen on ALL scripts, including lua3, but I reset it to a new value on lua2, and on lua3 I don't see the change!! The variable is still the value I set on lua1!!! wth??</div><div><br></div><div>Am I missing something on variables??</div><div><br></div><div>Thanks a lot,</div><div><br></div><div>David</div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 4, 2015 at 3:30 AM, David Villasmil Govea <span dir="ltr"><<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Guys,<div><br></div><div>I have this lus script, which sets a custom variable, this is ok.</div><div>The the call is transferred to another extension, and the variable is not there anymore, is this by design?</div><div><br></div><div>Thanks!</div><div><br></div><div>David<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div>DVG<br><br>-- <br>Imagination is more important than knowledge<br>Albert Einstein</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>DVG<br><br>-- <br>Imagination is more important than knowledge<br>Albert Einstein</div>
</div>
</div></div><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>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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>