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? Thanks! David -- DVG -- Imagination is more important than knowledge Albert Einstein
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?? Thanks a lot, David On Sun, Jan 4, 2015 at 3:30 AM, David Villasmil Govea < david.villasmil@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?
Thanks!
David
-- DVG
-- Imagination is more important than knowledge Albert Einstein
-- DVG -- Imagination is more important than knowledge Albert Einstein
Hello guys, Any help with this? Thanks David On Sun, Jan 4, 2015 at 7:12 AM, David Villasmil Govea < david.villasmil@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??
Thanks a lot,
David
On Sun, Jan 4, 2015 at 3:30 AM, David Villasmil Govea < david.villasmil@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?
Thanks!
David
-- DVG
-- Imagination is more important than knowledge Albert Einstein
-- DVG
-- Imagination is more important than knowledge Albert Einstein
-- DVG -- Imagination is more important than knowledge Albert Einstein
sounds like the second time its executing on a different session
On Jan 4, 2015, at 9:01 PM, David Villasmil Govea <david.villasmil@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@gmail.com <mailto:david.villasmil@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@gmail.com <mailto:david.villasmil@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?
Is it possible to prevent this? On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike@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@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@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@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?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Prevent different sessions being different?
On Jan 6, 2015, at 1:07 PM, David Villasmil Govea <david.villasmil@gmail.com> wrote:
Is it possible to prevent this?
On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike@jerris.com <mailto:mike@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@gmail.com <mailto:david.villasmil@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@gmail.com <mailto:david.villasmil@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@gmail.com <mailto:david.villasmil@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?
Yes, why are sessions different? Because they are different scripts?? Do I need to keep everything in one script? On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike@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@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@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@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?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
They are different calls to different destinations?
On Jan 6, 2015, at 2:40 PM, David Villasmil Govea <david.villasmil@gmail.com> wrote:
Yes, why are sessions different? Because they are different scripts?? Do I need to keep everything in one script? On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike@jerris.com <mailto:mike@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@gmail.com <mailto:david.villasmil@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@gmail.com <mailto:david.villasmil@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@gmail.com <mailto:david.villasmil@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?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://confluence.freeswitch.org <http://confluence.freeswitch.org/> http://www.cluecon.com <http://www.cluecon.com/>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org <http://www.freeswitch.org/> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Hello, Not really, no. 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't see the variable set with the answer script. On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike@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@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@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@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?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Why are you doing anything at all to set variables with hangup times, FreeSWITCH does all this for you already, maybe can you step back and tell me exactly what you're trying to accomplish? On Wed, Jan 7, 2015 at 3:45 AM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello,
Not really, no.
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't see the variable set with the answer script. On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike@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@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@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@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?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
What I'm doing is the following: - Receive from A side - Launch a lua to get a destination number, and send the call to the B-side. - When the call is answered, I launch another lua which make a few checks and set a variable with the maximum call duration. It is then transferred, only the b side to an extension. - said extension launches a lua which should use the max call duration to set a sched_hangup and then add the b side to a queue (mod_callcenter) Thanks for your help David On Jan 5, 2015 7:26 PM, "Michael Jerris" <mike@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@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@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@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?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
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? -MC On Sat, Jan 3, 2015 at 10:12 PM, David Villasmil Govea < david.villasmil@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??
Thanks a lot,
David
On Sun, Jan 4, 2015 at 3:30 AM, David Villasmil Govea < david.villasmil@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?
Thanks!
David
-- DVG
-- Imagination is more important than knowledge Albert Einstein
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
participants (4)
-
Brian West
-
David Villasmil Govea
-
Michael Collins
-
Michael Jerris