Voice Name Upload for Call Handlers
This API is used to upload voice name to the Call Handlers. There are three ways of uploading the voice name:
-
1. Upload a .wav file from the desktop.
-
2. Record using CUTI(Cisco Unity Telephony Interface) and then upload the recording.
-
3. Pass the .wav file as the input stream to upload the voice name.
Add/ Update the Voice Name for Call Handler by Uploading a File From the Desktop
It is a 3 step process:
Procedure
Step 1 |
A placeholder for the WAV file must be created with a POST request. This is a temporary file placeholder that can be used for up to 30 minutes. If it is not used within 30 minutes (assigned to a resource), the file is assumed to be abandoned and is automatically cleaned. The request is as follows:
The content will be the name of the newly created temporary .wav file. JSON Example
|
||||||
Step 2 |
Use the temporary file name to put the new audio data. The HTTP content type is "audio/wav" and the payload content is the audio data.
The request is as follows:
The content has been accepted and copied into the temporary file. JSON Example
|
||||||
Step 3 |
Add the file to the voice name. The request is as follows:
JSON Example
Use the below URL in the browser to listen to the voice name. https://<connection-server>/vmrest/handlers/callhandlers/<callhandlerobjectId>/voicename |
Add/Update Voice Name Recording the Greeting using Telephony Interface
It’s a three step process to record a new file then modify the current stream with this new stream
Procedure
Step 1 |
Call Connection In the first step, the integration between Unity Connection and Call Manager must be setup so that a call can be setup. Refer to the document at the below link to check how to make the call. http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_Telephony_Interface_(CUTI)_API_--_Using_CUTI_for_Basic_Call_Operations  |
||||||||
Step 2 |
Recording Once the phone is answered, the second step is to record the greeting. The length of the greeting can be set under the System Settings > General Configuration settings. Here you can enter the maximum length for system call handler greetings. The range is 1 to 1,200 seconds and default setting is 90 seconds. The minimum and maximum length of the recording using telephony integration can be seen in Connection Administration under the Advanced >> Telephony settings.
The same can be fetched using APIs using the following URL: https://<connection-server>/vmrest/configurationvalues Check for the values The request is as follows:
Configuration values can be modified using Connection Administration.. JSON Example
Use the following request to record the voice name:
Make a note of the output obtained, that will be the input for uploading a wave file. JSON Example
|
||||||||
Step 3 |
Upload the .WAV File The third step is to upload the wave file to the call handler voice name.
JSON Example
Use the following URL to listen to the voice name associated with the call handler: Paste the URL in the browser and listen to the voice name. https://<connection-server>/vmrest/handlers/callhandlers/<callhandlerobjectid>/voicename |
Adding Voice Name by Passing Input Stream in the Request
The voice name can also be updated using the input stream. An input stream can be created from the .wav file and passed as the request body. The URL for this should be:
https://<connection-server>/vmrest/handlers/callhandlers/<callhandlerobjectid>/voicename
The request body should be like this:
|
where the PUT request is created to upload the file3 .wav file. Make sure the content type for the request should be passed as "audio/wav". Use the following URL from the browser to listen to the voice name associated with the call handler:
https://<connection-server>/vmrest/handlers/callhandlers/<callhandlerobjectid>/voicename