TLV Parameters SMPP in Kannel

By Published On: August 16, 2022Categories: Blog0 Comments

My SMS service provider asked me to set the below TLV parameters while connecting to him over SMPP: PRICEPOINT (0x1400) PRODUCT (0x1401) PARTNER ROLE ID (0x1402) How to configure the same in Kannel as it is the first time for me using this SMPP client app, I set the below data in Kannel.conf file, but when I pushed/sent a message, the gateway didn’t feel the TLV which I have set. group = smpp-tlv name = PRICEPOINT tag = 0x1400 type = integer length = 4 smsc-id = SMSC01 group = smpp-tlv name = PRODUCT tag = 0x1401 type = integer length = 4 smsc-id = SMSC01 group = smpp-tlv name = PARTNERROLEID tag = 0x1402 type = integer length = 4 smsc-id = SMSC01 You did the right thing with the configuration but what it does is that it simply informs Kannel as to what possible TLV parameters exist for the SMSC. To actually use them, you have to set the values in the sendsms call in a meta-data parameter formatted like this ?smsc-type?key1=value1&key2=value2&key3=value3… You must take into account that when constructing this string, the smsc-type, the keys and the values must be urlencoded, and then the whole resulting string has to be urlencoded again. In your case it would look something like this: http://host:port/cgi-bin/sendsms?username=user&password=password&to=recipientphone&
from=senderphone&text=content&smsc=smsc&meta-data=%3Fsmpp%3FPRICEPOINT%3D1%26PRODUCT%3D2%26PARTNERROLEID%3D3.
The %3Fsmpp%3FPRICEPOINT%3D1%26PRODUCT%3D2%26PARTNERROLEID%3D3 in the example is urlencoded ?smpp?PRICEPOINT=1&PRODUCT=2&PARTNERROLEID=3. Here’s the relevant section in the documentation: http://kannel.org/download/1.4.4/userguide-1.4.4/userguide.html#AEN6370

Leave A Comment

Related Posts