Billing Information for SMPP connection - user_message_reference

Billing Information for SMPP connection - user_message_reference SearchSearch

NowSMS Support Forums » NowSMS Support - SMS Issues » Archive through February 02, 2006 » Billing Information for SMPP connection - user_message_reference « Previous || Next »
Author Message
Steve Napp
New member
Username: Snapp

Post Number: 2
Registered: 01-2006
Posted on Thursday, January 26, 2006 - 03:46 pm:   

Hi,

My service provider requires me to supply a billing code in the SMPP user_message_reference parameter.

I have found some reference to this parameter in a thread about another provider (mBlox): http://support.nowsms.com/discus/messages/1/9114.html

However, I'm a bit thick, and there's something I'm missing. Can you explain how I can configure NowSMS to set this parameter?

Thanks,

Steve
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 5442
Registered: 10-2002
Posted on Thursday, January 26, 2006 - 05:19 pm:   

Hi Steve,

The user_message_reference parameter is one of the optional TLV (tag, length, value) parameters available in the SMPP protocol.

Because they are optional, they are somewhat infrequently used. The SMPP specification defines user_message_reference as a message reference number assigned by the message originator. But, indeed, some SMPP service providers have decided to use this parameter to contain a billing code.

Other SMPP service providers have added additional custom TLV parameters for this type of purpose.

Because these parameters are often custom (and unique to a particular service provider), NowSMS requires you to configure it to tell it which of the optional SMPP TLV parameters should be supported.

The thread that you referenced has a good explanation of this process, but it mBlox specific. A more generic explanation can be found in the following thread: http://support.nowsms.com/discus/messages/1/5972.html

Search for "SMPPOptions" in that thread. But I'll go ahead and include the general description here:


quote:

SMSGW.INI, [SMPPOptions] section:

This section is used to enable support for SMPP Optional parameters. In particular, mBlox customers may wish to configure these settings in order to enable support for mBlox specific settings related to premium rate SMS.

Other SMS providers might also use SMPP Optional parameters for similar purposes.

The [SMPPOptions] section contains a list of SMPP optional parameters that NowSMS should support.

Some optional parameters are defined in the SMPP specification, while others, such as the mBlox settings that we reference below, are vendor specific.

The format of entries in the [SMPPOptions] section is:

setting_name=SMPPTagValue,Type,Len

setting_name is a descriptive name for the setting. For each setting that is defined, NowSMS will support an additional parameters when submitting a message to NowSMS via an HTTP URL request. "&SMPPOption_setting_name=" will specify a value to be set for this parameter.

For each optional parameter that is defined, NowSMS will also route these parameters to HTTP-based 2-way commands. If a message is received which contains values for any optional parameter defined in the [SMPPOptions] section, NowSMS will automatically append "&SMPPOption_setting_name=value" to the 2-way URL, if the optional parameter is present in a received parameter. It is not necessary to add any variables to the 2-way command template, as these values will be appended automatically if present in a received message.

SMPPTagValue is the SMPP tag value associated with the parameter, in hex format. For example, the SMPP v3.4 specification defines the tag value for user_message_reference to be 0204.

Type can be either String, CString or Integer. String corresponds to the "Octet String" definition in the SMPP specification. CString corresponds to the "C-Octet String" (null terminated) definition in the SMPP specification. Integer corresponds to the "Integer" definition in the SMPP specification.

Length specifies the field length, and is optional. If specified for a String parameter, it specifies a fixed length for the string (longer strings will be truncated, shorter strings will be padded with nulls to meet this length). If specified for an Integer parameter, the value should be either 1 or 2, otherwise NowSMS will choose a size based upon whether the value requires 1 or 2 bytes to encode. Length is ignored for CString typed parameters.




Now, let's talk about how to use this information to configure support for the user_message_reference parameter.

Edit SMSGW.INI, and add an [SMPPOptions] section like this:

the following settings are intended to enable support for their premium rate parameters:

[SMPPOptions]
user_message_reference=204,Integer,2

(This indicates that the option parameter user_message_reference has a code of hex 204, and that it is of the type Integer, with a size of 2 bytes.)

With this setting present, an additional parameter is now supported when submitting a message to NowSMS via an HTTP URL request. "&SMPPOption_user_message_reference=" allows you to set/retrieve the value of the SMPP "user_message_reference" variable.

I say set/retrieve, because when this [SMPPOptions] section is present, NowSMS will also route these parameters to HTTP-based 2-way commands. If a message is received which contains values for any setting defined in this section, NowSMS will automatically append "&SMPPOption_user_message_reference=value"to the 2-way URL. It is not necessary to add any variables to the 2-way command template, as these values will be appended automatically if present in a received message.

Now, suppose you need to use the same billing code / user_message_reference in every message that you submit.

In addition to supporting this option via HTTP URL request, it is possible to configure default settings for any of these [SMPPOptions] for each outbound SMPP connection. To define default settings, manually edit the SMSGW.INI, and in the section header for an SMPP connection (e.g., [SMPP - ip.address:port]), add a "DefaultSMPPOptions=" setting, where the value of this setting can contain any of the "SMPPOptions" settings. For example, "DefaultSMPPOptions=user_message_reference=1". (Note that you do not use the "SMPPOption=" prefix here, like you would in the URL request.) To include multiple options, separate the entries with a ";", for example, "DefaultSMPPOptions=mblox_tariff=00000;user_message_reference=14".

Does that help?

-bn
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 5501
Registered: 10-2002
Posted on Wednesday, February 01, 2006 - 07:55 pm:   

Here's a link to a related thread that talks about configuring the SMPPOptions settings used for mBlox:

http://support.nowsms.com/discus/messages/1/9114.html

Topics Forums Search Last 30 Days Login Login / Register Logout Logout