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