Configuring MDC for SMS Delivery

So you've read about MDC and would like to configure it for SMS delivery. Let's start off by opening the MDC config tool and selecting the SMS Delivery tab.

For this tutorial I will set up a python http server for test purposes, configuring a production server will be performed in the same manner. If you want to follow along, install python and run one of the following commands from your terminal/machine depending on the version:

python -m SimpleHTTPServer 8000
python -m http.server 8000
  1. Check Enable SMS Delivery
  2. Click Add HTTP Gateway or Add SMPP Gateway depending on the protocol that is supported by your gateway.
  3. Enter a display name
  4. Enter the URL/IP address (depending on the protocol) of your gateway
  5. Enter the port that the gateway is listening on
  6. (Optional) Configure account settings in case authentication is required
  7. (Optional) Configure SMPP settings for your country/provider

Let's take a close look at the HTTP gateway configuration settings, specifically the Query and Result tab:

When using an HTTP server you have 3 settings to configure: the query string, form method and result matching rules.

Query String

You can configure 4 paramters:

Parameter Description
[acc_user] Username set in the gateway account settings
[acc_pwd] Password set in the gateway account settings
[otp_dest] Destination of the message, in this case the phone number
[otp_msg] Message sent by OAS

In the example above we are passing the destination and message as query parameters:


Form Method

You can send the paramters either as a get or post request. Since we are using the built-in http server module from python, which only implements GET, we are restricted to using GET.

Result Matching Rules

The http server can respond with different responses, here we can define what should be treated as a success or failure message. For our sample, we will only fill out the description, the rest we will leave as blank as the built-in http server module in python will send an empty response in case of success.

Testing the MDC Configuration

Upon configuring our settings we have to click apply and restart the MDC service for the changes to take effect. Now we can click the Test button:

When we click send, we will see the following output on our python server:

>python -m http.server 8000
Serving HTTP on port 8000 ( ... - - [12/Mar/2020 01:03:54] "GET /?destination=123456789&message=Test%20Message%20from%20mdcconfiggui. HTTP/1.1" 200 -

Here we see that our python server received the SMS with the data we requested and that our test succeeded.

Show Comments