Skip to main content
RLS
Inspiring
July 8, 2008
Answered

MX Telecom ID Codes

  • July 8, 2008
  • 3 replies
  • 2406 views
Is this forum ever visited or replied to? I see the three messages posted here before me have not warranted one reply from anyone.

I will try another question. I hope someone who knows is monitoring!

After experimenting with SMS providers, we settled on MX Telecom. Great - except that the level of the service we have says that we must send back a special username based on the carrier from which the message came. Pain in the posterior...

So, for example, they give this parameter for Operator Code:
ID: 0x3010
Name: Operator Code
Direction: MX -> Customer
Length: Variable
value: string (not null terminated)

So, if my cfscript code looks something like this:

mesg = structNew();
mesg.command = "submit";
mesg.sourceAddress = "12345";
mesg.destAddress = "16125551212";
mesg.shortMessage = "Hello, World.";
sendGatewayMessage("smsMyMenuTest", mesg);

Just how do I encode and pass along that parameter that they want?

RLS
This topic has been closed for replies.
Correct answer RLS
I have the solution. It was provided to me by someone that I have not received permission from to use his or her name, so I won't, but they are MORE than welcome to come and take credit for finding this solution. I am merely the "journalist" in this regard and am MORE than happy to report how to post custom TLV codes for SMS!

Here's the simple documentation - this should be all you need to finish the job:

* Process the outgoing mesage struct and set optionalParameters that are not
* defined by the SMPP specification.
* See section 5.3 of SMPP.
*
* Two ways to set these values:
* <ol>
* <li> A single value using optionalParamter (no 's')
* out.optionalParamter = 0x1500
* out.optionalParamterValue = "1,2,3,4"
* </li>
* <li> Multiple values using optionalParameters (with 's') and a struct.
* params = StructNew()
* params["0x1501"] = BinaryDecode("1a2b3c4d", "hex")
* params["0x1522"] = CharsetDecode("my value", "utf-8")
* out.optionalParameters = params
* </li>
* </ol>

3 replies

Inspiring
July 11, 2008
Joralac wrote:
> Let me be sure I understand your directions. Assuming you want to include the
> SMPP optional parameter for a privacy indicator (0x0201) which can include an
> integer value of 0,1,2, or 3, the message would look like:
>
> params = structNew();
> params["0x0201"] = 1; // privacy level 1 (restricted)

optionalParameters wants a byte[] so you need to use one of those decode functions.

see:
http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entry&entry=0E42140A-20ED-7DEE-2AA35B56931A402D
Participant
July 11, 2008
RLS,
Thanks for posting this!!

Let me be sure I understand your directions. Assuming you want to include the SMPP optional parameter for a privacy indicator (0x0201) which can include an integer value of 0,1,2, or 3, the message would look like:

params = structNew();
params["0x0201"] = 1; // privacy level 1 (restricted)

mesg = structNew();
mesg.command = "submit";
mesg.sourceAddress = "12345";
mesg.destAddress = "16125551212";
mesg.shortMessage = "Hello, World.";
mesg.optionalParameters = params;
sendGatewayMessage("mySMSGateway", mesg);

Is this correct?
RLS
RLSAuthorCorrect answer
Inspiring
July 11, 2008
I have the solution. It was provided to me by someone that I have not received permission from to use his or her name, so I won't, but they are MORE than welcome to come and take credit for finding this solution. I am merely the "journalist" in this regard and am MORE than happy to report how to post custom TLV codes for SMS!

Here's the simple documentation - this should be all you need to finish the job:

* Process the outgoing mesage struct and set optionalParameters that are not
* defined by the SMPP specification.
* See section 5.3 of SMPP.
*
* Two ways to set these values:
* <ol>
* <li> A single value using optionalParamter (no 's')
* out.optionalParamter = 0x1500
* out.optionalParamterValue = "1,2,3,4"
* </li>
* <li> Multiple values using optionalParameters (with 's') and a struct.
* params = StructNew()
* params["0x1501"] = BinaryDecode("1a2b3c4d", "hex")
* params["0x1522"] = CharsetDecode("my value", "utf-8")
* out.optionalParameters = params
* </li>
* </ol>