08-29-2016 08:56 AM
Hi,
How can I list the possible MOH Audio Source files using an AXL request (or SQL)?
Thanks,
Fabien
08-29-2016 10:47 AM
It looks like this may be possible via the Serviceability XML - Control Center Services API:
https://developer.cisco.com/site/sxml/documents/api-reference/service-control/#getfiledirectorylist
This is what I get on my 10.5 CUCM lab system:
POST https://10.194.104.60:8443/controlcenterservice2/services/ControlCenterServicesEx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "getFileDirectoryList"
Content-Length: 345
Host: 10.194.104.60:8443
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Authorization: Basic QWRtaW5pc3RyYXRvcjpjaXNjb3BzZHQ=
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:getFileDirectoryList>
<soap:DirectoryPath>/var/log/active/mohprep/</soap:DirectoryPath>
</soap:getFileDirectoryList>
</soapenv:Body>
</soapenv:Envelope>
---------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:getFileDirectoryListResponse xmlns:ns1="http://schemas.cisco.com/ast/soap">
<ns1:ListOfFiles>
<ns1:File>SampleAudioSource.wb.wav</ns1:File>
<ns1:File>SilenceAudioSource.xml</ns1:File>
<ns1:File>ToneOnHold.g729.wav</ns1:File>
<ns1:File>ToneOnHold.alaw.wav</ns1:File>
<ns1:File>SilenceAudioSource.ulaw.wav</ns1:File>
<ns1:File>CiscoMOHSourceReport.xml</ns1:File>
<ns1:File>ToneOnHold.xml</ns1:File>
<ns1:File>SampleAudioSource.ulaw.wav</ns1:File>
<ns1:File>SampleAudioSource.alaw.wav</ns1:File>
<ns1:File>SilenceAudioSource.alaw.wav</ns1:File>
<ns1:File>SampleAudioSource.xml</ns1:File>
<ns1:File>ToneOnHold.ulaw.wav</ns1:File>
<ns1:File>SampleAudioSource.g729.wav</ns1:File>
<ns1:File>SilenceAudioSource.wb.wav</ns1:File>
<ns1:File>ToneOnHold.wb.wav</ns1:File>
<ns1:File>SilenceAudioSource.g729.wav</ns1:File>
</ns1:ListOfFiles>
</ns1:getFileDirectoryListResponse>
</soapenv:Body>
</soapenv:Envelope>
08-30-2016 08:02 AM
Thank you for this answer.
In fact I want to know the possible values for a MOH Audio Source. On the CUCM administrator view, I have 3 possibles values.
The "getFileDirectoryList" returns 16 files :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:getFileDirectoryListResponse xmlns:ns1="http://schemas.cisco.com/ast/soap">
<ns1:ListOfFiles>
<ns1:File>CiscoMOHSourceReport.xml</ns1:File>
<ns1:File>ToneOnHold.xml</ns1:File>
<ns1:File>ToneOnHold.wb.wav</ns1:File>
<ns1:File>SilenceAudioSource.alaw.wav</ns1:File>
<ns1:File>SilenceAudioSource.g729.wav</ns1:File>
<ns1:File>SampleAudioSource.alaw.wav</ns1:File>
<ns1:File>SampleAudioSource.wb.wav</ns1:File>
<ns1:File>SilenceAudioSource.wb.wav</ns1:File>
<ns1:File>SilenceAudioSource.ulaw.wav</ns1:File>
<ns1:File>SampleAudioSource.ulaw.wav</ns1:File>
<ns1:File>ToneOnHold.alaw.wav</ns1:File>
<ns1:File>ToneOnHold.ulaw.wav</ns1:File>
<ns1:File>SilenceAudioSource.xml</ns1:File>
<ns1:File>SampleAudioSource.xml</ns1:File>
<ns1:File>ToneOnHold.g729.wav</ns1:File>
<ns1:File>SampleAudioSource.g729.wav</ns1:File>
</ns1:ListOfFiles>
</ns1:getFileDirectoryListResponse>
</soapenv:Body>
</soapenv:Envelope>
Moreover, how to know the value to put for "sourceFile" in the request updateMohAudioSource ("ToneOnHold.xml", "ToneOnHold.wb.wav", "ToneOnHold"...)?
Fabien
09-02-2016 02:12 PM
Looks like <listMohAudioSource> is what you're looking for:
https://developer.cisco.com/media/axl-schema-11-5/Files/AXLSoap_listMohAudioSource.html#Link90F
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:listMohAudioSource>
<searchCriteria>
<name>%</name>
</searchCriteria>
<returnedTags>
<sourceId/>
<name/>
<sourceFile/>
<multicast/>
<mohFileStatus/>
<initialAnnouncement/>
<periodicAnnouncement/>
<periodicAnnouncementInterval/>
<localeAnnouncement/>
<initialAnnouncementPlayed/>
</returnedTags>
</ns:listMohAudioSource>
</soapenv:Body>
</soapenv:Envelope>
---------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:listMohAudioSourceResponse xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<return>
<mohAudioSource uuid="{AC0250B0-6F23-4D91-A73B-A733B011C5CE}">
<sourceId>1</sourceId>
<name>SampleAudioSource</name>
<sourceFile>SampleAudioSource.xml</sourceFile>
<multicast>false</multicast>
<mohFileStatus>0</mohFileStatus>
<initialAnnouncement/>
<periodicAnnouncement/>
<periodicAnnouncementInterval>30</periodicAnnouncementInterval>
<localeAnnouncement>English United States</localeAnnouncement>
<initialAnnouncementPlayed>true</initialAnnouncementPlayed>
</mohAudioSource>
</return>
</ns:listMohAudioSourceResponse>
</soapenv:Body>
</soapenv:Envelope>
09-05-2016 02:12 AM
The listMohAudioSource request give the list of MohAudioSource.
What I want is to know the possible values for item "sourceFile" in "updateMohAudioSource" request (for example "SampleAudioSource.xml").
The request "getFileDirectoryListResponse" returns too many result (for example "SampleAudioSource.alaw.wav" is not a correct value for "sourceFile").
If I set an invalid value in "sourceFile" of "updateMohAudioSource" request, there is no error but on the CUCM administration view the "MOH Audio Source File" is "Not Selected". This is a problem because it's a required item...
09-07-2016 02:57 PM
It looks like any file with an '.xml' extension (i.e. returned by 'getFileDirectoryList' as above) is a valid option...
09-15-2016 01:16 AM
Thank you for this answer.
There is two problems for me :
Regards,
Fabien
09-16-2016 09:19 AM
You may have to ignore the CiscoMOHSourceReport.xml entry - I'm not aware of a way to get a 'cleaner' listing, unfortunately.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide