SMS Deliverer HTTP Callback & Webhooks Integration Guide

Official Source: https://www.smsdeliverer.com/onlinehelp/howto/httpcallbck/

Positioning: HTTP Callback (Webhook) is SMS Deliverer's real-time SMS data synchronization solution. Whenever your GSM modem receives an inbound message or triggers an outbound status change, the software immediately pushes the payload to your pre-defined URL via HTTP POST.

Capabilities: Inbound SMS Webhooks, Instant Incoming Call Notifications, SMS Delivery Status Report APIs.


1. Overview & Typical Use Cases

Through this asynchronous notification mechanism, you can forward SMS to web applications in real-time with zero database polling and zero latency. Typical use cases:

  1. SMS Gateway: Push received SMS to your business system in real-time.
  2. OTP Verification System: Inbound verification-code SMS automatically flows into your app for validation.
  3. CRM / Workflow Trigger: SMS content triggers third-party CRM workflows.
  4. Delivery Status Tracking: Get real-time confirmation of whether an SMS was sent successfully.

Traditional database polling is slow and resource-intensive. Webhook is the recommended high-performance alternative.


2. Callback Workflow

                    ┌─────────────────────────────┐
                    │       SMS Deliverer         │
   GSM Modem        │                             │
  ┌────────┐  SMS   │  ┌───────────────────────┐  │   HTTP Push
  │ RX/TX  │───────▶  │    Trigger Callback   │──┼───────────────▶  Your Web Service
  └────────┘        │  │  (POST / GET)         │  │       (Callback URL)
                    │  └───────────────────────┘  │
                    │        │  Ack validation    │
                    └────────┼───────────────────┘
                             ▼
                 Your service returns the "Message ID"
                 Match → stop; Mismatch → retry

3. Callback Configuration (Options → HTTP callback tab)

Setting Description
Enable HTTP callbacks Check to enable the HTTP callback feature
Web page Target callback URL, e.g. http://hostname/webpage.aspx
HTTP method Delivery method: POST or GET
Timeout Push timeout (default 5 seconds)
Request holder to reply message ID Require your service to reply the message ID (recommended, see Section 5)
Incoming message Check to trigger callback on inbound SMS
Outgoing message Check to trigger callback on outbound message status change

HTTP Callback Key Mappings

The UI lets you map internal fields to custom parameter names (defaults shown below):

UI Field Default Parameter Name
To to
From from
Message message
COM com
IMSI imsi
IMEI imei
SIM No. simno

Example URL shown in the config UI:

http://hostname/webpage.aspx?to=8697654321&message=HTTP_callback_test_message&res=123456&imsi=000000&imei=000000&com=COM1&simno=123456789&sendstat=1&softwareid=abcd&customemo=memo

4. Callback Parameters (HTTP Query Parameters)

SMS Deliverer pushes the following parameters on callback. Be aware that some fields have different meanings for inbound SMS vs outbound messages.

Parameter Description
id Unique string identifier (message ID)
from Sender number. Empty string for outgoing messages. URL decode required if number includes a + prefix
to Destination number. Empty string for incoming messages. URL decode required if number includes a + prefix
message Inbound or outbound message content. URL decode required for other languages or special characters
res_sn Inbound message serial number
imsi SIM card serial number
imei Modem IMEI
comport COM port number that sent or received the message
simno SIM card phone number
softwareid Software ID (Ultimate Edition only)
custmemo Custom field to transfer messages from external applications (Ultimate Edition only)
sendstat Send status: 1 = success, 0 = fail

Inbound vs Outbound Quick Reference

Parameter Inbound SMS Outbound Message
from Remote mobile number Empty string
to Empty string Destination mobile number
res_sn Has value N/A
sendstat N/A Has value (0/1)

5. Acknowledgment Mechanism (Request holder to reply message ID)

This is the most critical point — make sure you understand it:

  1. When Request holder to reply message ID is checked, your callback service must return the received message ID as plain text.
  2. SMS Deliverer extracts the message ID from your response and compares it with the original ID:
    • Match → callback processed successfully, no more pushes;
    • Mismatch or timeout → treated as failure, callback is retried automatically.
  3. If the option is not checked, SMS Deliverer pushes only once per message, without acknowledgment validation.

Recommendation: always keep this option checked for reliable message delivery confirmation and to avoid data loss.


6. Request & Response Examples

6.1 HTTP GET Callback Example

http://host.com/?id=ce563271-ac66-4d48-acea-edb3af7beea9&from=10086&to=&message=message&res_sn=000001&imsi=460021437168596&imei=865633016194898&comport=COM9&simno=+86183555999

6.2 Correct Response (reply the message ID as plain text)

ce563271-ac66-4d48-acea-edb3af7beea9

7. Callback Server Example Code (ASP.NET VB.NET)

Official example: a WebForm handling both GET and POST callbacks, echoing the received message ID back in the response.

Public Class WebForm1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ' HTTP GET callback
        If Not Request.QueryString("id") Is Nothing Then
            ' Store / process the received SMS here
            ' ......
            Response.Write(Request.QueryString.Item("id"))
        End If

        ' HTTP POST callback
        If Not Request.Form("id") Is Nothing Then
            ' Store / process the received SMS here
            ' ......
            Response.Write(Request.Form.Item("id"))
        End If
    End Sub

End Class

Key point: regardless of GET or POST, you must write the id parameter back into the response text, otherwise the callback will be retried.


8. Quick Integration Checklist

You are ready to integrate once all of the following are satisfied:

  • Enable callbacks in the HTTP callback tab of SMS Deliverer
  • Fill in your callback URL and choose POST or GET
  • Check Request holder to reply message ID
  • Your server can receive inbound SMS / outbound status callbacks
  • Your server replies the received id as plain text
  • (Optional) URL-decode message, from, to on receipt

9. FAQ

Q1: Why is my callback service being pushed repeatedly? A: Your service did not reply with a matching message ID, or the response timed out. SMS Deliverer treats it as failure and retries automatically. Make sure you return the received id as plain text.

Q2: How do I distinguish inbound SMS from outbound status callbacks? A: Look at from / to / sendstat. For inbound, from has a value and to is empty; for outbound, from is empty and to has a value with sendstat present.

Q3: Received numbers show a + prefix or garbled characters? A: Fields like from, to, message are URL-encoded on push. URL-decode them on the server side after receipt.

Q4: I don't receive softwareid / custmemo parameters? A: These two fields are available in Ultimate Edition only; they are not pushed in standard editions.

Q5: How do I prevent message loss? A: Check Request holder to reply message ID and reply the correct ID. If a push fails, the software retries automatically until acknowledged.