The Deepnet Authentication Server has provided support for multiple SMS providers offering flexible customisation options together with the provision to support additional SMS providers (as an example, you might want to add a local SMS provider in order to reduce service charges). Whilst customisation requirements can vary between SMS providers, there are usually several aspects that they share in common, and adding new providers can often be as simple as adapting an existing SMS template from a similar provider.
In the following example, we will demonstrate one approach that may be used, but given the variety of solutions that may be required, it should be pointed out that configuring some providers may involve a lot more work and investigation, however we are on hand to assist if configuring the provider proves more challenging than expected.
The first step in setting up an SMS provider is usually to create an account with the provider, then obtain their SMS API documentation (please also ensure that you identify what protocol they are using, HTTP, SMTP, or SMPP etc.).
The next step would normally be to examine the built-in SMS provider templates that were installed into the folder "$INSTALL_PATH/Deepnet DualShield/smsproviders" :
If you find a good match with the provided templates then configuring the new provider should be relatively straightforward.
As an example, let us assume that you are going to use "txtmail.co.nz" as your SMS provider in DualShield. This company provides SMTP protocol, so we copy the built-in provider "gin.xml" which uses SMTP as well, and save the new file as "txtmail.xml", open the file "txtmail.xml" and change the provider name etc. Once this is done, the file content should look like as the following;
<?xml version="1.0" encoding="UTF-8"?>
Finally, add an entry in the file "sms_providers.xml",
<provider name="TXTMail" file="txtmail.xml" />
Access the management console of DualShield, you should see the newly added provider in SMS Gateway Settings. You should now restart DualShield service for it to take effect.
The following example, "mollie.nl", will send SMS via HTTP.
Accrding to its API document, the syntax of sending the request is,
And the response is something like
<?xml version="1.0" ?>
<resultmessage>Message successfully sent.</resultmessage>
As it is a HTTP protocol, you can refer to the built-in template ClickAtell. The response is XML format, so you can use xmlPath to extract the result, otherwise, you may need a regular expression which is complicated. However you can find the regular expression example in the built-in templates. The final mollie template would be
<mapping name="replace_sms" type="boolean">
<response type="http_body" regexp="true" format="xml">
<pattern success="true" xmlPath="//response/item/success">true</pattern>