April 13, 2021

How to add TLV Parameters in Kannel and SQLBox

According to the DLT rules in India, every SMS Marketing Company now has to pass the Principal Entity ID (i.e PE ID). This means every Entity will have to register to the DLT Platform in order to send their SMS with their desired six-digit sender ID. Also, the template approval is also mandatory for the entity to whitelist.

So therefore operator will ask all the SMS marketing company to send the Principal Entity ID with the external parameter as 0x1400 and 0x1401.

Therefore inorder to pass this parameter in kannel you will have to do the following configuration and restart the kannel.

The Configuration are as follows:-

group = smpp-tlv
name = EntityID
tag = 0x1400
type = octetstring
length = 20
smsc-id = xyz

group = smpp-tlv
name = TemplateID
tag = 0x1401
type = octetstring
length = 20
smsc-id = xyz

Meaning of the above variable are as follows:-

taghex32-Bit HEX address for the given TLV. Must match SMPP specifications for the TLV (or be agreed with the SMSC operator).
typestringAccepted data type. Accepted values are integer, nulterminated and octetstring. Must match SMPP specifications for the TLV (or be agreed with the SMSC operator).
lengthintegerMaximum data length expected in bytes. Must match SMPP specifications for the TLV (or be agreed with the SMSC operator).
smsc-idstringAn optional smsc-id for which this TLV is valid. If smsc-id is not given then this TLV is valid for all SMSCs. To define list of smsc-id, just use ; as split char

This configuration will only work when messages are going through the SMSBOX. If you want to this optional parameter through SQLBox then will have to pass the value to the meta-data column in the send_sms table in the following manner.

format in which data should pass = ?smpp?EntityID=123456789987654321&TemplateID=123456789987654321

You can verify this by simply opening the kannel access-log which will look like this–

Sent SMS [SMSC:XYZ] [SVC:] [ACT:] [BINF:] [FID:S21810224161132159863931037] [META:?smpp?EntityID=123456789987654321&TemplateID=123456789987654321&?smpp_resp?] [from:MMMMMM] [to:+911234567898] [flags:-1:0:-1:-1:19] [msg:37:Dear User, Your new password is 13234] [udh:0:]

If you see like this in the access-log means your are sending the parameters correctly.

Vedant Singh

Linux System Administrator | Entrepreneur | Founder Techmion. I have started my career as a Linux system Administrator after that quit my job to start something new that excites me and started a Tech Company in order to provide the best technology to my clients. My Company website link: https://www.techmion.com/ For Bulk, SMS-Marketing follows the link : https://www.pingsms.in/

View all posts by Vedant Singh →

Leave a Reply

Your email address will not be published. Required fields are marked *