From: Sean Bright Date: Sat, 11 Jan 2020 13:29:46 +0000 (-0500) Subject: app_queue: Deprecate the QueueMemberPause.Reason field X-Git-Tag: 18.0.0-rc1~255^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9522390a697591cc960a5bc0ffd3d66fcdcb6a25;p=thirdparty%2Fasterisk.git app_queue: Deprecate the QueueMemberPause.Reason field The QueueMemberPause AMI event includes two fields that return the reason a member was paused. * In release branches, deprecate Reason in favor of PausedReason. * In master, remove the Reason field entirely. ASTERISK-28349 #close Reported by: Niksa Baldun Change-Id: I01da58f2b0ab927baeee754870f62b51b7b3d296 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index a0cb1f7a7f..8cb3e32fa6 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1145,9 +1145,6 @@ Raised when a member is paused/unpaused in the queue. - - The reason a member was paused. - PauseQueueMember @@ -7448,7 +7445,7 @@ static int change_priority_caller_on_queue(const char *queuename, const char *ca } -static int publish_queue_member_pause(struct call_queue *q, struct member *member, const char *reason) +static int publish_queue_member_pause(struct call_queue *q, struct member *member) { struct ast_json *json_blob = queue_member_blob_create(q, member); @@ -7456,10 +7453,6 @@ static int publish_queue_member_pause(struct call_queue *q, struct member *membe return -1; } - if (!ast_strlen_zero(reason)) { - ast_json_object_set(json_blob, "Reason", ast_json_string_create(reason)); - } - queue_publish_member_blob(queue_member_pause_type(), json_blob); return 0; @@ -7520,7 +7513,7 @@ static void set_queue_member_pause(struct call_queue *q, struct member *mem, con ast_queue_log(q->name, "NONE", mem->membername, (paused ? "PAUSE" : "UNPAUSE"), "%s", S_OR(reason, "")); - publish_queue_member_pause(q, mem, reason); + publish_queue_member_pause(q, mem); } static int set_member_paused(const char *queuename, const char *interface, const char *reason, int paused) diff --git a/doc/UPGRADE-staging/app_queue_remove_reason.txt b/doc/UPGRADE-staging/app_queue_remove_reason.txt new file mode 100644 index 0000000000..e333e2ce83 --- /dev/null +++ b/doc/UPGRADE-staging/app_queue_remove_reason.txt @@ -0,0 +1,5 @@ +Subject: app_queue +Master-Only: True + +The 'Reason' header in the QueueMemberPause AMI Event has been +removed. The 'PausedReason' header should be used instead.