SMS Relay Server (SMSHub) - Web Service
Overview
SMSHub is WebADM’s messaging and mobile-signature broker. It exposes a simple SOAP API to:
- Send SMS via one or more pluggable SMS gateways (SMSC).
- Request Mobile Signatures (MSS) from a mobile signature provider (e.g., Swisscom Mobile ID).
- Health-check the service.
Administrators configure routing, providers, authentication and retry/spooling in WebADM. Client applications call the SOAP methods described below.
The SMSHub component must be configured with either an internal or external SMS provider to allow the WebADM framework and its components to send SMS messages. SMS messages can be used for alerts, self-registration requests, OTP delivery...
If no internal or external SMS gateway is available, SMS credits can be purchased from RCDevs.
Audience & Terminology
- Developers integrating applications with WebADM to send SMS or trigger mobile signatures.
- Administrators operating WebADM and managing SMS/Signature providers.
Terms
- SMSC: SMS gateway/provider (Clickatell, Plivo, SMPP, etc.).
- MSS: Mobile Signature Service/provider.
- Client: The calling application consuming this SOAP API.
SOAP Service Definition (WSDL extract)
- Target Namespace:
http://www.rcdevs.com/wsdl/smshub/ - Binding:
soap:bindingstyle rpc, body literal - SOAPAction values:
smshubSend,smshubSign,smshubStatus - Service Address:
https://webadm1.rcdevsdocs.com:8443/smshub/
Operations
smshubSend(username, password, mobile[], text, type, sender, client, source, settings)→(code, error, message)smshubSign(username, password, mobile[], text, timeout, client, source, settings)→(code, error, message, data(base64), deny(boolean))smshubStatus()→(status(boolean), message)
Types
mobile:ArrayOfString(SOAP-ENC array ofxsd:string).
Note: The authentication credentials are SOAP parameters (username, password). WebADM validates them using the configured Authentication Backend (Static or LDAP).
Authentication & Security
- Backends
- STATIC: Validate the given
username/passwordagainst static credentials defined by the admin. - LDAP: Validate the given
username/passwordagainst LDAP. Usernames may be provided asdomain\username.
- STATIC: Validate the given
- Failure Blocking Timer (seconds): after an auth failure, new requests are temporarily rejected.
- With STATIC, the client IP is blocked.
- With LDAP, the user’s LDAP account is blocked.
- Set to
0to disable blocking.
- Transport: HTTPS (TLS) to the service URL.
- MSS (Swisscom): a client certificate is required by the provider; WebADM stores the certificate/key files (see Admin settings below).
Credentials travel in the SOAP body.
Operations in Detail
smshubStatus
Purpose: Health-check SMSHub.
Request: no parameters
Response
status(xsd:boolean):trueif service is up.message(xsd:string): diagnostic text.
smshubSend
Purpose: Send an SMS to one or more mobile numbers.
Request parameters
username/password(xsd:string): credentials; validated via STATIC or LDAP backend.mobile(ArrayOfString): one or more destination numbers (recommended format: E.164, e.g.,+352...).text(xsd:string): message body.type(xsd:string, optional): SMS type/class. If omitted, WebADM uses Default SMS Type (Class) from the Admin settings. Note: Flash SMS is not supported by Clickatell Platform, Plivo, and Mpulse.sender(xsd:string, optional): Sender ID/number. May be required by some providers (e.g., Plivo).client(xsd:string, optional): Free-form client label (appears in logs/stats).source(xsd:string, optional): Free-form origin tag (environment, module, etc.).settings(xsd:string, optional): Provider-specific/advanced options as an opaque string; leave empty unless instructed by RCDevs.
Response
code(xsd:integer): implementation-defined result code.error(xsd:string): error description (empty on success).message(xsd:string): human-readable status (may include upstream provider info).
Routing and provider selection are governed by Admin settings: SMSC priorities, prefix/location matches, max per-SMSC connections, and retry rules.
smshubSign
Purpose: Start a Mobile Signature (MSS) request to the configured provider.
Request parameters
username/password(xsd:string): credentials; validated via STATIC or LDAP backend.mobile(ArrayOfString): one or more MSISDNs (the primary recipient is typically the first entry).text(xsd:string): text presented to the user in the signature prompt, as supported by the provider.timeout(xsd:integer): seconds to wait for user action/response before timing out.client/source/settings(xsd:string, optional): seesmshubSend.
Response
code(xsd:integer): implementation-defined result code.error(xsd:string): error description (empty on success).message(xsd:string): status text from SMSHub/provider.data(xsd:base64Binary): provider-returned data (e.g., signature payload) encoded in Base64.deny(xsd:boolean):trueif the end-user explicitly denied the signature request.
Swisscom Mobile ID requires a client certificate configured in WebADM (see Admin ▸ Mobile Signature Service).
SOAP Examples
Raw SOAP (RPC-literal) – smshubSend
HTTP
POST /smshub/ HTTP/1.1
Host: webadm1.rcdevsdocs.com:8443
Content-Type: text/xml; charset=utf-8
SOAPAction: "smshubSend"
Body
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:smshub">
<SOAP-ENV:Body>
<ns1:smshubSend>
<username>api-user</username>
<password>••••••••</password>
<mobile SOAP-ENC:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">+35212345678</item>
<item xsi:type="xsd:string">+33123456789</item>
</mobile>
<text>Your OTP is 123456</text>
<type>standard</type>
<sender>ACMECorp</sender>
<client>WebPortal</client>
<source>prod-eu</source>
<settings></settings>
</ns1:smshubSend>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Typical Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<smshubSendResponse>
<code>0</code>
<error></error>
<message>Accepted</message>
</smshubSendResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
When using client libraries, just pass mobile as a native list/array of strings; the library handles SOAP array encoding.
Raw SOAP – smshubSign
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="urn:smshub">
<SOAP-ENV:Body>
<ns1:smshubSign>
<username>api-user</username>
<password>••••••••</password>
<mobile>
<item>+41790000000</item>
</mobile>
<text>Approve login to ExampleApp</text>
<timeout>60</timeout>
<client>ExampleApp</client>
<source>prod</source>
<settings></settings>
</ns1:smshubSign>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response (illustrative)
<smshubSignResponse>
<code>0</code>
<error/>
<message>Signature OK</message>
<data>BASE64_PAYLOAD_HERE</data>
<deny>false</deny>
</smshubSignResponse>
Raw SOAP – smshubStatus
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:smshub">
<SOAP-ENV:Body>
<ns1:smshubStatus/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<smshubStatusResponse>
<status>true</status>
<message>OK</message>
</smshubStatusResponse>
PHP (SoapClient) – Send SMS
$client = new SoapClient('https://webadm1.rcdevsdocs.com:8443/smshub/?wsdl', [
'trace' => 1,
'exceptions' => true,
]);
$params = [
'username' => 'api-user',
'password' => 'secret',
'mobile' => ['+35212345678', '+33123456789'],
'text' => 'Your OTP is 123456',
'type' => 'standard',
'sender' => 'ACMECorp',
'client' => 'WebPortal',
'source' => 'prod-eu',
'settings' => '',
];
$result = $client->smshubSend($params);
Python (zeep) – Send SMS
from zeep import Client
wsdl = 'https://webadm1.rcdevsdocs.com:8443/smshub/?wsdl'
client = Client(wsdl)
result = client.service.smshubSend(
username='api-user',
password='secret',
mobile=['+35212345678', '+33123456789'],
text='Your OTP is 123456',
type='standard',
sender='ACMECorp',
client='WebPortal',
source='prod-eu',
settings='',
)
Administration in WebADM
This section mirrors the Admin “settings” page and explains how runtime behavior affects the SOAP API.
Global SMS Settings
- Default SMS Type (Class): Used if
typeis not provided in the request. Flash SMS is not supported by Clickatell Platform, Plivo and Mpulse. - Max Per-SMSC Connections: If enabled, limits concurrent SMS requests per SMSC. Requests over the limit are spooled (queued) for each SMSC.
- SMSC Request Retries: Number of retries attempted per SMSC when an SMS request fails.
Server Authentication
- Authentication Backend
- STATIC: uses the admin-defined static username/password.
- LDAP: uses LDAP to authenticate existing users. Usernames may be formatted
domain\username.
- Static Username / Static Password: Only for STATIC backend.
- Failure Blocking Timer (seconds): Reject new requests after an auth failure.
- STATIC: client IP is blocked.
- LDAP: user LDAP account is blocked.
- Set
0to disable.
SMS Gateways (SMSC 1..4)
You can configure up to four SMSCs. SMSHub selects providers based on priority and optional prefix/country matching.
Common Fields
- SMS Gateway (type): one of
- RCDevs: RCDevs SMS Cloud Service (SMS credits required)
- Clickatell: Clickatell Platform REST API
- Clickatell (REST): Clickatell Central REST API (deprecated)
- Clickatell (SOAP): Clickatell Central SOAP API (deprecated)
- Plivo: Plivo REST API
- AQL: AQL HTTP API
- Mpulse: Mpulse SOAP API
- GenericSMPP: Generic SMPP-TR gateway (requires server address & port)
- GnokiiDevice: Local SIM box / mobile phone via the
gnokiitool - Custom[1-4]: Custom gateway implemented in
smsc/custom[1-4].php
- SMSC Username
- RCDevs / Clickatell Platform: not needed
- Clickatell Central (SOAP): developer account username
- Plivo:
AUTH_ID - GenericSMPP: SMPP
system_id
- SMSC Password
- RCDevs / Clickatell Platform: not needed
- Clickatell Central (SOAP): developer account password
- Plivo:
AUTH_TOKEN - GenericSMPP: SMPP password
- SMSC Account
- Clickatell Platform: SMS Account API Key
- Clickatell Central (REST): REST Auth Token
- Clickatell Central (SOAP): SOAP API-ID
- GenericSMPP: value passed in SMPP
system_type - Custom SMSC: value passed to
accountfunction parameter
- SMSC Custom Name: Name shown in logs.
- Sender Number / ID: Default sender for the SMSC. Required with Plivo.
- SMSC Priority: Higher value = higher priority. SMSCs with the same priority are selected randomly.
- Mobile Prefix Match: Comma-separated MSISDN prefixes for which this SMSC has priority.
- Location Match: Comma-separated country codes for which this SMSC has priority.
- SMSC URL or Address
- Web SMSCs: HTTP(s) URL if different from the provider default.
- GenericSMPP: required
hostname:port. - GnokiiDevice: path to the
gnokiicommand (default/usr/bin/gnokii).
Routing Logic (summary)
- Build the candidate list from enabled SMSCs.
- Apply prefix/location matches.
- Order by priority (desc). If equal priority, choose randomly.
- Enforce Max Per-SMSC Connections; excess requests are spooled.
- On failure, retry up to SMSC Request Retries for that SMSC; failover to next candidate.
Mobile Signature Service (MSS)
- MSS Provider: Select the mobile signature provider.
- MSSP Username / Password / Account: Provider credentials.
- Client Certificate File: Required with Swisscom.
- Private Key File: Provide only if the certificate file does not contain the private key.
Message Templates
Customize texts used by SMSHub for user/admin notifications:
- SMS Send Failed Message
- SMS Send Success Message
- MSS Signature Failed Message
- MSS Signature Success Message
- MSS Signature Cancel Message
- Auth Failed Message
- Invalid Request Message
- Timer Exists Message
- Server Error Message
- Server Busy Message
Templates are free-form strings stored in WebADM. They do not change the SOAP contract.
Implementation Notes & Best Practices
- Phone Numbers: Prefer E.164 format (
+countrycode…) for reliable prefix/location matching. - Sender ID: Some providers require pre-registration; ensure your chosen sender is accepted in the destination country.
- Flash SMS: Avoid when using Clickatell Platform, Plivo, or Mpulse (unsupported).
- Timeouts: Use a realistic
timeoutforsmshubSignreflecting user interaction time. - Idempotency: If your client may retry, add your own de-duplication key in
client/sourceand log accordingly. - Monitoring: Call
smshubStatusfrom health checks. Trackcode/error/messagein your application logs.
Troubleshooting
- Authentication failures → check which backend is configured. With STATIC, the source IP may be blocked by the Failure Blocking Timer; with LDAP, verify the user credentials (and possible account lock due to the timer).
- Provider rejects sender → ensure Sender Number / ID is set (Plivo requires it) and valid for the destination.
- High latency or throttling → tune Max Per-SMSC Connections and SMSC Request Retries; consider adding another SMSC with higher priority for target regions/prefixes.
- Flash not delivered → confirm whether the selected provider supports Flash SMS; if not, switch the SMS type or provider.
- SMPP connectivity → verify
hostname:port, credentials and that firewalls allow outbound connections to the SMPP host.
Appendix: Full Operation Signatures
Messages
- smshubSendRequest:
username:string, password:string, mobile:ArrayOfString, text:string, type:string, sender:string, client:string, source:string, settings:string - smshubSendResponse:
code:integer, error:string, message:string - smshubSignRequest:
username:string, password:string, mobile:ArrayOfString, text:string, timeout:integer, client:string, source:string, settings:string - smshubSignResponse:
code:integer, error:string, message:string, data:base64Binary, deny:boolean - smshubStatusRequest: (empty)
- smshubStatusResponse:
status:boolean, message:string
Array Type
ArrayOfString(restriction ofSOAP-ENC:ArraywithSOAP-ENC:arrayType="xsd:string[]").
Quick Start Checklist
- In WebADM, set Authentication Backend (STATIC or LDAP) and, if STATIC, define the credentials.
- Configure at least one SMS Gateway (SMSC) with credentials, Sender ID (Plivo requires), Priority, and optional Prefix/Location matches.
- (If using MSS) Configure the Mobile Signature Service, including the client certificate for Swisscom.
- Test connectivity with
smshubStatus. - Send a test SMS with
smshubSend. - Monitor logs and tune Max Per-SMSC Connections and SMSC Request Retries as needed.
Custom PHP script examples
Internal SMS Gateway
<?php
/*
* Custom SMS 1
*
* Input Variables:
* $msg : Text message
* $mobile : User mobile number
* $flash : true for flash SMS, false for normal SMS
* $sender : Sender mobile number
* $username : SMSC connection username
* $password : SMSC connection password
* $account : SMSC account ID
* $url : SMSC SOAP service url
* $proxy : proxy server connection data
* &$error : error message
*
* Return values:
* true for success
* false for error
*/
//
// sample custom SMSC connector using SOAP
//
class WSSoapClient extends SoapClient
{
private $OASIS = 'http://docs.oasis-open.org/wss/2004/01';
/**
* WS-Security Username
* @var string
*/
private $username;
/**
* WS-Security Password
* @var string
*/
private $password;
/**
* WS-Security PasswordType
* @var string
*/
private $passwordType;
/**
* Set WS-Security credentials
*
* @param string $username
* @param string $password
* @param string $passwordType
*/
public function __setUsernameToken($username, $password, $passwordType)
{
$this->username = $username;
$this->password = $password;
$this->passwordType = $passwordType;
}
/**
* Overwrites the original method adding the security header.
* As you can see, if you want to add more headers, the method needs to be modified.
*/
public function __soapcall($function_name, $arguments)
{
$this->__setSoapHeaders($this->generateWSSecurityHeader());
return parent::__soapcall($function_name, $arguments);
}
/**
* Generate password digest.
*
* Using the password directly may work also, but it's not secure to transmit it without encryption.
* And anyway, at least with axis+wss4j, the nonce and timestamp are mandatory anyway.
*
* @return string base64 encoded password digest
*/
private function generatePasswordDigest()
{
$this->nonce = mt_rand();
$this->timestamp = gmdate('Y-m-d\TH:i:s\Z');
$packedNonce = pack('H*', $this->nonce);
$packedTimestamp = pack('a*', $this->timestamp);
$packedPassword = pack('a*', $this->password);
$hash = sha1($packedNonce . $packedTimestamp . $packedPassword);
$packedHash = pack('H*', $hash);
return base64_encode($packedHash);
}
/**
* Generates WS-Security headers
*
* @return SoapHeader
*/
private function generateWSSecurityHeader()
{
if ($this->passwordType === 'PasswordDigest')
{
$password = $this->generatePasswordDigest();
$nonce = sha1($this->nonce);
}
elseif ($this->passwordType === 'PasswordText')
{
$password = $this->password;
$nonce = base64_encode(random_bytes(16));
}
else
{
return '';
}
$xml = '
<wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="' . $this->OASIS . '/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-'. strtoupper(bin2hex(random_bytes(16))).'">
<wsse:Username>' . $this->username . '</wsse:Username>
<wsse:Password Type="' . $this->OASIS . '/oasis-200401-wss-username-token-profile-1.0#' . $this->passwordType . '">' . $password . '</wsse:Password>
<wsse:Nonce EncodingType="' . $this->OASIS . '/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' . $nonce . '</wsse:Nonce>
<wsu:Created>' . gmdate('Y-m-d\TH:i:s.000\Z') . '</wsu:Created>';
if ($this->passwordType === 'PasswordDigest')
{
$xml .= "\n\t" . '<wsu:Created xmlns:wsu="' . $this->OASIS . '/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . $this->timestamp . '</wsu:Created>';
}
$xml .= '
</wsse:UsernameToken>
</wsse:Security>';
return new SoapHeader(
$this->OASIS . '/oasis-200401-wss-wssecurity-secext-1.0.xsd',
'Security',
new SoapVar($xml, XSD_ANYXML),
true);
}
}
abstract class MODE {
const NORMAL = "NORMAL";
const SANDBOX = "SANDBOX";
}
abstract class ENCODING {
const TEXT = "TEXT";
const AUTO = "AUTO";
const UNICODE = "UNICODE";
}
function smshub_custom1($msg, $mobile, $flash, $sender, $username, $password, $account, $url, $proxy, &$error) {
// load WSDL file for Custom1 SOAP SMSC
$wsdl_file = "/opt/webadm/websrvs/smshub/smsc/sms.wsdl";
if (!file_exists($wsdl_file)) {
$error = "WSDL file '$wsdl_file' does not exists";
return false;
}
// set HTTP proxy connection
$options = ['exceptions' => false,
'stream_context' => stream_context_create(['ssl' => ['verify_peer' => false]])];
if ($proxy) {
print("Configuring proxy...");
$options['proxy_host'] = $proxy['host'];
$options['proxy_port'] = $proxy['port'];
if ($proxy['user']) $options['proxy_login'] = $proxy['user'];
if ($proxy['password']) $options['proxy_password'] = $proxy['password'];
}
else
print("No proxy to configure.");
// create SOAP client
$client = null;
try {
$client = new WSSoapClient($wsdl_file, $options);
$client->__setUsernameToken($username, $password, 'PasswordText');
} catch (Exception $e) {
print("error");
}
if (!$client) {
$error = "Could not load WSDL file '$wsdl_file'";
return false;
}
// set soap request
$req = [[
'message'=> [
'content'=>$msg,
'encoding'=>ENCODING::TEXT,
'mode'=>MODE::NORMAL],
'recipients'=>[
'recipient'=>[
'phoneNumber' =>$mobile]]]];
// send soap request
$ret = $client->__soapcall("sendShortMessage", $req);
if (!$ret) {
$error = "Invalid SOAP response";
return false;
}
if (is_soap_fault($ret)) {
$error = $ret->faultstring;
return false;
}
// Check soap response and return
// -> true on success
// -> false on failure
return true;
}
sms.wsdl
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic" xmlns:xsd
="http://www.w3.org/2001/XMLSchema" name="GenericAdminCloudShortMessageService" targetNamespace="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic"><wsdl:documentation><wsdl:appinfo sour
ce="WMQI_APPINFO"><MRWSDLAppInfo imported="true"><generatedXSD location="GenericAdminCloudShortMessageService_InlineSchema1.xsd"/><binding hasEncoding="false" imported="true" name="GenericAdminCloudShortMess
ageServiceSOAP" originalBindingStyle="document"/></MRWSDLAppInfo></wsdl:appinfo></wsdl:documentation><wsdl:types><xsd:schema elementFormDefault="qualified" targetNamespace="http://sms.rcdevsdocs.com/admin/c
loudshortmessage/service/inf/generic"><xsd:include schemaLocation="/opt/webadm/websrvs/smshub/smsc/sms.xml"/></xsd:schema></wsdl:types><wsdl:message name="getLastShortMessageDetailsRequest"><wsdl:part elemen
t="tns:getLastShortMessageDetails" name="getLastShortMessageDetails"/></wsdl:message><wsdl:message name="getLastShortMessageDetailsResponse"><wsdl:part element="tns:getLastShortMessageDetailsResponse" name="
getLastShortMessageDetailsResponse"/></wsdl:message><wsdl:message name="sendShortMessageRequest"><wsdl:part element="tns:sendShortMessage" name="sendShortMessage"/></wsdl:message><wsdl:message name="sendShor
tMessageResponse"><wsdl:part element="tns:sendShortMessageResponse" name="sendShortMessageResponse"/></wsdl:message><wsdl:message name="multicastShortMessageRequest"><wsdl:part element="tns:multicastShortMes
sage" name="multicastShortMessage"/></wsdl:message><wsdl:message name="multicastShortMessageResponse"><wsdl:part element="tns:multicastShortMessageResponse" name="multicastShortMessageResponse"/></wsdl:messa
ge><wsdl:message name="getShortMessageDeliveryStatusRequest"><wsdl:part element="tns:getShortMessageDeliveryStatus" name="getShortMessageDeliveryStatus"/></wsdl:message><wsdl:message name="getShortMessageDel
iveryStatusResponse"><wsdl:part element="tns:getShortMessageDeliveryStatusResponse" name="getShortMessageDeliveryStatusResponse"/></wsdl:message><wsdl:message name="checkShortMessageDeliveryStatusRequest"><w
sdl:part element="tns:checkShortMessageDeliveryStatus" name="checkShortMessageDeliveryStatus"/></wsdl:message><wsdl:message name="checkShortMessageDeliveryStatusResponse"><wsdl:part element="tns:checkShortMe
ssageDeliveryStatusResponse" name="checkShortMessageDeliveryStatusResponse"/></wsdl:message><wsdl:portType name="GenericAdminCloudShortMessageService"><wsdl:operation name="getLastShortMessageDetails"><wsdl:
input message="tns:getLastShortMessageDetailsRequest"/><wsdl:output message="tns:getLastShortMessageDetailsResponse"/></wsdl:operation><wsdl:operation name="sendShortMessage"><wsdl:input message="tns:sendSho
rtMessageRequest"/><wsdl:output message="tns:sendShortMessageResponse"/></wsdl:operation><wsdl:operation name="multicastShortMessage"><wsdl:input message="tns:multicastShortMessageRequest"/><wsdl:output mess
age="tns:multicastShortMessageResponse"/></wsdl:operation><wsdl:operation name="getShortMessageDeliveryStatus"><wsdl:input message="tns:getShortMessageDeliveryStatusRequest"/><wsdl:output message="tns:getSho
rtMessageDeliveryStatusResponse"/></wsdl:operation><wsdl:operation name="checkShortMessageDeliveryStatus"><wsdl:input message="tns:checkShortMessageDeliveryStatusRequest"/><wsdl:output message="tns:checkShor
tMessageDeliveryStatusResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="GenericAdminCloudShortMessageServiceSOAP" type="tns:GenericAdminCloudShortMessageService"><soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="getLastShortMessageDetails"><soap:sendShortMessage soapAction="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic/g
etLastShortMessageDetails"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="sendShortMessage"><soap:sendShortMes
sage soapAction="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic/sendShortMessage"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:out
put></wsdl:operation><wsdl:operation name="multicastShortMessage"><soap:sendShortMessage soapAction="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic/multicastShortMessage"/><wsdl:input
><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="getShortMessageDeliveryStatus"><soap:sendShortMessage soapAction="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic/getShortMessageDeliveryStatus"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:op
eration><wsdl:operation name="checkShortMessageDeliveryStatus"><soap:sendShortMessage soapAction="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic/checkShortMessageDeliveryStatus"/><wsd
l:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="GenericAdminCloudShortMessageService"><wsdl:port bindin
g="tns:GenericAdminCloudShortMessageServiceSOAP" name="GenericAdminCloudShortMessageService"><soap:address location="https://sms.rcdevsdocs.com/SOAP/GenericAdminCloudShortMessageService"/></wsdl:port></wsdl:service></wsdl:definitions>
sms.xml
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:Q1="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic" xmlns:Q2="http://sms.rcdevsdocs.com/admin/shortmessage/data_type/generic" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic" elementFormDefault="qualified" targetNamespace="http://sms.rcdevsdocs.com/admin/cloudshortmessage/service/inf/generic" version="1.0"><xsd:import namespace="http://sms.rcdevsdocs.com/admin/shortmessage/data_type/generic" schemaLocation="/opt/webadm/websrvs/smshub/smsc/sms.xsdl"/><xsd:complexType name="GetLastShortMessageDetails"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="mobile" type="xsd:string"/></xsd:sequence></xsd:complexType><xsd:complexType name="GetLastShortMessageDetailsResponse"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="0" name="detail" type="Q2:CloudShortMessageStatus"/></xsd:sequence></xsd:complexType><xsd:element name="getLastShortMessageDetails" type="tns:GetLastShortMessageDetails"/><xsd:element name="getLastShortMessageDetailsResponse" type="tns:GetLastShortMessageDetailsResponse"/><xsd:complexType name="SendShortMessage"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="message" type="Q2:CloudShortMessage"/><xsd:element maxOccurs="1" minOccurs="1" name="recipients" type="Q2:CloudShortMessageRecipients"/></xsd:sequence></xsd:complexType><xsd:complexType name="SendShortMessageResponse"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="status" type="xsd:int"/><xsd:element maxOccurs="1" minOccurs="1" name="description" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="1" name="recipientsStatus" type="Q2:CloudShortMessageStatuses"/></xsd:sequence></xsd:complexType><xsd:element name="sendShortMessage" type="tns:SendShortMessage"/><xsd:element name="sendShortMessageResponse" type="tns:SendShortMessageResponse"/><xsd:complexType name="GetShortMessageDeliveryStatus"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="smsId" type="xsd:string"/></xsd:sequence></xsd:complexType><xsd:complexType name="GetShortMessageDeliveryStatusResponse"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="0" name="status" type="Q2:CloudShortMessageStatus"/></xsd:sequence></xsd:complexType><xsd:element name="getShortMessageDeliveryStatus" type="tns:GetShortMessageDeliveryStatus"/><xsd:element name="getShortMessageDeliveryStatusResponse" type="tns:GetShortMessageDeliveryStatusResponse"/><xsd:complexType name="CheckShortMessageDeliveryStatus"/><xsd:complexType name="CheckShortMessageDeliveryStatusResponse"><xsd:sequence><xsd:element name="status" type="xsd:int"/></xsd:sequence></xsd:complexType><xsd:element name="checkShortMessageDeliveryStatus" type="tns:CheckShortMessageDeliveryStatus"/><xsd:element name="checkShortMessageDeliveryStatusResponse" type="tns:CheckShortMessageDeliveryStatusResponse"/><xsd:element name="acknowledgeShortMessage" type="tns:AcknowledgeShortMessage"/><xsd:element name="acknowledgeShortMessageResponse" type="tns:AcknowledgeShortMessageResponse"/><xsd:complexType name="AcknowledgeShortMessage"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="status" type="Q2:CloudShortMessageStatus"/></xsd:sequence></xsd:complexType><xsd:complexType name="AcknowledgeShortMessageResponse"><xsd:sequence><xsd:element name="status" type="xsd:int"/></xsd:sequence></xsd:complexType><xsd:element name="multicastShortMessage" type="tns:MulticastShortMessageMessage"/><xsd:element name="multicastShortMessageResponse" type="tns:MulticastShortMessageResponse"/><xsd:complexType name="MulticastShortMessageMessage"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="targetBuidling "><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:enumeration value="NOBLD"/><xsd:enumeration value="WKI"/><xsd:enumeration value="EKI"/><xsd:enumeration value="IAK"/><xsd:enumeration value="BKI"/><xsd:enumeration value="LKI"/><xsd:enumeration value="LHO"/><xsd:enumeration value="PKI"/><xsd:enumeration value="LUX"/><xsd:enumeration value="EXT_OFFICES"/><xsd:enumeration value="ALL"/><xsd:enumeration value="TST"/></xsd:restriction></xsd:simpleType></xsd:element><xsd:element maxOccurs="1" minOccurs="0" name="additionalRecipients" type="xsd:string"/><xsd:element name="shortMessageBody" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="mode" type="Q2:Mode"/><xsd:element maxOccurs="1" minOccurs="0" name="includePrivateNumbers" type="xsd:boolean"/></xsd:sequence></xsd:complexType><xsd:complexType name="MulticastShortMessageResponse"><xsd:sequence><xsd:element name="status" type="xsd:string"/></xsd:sequence></xsd:complexType><xsd:element name="getEmployeeMobileAndWorkPlaceList" type="tns:GetEmployeeMobileAndWorkPlaceList"/><xsd:complexType name="GetEmployeeMobileAndWorkPlaceList"><xsd:sequence><xsd:element maxOccurs="unbounded" name="employeeDetails" type="tns:GetEmployeeMobileAndWorkPlace"/></xsd:sequence></xsd:complexType><xsd:complexType name="GetEmployeeMobileAndWorkPlace"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="employeeId" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="mobileNumber" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="1" name="workPlace" type="xsd:string"/></xsd:sequence></xsd:complexType></xsd:schema>
sms.xsdl
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://sms.rcdevsdocs.com/admin/shortmessage/data_type/generic" elementFormDefault="qualified" targetNamespace="http://sms.rcdevsdocs.com/admin/shortmessage/data_type/generic"><xsd:complexType name="CloudShortMessage"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="content" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="scheduledDeliveryTime" type="xsd:dateTime"/><xsd:element maxOccurs="1" minOccurs="0" name="ValidityTime" type="xsd:dateTime"/><xsd:element maxOccurs="1" minOccurs="0" name="encoding" type="tns:CloudMessageEncoding"/><xsd:element maxOccurs="1" minOccurs="0" name="mode" type="tns:Mode"/></xsd:sequence></xsd:complexType><xsd:complexType name="CloudShortMessageRecipient"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="phoneNumber"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:pattern value="[1-9][0-9]{0,14}"/><xsd:pattern value="[\+][1-9][0-9]{0,14}"/><xsd:pattern value="[0]{2}[1-9][0-9]{0,14}"/><xsd:maxLength value="15"/><xsd:minLength value="3"/></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType><xsd:complexType name="CloudShortMessageStatus"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="phoneNumber"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:pattern value="[1-9][0-9]{0,14}"/><xsd:pattern value="[\+][1-9][0-9]{0,14}"/><xsd:pattern value="[0]{2}[1-9][0-9]{0,14}"/><xsd:maxLength value="15"/><xsd:minLength value="3"/></xsd:restriction></xsd:simpleType></xsd:element><xsd:element maxOccurs="1" minOccurs="0" name="smsId" type="xsd:string"/><xsd:element name="message" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="sendingStatus" type="tns:CloudShortMessageSendingStatus"/><xsd:element maxOccurs="1" minOccurs="0" name="deliveryStatus" type="tns:CloudShortMessageDeliveryStatus"/></xsd:sequence></xsd:complexType><xsd:complexType name="CloudShortMessageDeliveryStatus"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="code" type="xsd:int"/><xsd:element maxOccurs="1" minOccurs="1" name="description" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="deliveryTime" type="xsd:dateTime"/></xsd:sequence></xsd:complexType><xsd:complexType name="CloudShortMessageRecipients"><xsd:sequence><xsd:element maxOccurs="unbounded" minOccurs="0" name="recipient" type="tns:CloudShortMessageRecipient"/></xsd:sequence></xsd:complexType><xsd:complexType name="CloudShortMessageSendingStatus"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="code" type="xsd:int"/><xsd:element maxOccurs="1" minOccurs="1" name="description" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="sendingTime" type="xsd:dateTime"/></xsd:sequence></xsd:complexType><xsd:complexType name="CloudShortMessageStatuses"><xsd:sequence><xsd:element maxOccurs="unbounded" minOccurs="0" name="status" type="tns:CloudShortMessageStatus"/></xsd:sequence></xsd:complexType><xsd:complexType name="Recipient"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="phoneNumber"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:pattern value="[1-9][0-9]{0,14}"/><xsd:pattern value="[\+][1-9][0-9]{0,14}"/><xsd:pattern value="[0]{2}[1-9][0-9]{0,14}"/><xsd:maxLength value="15"/><xsd:minLength value="3"/></xsd:restriction></xsd:simpleType></xsd:element><xsd:element maxOccurs="1" minOccurs="0" name="trackingId" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="status" type="tns:RecipientStatus"/><xsd:element maxOccurs="1" minOccurs="0" name="sendingTime" type="xsd:dateTime"/><xsd:element maxOccurs="1" minOccurs="0" name="deliveryTime" type="xsd:dateTime"/><xsd:element maxOccurs="1" minOccurs="0" name="deliveryNotification" type="tns:NotificationEmails"/><xsd:element maxOccurs="1" minOccurs="0" name="failureNotification" type="tns:NotificationEmails"/></xsd:sequence></xsd:complexType><xsd:complexType name="ShortMessage"><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="content" type="xsd:string">
</xsd:element><xsd:element maxOccurs="1" minOccurs="0" name="priority" type="tns:ShortMessagePriority"/><xsd:element maxOccurs="1" minOccurs="0" name="scheduledDeliveryTime" type="xsd:dateTime">
</xsd:element><xsd:element maxOccurs="1" minOccurs="0" name="validityPeriod" type="xsd:int">
</xsd:element></xsd:sequence></xsd:complexType><xsd:simpleType name="ShortMessagePriority"><xsd:restriction base="xsd:string"><xsd:enumeration value="EMERGENCY"/><xsd:enumeration value="NEWSLETTER"/><xsd:enumeration value="TOKEN"/></xsd:restriction></xsd:simpleType><xsd:complexType name="NotificationEmails"><xsd:sequence><xsd:element maxOccurs="unbounded" minOccurs="1" name="email" type="xsd:string"/></xsd:sequence></xsd:complexType><xsd:simpleType name="RequestStatus"><xsd:restriction base="xsd:string"><xsd:enumeration value="ACCEPTED"/><xsd:enumeration value="ERROR"/></xsd:restriction></xsd:simpleType><xsd:complexType name="Recipients"><xsd:sequence><xsd:element maxOccurs="unbounded" minOccurs="0" name="recipient" type="tns:Recipient"/></xsd:sequence></xsd:complexType><xsd:simpleType name="RecipientStatus"><xsd:restriction base="xsd:string"><xsd:enumeration value="DELIVERED"/><xsd:enumeration value="ERROR"/><xsd:enumeration value="EXPIRED"/><xsd:enumeration value="PENDING"/><xsd:enumeration value="SMS_EXPIRED"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="CloudMessageEncoding"><xsd:restriction base="xsd:string"><xsd:enumeration value="TEXT"/><xsd:enumeration value="AUTO"/><xsd:enumeration value="UNICODE"/></xsd:restriction></xsd:simpleType><xsd:element name="cloudShortMessage" type="tns:CloudShortMessage"/><xsd:element name="cloudShortMessageStatus" type="tns:CloudShortMessageStatus"/><xsd:element name="cloudShortMessageRecipient" type="tns:CloudShortMessageRecipient"/><xsd:element name="cloudShortMessageRecipients" type="tns:CloudShortMessageRecipients"/><xsd:element name="cloudShortMessageStatuses" type="tns:CloudShortMessageStatuses"/><xsd:element name="shortMessage" type="tns:ShortMessage"/><xsd:element name="recipient" type="tns:Recipient"/><xsd:element name="recipients" type="tns:Recipients"/><xsd:simpleType name="Mode"><xsd:restriction base="xsd:string"><xsd:enumeration value="NORMAL"/><xsd:enumeration value="SANDBOX"/></xsd:restriction></xsd:simpleType></xsd:schema>
EagleSMS service
<?php
function smshub_custom1 ($msg, $mobile, $flash, $sender, $username, $password, $account, $url, $proxy, &$error) {
$base_url = $url.'/index.php/api/v2/';
$method = 'messages/sms';
$url = $base_url.$method;
$params = json_encode(array(
'to' => array($mobile),
'text' => $msg,
'priority' => 5,
// 'encoding' => 'unicode',
'validity' => '10m',
));
// error_log('SMSC1 url: '.$url);
// error_log('SMSC1 params: '.$params);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // FIXME
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json', 'access-token: '.$account));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) == 200) {
error_log('SMSC1: success');
return true;
} else {
error_log('SMSC1: failure, HTTP code: '.curl_getinfo($ch, CURLINFO_HTTP_CODE));
return false;
}
}
?>