cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
995
Views
1
Helpful
7
Replies

How to list the MOH Audio Source Files?

fabien.bonic
Level 5
Level 5

Hi,

How can I list the possible MOH Audio Source files using an AXL request (or SQL)?

Thanks,

Fabien

7 Replies 7

dstaudt
Cisco Employee
Cisco Employee

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>

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.

MOH-source.jpg

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

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>

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...

It looks like any file with an '.xml' extension (i.e. returned by 'getFileDirectoryList' as above) is a valid option...

Thank you for this answer.

There is two problems for me :

  • the getFileDirectoryList request returns also CiscoMOHSourceReport.xml which is not a valid xml file for file name
  • the updateMohAudioSource request should return an error if the sourceFile is invalid (there is no error on update request, the get request returns the same value but on cisco administration interface, the field is "not selected" despite it's a required field)

Regards,

Fabien

You may have to ignore the CiscoMOHSourceReport.xml entry - I'm not aware of a way to get a 'cleaner' listing, unfortunately.