<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head><meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
<style>BODY{font:10pt Tahoma, Verdana, sans-serif}</style></head><body>
<DIV>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.</DIV>
<DIV>&nbsp;</DIV>
<DIV>--Dave</DIV><BR>
<BLOCKQUOTE style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<HR>
<B>From:</B> Gregor Nanger [mailto:gregor@infomedia.si]<BR><B>To:</B> FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org]<BR><B>Sent:</B> Sun, 03 Nov 2013 13:28:53 -0800<BR><B>Subject:</B> [Freeswitch-users] Execute_on_answer and ${strepoch}<BR><BR>
<DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default>One funny "by design" catch.</DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default><BR></DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default>I want to set variable when channel is answered. execute_on_answer is perfect tool for this job. I have:</DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default><BR></DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default><BR></DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default>&lt;action application="set" data="execute_on_answer=set myvariable=${strepoch()}" /&gt;</DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default><BR></DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default>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.&nbsp;</DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default><BR></DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default>Is there a notation to tell FS not to evaluate variable during dialplan parsing?</DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default><BR></DIV>
<DIV style="FONT-FAMILY: 'trebuchet ms',sans-serif" class=gmail_default>Best regards, Gregor</DIV></DIV></BLOCKQUOTE>
<STYLE>
</STYLE>

<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></body></html>