FreePBX UCP extension 0xx

We see a bug in javascript player code (jquery) then extension has a number 0xx.
When user with extension 011 click Play on Call History in UCP error shown:
"Media URL could not be loaded."
and in DOM:

<audio id="jp_audio_0" preload="metadata" src="https://x.x.x.x/?quietmode=1&amp;module=cdr&amp;command=listen&amp;msgid=1424151973_442&amp;format=oga&amp;type=playback&amp;ext=9" title=" &quot;&quot; &amp;lt;<span class=&quot;clickable&quo
t; data-type=&quot;number&quot; data-primary=&quot;phone&quot;>451236</span>&amp;gt;"></audio>

ext is 9, but correct URL in download section with extension 011:

<a class="download" alt="Загрузить" href="?quietmode=1&amp;module=cdr&amp;command=download&amp;msgid=1424151973_442&amp;type=download&amp;format=wav&amp;ext=011" target="_blank">
<i class="fa fa-cloud-download"></i>
</a>

With Extensions 1xx all worked fine, for example with 100
:

<a class="download" alt="Загрузить" href="?quietmode=1&amp;module=cdr&amp;command=download&amp;msgid=1424156229_518&amp;type=download&amp;format=wav&amp;ext=100" target="_blank">
<i class="fa fa-cloud-download"></i>
</a>

<audio id="jp_audio_0" preload="metadata" src="https://x.x.x.x/?quietmode=1&amp;module=cdr&amp;command=listen&amp;msgid=1424156229_518&amp;format=oga&amp;type=playback&amp;ext=100" title=" &quot;&quot; &amp;lt;<span 
class=&quot;clickable&quot; data-type=&quot;number&quot; data-primary=&quot;phone&quot;>451236</span>&amp;gt;"></audio>

https://schmoozecom.com/video/feature-requests.php

And i`m found there is incorrect cast:

/var/www/html/admin/modules/cdr/ucp/views/view.php

<div class="col-md-12">
<script>var extension = <?php echo $_REQUEST['sub']?>;</script>

replaced with:

<script>var extension = "<?php echo $_REQUEST['sub']?>";</script>

and 011 in php = 011 in javascript

And for voicemail accounts in ucp:

Voicemail.class.php (62)

$html = "<script>var supportedMediaFormats = '".implode(",",array_keys($this->UCP->FreePBX->Voicemail->supportedFormats))."'; var extension = '".$ext."';</script>";

changed var extension = “.$ext.”; to var extension = ‘".$ext."’;

this did the trick for us. thanks

Sadly no bug has still been reported for this.

There is now a bug report

Bob Reiber
BK Sales and Service
Tel: (650) 376-1122
http://www.bkss.nethttp://www.bkss.net/
https://www.facebook.com/BKSales