Author: mjordan
Date: Sun Feb  8 21:12:16 2015
New Revision: 431623

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431623
Log:
res/ari/resource_channels: Add missing 'no_answer' reason to DELETE /channels

One of the canonical reasons for hanging up a channel is because the far end
failed to answer - or because someone else answered, and we want to get rid of
this channel. This patch adds the missing value to the 'reason' query parameter
for the DELETE /channels operation.

Review: https://reviewboard.asterisk.org/r/4400

ASTERISK-24745 #close
Reported by: Ben Merrills
patches:
  add_no_answer_ari_hangup_cause.diff uploaded by Ben Merrills (License 6678)
........

Merged revisions 431622 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/res/ari/resource_channels.c
    trunk/rest-api/api-docs/channels.json

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/ari/resource_channels.c
URL: 
http://svnview.digium.com/svn/asterisk/trunk/res/ari/resource_channels.c?view=diff&rev=431623&r1=431622&r2=431623
==============================================================================
--- trunk/res/ari/resource_channels.c (original)
+++ trunk/res/ari/resource_channels.c Sun Feb  8 21:12:16 2015
@@ -704,6 +704,8 @@
                cause = AST_CAUSE_BUSY;
        } else if (!strcmp(args->reason, "congestion")) {
                cause = AST_CAUSE_CONGESTION;
+       } else if (!strcmp(args->reason, "no_answer")) {
+               cause = AST_CAUSE_NOANSWER;
        } else {
                ast_ari_response_error(
                        response, 400, "Invalid Reason",

Modified: trunk/rest-api/api-docs/channels.json
URL: 
http://svnview.digium.com/svn/asterisk/trunk/rest-api/api-docs/channels.json?view=diff&rev=431623&r1=431622&r2=431623
==============================================================================
--- trunk/rest-api/api-docs/channels.json (original)
+++ trunk/rest-api/api-docs/channels.json Sun Feb  8 21:12:16 2015
@@ -313,7 +313,8 @@
                                                                "values": [
                                                                        
"normal",
                                                                        "busy",
-                                                                       
"congestion"
+                                                                       
"congestion",
+                                                                       
"no_answer"
                                                                ]
                                                        }
                                                }


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to