[cisco-voip] SetRingTone Wideband

Anthony Holloway avholloway+cisco-voip at gmail.com
Thu Apr 25 15:14:01 EDT 2019


I made a little progress.

*Python*
>>> import requests
>>> phone = 'my phone IP here'
>>> creds = ('my username', 'my password')
>>> xml = {'XML': '<setRingTone><ringTone>
https://tftpserver.company.com:6972/NewRingtone.rwb
</ringTone></setRingTone>'}
>>> resp = requests.post('http://{}/CGI/Execute'.format(phone), auth=creds,
data=xml)
>>> resp
<Response [200]>
>>> resp.text
u'<?xml version="1.0"
encoding="utf-8"?>\r\n<CiscoIPPhoneResponse>\r\n<ResponseItem URL=""
Data="Success" Status="0" />\r\n</CiscoIPPhoneResponse>\r\n'

At first I got:

>>> resp
<Response [400]>
>>> resp.text
u'<?xml version="1.0" encoding="utf-8"?>\r\n<errorResponse>\r\n<type>
Unsupported Operation</type> \r\n<data> Personalization is disabled</data>
\r\n</errorResponse>\r\n'

After I enabled that, I then got:

>>> resp
<Response [400]>
>>> resp.text
u'<?xml version="1.0" encoding="utf-8"?>\r\n<errorResponse>\r\n<type>
InvalidResource</type> \r\n<data>  Ring Tone Too Large:
https://tftpserver.company.com:6972/ NewRingtone.rwb  Size is 264828</data>
\r\n</errorResponse>\r\n'

Then after I cut the ringtone in half, I got this:


>>> resp
<Response [400]>
>>> resp.text
u'<?xml version="1.0" encoding="utf-8"?>\r\n<errorResponse>\r\n<type>
InvalidResource</type> \r\n<data>  Invalid Ring Tone: Number of Ring
samples in the ring not evenly divisible by 240:
https://tftpserver.company.com:6972/ NewRingtone.rwb</data>
\r\n</errorResponse>\r\n'

So, I used the following as a supplement to the previously linked site, so
that I could figure out this 240 sample thing:
https://www.netcraftsmen.com/uc-toolkit-using-audacity-for-cucm-ring-tones/

My phone (8851 on 12.5(1)SR2) still plays the default Sunrise ringtone, and
I don't see where the new ringtone comes into play.  Perhaps my successes
will help you move the needle a little further?

On Thu, Apr 25, 2019 at 12:35 PM Brian Meade <bmeade90 at vt.edu> wrote:

> I've got it working using the RingList-wb.xml globally, but still can't
> get it to work via API.  It seems like SetRingTone was just never updated
> to allow for wideband ringtones.
>
> On Thu, Apr 25, 2019 at 10:37 AM Anthony Holloway <
> avholloway+cisco-voip at gmail.com> wrote:
>
>> Do you have it working now then?
>>
>> On Wed, Apr 24, 2019 at 12:42 PM Brian Meade <bmeade90 at vt.edu> wrote:
>>
>>> So I confirmed the sample rate should be 16000 Hz as well.
>>>
>>> Then exported as Raw (headerless) Signed 16-bit PCM
>>>
>>> On Wed, Apr 24, 2019 at 1:25 PM Brian Meade <bmeade90 at vt.edu> wrote:
>>>
>>>>  SetRingTone is a bit undocumented in any of the API guides similar to
>>>> setBackground.  They both work but RingTone may not have been updated to
>>>> support wideband files.
>>>>
>>>> I've got the ringtone on CUCM now as well using the file settings in
>>>> that blog but it's playing too fast.
>>>>
>>>> Anyone know if the sample rate needs to be changed from 8000 Hz or any
>>>> other changes for wideband?
>>>>
>>>> On Wed, Apr 24, 2019 at 1:12 PM Anthony Holloway <
>>>> avholloway+cisco-voip at gmail.com> wrote:
>>>>
>>>>> I've never heard of this before, but a quick google search turns up
>>>>> the following page with some detailed info.  Have you already seen this
>>>>> info?
>>>>>
>>>>> http://usecallmanager.nz/ring-list-xml.html
>>>>>
>>>>> Interestingly, this information doesn't seem to be present in the
>>>>> normal Phone API guide.  Is this hidden information, or just documented
>>>>> elsewhere?
>>>>>
>>>>> On Wed, Apr 24, 2019 at 11:38 AM Brian Meade <bmeade90 at vt.edu> wrote:
>>>>>
>>>>>> Anyone had any luck using the IP Phone Services API to set a wideband
>>>>>> ringtone? It doesn't seem to like the file size for me even though my files
>>>>>> are smaller than the default wideband ringtones.
>>>>>>
>>>>>> Thanks,
>>>>>> Brian Meade
>>>>>> _______________________________________________
>>>>>> cisco-voip mailing list
>>>>>> cisco-voip at puck.nether.net
>>>>>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>>>>>
>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20190425/98ab27e0/attachment.html>


More information about the cisco-voip mailing list