December 21, 2024

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 Kumar

Currently I'm working as an Implementation Engineer, Started my career as an System Administrator - Linux. Additionally loves to explore new technologies and research about new open-source software that ease the development cycle.

View all posts by Vedant Kumar →

2 thoughts on “How to add TLV Parameters in Kannel and SQLBox

  1. I have made all changes but still, it passes only the first tlv value, not the next one.pfb details
    #For DLT PID
    group = smpp-tlv
    name = PEID
    tag = 0x0601
    type = octetstring
    length = 20
    smsc-id = TUBEN

    #For DLT Tempid
    group = smpp-tlv
    name = tempid
    tag = 0x0602
    type = octetstring
    length = 21
    smsc-id = TUBEN

    url part : http://ip:port/cgi-bin/sendsms?username=user&password=password&to=mobile&from=SENDER&text=msg&smscid=&meta-data=?smpp?PEID=value&tempid=value

    can you please help on this.

    1. verify the tag value from your SMPP Provider. If I’m not wrong the tag value for EntityID=0x1400 and templateid =0x1401 in INDIA

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.

close

Ad Blocker Detected!

VEDANT EXPLAINS
We've noticed that you are using an ad blocker. Advertising helps fund our server cost and keep it truly independent. It helps to build our content creator team. So please disable your ad blocker, and help us to keep providing you with free- great content - for free. Thank you for your support.

Refresh