<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/3028/">https://reviewboard.asterisk.org/r/3028/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 23rd, 2013, 5:38 p.m. UTC, <b>Paul Belanger</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Wouldn't this be the same path as /dial? I know asterisk has native functionality to play numbers however, feel like libraries on top of ARI could handle this. /me shrugs.</pre>
</blockquote>
<p>On November 23rd, 2013, 5:40 p.m. UTC, <b>Joshua Colp</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">To play numbers in various languages is complicated... so every library would then need to implement that logic. It's non-trivial.</pre>
</blockquote>
<p>On November 23rd, 2013, 5:50 p.m. UTC, <b>Paul Belanger</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I agree, I don't think it would be trivial. However, if ARI is basically to remove the app/* folder, maybe some of the heavy lifting needs to be done by the libraries. I'm not opposed of having this functionality in ARI but do we want it in ARI is the question.
Just look at the issue we have today with different languages and syntax in Asterisk, Steve even had a talk at Astridevcon about it.
I'd rather see us expose the logic to have people write something, then embedded into ARI.</pre>
</blockquote>
<p>On November 23rd, 2013, 5:52 p.m. UTC, <b>Joshua Colp</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Nothing needs to be explicitly done to allow that, everything exists as sound files which can be played using the existing playback functionality.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">First, on Steve's talk:
Steve's talk at AstriDevCon served two purposes:
(1) Provide a different mechanism than the existing say.conf mechanism to configure text to speech, focusing on phrases instead of words
(2) Provide a different mechanism to add in localization efforts
Neither of these goals impact this proposal. Even if you integrated all of Steve's work, you still would need an external mechanism to make use of it. Performing a /play of digits/1; digits/2 will still play "1" followed by "2", and not "12" - with or without his work incorporated.
Asterisk already has internal mechanisms to handle much of the digit/character/number logic. That logic already has localization support in say.conf. Assuming Steve's proposal was included in some future version, you would simply have a different configuration mechanism and a different engine - but you would still have to have a way to make use of that engine externally. The implementation of how these things are transformed into sound changing does not have to impact how ARI instructs Asterisk to perform a playback of said resources.
Second, on whether or not this should exist in Asterisk or be implemented in an external library:
Yes, you can re-implement that logic outside of Asterisk - but is that something useful to do? Do library writers want to write routines that turn 101 into "one hundred and one" or "one zero one"? Or would you rather be implementing actual applications? (Rhetorical question here). If the answer is "yes, I want to write my own digitization logic", then by all means, you can still do that: the basic /play operation will still let you dictate exactly how you want digits played. That doesn't change. This just makes some common use cases much easier (and this is also rather needed for directory/voicemail like functionality).
Third, on whether or not we are falling into the /dial trap:
I don't think this is the same thing as dial. Dial's fatal flaw - that we admittedly did step into - was that it attempted to combine many Asterisk operations into a single operation. That resulted in a situation where the only way to control the overall operation was through lots of little options - and those options started to make the whole thing inherently complex. This is different. In this case, we aren't attempting to combine operations - we're attempting to expose a mapping of text to sound files that already exists in Asterisk.</pre>
<br />
<p>- Matt</p>
<br />
<p>On November 23rd, 2013, 2:35 p.m. UTC, Joshua Colp wrote:</p>
<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 Joshua Colp.</div>
<p style="color: grey;"><i>Updated Nov. 23, 2013, 2:35 p.m.</i></p>
<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;">There is currently no way in ARI to easily say a number, digits, or a string of characters. You can do it manually but this is extremely cumbersome. The attached change implements this functionality using new URI schemes in the Playback operation.
number:<number> will play the provided number
digits:<digits> will play the provided digits
characters:<characters> will play the provided characters
By using the existing playback operation these can be queued up just like any other sound file, allowing you to construct a complete sentence if you desire.</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;">Executed playback with the various URI schemes.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/12/res/res_stasis_playback.c <span style="color: grey">(403119)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3028/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>