Adding optional TLV parameters to payload

Post Reply
bencover
Posts: 8
Joined: Wed May 26, 2021 12:40 pm

Adding optional TLV parameters to payload

Post by bencover » Tue Aug 06, 2024 10:10 am

Hey!
My SMPP server provider supports custom TLV parameters to forward Carrier Codes. It's documented as follows -
Parameter tag - 0x1401
Parameter value - The Carrier Code in Octet String

I've tried adding the requested parameter to my payload like such -
```cs
//create pdu and register DLR
var payload = SMS.ForSubmit().From(request.FromNumber).To(request.ToNumber).DeliveryReceipt().Text(request.MessageContent);

//init custom tlv param
ushort carrierCodeTag = 0x1401;
payload.AddParameter(carrierCodeTag, request.CarrierCode);

//send message
var response = await smsc.transmitter.SubmitAsync(payload);
```

The above doesn't add the custom parameter to the payload TLV parameters list.
What am I doing wrong? how can I achieve my needs?

Thanks, Ben
Post Reply