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 »

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: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: Adding Headers to smpp client before bind

Post by alt »

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 »

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 »

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

Re: Adding Headers to smpp client before bind

Post by alt »

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 »

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

Re: Adding Headers to smpp client before bind

Post by alt »

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