C Open SMPP Library

A open PDU smpp packaging and unpackaging tool

FAQs

Q1.- Does C SMPP support smpp 3.3 ?

We use it in production projects with smpp 3.3 version.

Q2.- Why are some PDUs discarded by the library ?

Some smpp routers/gateways use a deliver_sm modified PDU from submit_sm PDU (is a very simple change in mandatory header ), but in PDU remains some optional parameters not presents in spec for deliver_sm PDU.
In this case the library discards that PDUs.
If you don't want this behavior, you have to do these changes:


------ Sample for deliver_sm PDU ------------------------
Change this (eg for deliver_sm.tlv file) :

} else if( inst_tlv-> tag > 0x3FFF && inst_tlv-> tag < 0xFFFF ){\
    OCTET16( inst_tlv->, value.octet, 1024 )\
} else {\
    /* ERROR */\
};

To :

} else if( inst_tlv-> tag > 0x3FFF && inst_tlv-> tag < 0xFFFF ){\
    OCTET16( inst_tlv->, value.octet, 1024 )\
} else {\
    /* Any other PDU */
    OCTET16( inst_tlv->, value.octet, 1024 )\
};
--------------------------------------------------------

Q3.- How can add a new optional parameter ?

This option es very common in GW implement, because in exceptional cases a peer in the connection use the Reserved Range in TLV-tags defined in SMPP-3.4. So the ranges are:

0x0000 Reserved
0x0001 - 0x00FF SMPP defined optional parameters
0x0100 - 0x01FF Reserved
0x0200 - 0x05FF SMPP defined optional parameters
0x0600 - 0x10FF Reserved for SMPP Protocol Extension
0x1100 - 0x11FF Reserved
0x1200 - 0x13FF SMPP defined optional parameters
0x1400 - 0x3FFF Reserved for SMSC Vendor specific optional parameters
0x4000 - 0xFFFF Reserved

In this cases a PEER of connection, put on some PDU a new optional parameter. How can I to handle?. For example, my ESME receive a DELIVER_SM with a optional parameter with tag = 0x3000. In a normal case, the PDU would be rejected because this TLV is out of the DELIVER_SM optional params set.

The solution is tunning the library. In our example:

1) Add the TLVID_newParam to src/smpp34.h.

#define TLVID_newParam 0x3000 /* Movilgate */

2) Add the reference to TLVID_newParam in def_list/tlv_id.list.

OPERACION( TLVID_newParam )

3) Add the reference to TLVID_newParam in def_frame/deliver_sm.tlv (if this is the PDU modified). Please, remember this code is expanded in macros, is C code. Here you have several options for the new data, it can be OCTET16, U08, U16 and U32. In our example.

} else if( inst_tlv-> tag == TLVID_newParam ){\
        OCTET16( inst_tlv->, value.octet, 1024 )\

You must rebuild the library and use TLVID_newParam like a optional param in DELIVER_SM PDU.

Q4.- There is a lot of warnings in compilation.

There isn't problem with the compilation. The GCC-4.0 delivery this warning but in GCC-3.4 don't.