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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
PhoneNumberToDial | The phone number the system should call to get a voice recording. To dial an extension, add x followed by the extension. | String | True | 7575551234 |
SoundFileID | The name you want for your file, for use in future retrieval. The ID will be converted to lowercase. | String | True | greeting |
LicenseKey | Your license key. | String | True | 00000000-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#
- Python
- GET Request
- POST Request
- SOAP 1.1 Request
- SOAP 1.1 Response
- SOAP 1.2 Request
- SOAP 1.2 Response
- XML Response
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>