<p>Shloime Rosenblum has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18541">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_agi: Evaluate dialplan functions and variables in agi exec<br><br>Improve agi exec to evaluate dialplan functions and<br>variables in agi exec this can be usefull to SAYFILES<br>in Playback and Read.<br><br>ASTERISK-30058 #close<br><br>Change-Id: I669991f540496e7bddd096fec82b52c083036832<br>---<br>M res/res_agi.c<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/41/18541/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_agi.c b/res/res_agi.c</span><br><span>index 339a15d..6643ba6 100644</span><br><span>--- a/res/res_agi.c</span><br><span>+++ b/res/res_agi.c</span><br><span>@@ -3121,6 +3121,7 @@</span><br><span> {</span><br><span> int res, workaround;</span><br><span> struct ast_app *app_to_exec;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_str *data_with_var;</span><br><span> </span><br><span> if (argc < 2)</span><br><span> return RESULT_SHOWUSAGE;</span><br><span>@@ -3133,7 +3134,8 @@</span><br><span> ast_set_flag(ast_channel_flags(chan), AST_FLAG_DISABLE_WORKAROUNDS);</span><br><span> }</span><br><span> ast_channel_unlock(chan);</span><br><span style="color: hsl(0, 100%, 40%);">- res = pbx_exec(chan, app_to_exec, argc == 2 ? "" : argv[2]);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_str_substitute_variables(&data_with_var, 0, chan, argv[2]);</span><br><span style="color: hsl(120, 100%, 40%);">+ res = pbx_exec(chan, app_to_exec, argc == 2 ? "" : ast_str_buffer(data_with_var));</span><br><span> if (!workaround) {</span><br><span> ast_channel_clear_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18541">change 18541</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18541"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I669991f540496e7bddd096fec82b52c083036832 </div>
<div style="display:none"> Gerrit-Change-Number: 18541 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Shloime Rosenblum <shloimerosenblum@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>