<p>Shloime Rosenblum has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16519">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">apps/app_playback.c: Add 'mix' option to app_playback<br><br>I am adding a mix option that will play by filename and say.conf unlike<br>say option that will only play with say.conf. It<br>will look on the format of the name, if it is like say it play with<br>say.conf if not it will play the file name.<br><br>ASTERISK-29662<br><br>Change-Id: I815816916a308f0fa8f165140dc15772dcbd547a<br>---<br>M apps/app_playback.c<br>1 file changed, 16 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/19/16519/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_playback.c b/apps/app_playback.c</span><br><span>index 0c9281a..045934d 100644</span><br><span>--- a/apps/app_playback.c</span><br><span>+++ b/apps/app_playback.c</span><br><span>@@ -62,6 +62,12 @@</span><br><span> be answered before the sound is played.</para></span><br><span> <note><para>Not all channel types support playing messages while still on hook.</para></note></span><br><span> </option></span><br><span style="color: hsl(120, 100%, 40%);">+ <option name="say"></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>Play using the say.conf file.</para></span><br><span style="color: hsl(120, 100%, 40%);">+ </option></span><br><span style="color: hsl(120, 100%, 40%);">+ <option name="mix"></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>Play using a mix of filename and the say.conf file.</para></span><br><span style="color: hsl(120, 100%, 40%);">+ </option></span><br><span> </optionlist></span><br><span> </parameter></span><br><span> </syntax></span><br><span>@@ -446,6 +452,7 @@</span><br><span> char *tmp;</span><br><span> int option_skip=0;</span><br><span> int option_say=0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int option_mix=0;</span><br><span> int option_noanswer = 0;</span><br><span> </span><br><span> AST_DECLARE_APP_ARGS(args,</span><br><span>@@ -466,6 +473,8 @@</span><br><span> option_skip = 1;</span><br><span> if (strcasestr(args.options, "say"))</span><br><span> option_say = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (strcasestr(args.options, "mix"))</span><br><span style="color: hsl(120, 100%, 40%);">+ option_mix = 1;</span><br><span> if (strcasestr(args.options, "noanswer"))</span><br><span> option_noanswer = 1;</span><br><span> }</span><br><span>@@ -486,7 +495,13 @@</span><br><span> while (!res && (front = strsep(&back, "&"))) {</span><br><span> if (option_say)</span><br><span> res = say_full(chan, front, "", ast_channel_language(chan), NULL, -1, -1);</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(120, 100%, 40%);">+ else if (option_mix){</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Check if it is in say format but not remote audio file */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (strcasestr(front, ":") && !strcasestr(front, "://"))</span><br><span style="color: hsl(120, 100%, 40%);">+ res = say_full(chan, front, "", ast_channel_language(chan), NULL, -1, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ res = ast_streamfile(chan, front, ast_channel_language(chan));</span><br><span style="color: hsl(120, 100%, 40%);">+ } else</span><br><span> res = ast_streamfile(chan, front, ast_channel_language(chan));</span><br><span> if (!res) {</span><br><span> res = ast_waitstream(chan, "");</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16519">change 16519</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/+/16519"/><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: I815816916a308f0fa8f165140dc15772dcbd547a </div>
<div style="display:none"> Gerrit-Change-Number: 16519 </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>