Sidebar Menu

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 Name Description Data Type Required Sample Value
MultipleANR

One or more calls that you want to send.

Array of AdvancedNotifyRequest objects True

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.

/* 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
    );
}
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)
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>
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>
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>
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>