MMSC Accounting Callbacks for Billing and Charging

MMSC accounting callbacks provide an interface between the NowSMS MMSC and external billing and charging systems.

These MMSC accounting callbacks are HTTP-based. When accounting callbacks are enabled, the MMSC will issue HTTP requests to a customer supplied URL in order to interface with the customer billing and charging systems.

To enable MMSC accounting callbacks, it is necessary to manually edit the MMSC.INI configuration file, and define the callback URL under the [MMSC] section header, using the following configuration parameter:

MMSAccountingURL=http://server/path

Whenever the MMSC processes an MMS message, it issues an accounting callback by issuing an HTTP transaction to the callback URL. Variables describing the MMS transaction are appended to the MMSAccoutingURL as HTTP GET CGI-style variables, with standard URL escaping applied for encoding reserved characters.

For example:

http://server/path?PreAuth=Yes&Type=MMSSend&From=%2B449999999999&To=%2B447777777777&MsgCount=1

(These variables and transaction types will be described later in this section.)

Most of the accounting callbacks are informational only, and exist to record charging information after the MMSC has processed a transaction.

However, there are also pre-authorisation callbacks which occur before the MMSC processes a transaction. These pre-authorisation callbacks exist to allow the customer billing system to decide whether or not the transaction should be allowed. In this scenario, the callback could check available credit and reject an MMS message transaction before it is accepted by the MMSC.

The remainder of this section provides additional details on the parameters supported by these callbacks.

MMSSend PreAuth Callback

This callback is executed when an MMS subscriber, Value Added Service Provider (VASP) or MMSC interconnect partner, is requesting to send a message.

This is a “pre-authorisation” request, and does not mean that the message will actually be accepted by NowSMS for delivery. If NowSMS cannot successfully connect to the accounting URL, or the URL returns a response other than a standard “HTTP 200 OK” response, the user request to send a message will be blocked. A “PreAuth” request to send a message will also be blocked if the HTTP response content includes the text “PreAuth=Deny”.

The following parameter variables may be set for the MMSSend pre-authorisation request:

PreAuth=Yes

The presence of this parameter indicates that this callback is a pre-authorisation request.

Type=MMSSend

The transaction type is MMSSend, indicating that a request is being made to send an MMS message.

From=SenderPhoneNumber

This parameter contains the phone number of the subscriber that is sending the message. Note that URL escaping rules require the “+” symbol to be encoded as “%2B”.

To=RecipientPhoneNumber (may be a comma delimited list with multiple recipients)

This parameter contains one or more recipient phone numbers. If more than one phone number is present, this will be a comma delimited list of recipient phone numbers. (Note that URL escaping rules require the “,” symbol to be encoded as “%2C”.)

VASPIN=MmscVaspName

This parameter is present if the message is arriving from a Value Added Service Provider or MMSC interconnect partner. The value of this parameter refers to the account name as defined in the “MMSC VASP” list.

Note that some versions of NowSMS may preface the MmscVaspName with the text “VASP:”.

VASP=MmscOutboundRoute (may be a comma delimited list if multiple recipients)

This parameter is present if the MMSC has determined that the message must be routed via an external route for delivery. The value of this parameter refers to the account name as defined in the “MMSC Routing” list.

If the message is being sent to multiple recipients, this field may contain a comma delimited list of routes with a route listed for each recipient. If there is a mix of local and remote recipients, local recipients will have a blank entry within the comma delimited list of routes.

MsgCount=####

This parameter specifies the number of recipients for this MMS message transaction.

(Note that the MMSSend PreAuth callback is issued only once if an MMS message is being sent to multiple recipients. The MMSSend Charging callback, which records billing and charging information after the MMSC has accepted the message, issues a separate callback for each recipient.)

Size=####

This parameter specifies the size of the MMS message in bytes.

Note that the MMS message size refers to the size of the data using the encoding of the protocol through which the message is being received (e.g., MM1, MM4, MM7). The actual size of the delivered MMS message may be different because of conversion between these protocols, and/or MMS header manipulation.

Also note that this parameter may not be present for all protocols. In particular, this parameter is not present for messages received via the MM4 (MMSC interconnect) protocol.

Depending on system configuration, additional parameters such as SGSN Address, SGSN MCC MNC (used to detect roaming subscribers) and IMSI may also be available to the callback.  For information on these parameters, see Detecting Roaming Subscribers.

MMSSend Charging Callback

This callback is executed when an MMS subscriber, Value Added Service Provider (VASP) or MMSC interconnect partner, has submitted a message to the MMSC, and the MMSC has accepted the message for further processing.

NowSMS will ignore any HTTP response returned by the callback, however we recommend returning an “HTTP 200 OK” response for future compatibility reasons.

The following parameter variables may be set for the MMSSend Charging Callback:

Type=MMSSend

The transaction type is MMSSend, indicating that an MMS message has been submitted.

From=SenderPhoneNumber

This parameter contains the phone number of the subscriber that is sending the message. Note that URL escaping rules require the “+” symbol to be encoded as “%2B”.

To=RecipientPhoneNumber

This parameter contains a single recipient phone number. If the original message was submitted to more than one recipient, a separate charging callback will occur for each recipient.

VASPIN=MmscVaspName

This parameter is present if the message arrived from a Value Added Service Provider or MMSC interconnect partner. The value of this parameter refers to the account name as defined in the “MMSC VASP” list.

Note that some versions of NowSMS may preface the MmscVaspName with the text “VASP:”.

VASP=MmscOutboundRoute

This parameter is present if the MMSC has determined that the message must be routed via an external route for delivery. The value of this parameter refers to the account name as defined in the “MMSC Routing” list.

Note that some versions of NowSMS may preface the MmscOutboundRoute with the text “VASP:”.

MessageID=assignedMessageID

This parameter records the MMS message ID assigned by MMSC. Note that if the message was sent to multiple recipients, each recipient instance shares the same message ID.

Size=####

This parameter specifies the size of the MMS message in bytes.

Note that MMS message size may differ based upon the encoding protocol (e.g., MM1, MM4, MM7). The actual size of the delivered MMS message may be different because of conversion between these protocols, and/or MMS header manipulation.\

Depending on system configuration, additional parameters such as SGSN Address, SGSN MCC MNC (used to detect roaming subscribers) and IMSI may also be available to the callback.  For information on these parameters, see Detecting Roaming Subscribers.

MMSRetrieve Accounting Callback

This callback is executed when an MMS subscriber connects to the MMSC to retrieve the content of an MMS message.

NowSMS will ignore any HTTP response returned by the callback, however we recommend returning an “HTTP 200 OK” response for future compatibility reasons.

The following parameter variables may be set for the MMSRetrieve Accounting Callback:

Type=MMSRetrieve

The transaction type is MMSRetrieve, indicating that an MMS subscriber has connected to the MMSC to retrieve the content of an MMS message.

From=SenderPhoneNumber (or EMailAddress)

This parameter contains the phone number or e-mail address of the message sender. Note that URL escaping rules require the “+” symbol to be encoded as “%2B”.

To=RecipientPhoneNumber

This parameter contains the recipient phone number that is retrieving this MMS message.

MessageID=assignedMessageID

This parameter contains the MMS message ID assigned by MMSC. Note that if the message was sent to multiple recipients, each recipient instance shares the same message ID.

Size=####

This parameter specifies the size of the MMS message in bytes.

Note that MMS message size may differ based upon the encoding protocol (e.g., MM1, MM4, MM7). The actual size of the delivered MMS message may be different because of conversion between these protocols, and/or MMS header manipulation.

MMSOut Accounting Callback

This callback is executed when an MMS message is routed to an external route (VASP or MMSC interconnect) defined in the “MMSC Routing” list.

NowSMS will ignore any HTTP response returned by the callback, however we recommend returning an “HTTP 200 OK” response for future compatibility reasons.

The following parameter variables may be set for the MMSOut Accounting Callback:

Type=MMSOut

The transaction type is MMSOut, indicating that an MMS message has been routed to an external route.

From=SenderPhoneNumber (or EMailAddress)

This parameter contains the phone number or e-mail address of the message sender. Note that URL escaping rules require the “+” symbol to be encoded as “%2B”.

To=RecipientPhoneNumber

This parameter contains the recipient phone number for the MMS message.

MessageID=assignedMessageID

This parameter contains the MMS message ID assigned by MMSC. Note that if the message was sent to multiple recipients, each recipient instance shares the same message ID.

Size=####

This parameter specifies the size of the MMS message in bytes.

Note that MMS message size may differ based upon the encoding protocol (e.g., MM1, MM4, MM7). The actual size of the delivered MMS message may be different because of conversion between these protocols, and/or MMS header manipulation.

VASP=MmscOutboundRoute

This parameter specifies the MMSC outbound route via which the MMS message was routed.

Note that some versions of NowSMS may preface the MmscOutboundRoute with the text “VASP:”.

MMSOutFailed Accounting Callback

This callback is executed when an attempt is made to route an MMS message to an external route (VASP or MMSC interconnect) defined in the “MMSC Routing” list, but the attempt fails.

Information about the failure is not currently provided by this callback, but can be found in the MMSC-yyyymmdd.LOG file.

NowSMS will ignore any HTTP response returned by the callback, however we recommend returning an “HTTP 200 OK” response for future compatibility reasons.

The following parameter variables may be set for the MMSOutFailed Accounting Callback:

Type=MMSOutFailed

The transaction type is MMSOutFailed, indicating that an attempt was made to route an MMS message to an external route, but the attempt failed.

From=SenderPhoneNumber (or EMailAddress)

This parameter contains the phone number or e-mail address of the message sender. Note that URL escaping rules require the “+” symbol to be encoded as “%2B”.

To=RecipientPhoneNumber

This parameter contains the recipient phone number for the MMS message.

MessageID=assignedMessageID

This parameter contains the MMS message ID assigned by MMSC. Note that if the message was sent to multiple recipients, each recipient instance shares the same message ID.

Size=####

This parameter specifies the size of the MMS message in bytes.

Note that MMS message size may differ based upon the encoding protocol (e.g., MM1, MM4, MM7). The actual size of the delivered MMS message may be different because of conversion between these protocols, and/or MMS header manipulation.

VASP=MmscOutboundRoute

This parameter specifies the MMSC outbound route via which the MMS message was routed.

Note that some versions of NowSMS may preface the MmscOutboundRoute with the text “VASP:”.

MMSDeliveryReport PreAuth Callback

This callback is executed when a Value Added Service Provider (VASP) or MMSC interconnect partner is requesting to send a delivery report. This callback is also generated when the MMSC wants to generate a delivery a report on behalf of a local subscriber.

This is a “pre-authorisation” request, and does not mean that the delivery report will actually be accepted by NowSMS for delivery. If NowSMS cannot successfully connect to the accounting URL, or the URL returns a response other than a standard “HTTP 200 OK” response, the user request to send a message will be blocked. A “PreAuth” request to send a message will also be blocked if the HTTP response content includes the text “PreAuth=Deny”.

The following parameter variables may be set for the MMSDeliveryReport pre-authorisation request:

PreAuth=Yes

The presence of this parameter indicates that this callback is a pre-authorisation request.

Type=MMSDeliveryReport

The transaction type is MMSDeliveryReport, indicating that a request is being made to send an MMS delivery report.

From=SenderPhoneNumber

This parameter contains the phone number of the subscriber for which the delivery report is being generated (i.e., the original recipient of the message).

To=RecipientPhoneNumber

This parameter contains the phone number to which this delivery report is being sent (i.e., the original sender of the message).

VASP=MmscOutboundRoute

This parameter is present if the MMSC has determined that the delivery report must be routed via an external route for delivery. The value of this parameter refers to the account name as defined in the “MMSC Routing” list.

Note that some versions of NowSMS may preface the MmscOutboundRoute with the text “VASP:”.

MMSDeliveryReport Charging Callback

This callback is executed when a delivery report is being routed by the MMSC.

NowSMS will ignore any HTTP response returned by the callback, however we recommend returning an “HTTP 200 OK” response for future compatibility reasons.

The following parameter variables may be set for the MMSDeliveryReport charging callback:

Type=MMSDeliveryReport

The transaction type is MMSDeliveryReport, indicating that an MMS Delivery Report has been generated.

From=SenderPhoneNumber

This parameter contains the phone number of the subscriber for which the delivery report has been generated (i.e., the original recipient of the message).

To=RecipientPhoneNumber

This parameter contains the phone number to which this delivery report is being sent (i.e., the original sender of the message).

VASP=MmscOutboundRoute

This parameter is present if the MMSC has determined that the delivery report must be routed via an external route for delivery. The value of this parameter refers to the account name as defined in the “MMSC Routing” list.

Note that some versions of NowSMS may preface the MmscOutboundRoute with the text “VASP:”.

MMSReadReport PreAuth Callback

This callback is executed when a MMS subscriber, Value Added Service Provider (VASP) or MMSC interconnect partner is requesting to send a read report (a.k.a., message read receipt).

This is a “pre-authorisation” request, and does not mean that the read report will actually be accepted by NowSMS for delivery. If NowSMS cannot successfully connect to the accounting URL, or the URL returns a response other than a standard “HTTP 200 OK” response, the user request to send a message will be blocked. A “PreAuth” request to send a message will also be blocked if the HTTP response content includes the text “PreAuth=Deny”.

The following parameter variables may be set for the MMSReadReport pre-authorisation request:

PreAuth=Yes

The presence of this parameter indicates that this callback is a pre-authorisation request.

Type=MMSReadReport

The transaction type is MMSReadReport, indicating that a request is being made to send an MMS read report.

From=SenderPhoneNumber

This parameter contains the phone number of the subscriber for which the read report is being generated (i.e., the original recipient of the message).

To=RecipientPhoneNumber

This parameter contains the phone number to which this read report is being sent (i.e., the original sender of the message).

VASP=MmscOutboundRoute

This parameter is present if the MMSC has determined that the read report must be routed via an external route for delivery. The value of this parameter refers to the account name as defined in the “MMSC Routing” list.

Note that some versions of NowSMS may preface the MmscOutboundRoute with the text “VASP:”.

MMSReadReport Charging Callback

This callback is executed when a read report is being routed by the MMSC.

NowSMS will ignore any HTTP response returned by the callback, however we recommend returning an “HTTP 200 OK” response for future compatibility reasons.

The following parameter variables may be set for the MMSReadReport charging callback:

Type=MMSReadReport

The transaction type is MMSReadReport, indicating that an MMS Read Report has been generated.

From=SenderPhoneNumber

This parameter contains the phone number of the subscriber for which the read report has been generated (i.e., the original recipient of the message).

To=RecipientPhoneNumber

This parameter contains the phone number to which this read report is being sent (i.e., the original sender of the message).

VASP=MmscOutboundRoute

This parameter is present if the MMSC has determined that the read report must be routed via an external route for delivery. The value of this parameter refers to the account name as defined in the “MMSC Routing” list.

Note that some versions of NowSMS may preface the MmscOutboundRoute with the text “VASP:”.

MMSEMail PreAuth Callback

This callback is executed when an e-mail message has arrived via SMTP, specifying an MMS recipient.

This is a “pre-authorisation” request, and does not mean that the message will actually be accepted by NowSMS for delivery. If NowSMS cannot successfully connect to the accounting URL, or the URL returns a response other than a standard “HTTP 200 OK” response, the user request to send a message will be blocked. A “PreAuth” request to send a message will also be blocked if the HTTP response content includes the text “PreAuth=Deny”.

The following parameter variables may be set for the MMSEMail pre-authorisation request:

PreAuth=Yes

The presence of this parameter indicates that this callback is a pre-authorisation request.

Type=MMSEMail

The transaction type is MMSEMail, indicating that an SMTP request is being made to deliver an MMS message to a subscriber.

From=EMailAddress

This parameter contains the e-mail address of the SMTP message sender.

To=RecipientPhoneNumber

This parameter contains a single recipient phone number.

MsgCount=1

This parameter is always 1 in current versions of NowSMS.

MMSEMail Charging Callback

This callback is executed when an SMTP message has been accepted for routing to an MMS recipient.

NowSMS will ignore any HTTP response returned by the callback, however we recommend returning an “HTTP 200 OK” response for future compatibility reasons.

The following parameter variables may be set for the MMSEMail Charging Callback:

Type=MMSEMail

The transaction type is MMSEMail, indicating that an SMTP message has been accepted for routing to an MMS recipient.

From=EMailAddress

This parameter contains the e-mail address of the SMTP message sender.

To=RecipientPhoneNumber

This parameter contains a single recipient phone number. If the original message was submitted to more than one recipient, a separate charging callback will occur for each recipient.

MessageID=assignedMessageID

This parameter records the MMS message ID assigned by MMSC. Note that if the message was sent to multiple recipients, each recipient instance shares the same message ID.

Size=####

This parameter specifies the size of the MMS message in bytes.

Note that MMS message size may differ based upon the encoding protocol (e.g., MM1, MM4, MM7). The actual size of the delivered MMS message may be different because of conversion between these protocols, and/or MMS header manipulation.