VoiceMessages APIs
-
Get Supported TTS Languages
Description: Returns an array of languages supported by the text-to-speech engine.Usage:
GET api/Messages/Voice/Languages
Returns:
Returns an string array of supported languages
Examples:
//-- Currently no examples for XML --//
-
Create New Voice Message
Description: Creates a new voice message using a minimum set of optionsUsage:
POST api/Messages/Voice/Create/Simple
Parameter Type Source Description VoiceObject SimpleVoice FromBody SimpleVoice. Returns:
the new Message_Profile including any fragment codes.
Examples:
<!-- Intent: Create a new Voice_Message using a minimal set of options POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Create/Simple --> <SimpleVoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > <Name>My Simple Message</Name> <Description>this is an example of a simple message</Description> <CallerID>2012361344</CallerID> <UseTTS>true</UseTTS> <Content>This is the content of my simple message.</Content> </SimpleVoice> <!-- example return value --> <Message_Profile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="Voice_Message" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Messages.Voice"> <ChangeStamp>0001-01-01T00:00:00</ChangeStamp> <ChangedByUser i:nil="true" /> <CreateStamp>0001-01-01T00:00:00</CreateStamp> <CreatedByUser i:nil="true" /> <DeleteLocked>false</DeleteLocked> <Description>this is an example of a simple message</Description> <LastUsed>0001-01-01T00:00:00</LastUsed> <Name>My Simple Message</Name> <Visibility>Visible</Visibility> <VoiceCode>659837</VoiceCode> <VoiceType>voice_message</VoiceType> <AutoRetries>1</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <CongestionAttempts>2</CongestionAttempts> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <EnableWaterfall>false</EnableWaterfall> <RingSeconds>60</RingSeconds> <AutoReplays>1</AutoReplays> <ContentProfile> <VOICE_ALERT_PROFILE> <SpokenLanguage>English</SpokenLanguage> <TTY_Text i:nil="true" /> <VoiceItem> <VOICE_ALERT_CONTENT> <AudioSource> <AUDIO_SOURCE i:type="AUDIO_SOURCE_VOICE"> <AudioType>audio_source_voice</AudioType> <AutoGenerateVoice>true</AutoGenerateVoice> <Content>This is the content of my simple message.</Content> <FileVersion>0</FileVersion> <VoiceCode>100937</VoiceCode> </AUDIO_SOURCE> </AudioSource> <VoiceItemType>alert_human</VoiceItemType> </VOICE_ALERT_CONTENT> </VoiceItem> </VOICE_ALERT_PROFILE> </ContentProfile> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <EnableAnsweringMachineMessage>false</EnableAnsweringMachineMessage> <RequireResponse>false</RequireResponse> <ValidResponses></ValidResponses> </Message_Profile>
-
Create New Voice Message
Description: Creates a new voice messageUsage:
POST api/Messages/Voice/Create
Parameter Type Source Description VoiceObject Message_Profile FromBody Message_Profile base class. You must pass in one of the following which inherit from Message_Profile: Voice_Message, Voice_Link_Message, Secure_Voice_Message, Conference_Blast_Message, Voice_Feedback_Message, User_Defined_Voice_Message Returns:
the new Message_Profile including any fragment codes. This object may be up cast to its original type.
Examples:
<!-- Intent: Create a new Voice_Message POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Create --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Voice_Message"> <Name>API Voice Message</Name> <Description>created by api</Description> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <AutoReplays>1</AutoReplays> <RequireResponse>false</RequireResponse> <ValidResponses/> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <EnableAnsweringMachineMessage>false</EnableAnsweringMachineMessage> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>0</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <VoiceType>voice_message</VoiceType> <ContentProfile> <VOICE_ALERT_PROFILE> <SpokenLanguage>English</SpokenLanguage> <TTY_Text>This is what I want to show up on a TTY</TTY_Text> <VoiceItem> <VOICE_ALERT_CONTENT> <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> </VoiceItem> </VOICE_ALERT_PROFILE> </ContentProfile> </Message_Profile> <!-- example return value --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Voice_Message"> <VoiceCode>123456</VoiceCode> <Name>API Voice Message</Name> <Description>created by api</Description> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <AutoReplays>1</AutoReplays> <RequireResponse>false</RequireResponse> <ValidResponses/> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <EnableAnsweringMachineMessage>false</EnableAnsweringMachineMessage> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>0</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <VoiceType>voice_message</VoiceType> <ContentProfile> <VOICE_ALERT_PROFILE> <SpokenLanguage>English</SpokenLanguage> <TTY_Text>This is what I want to show up on a TTY</TTY_Text> <VoiceItem> <VOICE_ALERT_CONTENT> <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> </VoiceItem> </VOICE_ALERT_PROFILE> </ContentProfile> </Message_Profile>
-
Update Existing Voice Message
Description: Updates the voice message parameters and content.Usage:
PUT api/Messages/Voice/Update/{VoiceCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unique numerical code of the voice message to update VoiceObject Message_Profile FromBody An Object that is derived from the Message_Profile object which containing the modifications. You must pass in one of the following which inherit from Message_Profile: Voice_Message, Voice_Link_Message, Secure_Voice_Message, Conference_Blast_Message, Voice_Feedback_Message, User_Defined_Voice_Message Returns:
Returns the updated Message_Profile object which includes any new fragment codes in its content. This object may be up cast to its original type.
Examples:
<!-- Intent: Update a Voice_Message with voicecode 123456 PUT to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Update/123456 --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Voice_Message"> <VoiceCode>123456</VoiceCode> <Name>API Voice Message</Name> <Description>created by api</Description> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <AutoReplays>1</AutoReplays> <RequireResponse>false</RequireResponse> <ValidResponses/> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <EnableAnsweringMachineMessage>false</EnableAnsweringMachineMessage> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>0</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <VoiceType>voice_message</VoiceType> <ContentProfile> <VOICE_ALERT_PROFILE> <SpokenLanguage>English</SpokenLanguage> <TTY_Text>This is what I want to show up on a TTY</TTY_Text> <VoiceItem> <VOICE_ALERT_CONTENT> <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> </VoiceItem> </VOICE_ALERT_PROFILE> </ContentProfile> </Message_Profile> <!-- example return value --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Voice_Message"> <VoiceCode>123456</VoiceCode> <Name>API Voice Message</Name> <Description>created by api</Description> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <AutoReplays>1</AutoReplays> <RequireResponse>false</RequireResponse> <ValidResponses/> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <EnableAnsweringMachineMessage>false</EnableAnsweringMachineMessage> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>0</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <VoiceType>voice_message</VoiceType> <ContentProfile> <VOICE_ALERT_PROFILE> <SpokenLanguage>English</SpokenLanguage> <TTY_Text>This is what I want to show up on a TTY</TTY_Text> <VoiceItem> <VOICE_ALERT_CONTENT> <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> </VoiceItem> </VOICE_ALERT_PROFILE> </ContentProfile> </Message_Profile>
-
Delete a Voice Message
Description: Deletes the given voice message.Usage:
DELETE api/Messages/Voice/Delete/{VoiceCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unique numerical code identifying the voice message to delete Returns:
Returns 0 on success
Examples:
<!-- Intent: Delete voice message with voicecode of 100000 DELETE to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Delete/100000 --> <!-- No XML input is required --> <!-- example return value --> <int>0</int>
-
List Voice Messages
Description: Returns a list of either recorded or yet to be recorded voice messagesUsage:
GET api/Messages/Voice/List/{Recorded}
Parameter Type Source Description Recorded String FromUri Specifies whether to return voice messages that are recorded or those which still require recordings. Returns:
Returns a list of Message objects
Examples:
<!-- Intent: retrieve a list of existing voice messages that have all required recordings. For unrecorded, a value of 0 would be passed into {Recorded} instead of 1. GET to the following url http://api.v4.swiftreach.com/api/Messages/Voice/List/1 --> <!-- No XML input is required --> <!-- Example Return Value --> <ArrayOfMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwiftReach.Swift911.Core.Messages.Voice"> <Message> <ChangeStamp>2012-07-21T22:15:34.64</ChangeStamp> <ChangedByUser/> <CreateStamp>2012-07-21T22:15:34.64</CreateStamp> <CreatedByUser>SYSTEM</CreatedByUser> <DeleteLocked>false</DeleteLocked> <Description>call with confirmation code</Description> <LastUsed>2012-09-27T10:05:19.077</LastUsed> <Name>Confirm</Name> <Visibility>Visible</Visibility> <VoiceCode>643507</VoiceCode> <VoiceType>voice_message</VoiceType> </Message> <Message> <ChangeStamp>2012-12-21T11:00:22.79</ChangeStamp> <ChangedByUser>sample</ChangedByUser> <CreateStamp>2012-07-22T09:15:59.7</CreateStamp> <CreatedByUser>sample</CreatedByUser> <DeleteLocked>true</DeleteLocked> <Description>this is a test</Description> <LastUsed>2013-01-09T15:23:55.393</LastUsed> <Name>Test TTS</Name> <Visibility>Visible</Visibility> <VoiceCode>643547</VoiceCode> <VoiceType>voice_message</VoiceType> </Message> </ArrayOfMessage>
-
Verify Voice Message Exists
Description: Checks to see if the given voice message exists.Usage:
GET api/Messages/Voice/Exists/{VoiceCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unique numerical code identifying the voice message Returns:
Returns true if the voice message exists.
Examples:
<!-- Intent: verify that voice message with voicecode of 100000 exists GET to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Exists/100000 --> <!-- No XML input is required --> <!-- example return value --> <boolean>true</boolean>
-
Upload Audio File
Description: Uploads the audio fragment content. The audio file should be sent in the HTTP POST body using a content-type of application x-www-form-urlencoded.Usage:
POST api/Messages/Voice/UploadAudio/{VoiceCode}/{FragmentCode}
Parameter Type Source Description VoiceCode Int32 FromUri The code that uniquely identifies the voice profile that an audio fragment is associated with. FragmentCode Int32 FromUri The code that uniquely identifies the audio fragment to upload. Returns:
Returns 0 on success
Examples:
<!-- Intent: Upload an audio file recording for VoiceCode 100000 with and audio file fragment code of 200123 POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Upload/100000/200123 --> <!-- Posted body content is a binary file upload --> <!-- Example Return Value --> <int>0</int>
-
Upload Audio File
Description: Uploads the audio fragment content. Audio may be in the format of vox, ulaw, wav, mp3. The audio file should be sent in the HTTP POST body using a content-type of application x-www-form-urlencoded.Usage:
POST api/Messages/Voice/UploadAudio/{VoiceCode}/{FragmentCode}/{AudioFormat}
Parameter Type Source Description VoiceCode Int32 FromUri The code that uniquely identifies the voice profile that an audio fragment is associated with. FragmentCode Int32 FromUri The code that uniquely identifies the audio fragment to upload. AudioFormat String FromUri Supported values are: vox, ulaw, wav, mp3 Returns:
Returns 0 on success
Examples:
//-- Currently no examples for XML --//
-
Generate an Audio File with TTS
Description: Generates an audio fragment using text-to-speech defaulting to English.Usage:
POST api/Messages/Voice/GenerateAudio/{VoiceCode}/{FragmentCode}/{SpokenLanguage}
Parameter Type Source Description VoiceCode Int32 FromUri The unqiue numerical code identifying the voice message that owns this audio fragment. FragmentCode Int32 FromUri The unique numerical code identifying the audio fragment. SpokenLanguage String FromUri The language dialect to use during speech conversion. TextContent String FromBody The text content to be converted to speech. Returns:
Return 0 on success.
Examples:
<!-- Intent: Generate an audio file recording using text-to-speech for VoiceCode 100000 with an audio file fragment code of 200123 using a language of English POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/GenerateAudio/100000/200123/English --> <TextContent>This is my message in English.</TextContent> <!-- Example Return Value --> <int>0</int>
-
Generate an Audio File with TTS
Description: Generates an audio fragment using text-to-speech defaulting to English.Usage:
POST api/Messages/Voice/GenerateAudio/{VoiceCode}/{FragmentCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unqiue numerical code identifying the voice message that owns this audio fragment. FragmentCode Int32 FromUri The unique numerical code identifying the audio fragment. TextContent String FromBody The text content to be converted to speech. Returns:
Return 0 on success.
Examples:
<!-- Intent: Generate an audio file recording using text-to-speech for VoiceCode 100000 with an audio file fragment code of 200123 defaulting to using a language of English POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/GenerateAudio/100000/200123 --> <TextContent>This is my message in English.</TextContent> <!-- Example Return Value --> <int>0</int>
-
Download Audio File
Description: Download an audio file from the server.Usage:
POST api/Messages/Voice/DownloadAudio/{VoiceCode}/{FragmentCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unqiue numerical code identifying the voice message that owns this audio fragment. FragmentCode Int32 FromUri The unique numerical code identifying the audio fragment. Returns:
Binary audio file in the format of u-Law 8000Hz, 64kbps, mono.
Examples:
//-- Currently no examples for XML --//
-
Download Audio File
Description: Download an audio file from the server. The audio can be downloaded in formats of vox, ulaw, wav, mp3.Usage:
POST api/Messages/Voice/DownloadAudio/{VoiceCode}/{FragmentCode}/{AudioFormat}
Parameter Type Source Description VoiceCode Int32 FromUri The unqiue numerical code identifying the voice message that owns this audio fragment. FragmentCode Int32 FromUri The unique numerical code identifying the audio fragment. AudioFormat String FromUri Supported values are: vox, ulaw, wav, mp3 Returns:
Binary audio file in the format specified.
Examples:
//-- Currently no examples for XML --//
-
Verify All Recordings for Message Exist
Description: Checks to see if all audio fragments corresponding to the given voice message have been recorded.Usage:
GET api/Messages/Voice/IsMessageRecorded/{VoiceCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unique numerical code identifying the voice message that we will verify the recorded status of. Returns:
Returns true if the given voice message's audio fragments have all been recorded.
Examples:
<!-- Intent: verify that all audio file recording fragments exist for voice message with voicecode of 100000 GET to the following url http://api.v4.swiftreach.com/api/Messages/Voice/IsMessageRecorded/100000 --> <!-- No XML input is required --> <!-- example return value --> <boolean>true</boolean>
-
Verify an Audio File Exists
Description: Checks to see if an audio fragment has been recorded.Usage:
GET api/Messages/Voice/IsFragmentRecorded/{VoiceCode}/{FragmentCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unique numerical code identifying the voice message that the audio fragment belongs to. FragmentCode Int32 FromUri The unique numerical code identifying the audio fragment Returns:
Return true if the given audio fragment is already recorded.
Examples:
<!-- Intent: verify that the given audio file recording fragment 200123 exists for voice message with voicecode of 100000 GET to the following url http://api.v4.swiftreach.com/api/Messages/Voice/IsFragmentRecorded/100000/200123 --> <!-- No XML input is required --> <!-- example return value --> <boolean>true</boolean>
-
Send Alert to gzipped Contact Array and Hotline
Description: Sends the alert to the contact list and also posts the voice message content to the specified hotline. The gzip compressed contacts array xml should be sent in the HTTP POST body using a content-type of application x-www-form-urlencoded.Usage:
POST api/Messages/Voice/Send/Publish/Compressed/{TaskName}/{VoiceCode}/{Hotline}
Parameter Type Source Description TaskName String FromUri The name of the alert. VoiceCode Int32 FromUri The unique numerical code identifying the voice message to send. Hotline String FromUri The phone number of the hotline to publish the voice message to Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
//-- Currently no examples for XML --//
-
Send Alert to Contact List and Hotline
Description: Sends the alert to the contact list and also posts the voice message content to the specified hotline.Usage:
POST api/Messages/Voice/Send/Publish/{TaskName}/{VoiceCode}/{Hotline}/{ListCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. VoiceCode Int32 FromUri The unique numerical code identifying the voice message to send. ListCode Int32 FromUri The unique numerical code identifying the contact list to send the voice message to. Hotline String FromUri The phone number of the hotline to publish the voice message to Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
//-- Currently no examples for XML --//
-
Send Alert to Contact Array and Hotline
Description: Sends the alert to the contact list and also posts the voice message content to the specified hotline.Usage:
POST api/Messages/Voice/Send/Publish/{TaskName}/{VoiceCode}/{Hotline}
Parameter Type Source Description TaskName String FromUri The name of the alert. VoiceCode Int32 FromUri The unique numerical code identifying the voice message to send. Contacts Contact[] FromBody Array of Contact objects to send the voice message to. Hotline String FromUri The phone number of the hotline to publish the voice message to Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
//-- Currently no examples for XML --//
-
Send Alert to gzipped Contact Array
Description: Launches an alert. The gzip compressed contacts array xml should be sent in the HTTP POST body using a content-type of application x-www-form-urlencoded.Usage:
POST api/Messages/Voice/Send/Compressed/{TaskName}/{VoiceCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. VoiceCode Int32 FromUri The unique numerical code identifying the voice message to send. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
//-- Currently no examples for XML --//
-
Send Alert to Contact List
Description: Launches an alertUsage:
POST api/Messages/Voice/Send/{TaskName}/{VoiceCode}/{ListCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. VoiceCode Int32 FromUri The unique numerical code identifying the voice message to send. ListCode Int32 FromUri The unique numerical code identifying the contact list to send the voice message to. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
<!-- Intent: send the voice message with voicecode of 100000 to an existing contact list with listcode 200000 and name the alert "My Test Alert" POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Send/MY%20Test%20Alert/100000/200000 --> <!-- No XML input is required --> <!-- example return value --> <int>123456</int>
-
Send Alert to Contact Array
Description: Launches an alertUsage:
POST api/Messages/Voice/Send/{TaskName}/{VoiceCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. VoiceCode Int32 FromUri The unique numerical code identifying the voice message to send. Contacts Contact[] FromBody Array of Contact objects to send the voice message to. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
<!-- Intent: send the voice message with voicecode of 100000 to an array of contacts posted in the body of the request and name the alert "My Test Alert" POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Send/MY%20Test%20Alert/100000 --> <ArrayOfContact> <Contact> <EntityName>Sample One</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Phones> <PhoneProfile> <Phone>5551234567</Phone> <Extension/> <OptInSMS>false</OptInSMS> <PhoneType>phonetype_voice</PhoneType> <PhoneLabel>Home</PhoneLabel> </PhoneProfile> </Phones> </Contact> <Contact> <EntityName>Sample Two</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Phones> <PhoneProfile> <Phone>5551234568</Phone> <Extension/> <OptInSMS>true</OptInSMS> <PhoneType>phonetype_voice</PhoneType> <PhoneLabel>Mobile</PhoneLabel> </PhoneProfile> </Phones> </Contact> </ArrayOfContact> <!-- example return value --> <int>123456</int>
-
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>
-
VOICE_ALERT_PROFILE[] to String Helper Function
Description: Retrieves the text content for the given profile in the given language.Usage:
POST api/Messages/Voice/Helpers/VoiceContentProfileArrayToText/{SpokenLanguage}/{ItemType}
Parameter Type Source Description SpokenLanguage String FromUri The language to get the content for from the profile ItemType String FromUri The voice item type to get the content for 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 ContentProfile VOICE_ALERT_PROFILE[] FromBody The VOICE_ALERT_PROFILE array that contains the current content Returns:
Returns a string containing the textual content of the message including auto-fields if used.
Examples:
<!-- Intent: takes the given array of VOICE_ALERT_PROFILE objects and returns the text content for the specified language. POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Helpers/VoiceContentProfileArrayToText/English/alert_human --> <ArrayOfVOICE_ALERT_PROFILE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <VOICE_ALERT_PROFILE> <SpokenLanguage>English</SpokenLanguage> <TTY_Text>this is the TTY message</TTY_Text> <VoiceItem> <VOICE_ALERT_CONTENT> <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> </VoiceItem> </VOICE_ALERT_PROFILE> </ArrayOfVOICE_ALERT_PROFILE> <!-- example return value --> <TextContent>This is the message.</TextContent>
-
VOICE_ALERT_CONTENT[] to String Helper Function
Description: Retrieves the text content for the given content typeUsage:
POST api/Messages/Voice/Helpers/VoiceContentObjectArrayToText/{ItemType}
Parameter Type Source Description ItemType String FromUri The voice item type to get the content for 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 ContentObject VOICE_ALERT_CONTENT[] FromBody The VOICE_ALERT_CONTENT array that contains the current content Returns:
Returns a string containing the textual content of the message including auto-fields if used.
Examples:
<!-- Intent: takes the given array of VOICE_ALERT_CONTENT objects and returns the text content for the specified language. POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Helpers/VoiceContentObjectArrayToText/English/alert_human --> <ArrayOfVOICE_ALERT_CONTENT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <VOICE_ALERT_CONTENT> <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> </ArrayOfVOICE_ALERT_CONTENT> <!-- example return value --> <TextContent>This is the message.</TextContent>
-
VOICE_ALERT_CONTENT to String Helper Function
Description: Retrieves the text content for the given alert content objectUsage:
POST api/Messages/Voice/Helpers/VoiceContentObjectToText
Parameter Type Source Description ContentObject VOICE_ALERT_CONTENT FromBody The VOICE_ALERT_CONTENT object that contains the current content Returns:
Returns a string containing the textual content of the message including auto-fields if used.
Examples:
<!-- Intent: takes the given VOICE_ALERT_CONTENT object and returns the text content for the specified language. POST to the following url http://api.v4.swiftreach.com/api/Messages/Voice/Helpers/VoiceContentObjectToText --> <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> <!-- example return value --> <TextContent>This is the message.</TextContent>
-
Get Voice Message Profile
Description: Returns the Message_Profile object for the given voicecodeUsage:
GET api/Messages/Voice/{VoiceCode}
Parameter Type Source Description VoiceCode Int32 FromUri The unique numerical code identifying the voice message to return Returns:
Returns Message_Profile object for the given voicecode. This can be up cast to its original type.
Examples:
<!-- Intent: retrieve the profile for voice message with voicecode of 100000 GET to the following url http://api.v4.swiftreach.com/api/Messages/Voice/100000 --> <!-- No XML input is required --> <!-- example return value --> <Message_Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/SwiftReach.Swift911.Core.Messages.Voice" xsi:type="Voice_Message"> <VoiceCode>100000</VoiceCode> <Name>API Voice Message</Name> <Description>created by api</Description> <DefaultSpokenLanguage>English</DefaultSpokenLanguage> <AutoReplays>1</AutoReplays> <RequireResponse>false</RequireResponse> <ValidResponses/> <EnableAnsweringMachineDetection>false</EnableAnsweringMachineDetection> <EnableAnsweringMachineMessage>false</EnableAnsweringMachineMessage> <CallerID>2012361344</CallerID> <CapacityLimit>0</CapacityLimit> <RingSeconds>60</RingSeconds> <CongestionAttempts>3</CongestionAttempts> <AutoRetries>0</AutoRetries> <AutoRetriesInterval>3</AutoRetriesInterval> <EnableWaterfall>false</EnableWaterfall> <VoiceType>voice_message</VoiceType> <ContentProfile> <VOICE_ALERT_PROFILE> <SpokenLanguage>English</SpokenLanguage> <TTY_Text>This is what I want to show up on a TTY</TTY_Text> <VoiceItem> <VOICE_ALERT_CONTENT> <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> </VoiceItem> </VOICE_ALERT_PROFILE> </ContentProfile> </Message_Profile>