Execute_on_answer and ${strepoch}
One funny "by design" catch. I want to set variable when channel is answered. execute_on_answer is perfect tool for this job. I have: <action application="set" data="execute_on_answer=set myvariable=${strepoch()}" /> Everything is working, except that ${strepoch()} is evaluated during dialplan parsing, not when on answer command is executed. So I get time when diaplan is processed, not when user pickups. Is there a notation to tell FS not to evaluate variable during dialplan parsing? Best regards, Gregor
Rather then doing the set as the DP action, you can have it execut a script, that sets the var, or execute_extension from the dialplan that does it. That way the eval will be done at execute time. --Dave _____ From: Gregor Nanger [mailto:gregor@infomedia.si] To: FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org] Sent: Sun, 03 Nov 2013 13:28:53 -0800 Subject: [Freeswitch-users] Execute_on_answer and ${strepoch} One funny "by design" catch. I want to set variable when channel is answered. execute_on_answer is perfect tool for this job. I have: <action application="set" data="execute_on_answer=set myvariable=${strepoch()}" /> Everything is working, except that ${strepoch()} is evaluated during dialplan parsing, not when on answer command is executed. So I get time when diaplan is processed, not when user pickups. Is there a notation to tell FS not to evaluate variable during dialplan parsing? Best regards, Gregor
Possibly more to the point - the channel already has the answer time in the timetables. -Yossi On 11/03/2013 03:55 PM, Dave R. Kompel wrote:
Rather then doing the set as the DP action, you can have it execut a script, that sets the var, or execute_extension from the dialplan that does it. That way the eval will be done at execute time. --Dave
------------------------------------------------------------------------ *From:* Gregor Nanger [mailto:gregor@infomedia.si] *To:* FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org] *Sent:* Sun, 03 Nov 2013 13:28:53 -0800 *Subject:* [Freeswitch-users] Execute_on_answer and ${strepoch}
One funny "by design" catch.
I want to set variable when channel is answered. execute_on_answer is perfect tool for this job. I have:
<action application="set" data="execute_on_answer=set myvariable=${strepoch()}" />
Everything is working, except that ${strepoch()} is evaluated during dialplan parsing, not when on answer command is executed. So I get time when diaplan is processed, not when user pickups.
Is there a notation to tell FS not to evaluate variable during dialplan parsing?
Best regards, Gregor
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Yes, Dave. I solved it with mod_managed and create app that I call it on execute_on_answer. Just wanted to know if there is some catch to formulate variable so that FS is not evaluating it on dialplan parsing. Thank you, Yosii. I know that channel has answer time, but I have more complicated scenario and I need this functionality to execute something on answer. --Gregor 2013/11/3 I put the Who? in Mishehu <mishehu@freeswitch.org>
Possibly more to the point - the channel already has the answer time in the timetables.
-Yossi
On 11/03/2013 03:55 PM, Dave R. Kompel wrote:
Rather then doing the set as the DP action, you can have it execut a script, that sets the var, or execute_extension from the dialplan that does it. That way the eval will be done at execute time.
--Dave
------------------------------ *From:* Gregor Nanger [mailto:gregor@infomedia.si <gregor@infomedia.si>] *To:* FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org<freeswitch-users@lists.freeswitch.org> ] *Sent:* Sun, 03 Nov 2013 13:28:53 -0800 *Subject:* [Freeswitch-users] Execute_on_answer and ${strepoch}
One funny "by design" catch.
I want to set variable when channel is answered. execute_on_answer is perfect tool for this job. I have:
<action application="set" data="execute_on_answer=set myvariable=${strepoch()}" />
Everything is working, except that ${strepoch()} is evaluated during dialplan parsing, not when on answer command is executed. So I get time when diaplan is processed, not when user pickups.
Is there a notation to tell FS not to evaluate variable during dialplan parsing?
Best regards, Gregor
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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 (3)
-
Dave R. Kompel
-
Gregor Nanger
-
I put the Who? in Mishehu