]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
apps/app_dial: Set the DIALSTATUS to NOANSWER on privacy option 5 21/3821/1
authorMatt Jordan <mjordan@digium.com>
Sat, 3 Sep 2016 21:02:37 +0000 (16:02 -0500)
committerMatt Jordan <mjordan@digium.com>
Sat, 3 Sep 2016 21:02:37 +0000 (16:02 -0500)
If the callee selects option '5' using the Dial application's privacy
(P) option, the DIALSTATUS is erroneously set to ANSWER. This option
reflects the callee sending the caller to VoiceMail one time; the call
is definitely *not* ANSWERed in such a scenario. With this patch, the
DIALSTATUS is instead set to NOANSWER, which is the same DIALSTATUS that
is set when the 'send to VoiceMail every time' option is set.

ASTERISK-25691

Change-Id: Iaf0c9f0fa00545e7366443875e2bb7d9a89a1358

apps/app_dial.c

index c2484a2f3f1437cc1acda9218098dd11a5ee360e..de6fe1852dbd81dc3f56eef047d882bd749a8ce0 100644 (file)
@@ -1914,9 +1914,10 @@ static int do_privacy(struct ast_channel *chan, struct ast_channel *peer,
                ast_copy_string(pa->status, "DONTCALL", sizeof(pa->status));
                break;
        case '5':
-               /* XXX should we set status to DENY ? */
-               if (ast_test_flag64(opts, OPT_PRIVACY))
+               if (ast_test_flag64(opts, OPT_PRIVACY)) {
+                       ast_copy_string(pa->status, "NOANSWER", sizeof(pa->status));
                        break;
+               }
                /* if not privacy, then 5 is the same as "default" case */
        default: /* bad input or -1 if failure to start autoservice */
                /* well, if the user messes up, ... he had his chance... What Is The Best Thing To Do?  */