Voice Broadcast API

Voice API
Quick Start Guides
Methods
Types
FAQ

NotifyMultiplePhoneAdvanced

This method sends multiple calls. (We suggest using member lists for batches of over 100 messages. See the LM_DialListAdvanced method.)

Syntax

NotifyMultiplePhoneAdvanced(MultipleANR)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
MultipleANROne or more calls that you want to send.Array of AdvancedNotifyRequest objectsTrue

Response

Returns: Array of NotifyReturn objects

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 request = new[]
{
    new AdvancedNotifyRequest
    {
        PhoneNumberToDial = YOUR_TO_NUMBER,
        TextToSay = "Hello, this is a test call.",
        UTCScheduledDateTime = DateTime.UtcNow,
        LicenseKey = YOUR_LICENSE_KEY
    }
};

var calls = await client.NotifyMultiplePhoneAdvancedAsync(request);

Console.WriteLine($"{calls.Length} calls were created.");

foreach (var call in calls)
{
    Console.WriteLine(Environment.NewLine +
        "QueueID: " + call.QueueID + Environment.NewLine +
        "Response Code: " + call.ResponseCode + Environment.NewLine +
        "Response Text: " + call.ResponseText
    );
}

Python

import zeep

client = zeep.Client(wsdl="https://ws.esendex.us/notifyws/phonenotify.asmx?wsdl")
ArrayOfString = client.get_type("ns0:ArrayOfAdvancedNotifyRequest")

request = ArrayOfString(
    [
        {
            "PhoneNumberToDial": "17575559999",
            "VoiceID": 1,
            "CallerIDNumber": "7575550000",
            "CallerIDName": "Esendex Services",
            "TextToSay": "Hello, this call was sent with Python.",
            "LicenseKey": "00000000-0000-0000-0000-000000000000",
            "TryCount": 2,
            "NextTryInSeconds": 180,
            "UTCScheduledDateTime": "1970-01-01T00:00:00Z",
            "TTSrate": 10,
            "TTSvolume": 100,
            "MaxCallLength": 0,
        }
    ]
)

result = client.service.NotifyMultiplePhoneAdvanced(request)

print(result)

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/NotifyMultiplePhoneAdvanced"

<?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>
    <NotifyMultiplePhoneAdvanced xmlns="https://ws.esendex.us/NotifyWS/">
      <MultipleANR>
        <AdvancedNotifyRequest>
          <PhoneNumberToDial>string</PhoneNumberToDial>
          <TransferNumber>string</TransferNumber>
          <VoiceID>int</VoiceID>
          <CallerIDNumber>string</CallerIDNumber>
          <CallerIDName>string</CallerIDName>
          <TextToSay>string</TextToSay>
          <LicenseKey>string</LicenseKey>
          <TryCount>int</TryCount>
          <NextTryInSeconds>int</NextTryInSeconds>
          <UTCScheduledDateTime>dateTime</UTCScheduledDateTime>
          <TTSrate>unsignedByte</TTSrate>
          <TTSvolume>unsignedByte</TTSvolume>
          <MaxCallLength>int</MaxCallLength>
          <StatusChangePostUrl>string</StatusChangePostUrl>
          <ReferenceID>string</ReferenceID>
        </AdvancedNotifyRequest>
        <AdvancedNotifyRequest>
          <PhoneNumberToDial>string</PhoneNumberToDial>
          <TransferNumber>string</TransferNumber>
          <VoiceID>int</VoiceID>
          <CallerIDNumber>string</CallerIDNumber>
          <CallerIDName>string</CallerIDName>
          <TextToSay>string</TextToSay>
          <LicenseKey>string</LicenseKey>
          <TryCount>int</TryCount>
          <NextTryInSeconds>int</NextTryInSeconds>
          <UTCScheduledDateTime>dateTime</UTCScheduledDateTime>
          <TTSrate>unsignedByte</TTSrate>
          <TTSvolume>unsignedByte</TTSvolume>
          <MaxCallLength>int</MaxCallLength>
          <StatusChangePostUrl>string</StatusChangePostUrl>
          <ReferenceID>string</ReferenceID>
        </AdvancedNotifyRequest>
      </MultipleANR>
    </NotifyMultiplePhoneAdvanced>
  </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>
    <NotifyMultiplePhoneAdvancedResponse xmlns="https://ws.esendex.us/NotifyWS/">
      <NotifyMultiplePhoneAdvancedResult>
        <NotifyReturn>
          <ResponseCode>int</ResponseCode>
          <ResponseText>string</ResponseText>
          <CallAnswered>boolean</CallAnswered>
          <QueueID>long</QueueID>
          <TryCount>int</TryCount>
          <Demo>boolean</Demo>
          <DigitsPressed>string</DigitsPressed>
          <MachineDetection>string</MachineDetection>
          <Duration>int</Duration>
          <StartTime>dateTime</StartTime>
          <EndTime>dateTime</EndTime>
          <MinuteRate>decimal</MinuteRate>
          <Country>string</Country>
          <CallComplete>boolean</CallComplete>
          <TextToSay>string</TextToSay>
          <VariableArray>
            <Variable xsi:nil="true" />
            <Variable xsi:nil="true" />
          </VariableArray>
        </NotifyReturn>
        <NotifyReturn>
          <ResponseCode>int</ResponseCode>
          <ResponseText>string</ResponseText>
          <CallAnswered>boolean</CallAnswered>
          <QueueID>long</QueueID>
          <TryCount>int</TryCount>
          <Demo>boolean</Demo>
          <DigitsPressed>string</DigitsPressed>
          <MachineDetection>string</MachineDetection>
          <Duration>int</Duration>
          <StartTime>dateTime</StartTime>
          <EndTime>dateTime</EndTime>
          <MinuteRate>decimal</MinuteRate>
          <Country>string</Country>
          <CallComplete>boolean</CallComplete>
          <TextToSay>string</TextToSay>
          <VariableArray>
            <Variable xsi:nil="true" />
            <Variable xsi:nil="true" />
          </VariableArray>
        </NotifyReturn>
      </NotifyMultiplePhoneAdvancedResult>
    </NotifyMultiplePhoneAdvancedResponse>
  </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>
    <NotifyMultiplePhoneAdvanced xmlns="https://ws.esendex.us/NotifyWS/">
      <MultipleANR>
        <AdvancedNotifyRequest>
          <PhoneNumberToDial>string</PhoneNumberToDial>
          <TransferNumber>string</TransferNumber>
          <VoiceID>int</VoiceID>
          <CallerIDNumber>string</CallerIDNumber>
          <CallerIDName>string</CallerIDName>
          <TextToSay>string</TextToSay>
          <LicenseKey>string</LicenseKey>
          <TryCount>int</TryCount>
          <NextTryInSeconds>int</NextTryInSeconds>
          <UTCScheduledDateTime>dateTime</UTCScheduledDateTime>
          <TTSrate>unsignedByte</TTSrate>
          <TTSvolume>unsignedByte</TTSvolume>
          <MaxCallLength>int</MaxCallLength>
          <StatusChangePostUrl>string</StatusChangePostUrl>
          <ReferenceID>string</ReferenceID>
        </AdvancedNotifyRequest>
        <AdvancedNotifyRequest>
          <PhoneNumberToDial>string</PhoneNumberToDial>
          <TransferNumber>string</TransferNumber>
          <VoiceID>int</VoiceID>
          <CallerIDNumber>string</CallerIDNumber>
          <CallerIDName>string</CallerIDName>
          <TextToSay>string</TextToSay>
          <LicenseKey>string</LicenseKey>
          <TryCount>int</TryCount>
          <NextTryInSeconds>int</NextTryInSeconds>
          <UTCScheduledDateTime>dateTime</UTCScheduledDateTime>
          <TTSrate>unsignedByte</TTSrate>
          <TTSvolume>unsignedByte</TTSvolume>
          <MaxCallLength>int</MaxCallLength>
          <StatusChangePostUrl>string</StatusChangePostUrl>
          <ReferenceID>string</ReferenceID>
        </AdvancedNotifyRequest>
      </MultipleANR>
    </NotifyMultiplePhoneAdvanced>
  </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>
    <NotifyMultiplePhoneAdvancedResponse xmlns="https://ws.esendex.us/NotifyWS/">
      <NotifyMultiplePhoneAdvancedResult>
        <NotifyReturn>
          <ResponseCode>int</ResponseCode>
          <ResponseText>string</ResponseText>
          <CallAnswered>boolean</CallAnswered>
          <QueueID>long</QueueID>
          <TryCount>int</TryCount>
          <Demo>boolean</Demo>
          <DigitsPressed>string</DigitsPressed>
          <MachineDetection>string</MachineDetection>
          <Duration>int</Duration>
          <StartTime>dateTime</StartTime>
          <EndTime>dateTime</EndTime>
          <MinuteRate>decimal</MinuteRate>
          <Country>string</Country>
          <CallComplete>boolean</CallComplete>
          <TextToSay>string</TextToSay>
          <VariableArray>
            <Variable xsi:nil="true" />
            <Variable xsi:nil="true" />
          </VariableArray>
        </NotifyReturn>
        <NotifyReturn>
          <ResponseCode>int</ResponseCode>
          <ResponseText>string</ResponseText>
          <CallAnswered>boolean</CallAnswered>
          <QueueID>long</QueueID>
          <TryCount>int</TryCount>
          <Demo>boolean</Demo>
          <DigitsPressed>string</DigitsPressed>
          <MachineDetection>string</MachineDetection>
          <Duration>int</Duration>
          <StartTime>dateTime</StartTime>
          <EndTime>dateTime</EndTime>
          <MinuteRate>decimal</MinuteRate>
          <Country>string</Country>
          <CallComplete>boolean</CallComplete>
          <TextToSay>string</TextToSay>
          <VariableArray>
            <Variable xsi:nil="true" />
            <Variable xsi:nil="true" />
          </VariableArray>
        </NotifyReturn>
      </NotifyMultiplePhoneAdvancedResult>
    </NotifyMultiplePhoneAdvancedResponse>
  </soap12:Body>
</soap12:Envelope>

Let’s start sending, together.