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
alt
Site Admin
Posts: 991
Joined: Tue Apr 25, 2006 9:45 am

Re: Adding optional TLV parameters to payload

Post by alt » Mon Dec 09, 2024 12:16 pm

Hi Ben,

The code is correct.

I would check the captured PDUs in wireshark.

If you still has this issue please write me to e-mail support@
Post Reply