RecordSoundViaPhoneCall

This method will call you in order to record a sound file. Follow the instructions during the call to record your sound.

Syntax

RecordSoundViaPhoneCall(PhoneNumberToDial, SoundFileID, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
PhoneNumberToDialThe phone number the system should call to get a voice recording. To dial an extension, add x followed by the extension.StringTrue7575551234
SoundFileIDThe name you want for your file, for use in future retrieval. The ID will be converted to lowercase.StringTruegreeting
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: Boolean

Description: True if the call was sent. False otherwise.

Code Samples

You can use any programming language you want with our API, as long as it can make a REST or SOAP call. Here are examples for some of the most common platforms.

C#

/* https://ws.esendex.us/notifyws/phonenotify.asmx?wsdl was added as a Service Reference and given the name WSDL */

using WSDL;

var client = new PhoneNotifySoapClient(PhoneNotifySoapClient.EndpointConfiguration.PhoneNotifySoap);
var soundFileId = "greeting";
var recorded = await client.RecordSoundViaPhoneCallAsync(YOUR_TO_NUMBER, soundFileId, YOUR_LICENSE_KEY);

Console.WriteLine("Call was sent: " + recorded);

Python

import zeep

client = zeep.Client(wsdl="https://ws.esendex.us/notifyws/phonenotify.asmx?wsdl")
phone_number_to_dial = "17575559999"
sound_file_id = "greeting"
license_key = "00000000-0000-0000-0000-000000000000"

result = client.service.RecordSoundViaPhoneCall(phone_number_to_dial, sound_file_id, license_key)

print(result)

GET Request

POST Request

POST /NotifyWS/PhoneNotify.asmx/RecordSoundViaPhoneCall HTTP/1.1
Host: ws.esendex.us
Content-Type: application/x-www-form-urlencoded
Content-Length: length

PhoneNumberToDial=string&SoundFileID=string&LicenseKey=string

SOAP 1.1 Request

POST /NotifyWS/PhoneNotify.asmx HTTP/1.1
Host: ws.esendex.us
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://ws.esendex.us/NotifyWS/RecordSoundViaPhoneCall"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <RecordSoundViaPhoneCall xmlns="https://ws.esendex.us/NotifyWS/">
      <PhoneNumberToDial>string</PhoneNumberToDial>
      <SoundFileID>string</SoundFileID>
      <LicenseKey>string</LicenseKey>
    </RecordSoundViaPhoneCall>
  </soap:Body>
</soap:Envelope>

SOAP 1.1 Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <RecordSoundViaPhoneCallResponse xmlns="https://ws.esendex.us/NotifyWS/">
      <RecordSoundViaPhoneCallResult>boolean</RecordSoundViaPhoneCallResult>
    </RecordSoundViaPhoneCallResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2 Request

POST /NotifyWS/PhoneNotify.asmx HTTP/1.1
Host: ws.esendex.us
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <RecordSoundViaPhoneCall xmlns="https://ws.esendex.us/NotifyWS/">
      <PhoneNumberToDial>string</PhoneNumberToDial>
      <SoundFileID>string</SoundFileID>
      <LicenseKey>string</LicenseKey>
    </RecordSoundViaPhoneCall>
  </soap12:Body>
</soap12:Envelope>

SOAP 1.2 Response

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <RecordSoundViaPhoneCallResponse xmlns="https://ws.esendex.us/NotifyWS/">
      <RecordSoundViaPhoneCallResult>boolean</RecordSoundViaPhoneCallResult>
    </RecordSoundViaPhoneCallResponse>
  </soap12:Body>
</soap12:Envelope>

XML Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<boolean xmlns="https://ws.esendex.us/NotifyWS/">boolean</boolean>

Let’s get your business buzzing

Spark customer connections in minutes. Discover the full power of our mobile messaging platform—no hidden fees, just real results.