[asterisk-dev] [Code Review] 4101: Channel Originate/Continue via ARI support for labels in dialplan is incomplete

greenfieldtech reviewboard at asterisk.org
Wed Dec 17 04:31:37 CST 2014

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 17, 2014, 10:31 a.m.)

Review request for Asterisk Developers.


**** Disregards previous patch - it was mis-created ****

New patch is now available for this issue. Please note, I've done some preliminary regression testing, however, I would appreciate some more feedback.

This patch is against latest SVN.

To test originate, I've used a vanilla SVN Asterisk, and added the following into the dialplan:

exten => 6000,1,Noop(*** I'm at 1 ****)
same => n,Hangup
same => n(label_1),Noop(*** I'm at label_1 ***)
same => n,Hangup
same => n(label_2),Noop(*** I'm at label_2 ***)
same => n,Hangup
same => n(label_3),Noop(*** I'm at label_3 ***)
same => n,Hangup

Then, using the following HTTP requests, I've tested that each time I reach a different part of the dialplan, in accordance to the specification:

POST http://178.62.XXX.XXX:8088/ari/channels HTTP/1.1
User-Agent: Fiddler
Host: 178.62.XXX.XXX:8088
Content-Length: 71
Authorization: Basic dGVzdDp0ZXN0
Content-type: application/x-www-form-urlencoded

endpoint=Local/500 at demo&extension=6000&context=arimonitor&label=label_2

HTTP/1.1 200 OK
Server: Asterisk/SVN-trunk-r429654M
Date: Wed, 17 Dec 2014 10:22:42 GMT
Cache-Control: no-cache, no-store
Content-type: application/json
Content-Length: 365

  "id": "1418811762.18",
  "name": "Local/500 at demo-00000003;1",
  "state": "Down",
  "caller": {
    "name": "",
    "number": ""
  "connected": {
    "name": "",
    "number": ""
  "accountcode": "",
  "dialplan": {
    "context": "demo",
    "exten": "500",
    "priority": 1
  "creationtime": "2014-12-17T05:22:42.079-0500",
  "language": "en"

Bugs: ASTERISK-24412

Repository: Asterisk


This patch changes the current behavior of ARI, to allow channel originate/continue requests to be performed with labels as the priority, not only integer values.

Diffs (updated)

  /trunk/rest-api/api-docs/channels.json 429672 
  /trunk/res/res_ari_channels.c 429672 
  /trunk/res/ari/resource_channels.c 429672 
  /trunk/res/ari/resource_channels.h 429672 
  /trunk/contrib/asterisk-ng-doxygen 429672 

Diff: https://reviewboard.asterisk.org/r/4101/diff/


Testing was performed by testing the following scenarios:
1. Originating a call to a numeric priority - works
2. Originating a call to a null priority - works
3. Originating a call to a label - works
4. Continue a call to a label - not tested yet



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141217/d1189a3a/attachment.html>

More information about the asterisk-dev mailing list