<p dir="ltr">Hello,</p>
<p dir="ltr">Not really, no.</p>
<p dir="ltr">I receive a call, send it to the b side with a script. When answered another script is launched which does a few checks and transfers it to another extension which then sets the hangup time with a variable set previously with the script launched at answer. Problem is I can&#39;t see the variable set with the answer script.<br>
</p>
<div class="gmail_quote">On Jan 5, 2015 7:26 PM, &quot;Michael Jerris&quot; &lt;<a href="mailto:mike@jerris.com">mike@jerris.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">sounds like the second time its executing on a different session<div><br><div><blockquote type="cite"><div>On Jan 4, 2015, at 9:01 PM, David Villasmil Govea &lt;<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hello guys,<div><br></div><div>Any help with this?</div><div><br></div><div>Thanks</div><div><br></div><div>David</div></div><div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><div class="gmail_quote">On Sun, Jan 4, 2015 at 7:12 AM, David Villasmil Govea<span> </span><span dir="ltr">&lt;<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>&gt;</span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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 face="monospace, monospace" size="1"><span style="white-space:pre-wrap">        </span>&lt;extension name=&quot;wholesale&quot; continue=&quot;true&quot;&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                </span>&lt;condition field=&quot;destination_number&quot; expression=&quot;^1.*$&quot;&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;info&quot;/&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;<br></font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;set&quot; data=&quot;execute_on_answer=lua lua2&quot;/&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;log&quot; data=&quot;INFO EXECUTING SCRIPT NOW&quot;/&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;lua&quot; data=&quot;lua1&quot;/&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;hangup&quot; data=&quot;NORMAL_CLEARING&quot;/&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                </span>&lt;/condition&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">        </span>&lt;/extension&gt;</font></div></div><div><br></div><div><br></div><div>Now, the lua1 executes, i set a variable &quot;custom_dur&quot; 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 &quot;9999&quot;, which is:</div><div><br></div><div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">        </span>&lt;extension name=&quot;9999&quot;&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                </span>&lt;condition field=&quot;destination_number&quot; expression=&quot;^9999$&quot;&gt;</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">&lt;action application=&quot;lua&quot; data=&quot;lua3&quot;/&gt;</span><br></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;hangup&quot; data=&quot;NORMAL_CLEARING&quot;/&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">                </span>&lt;/condition&gt;</font></div><div><font face="monospace, monospace" size="1"><span style="white-space:pre-wrap">        </span>&lt;/extension&gt;</font></div></div><div><br></div><div>Now, on lua3 I try to get the variable and it&#39;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&#39;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>On Sun, Jan 4, 2015 at 3:30 AM, David Villasmil Govea <span dir="ltr">&lt;<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>&gt;</span> wrote:</div></div><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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></blockquote></div></div></div></div></blockquote></div></div></div></blockquote></div><br></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>