VoiceMessages APIs
-
Create VOICE_ALERT_CONTENT Helper Function
Description: Converts the given text content including auto-fields into a VOICE_ALERT_CONTENT object.Usage:
POST api/Messages/Voice/Helpers/TextToVoiceContentObject/{ItemType}/{UseTTS}
Parameter Type Source Description TextContent String FromBody The text content of the message. This may contain auto-fields such as [Name/] or [Date/] etc. ItemType String FromUri The voice item type to create Value Description alert_human The main alert message. The message will be sent to the person who answers the phone call. alert_answering_machine A message that will only be sent to answering machines or voice-mail alert_response_confirm A custom response message that is played when confirming the reciept of digits. (i.e. Response Confirmed) alert_ask_for_pin A custom message that asks the called-party to key in a pin code. (i.e. Please enter your pin code followed by the # key) alert_invalid_pin A custom message that is played to indicate that the pin code entered was invalid. (i.e. the pin code you entered was invalid.) alert_feedback_recording_begin A custom message that plays after a response is keyed to begin recording audio during a voice feedback message UseTTS Boolean FromUri True if we want to flag all content to be built with TTS. Returns:
Returns a new VOICE_ALERT_CONTENT object.
Examples:
<!-- Intent: parses the text content and returns a VOICE_ALERT_CONTENT object POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Helpers/TextToVoiceContentObject/alert_human/true --> <TextContent>This is the message.</TextContent> <!-- example return value --> <VOICE_ALERT_CONTENT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <VoiceItemType>alert_human</VoiceItemType> <AudioSource> <AUDIO_SOURCE xsi:type="AUDIO_SOURCE_TTS_TEXT"> <AudioType>audio_source_tts_text</AudioType> <TTSText>This is the message.</TTSText> </AUDIO_SOURCE> </AudioSource> </VOICE_ALERT_CONTENT>