[Freeswitch-users] lua custom variables
Michael Jerris
mike at jerris.com
Tue Jan 6 22:37:53 MSK 2015
Prevent different sessions being different?
> On Jan 6, 2015, at 1:07 PM, David Villasmil Govea <david.villasmil at gmail.com> wrote:
>
> Is it possible to prevent this?
>
> On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike at jerris.com <mailto:mike at jerris.com>> wrote:
> sounds like the second time its executing on a different session
>
>> On Jan 4, 2015, at 9:01 PM, David Villasmil Govea <david.villasmil at gmail.com <mailto:david.villasmil at gmail.com>> wrote:
>>
>> Hello guys,
>>
>> Any help with this?
>>
>> Thanks
>>
>> David
>>
>> On Sun, Jan 4, 2015 at 7:12 AM, David Villasmil Govea <david.villasmil at gmail.com <mailto:david.villasmil at gmail.com>> wrote:
>> Update:
>>
>> I execute 2 scripts.
>>
>> I set an execute_on_answer lua script (lua2), and execute another (lua1).
>> like so:
>>
>> <extension name="wholesale" continue="true">
>> <condition field="destination_number" expression="^1.*$">
>> <action application="info"/>
>> <action application="set" data="hangup_after_bridge=false"/>
>> <action application="set" data="execute_on_answer=lua lua2"/>
>> <action application="log" data="INFO EXECUTING SCRIPT NOW"/>
>> <action application="lua" data="lua1"/>
>> <action application="hangup" data="NORMAL_CLEARING"/>
>> </condition>
>> </extension>
>>
>>
>> Now, the lua1 executes, i set a variable "custom_dur" which is the duration for the call.
>> When lua3 executes on answer, the variable custom_duration is still there, no problems. Then I transfer the call to "9999", which is:
>>
>> <extension name="9999">
>> <condition field="destination_number" expression="^9999$">
>> <action application="lua" data="lua3"/>
>> <action application="hangup" data="NORMAL_CLEARING"/>
>> </condition>
>> </extension>
>>
>> Now, on lua3 I try to get the variable and it's not there anymore!
>>
>> 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??
>>
>> Am I missing something on variables??
>> On Sun, Jan 4, 2015 at 3:30 AM, David Villasmil Govea <david.villasmil at gmail.com <mailto:david.villasmil at gmail.com>> wrote:
>> Hello Guys,
>>
>> I have this lus script, which sets a custom variable, this is ok.
>> The the call is transferred to another extension, and the variable is not there anymore, is this by design?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150106/28822a5b/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list