Adding Headers to smpp client before bind

Post Reply
jeremih.ose
Posts: 4
Joined: Tue Feb 07, 2023 5:02 pm

Adding Headers to smpp client before bind

Post by jeremih.ose » Wed Feb 08, 2023 11:22 am

Hello, I am looking for a way to add headers to smpp client before bind.
I have this code snippet to show what I am trying to achieve

using Inetlab.SMPP;
using Inetlab.SMPP.Common;
using System.Collections.Generic;

// Connect to the SMPP server
var client = new SmppClient();
client.Connect("serverAddress", portNumber);

// Create a dictionary of headers
var headers = new Dictionary<string, string>
{
{ "headerKey", "headerValue" }
};

// Create a Bind request
var request = new Bind();

// Set the OptionalParams property to the headers dictionary
request.OptionalParams = headers;

// Set the systemId and password
request.SystemId = "systemId";
request.Password = "password";

// Bind to the SMPP server
var response = client.Bind(request);

This is currently not possible, please advise
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Adding Headers to smpp client before bind

Post by alt » Wed Feb 08, 2023 7:00 pm

Hi jeremih

You cannot add optional TLV parameters to the Bind request, the SMPP protocol doesn't support this.

Why do you want to add the headers ?
jeremih.ose
Posts: 4
Joined: Tue Feb 07, 2023 5:02 pm

Re: Adding Headers to smpp client before bind

Post by jeremih.ose » Fri Feb 10, 2023 7:23 am

Hello kind sir, I am looking to do a CUAP connection using the Smpp client library. where before the bind some header parameters are added. CUAP meaning China mobile Ussd application protocol.
jeremih.ose
Posts: 4
Joined: Tue Feb 07, 2023 5:02 pm

Re: Adding Headers to smpp client before bind

Post by jeremih.ose » Fri Feb 10, 2023 8:56 am

please, find attached screenshot
Attachments
bindHeader.PNG
a screennshot showing bind header
bindHeader.PNG (89.5 KiB) Viewed 48199 times
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Adding Headers to smpp client before bind

Post by alt » Fri Feb 10, 2023 4:21 pm

Is CUAP based on SMPP protocol?
jeremih.ose
Posts: 4
Joined: Tue Feb 07, 2023 5:02 pm

Re: Adding Headers to smpp client before bind

Post by jeremih.ose » Mon Feb 13, 2023 10:55 am

The protocol is UAP
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Adding Headers to smpp client before bind

Post by alt » Mon Feb 13, 2023 1:23 pm

CUAP ( China Mobile USSD Application Protocol ) is HTTP-based protocol.
Inetlab.SMPP doesn't support this.
Post Reply