Project

General

Profile

Debug SMPP protocol in Asterisk

Let's suppose, you want to see which SMPP messages come from user user001 and which responses are sent back.
For this perform next actions:

1. Acquire root access.

2. Turn on SMPP debug for user user001:

# asterisk -rx "smpp set debug peer user001" 

To capture this way Asterisk should know IP address of a user.
Thus, user should be either registered, or user's IP address should be configured in user's settings.

In case if you know IP address of a user, but don't know, under which peer it's registered/configured, you can capture dump, using IP address:

# asterisk -rx "smpp set debug ip 192.168.1.1" 

In case if you need to debug all SMPP messages (and not from/to specific peer/IP address), execute following:

# asterisk -rx "smpp set debug on" 

3. You can watch results either in Asterisk console or in log file.

Asterisk console is convenient to use to quickly check if any messages come from client.
However console doesn't allow to perform text search.

Log file is convenient to use, if you wish to perform search inside of big amount of messages.
Also file is more convenient to use, if you use SMPP debugging together with Asterisk debugging

  • Asterisk console

    Enter console mode:

      # asterisk -r
      

    After this you'll see SMPP messages arriving on the console.
    Warning! Messages amount could be big and might hang your terminal application. Use search in log file in this case.

  • log file

    Perform search for IP address of a client, or time, or message type, for example, SUBMIT_SM, in file /var/log/asterisk/messages.
    Then check if there any error messages after receiving the message and if the response is sent.
    Principle of working with log files is described in section How to work with log file

4. To prevent from disk space overflow turn off debugging once you've finished:

# asterisk -rx "smpp set debug off" 

Русский перевод

Also available in: PDF HTML TXT