<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/4101/">https://reviewboard.asterisk.org/r/4101/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By greenfieldtech.</div>
<p style="color: grey;"><i>Updated Dec. 17, 2014, 10:31 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">**** 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:
[arimonitor]
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@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@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"
}</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-24412">ASTERISK-24412</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/rest-api/api-docs/channels.json <span style="color: grey">(429672)</span></li>
<li>/trunk/res/res_ari_channels.c <span style="color: grey">(429672)</span></li>
<li>/trunk/res/ari/resource_channels.c <span style="color: grey">(429672)</span></li>
<li>/trunk/res/ari/resource_channels.h <span style="color: grey">(429672)</span></li>
<li>/trunk/contrib/asterisk-ng-doxygen <span style="color: grey">(429672)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/4101/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>