<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7741">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_followme:  Add a prompt to be read when a call is connected<br><br>This patch adds the ability to configure a prompt which will be read<br>to the "winner" who pressed 1 (or the configured value) and received<br>the call.<br><br>ASTERISK-24372 #close<br><br>Change-Id: I6ec1c6c883347f7d1e1f597189544993c8d65272<br>---<br>M CHANGES<br>M apps/app_followme.c<br>M configs/samples/followme.conf.sample<br>3 files changed, 39 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/CHANGES b/CHANGES<br>index 84483d1..2aa5e58 100644<br>--- a/CHANGES<br>+++ b/CHANGES<br>@@ -12,6 +12,11 @@<br> --- Functionality changes from Asterisk 13.19.0 to Asterisk 13.20.0 ----------<br> ------------------------------------------------------------------------------<br> <br>+app_followme<br>+------------------<br>+ * Added a new prompt, connecting-prompt, which will be played<br>+   (if configured) to the "winner" callee before connecting the call.<br>+<br> res_pjsip<br> ------------------<br>  * Users who are matching endpoints by SIP header need to reevaluate their<br>diff --git a/apps/app_followme.c b/apps/app_followme.c<br>index 16fc044..43b95e7 100644<br>--- a/apps/app_followme.c<br>+++ b/apps/app_followme.c<br>@@ -176,6 +176,7 @@<br>   char plsholdprompt[PATH_MAX];   /*!< Sound prompt name and path */<br>         char statusprompt[PATH_MAX];    /*!< Sound prompt name and path */<br>         char sorryprompt[PATH_MAX];     /*!< Sound prompt name and path */<br>+        char connprompt[PATH_MAX];      /*!< Sound prompt name and path */<br> <br>      AST_LIST_HEAD_NOLOCK(numbers, number) numbers;     /*!< Head of the list of follow-me numbers */<br>   AST_LIST_HEAD_NOLOCK(blnumbers, number) blnumbers; /*!< Head of the list of black-listed numbers */<br>@@ -210,6 +211,7 @@<br>   char plsholdprompt[PATH_MAX];   /*!< Sound prompt name and path */<br>         char statusprompt[PATH_MAX];    /*!< Sound prompt name and path */<br>         char sorryprompt[PATH_MAX];     /*!< Sound prompt name and path */<br>+        char connprompt[PATH_MAX];      /*!< Sound prompt name and path */<br>         struct ast_flags followmeflags;<br> };<br> <br>@@ -274,6 +276,7 @@<br> static char plsholdprompt[PATH_MAX] = "followme/pls-hold-while-try";<br> static char statusprompt[PATH_MAX] = "followme/status";<br> static char sorryprompt[PATH_MAX] = "followme/sorry";<br>+static char connprompt[PATH_MAX] = "";<br> <br> <br> static AST_RWLIST_HEAD_STATIC(followmes, call_followme);<br>@@ -329,6 +332,7 @@<br>  ast_copy_string(f->plsholdprompt, plsholdprompt, sizeof(f->plsholdprompt));<br>     ast_copy_string(f->statusprompt, statusprompt, sizeof(f->statusprompt));<br>        ast_copy_string(f->sorryprompt, sorryprompt, sizeof(f->sorryprompt));<br>+  ast_copy_string(f->connprompt, connprompt, sizeof(f->connprompt));<br>      if (activate) {<br>               f->active = 1;<br>     }<br>@@ -360,7 +364,9 @@<br>                ast_copy_string(f->statusprompt, val, sizeof(f->statusprompt));<br>         else if (!strcasecmp(param, "followme-sorry-prompt") || !strcasecmp(param, "sorry_prompt"))<br>               ast_copy_string(f->sorryprompt, val, sizeof(f->sorryprompt));<br>-  else if (failunknown) {<br>+      else if (!strcasecmp(param, "followme-connecting-prompt") || !strcasecmp(param, "connecting_prompt")) {<br>+          ast_copy_string(f->connprompt, val, sizeof(f->connprompt));<br>+    } else if (failunknown) {<br>             if (linenum >= 0)<br>                  ast_log(LOG_WARNING, "Unknown keyword in profile '%s': %s at line %d of followme.conf\n", f->name, param, linenum);<br>              else<br>@@ -475,6 +481,13 @@<br>    } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "sorry_prompt")) && !ast_strlen_zero(tmpstr)) {<br>                ast_copy_string(sorryprompt, tmpstr, sizeof(sorryprompt));<br>    }<br>+<br>+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "connecting-prompt")) && !ast_strlen_zero(tmpstr)) {<br>+         ast_copy_string(connprompt, tmpstr, sizeof(connprompt));<br>+     } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "connecting_prompt")) && !ast_strlen_zero(tmpstr)) {<br>+          ast_copy_string(connprompt, tmpstr, sizeof(connprompt));<br>+     }<br>+<br> <br>       /* Chug through config file */<br>        while ((cat = ast_category_browse(cfg, cat))) {<br>@@ -1377,6 +1390,7 @@<br>        ast_copy_string(targs->plsholdprompt, f->plsholdprompt, sizeof(targs->plsholdprompt));<br>       ast_copy_string(targs->statusprompt, f->statusprompt, sizeof(targs->statusprompt));<br>  ast_copy_string(targs->sorryprompt, f->sorryprompt, sizeof(targs->sorryprompt));<br>+    ast_copy_string(targs->connprompt, f->connprompt, sizeof(targs->connprompt));<br>        /* Copy the numbers we're going to use into another list in case the master list should get modified<br>         (and locked) while we're trying to do a follow-me */<br>   AST_LIST_HEAD_INIT_NOLOCK(&targs->cnumbers);<br>@@ -1464,6 +1478,14 @@<br>           res = 0;<br>      } else {<br>              caller = chan;<br>+<br>+            /* Play "connecting" message to the winner, if configured. */<br>+              if (!ast_strlen_zero(targs->connprompt)) {<br>+                        ast_autoservice_start(caller);<br>+                       ast_stream_and_wait(outbound, targs->connprompt, "");<br>+                   ast_autoservice_stop(caller);<br>+                }<br>+<br>          /* Bridge the two channels. */<br> <br>             memset(&config, 0, sizeof(config));<br>diff --git a/configs/samples/followme.conf.sample b/configs/samples/followme.conf.sample<br>index be301f1..eb12cbd 100644<br>--- a/configs/samples/followme.conf.sample<br>+++ b/configs/samples/followme.conf.sample<br>@@ -34,7 +34,11 @@<br> sorry_prompt=>followme/sorry<br> ; The global default for 'I'm sorry, but we were unable to locate your party' message.<br> ;<br>-;<br>+connecting_prompt=><br>+; The global default sound file name for 'Please say hello to the caller' message.<br>+; Setting to an empty string skips playing the prompt.  The default is no prompt<br>+; file name.<br>+<br> [default]<br> musicclass=>default<br> ; The moh class that should be used for the caller while they are waiting to be connected.<br>@@ -87,3 +91,9 @@<br> sorry_prompt=>followme/sorry<br> ; The 'I'm sorry, but we were unable to locate your party' message prompt. Default<br> ; is the global default.<br>+;<br>+connecting_prompt=><br>+; The sound file name for 'Please say hello to the caller' message. Default is the<br>+; global default.<br>+;<br>+<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7741">change 7741</a>. To unsubscribe, 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/7741"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I6ec1c6c883347f7d1e1f597189544993c8d65272 </div>
<div style="display:none"> Gerrit-Change-Number: 7741 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Graham Mainwaring <graham@mhn.org> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>