By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Turain Software Pvt. Ltd.Turain Software Pvt. Ltd.Turain Software Pvt. Ltd.
  • HOME
  • ABOUT US
  • SERVICES
    • Digital Marketing
      • Search Engine Optimization (SEO)
      • Social Media Marketing (SMM)
      • Google Paid Search (PPC)
      • YouTube Promotion
      • Content Marketing
    • Telecom / SMS Service
      • Bulk SMS Service
      • Transactional SMS
      • Rich Communication Services
      • DLT Registration
      • WhatsApp Marketing
      • OTP SMS
      • Voice SMS
      • Toll Free Number with IVR
      • Cloud Call Center Solution
    • Products
      • Biomax
      • Others
    • Web Design & Development
      • Web Development
      • E-Commerce Website
      • Informative Website
    • App Development
      • Mobile App Development
      • Web App Development
      • Custom Software Development
    • Graphics Design
  • BLOG
  • CONTACT US
Search
  • DND Search
  • Bill Track
  • Privacy Policy
  • Terms and Conditions
Copyright © 2025. All Rights Reserved Turain Software Pvt. Ltd.
Reading: SMPP TLV Optional Parameters
Share
Notification
Font ResizerAa
Font ResizerAa
Turain Software Pvt. Ltd.Turain Software Pvt. Ltd.
  • HOME
  • ABOUT US
  • SERVICES
    • Digital Marketing
    • Telecom / SMS Service
    • Products
    • Web Design & Development
    • App Development
    • Graphics Design
  • BLOG
  • CONTACT US
Follow US
  • DND Search
  • Bill Track
  • Privacy Policy
  • Terms and Conditions
© 2026 Copyright © 2025. All Rights Reserved Turain Software Pvt. Ltd.
Turain Software Pvt. Ltd. > Blog > Blog > SMPP TLV Optional Parameters
Blog

SMPP TLV Optional Parameters

Turain Logo
Last updated: July 30, 2025 5:33 pm
Tarun Karan
Share
Smpp tlv optional parameters copy 1
SHARE

The SMPP protocol defines support for optional parameters, known as TLV parameters. Some TLV parameters are defined in the core specification, and TURAIN SMS may use them depending on configuration settings. These TLV parameters include message_payload, source_port, dest_port, sar_msg_ref_num, sar_total_segments, sar_segment_seqnum, payload_type, message_state and receipted_message_id. (There are also advanced configuration settings to generate values for user_message_reference and callback_num, which were required by specific customer implementations.)

SMS service providers are free to define their own TLV parameters, which sometimes may be required when interfacing with a mobile operator. These TLV parameters might include operator information for inbound messages, pricing information for premium rate SMS, or other security and fraud prevention parameters required by that service provider.

TURAIN SMS provides flexibility to configure support for custom TLV parameters as needed. TLV parameters must be manually defined to TURAIN SMS before they can be used.

TLV stands for Tag, Length and Value, which is the basic format of these parameters.

Tag is a numeric value, usually expressed as a hexadecimal value, that the provider defines for the parameter. These values are usually 0x1400 or higher for service provider specific parameters. While the parameter is logically thought of as a Name=Value pair, this number is used in the SMPP request instead of a parameter name.

Length and Value are used to encode the parameter value in the SMPP request.

Interpreting a TLV parameter can be tricky because the format of the value depends on how the provider defines the parameter. Values might be encoded as a string value, a numeric value, or binary data. For string values, it can sometimes be more complicated because the SMPP protocol defines two types of strings, a C format string that is null terminated (as is common for strings when working with the C programming language) and another that does not include the null terminator. Some provider parameter implementations can become confused over this minor difference.

Generally, to define a TLV parameter to TURAIN SMS, you need to know its Tag number (hexadecimal) and format of the value data.

When this is known, manually edit SMSGW.INI and create or modify an [SMPPOptions] section to define the parameter details.

The basic format is:

[SMPPOptions]
parametername=####,Type,Len

parametername is a descriptive name to be associated with the parameter. TURAIN SMS will use this name when converting the parameter to and from HTTP formats.

#### is the parameter tag number as a hexadecimal number. Do not include any prefix to indicate hex format…for example, 0x1400 is just 1400 for this parameter setting.

Type specifies the parameter type: Integer, String, CString or HexString.

Len is optional, but is usually required for Integer values to specify a 1, 2 or 4 byte value, as defined by the provider. (4 byte integer parameters require TURAIN SMS 2013.08.30 or later. Earlier versions of TURAIN SMS can only support 4 byte integers using the HexString format.)

CString is a text string that is null terminated (e.g., final 00 byte at the end), String is a text string that is not null-terminated.

HexString treats the value as binary data and converts it to a string of hex characters for HTTP (and back to binary for SMPP).

Len can be used for String or HexString to force a length (truncate value at length or pad with nulls). In most cases, Len is omitted from the parameter definition for String, CString and HexString format parameters, unless the provider requires the parameter to have a specific length. (TURAIN SMS will generate the L for the TLV based on actual value string length.)

Example
This is all easier to explain with an example.

For the purpose of this example, we will assume that our provider has defined a TLV parameter called request_id. It is a text string and has a tag number of 0x1555.

We define the following in SMSGW.INI:

[SMPPOptions]
request_id=1555,String

If TURAIN SMS receives an SMS from the provider via SMPP which includes this parameter, accounting callbacks and 2-way commands will automatically have this parameter added to the HTTP request as &SMPPOption_request_id=xxxxx (xxxxx is the value of the parameter that was parsed from the message).

When submitting a message to TURAIN SMS via HTTP, this same &SMPPOption_request_id=xxxxx can be used to specify that the TLV parameter should be included when submitting the message to the SMPP provider.

To Always Include Parameter With A Default Value

If you want to automatically include a TLV parameter in every message without requiring it to be explicitly set for each message submission, it is possible to configure TURAIN SMS to use a default value for this parameter when submitting messages to your SMPP connection.

To define a default value for this parameter, manually edit the SMSGW.INI, and in the section header for an SMPP connection (e.g., [SMPP – ip.address:port]), add a “DefaultSMPPOptions=” setting, where the value of this setting can contain any of the “SMPPOptions” settings. For example:

DefaultSMPPOptions=request_id=myrequest

(If you have multiple SMPPOptions parameters defined that need to be set as default, separate them with a “;”. For example: DefaultSMPPOptions=request_id=myrequest;otherparm=othervalue)

To Include TLV Parameter In 2-Way SMS Reply

Another common requirement for some TLV parameter is that when generating an automatic reply to a message, the value of the TLV parameter in the received message must be copied over to the new reply message. If you are using 2-way SMS to send replies to incoming messages (“Command returns response text” is checked for the 2-way command), add 2WayReplyCopySMPPOptions=requestid to the [SMSGW] section of SMSGW.INI. This setting tells TURAIN SMS that if it is processing a 2-way command reply, it should automatically copy the request_id TLV parameter from the source message to the reply.

Why Does Understanding Search Intent Matter Before You Even Start SEO Content Writing?
Digital Marketing 2022
Update on Omicron
How a 360-Degree Marketing Solution from Turain Software Boosts Brand Growth
How Is WhatsApp Business API Revolutionising Small Businesses?

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
* indicates required
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
What do you think?
Angry0
Cry0
Dead0
Embarrass0
Happy0
Joy0
Love0
Sad0
Surprise0
Shy0
Sleepy0
Wink0
Turain Logo
ByTarun Karan
Follow:
Tarun Karan is a technology writer and digital innovation enthusiast who covers emerging AI tools, automation platforms, and modern no-code workflows. With a strong focus on user-centric storytelling, Tarun simplifies complex concepts and translates them into clear, practical insights for creators, businesses, and learners. His writing aims to help audiences understand how new AI ecosystems—like Google’s experimental platforms—shape the future of productivity and digital creation.
Previous Article Attension copy 1 What is Promotional, Transactional and Service Bulk SMS routes in DLT?
Next Article Omicron copy Update on Omicron
Leave a Comment

Leave a Reply Cancel reply

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

Stay Connected

25KLike
9KFollow
3.2KFollow
Turain-Software_WhatsApp-API

Latest News

Cover graphic for network apis + cpaas showing a smartphone with api network icons for number verification, sim swap checks and fraud-safe messaging.
GSMA Open Gateway Network APIs: How Number Verification & SIM Swap Checks Enable Fraud-Safe Messaging
bulk SMS Bulk SMS Service
Before-and-after dlt sms template showing “rejected” vs “approved” after pre-tagging variables and whitelisting urls and numbers.
TRAI DLT Variable Tagging 2026: How to Whitelist URLs & Numbers and Stop SMS Rejections
DLT
Whatsapp business calling api turning chat leads into calls inside whatsapp.
WhatsApp Business Calling API: Turning Click-to-Chat Leads into Calls Inside WhatsApp (New Conversion Playbook)
WhatsApp Business API
Whatsapp business pricing 2026 concept banner with chat and pricing cards.
WhatsApp Business Pricing in 2026: How to Reduce Cost Per Lead with Flows + Smart Templates (RCS/SMS Backup)
whatsapp marketing

You Might also Like

Dlt
Blog

New TRAI Rules (DLT)

Turain Logo
Tarun Karan
1 Min Read
Read More
Sms marketing company in kolkata
Blogbulk SMSBulk SMS Service

How Can Your Travel Agency Reap the Benefits of a Bulk SMS Service?

Turain Logo
Tarun Karan
6 Min Read
Read More

The Truth About kmsauto net 2016 in Software Activation

Turain Logo
Tarun Karan
3 Min Read
Read More

+91 9230996919
+91 6290384889

sales@turaingrp.com
support@turaingrp.com

6/12 Poddarnagar, Kolkata-700068, WB, India.

Tower 1, 36/5, Hustle hub Tech Park,

Somasundarapalya Main Rd,

Bengaluru, Karnataka 560102

Others Platform
glassdoor
yourstory
ambitionbox

Information

  • Home
  • About Us
  • Services
  • Portfolio
  • Blogs
  • Brochure

Services

  • Bulk SMS
  • WhatsApp Marketing
  • Digital Marketing
  • Web Development
  • App Development
  • Graphics Design

Other links

  • DND Search
  • Bill Track
  • Privacy Policy
  • Terms and Conditions

Registered in

msme
trai

Our Other Business

dreamlink
Copyright © 2026. All Rights Reserved Turain Software Pvt. Ltd.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?