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
Enable SMS Delivery
Add HTTP Gatewayor
Add SMPP Gatewaydepending on the protocol that is supported by your gateway.
- Enter a display name
- Enter the URL/IP address (depending on the protocol) of your gateway
- Enter the port that the gateway is listening on
- (Optional) Configure account settings in case authentication is required
- (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:
You can configure 4 paramters:
|[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:
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
When we click send, we will see the following output on our python server:
>python -m http.server 8000 Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... 10.10.200.75 - - [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.