To send binary data to a single destination address in an SMPP DATA_SM PDU, the Data parameter of a SendGatewayMessage function or the return variable of the CFC listener method must have the following fields. For more information about these fields, see the documentation for the SUBMIT_MULTI PDU in the SMPP3.4 specification, which you can download from the SMS Forum at www.smsforum.net/.

Required fields

Field

Contents

command

Must be data.

messagePayload

The message data. To convert data to binary format, use the ColdFusion ToBinary function.

destAddress

The address to which to send the message.

sourceAddress

The address of this application. You can omit this field; the configuration file specifies the application address.

Optional fields

The following optional fields can have default values set in the SMS event gateway configuration file. For information on the default values see Configuring an SMS event gateway in the Developing ColdFusion Applications.

destAddress_npi

destAddress_ton

serviceType

The following optional fields do not have default values:

alertOnMsgDelivery

DestTelematicsId

NetworkErrorCode

SetDpf

callbackNum

DisplayTime

NumberOfMessages

SmsSignal

callbackNumAtag

EsmClass

PayloadType

SourceAddrSubunit

callbackNumPresInd

ItsReplyType

PrivacyIndicator

SourceBearerType

dataCoding

ItsSessionInfo

QosTimeToLive

SourceNetworkType

DestAddrSubunit

LanguageIndicator

ReceiptedMessgeId

SourcePort

DestBearerType

MessageState

registeredDelivery

SourceSubaddress

DestNetworkType

MoreMsgsToSend

SarMsgRefNum

SourceTelematicsId

DestinationPort

MsMsgWaitFacilities

SarSegmentSeqnum

UserMessageReference

DestSubaddress

MsValidity

SarTotalSegments

UserResponseCode

Example

The following example onIncomingMessage method converts an incoming message to binary data, and sends the binary version of the message back to the originator address:

<cffunction name="onIncomingMessage" output="no"> 
<cfargument name="CFEvent" type="struct" required="yes"> 
<!--- Get the message ---> 
<cfset data=CFEvent.DATA> 
<cfset message="#data.message#"> 
<!--- Create the return structure ---> 
<cfset retValue = structNew()> 
<cfset retValue.command = "data"> 
<!--- Sending to incoming message originator; get value from CFEvent. ---> 
<cfset retValue.destAddress = arguments.CFEvent.originatorid> 
<cfset retValue.messagePayload = tobinary(tobase64("echo: " & message))> 
<cfreturn retValue> 
</cffunction>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy