Mobile Number Portability (MNP) and the NowSMS MMSC

Posted by on Apr 22, 2008 in Support Blog

Topic Keywords: , , ,

The NowSMS MMSC implements a dynamic MMS routing callback facility for environments where more advanced MMS routing capabilities are required.

The standard NowSMS MMSC configuration allows for MMS routing based upon phone number prefixes. However, in MNP environments, it may be necessary to query a database to determine how to properly route an MMS message.

Dynamic MMS routing callbacks also allow for MMS routing control based upon who submitted the MMS message. For example, it may be desirable to block MMS sending to international destinations for some or all MMS VASP accounts.

Here’s the text that I usually cut and paste when people ask how to implement the dynamic MMS routing callback:

When the MMS Routing callback is enabled in NowSMS, each time the MMSC receives a message, it will connect to a configurable customer-provided routing callback URL, passing the message recipient to the URL. The customer provided URL can return a response to indicate that the message should be routed via a specific route defined in the “MMSC Routing” page of the NowSMS configuration dialog, or the response can indicate that the message should be rejected.

The MMS routing callback URL is defined in the MMSC.INI file, under the [MMSC] section header:


The variables listed below will be added to the MMSRoutingURL when the URL is executed by the gateway as HTTP GET (CGI-style) parameters.

Type=MMSRouteCheck (Note: Future “Type” values may be added in the future.)

From=SenderPhoneNumber or e-mail address

VASPIN=VASPname (present if the message was received via a specific account defined in the “MMSC VASP” list)



(Note: The “%2B” in the above examples is standard URL escaping for the “+” character.)

To specify which of the routes defined in the “MMSC Routing” list should be used to route this message, the URL must return a standard HTTP 200 OK response, and include the following text somewhere in the response:


“xxxxxxx” should match an “Account Name” defined in the “MMSC Routing” list, or it can use the predefined values of “Direct” (signifying MMSC Direct Delivery), “WAPPush” (signifying “Convert to Multimedia WAP Push”), or “BlockMessage” (signifying the MMSC should reject the message).

If it is possible to route the message via one of several defined routes, multiple routes can be returned in the response, separated by “:”. For example:


In the above case, the message could be routed through any of the listed routes.

Although that explanation is fairly complete, we’re frequently asked for an example.

Examples can be helpful. But we’ve always been hesitant to provide an example because this routing callback script runs on a separate external web server. That means that the script can be written in whatever web development environment the customer is most familiar with. For example, it could be PHP, ASP, Perl, Ruby on Rails, or numerous other environments.

We decided to provide a PHP example.

Blogger is not good for posting code examples, so you can download the PHP example at the following link:

For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...

One Response to “Mobile Number Portability (MNP) and the NowSMS MMSC”

  1. Brett Warthen says:

    Additional information regarding this configuration can be found here: