Skip to content

Instantly share code, notes, and snippets.

@callemall
callemall / PHP - ExtCreateBroadcast.php
Created July 31, 2013 16:17
This example creates and launches a simple text-to-speech broadcast using the ExtCreateBroadcast function.
// =====================
// account information
// =====================
$username = "999111999";
$pin = "9991";
// =====================
// 1 = Announcement
// 2 = Survey
// 3 = SMS
@callemall
callemall / PHP - CheckAccount.php
Created July 31, 2013 16:16
This example uses the CheckAccount function to retrieve basic information and settings of an account including its status, the available call balance, and most of the settings seen on the "My Account" tab when logged in to a Call-Em-All account.
// =====================
// account information
// =====================
$username = "999111999";
$pin = "9991";
$proxy = "http://staging-api.call-em-all.com/webservices/ceaapi_v2.asmx?WSDL";
$client = new SoapClient($proxy, array("trace" => true));
@callemall
callemall / Perl - SendOptInvitation.perl
Created July 31, 2013 16:14
This example invites a phone number to join the text messaging group identified by the keyword "RAMBLES". The SendOptInvitation function is used for this purpose.
#!/usr/bin/perl -w
# SOAP client for CEA web service
use strict;
use SOAP::Lite;
# To turn on SOAP debugging use this
# ==================================
# use SOAP::Lite +trace => 'all';
# ==================================
@callemall
callemall / Perl - ExtCreateBroadcast (Voice).perl
Created July 31, 2013 16:12
This example creates a voice-only broadcast using the ExtCreateBroadcast function. In this case, the messageID parameter is left blank. Once the broadcast is created, a message will have to be recorded using the toll-free number and message recording ID returned by the function.
#!/usr/bin/perl -w
# SOAP client for CEA web service
use strict;
use SOAP::Lite;
# To turn on SOAP debugging use this
# ==================================
# use SOAP::Lite +trace => 'all';
# ==================================
@callemall
callemall / Perl - ExtCreateBroadcast (Text).perl
Created July 31, 2013 16:07
Using the ExtCreateBroadcast function, this example launches a text-only broadcast to a set of comma delimited phone numbers. Recipients must be able to receive texts on their phone.
#!/usr/bin/perl -w
# SOAP client for CEA web service
use strict;
use SOAP::Lite;
# To turn on SOAP debugging use this
# ==================================
# use SOAP::Lite +trace => 'all';
# ==================================
@callemall
callemall / C++ Sample Results.txt
Created July 31, 2013 16:02
Results of running the C++ Sample Program.
SRV1092:/usr/local/src/CEAAPI# ./sample
ErrorCode : 0
ErrorMessage : Operation Successful
BroadcastID : 12939
GoodrecordCount : 1
BadRecordCount : 0
@callemall
callemall / C++ Compiling.txt
Created July 31, 2013 16:01
Command line compile instructions for the C++ Sample Program.
g++ -o sample sample.cpp soapC.cpp soapCEAAPI_USCOREv2SoapProxy.cpp soapCEAAPI_USCOREv2Soap12Proxy.cpp -lgsoap++
@callemall
callemall / C++ Sample Program.cpp
Created July 31, 2013 15:59
Create and launch a text-to-speech broadcast using the API's ExtCreateBroadcast function.
#include "soapH.h" // include header files
#include "soapCEAAPI_USCOREv2Soap12Proxy.h" // get proxy
#include "CEAAPI_USCOREv2Soap12.nsmap" // get namespace bindings
using namespace std;
int main()
{
CEAAPI_USCOREv2Soap12Proxy q;
@callemall
callemall / C++ Std string.txt
Last active December 20, 2015 11:29
For issues using std::string, uncomment the following line in typemap.dat to use char* strings when the definition gets created.
# To use regular char* strings instead of std::string, use:
xsd__string = | char* | char*
@callemall
callemall / C++ Pull Definitions From Web Service.txt
Created July 31, 2013 15:53
Commands to pull the Call-Em-All SOAP API web service definitions from the server.
mkdir /usr/local/src/CEAAPI
cd /usr/local/src/CEAAPI
cp /usr/local/src/gsoap-2.8/gsoap/typemap.dat .
wsdl2h -o CEAAPI.h http://staging-api.call-em-all.com/webservices/CEAAPI_v2.asmx?WSDL
soapcpp2 -i CEAAPI.h -I/usr/share/gsoap/import/