MMS routing callback

MMS routing callback SearchSearch
Author Message
marc bazimon
New member
Username: Marc_orange

Post Number: 7
Registered: 01-2007
Posted on Monday, August 13, 2007 - 02:12 pm:   

Hi,
We should incorporate a new telecom operator in the reunion island and that cause some difficulties to take count of a third operator for mobile number portability. We was focussed with two operator such month ago ( see below )

http://support.nowsms.com/discus/messages/485/19839.html

http://support.nowsms.com/discus/messages/485/18159.html

We have to use the MMS routing callback, but i didn’t find it on the 2006 documentation.
Do you have some information about it other than your response in the board about the use of the mms routing callback
(http://support.nowsms.com/discus/messages/485/18159.html )
Thanks for answer
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7413
Registered: 10-2002
Posted on Monday, August 20, 2007 - 08:32 pm:   

Hi Marc,

The only documentation of this functionality comes from a release note, which is basically what was cut & pasted into one of the messages that you referenced above.

You can find some discussion from people that have implemented it if you search the forums on a keyword of MMSRoutingURL. Most of the matches that I see for that search are the same text description cut & paste again. But I know there have been other discussions, because if you look at the "Important" note at the bottom of the message posted to Xavier about this feature, I know that there was a long discussion thread out here about that particular problem. Searching on keywords of "MMS routing callback" returns some more discussion, but nothing too informative.

All that said, it's a pretty straight-forward callback. NowSMS is not very picky about the response that comes back ... it can be either text or HTML, we just look for the "Route=" string in the response.

For testing, try creating a route named "Now" ... and use MMSRoutingURL=http://support.nowsms.com/discus/routenow.txt

This is a simple callback that I use for testing ... it just routes everything to the "Now" route.

If you connect to the URL directly, you'll see the format of the response that it returns.

That URL returns a static response, regardless of what parameters you pass to it. Your actual URL would be a script that returns different responses based upon where the message should be routed, like described in http://support.nowsms.com/discus/messages/485/18159.html.

-bn
marc bazimon
New member
Username: Marc_orange

Post Number: 8
Registered: 01-2007
Posted on Tuesday, August 21, 2007 - 03:40 pm:   

thks , i see you're definitely back.
i've got another thing to ask regarding the mmsrouting callback.
We use a internal database to see if the subscriber are from our network or not. how it works for the behaviour of both ( internal database and mms routing call back )? when a mms come and has to be route, does the mmsc first a request to internal database then call the mmsrouting callback one or as soon a mms has to be route , the mmsc did a request to mms routing callback interface without doing a request to internal db?In the second case , we have to build a external database for our subscriber.
Another important fact for us, is to know what time out there's for http request for mms routing callback. do you know the default value and can we change it?
what is the limit for mms on this interface ? we have a 3 mms/s license , is the interface can perform 3 request per second ?
thank for answer
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7417
Registered: 10-2002
Posted on Friday, August 24, 2007 - 05:48 pm:   

Hi Marc,

Still a few delays, but I'm working my way back.

The questions that you ask are very good. I think the best way to answer them is to go through the step-by-step process of what happens, and then afterward I'll add some more detail for clarification.

The MMSC maintains its own database of MMSC user accounts. These are accounts that are allowed to send messages via the MMSC, and they are frequently automatically provisioned in an operator configuration (http://www.nowsms.com/support/bulletins/tb-nowsms-002.htm).

When a user submits an MMS message to the MMSC, the following happens:

1.) MMSC validates that the sender has an MMSC User account.

2.) MMSC checks recipient addresses one at a time.

a.) If recipient address is an e-mail address, continue to next step.

b.) If recipient address is defined in the MMSC User database, continue to the next step. (This step can be skipped by adding the MMSC.INI [MMSC] parameter, DisableMMSDirectDelivery=Yes ... this confusingly named parameter only disables this check, it does not actually disable MMS direct delivery.)

c.) If the recipient address is defined in the IPNotify section of MMSC.INI (only used by test lab configurations), continue to the next step.

d.) If an MMSRoutingURL callback is defined, it is called. If "Route=BlockMessage" is returned, the MMSC will refuse to accept the message and return an error response back to the sender. Otherwise, continue to the next step.

3.) If an MMSAccountingURL callback is defined, it is called with an MMSSend PreAuth callback. If the request is rejected, the MMSC will refuse to accept the message and return an error response back to the sender. Otherwise, continue to the next step.

4.) The message is queued for delivery.

5.) If an MMSAccountingURL callback is defined, it is called with an MMSSend callback.

6.) A response is returned to the sending MMS client to indicate that the message has been accepted by the MMSC.


--

The above description probably has more detail than you need. But I figure it can be helpful.

In particular, the INI file parameter in 2b can be helpful for configurations where you are using a routing callback for all of your routing. If you have a subscriber that leaves you with number portability, you don't have to worry about removing them from the "MMSC Users" database in NowSMS.

--

Regarding timeout, the MMSC will wait 120 seconds for a response.

HOWEVER, it is important to note that these callbacks delay the response of the MMSC back to the sending client. The timeout of different MMS clients will vary. Therefore, you do not want to take too long in a callback. A couple of seconds is ok ... but 30 seconds would be pushing your luck.

Regarding performance limits, the MMSC allocates a separate thread for each MMS message that it is accepting from a client. So while we are waiting on a callback response, messages from other MMS clients continue to be processed. The MMSC could have multiple routing callbacks active at the same time.

-bn
marc bazimon
New member
Username: Marc_orange

Post Number: 10
Registered: 01-2007
Posted on Wednesday, August 29, 2007 - 11:26 am:   

Hi Bryce,
thks for the complement, as you can guess i've got some question and need about your last threads.
In order to not doing misunderstood, i put in joint file an organigram did with hand of your last threads , and it is important to know if the behaviour is the one described in the joint file because we have to do some developpment to integrate our server which is gonna respond to mmsroutingurl callback. and it is because i had not well sure from the way it takes.

from 2) d) "If an MMSRoutingURL callback is defined, it is called." sorry but what is it called?
"Otherwise, continue to the next step. " is it 3) or 4)?
because for me 3) is the request to server via html/url interface.


3) " it is called with an MMSSend PreAuth callback." is it the name that you give to the request to server/url ?

5) is it abnother request or the routing doing by MMSC?

For time out, what happen if the time out is reached, is mms drop or there's a kind of retry, and if it is reject waht is the message send to customer?

Thanks for your next response
Marc




application/octet-streamorganigram from the routing of mms
mms_routing_url.vsd (91.1 k)

Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7424
Registered: 10-2002
Posted on Wednesday, August 29, 2007 - 07:55 pm:   

Hi Marc,

I'm graphically challenged when it comes to diagrams. So while it might be nice if I updated the Visio diagram that you sent, I wouldn't know where to start with Visio.

So let me try to answer your questions.


quote:

from 2) d) "If an MMSRoutingURL callback is defined, it is called." sorry but what is it called?




Sorry, bad choice of English words on my part ... I can see where this would be confusing.

I meant "called" in the sense of programmatic API call. We refer to these URL as "callbacks" (which might not be a good choice of terminology either), so I'll frequently say that a "callback" gets "called".

I hope that makes more sense.


quote:

"Otherwise, continue to the next step. " is it 3) or 4)?
because for me 3) is the request to server via html/url interface.




The next step would be 3.

Anywhere that I stated "next step", it meant the next numbered step. So if there is a "next step" under 2a, this means that we jump to 3 ... we don't go to 2b.


quote:

3) " it is called with an MMSSend PreAuth callback." is it the name that you give to the request to server/url ?




There are multiple types of callbacks.

I wanted to give a more complete description of the logic flow, so I mentioned all of them. But in retrospect, I should have provided more of an introduction to explain the other callbacks. We originally were just talking about the "routing callback" ... and I threw in the "accounting callbacks" without any reference to explain them.

Until I confused things above, we were talking only about the "MMS Routing Callback". This is the callback described in step 2 of the explanation above.

When the "MMSRoutingURL=" parameter is present in MMSC.INI, the MMSC will perform this routing callback to ask how the MMS message recipient should be routed.

The logic associated with this MMS Routing Callback is contained entirely in step 2.

Step 3 and Step 5 describe different optional callbacks. These "MMS Accounting Callbacks" exist for a different purpose ... they are for accounting/charging purposes. The PreAuth in step 3 validates that the sender is allowed to send the message. The callback in step 5 records that the MMSC has accepted the message.

The accounting callbacks are described here: http://www.nowsms.com/support/bulletins/tb-nowsms-001.htm

If you don't have any accounting callbacks defined, then those steps are simply skipped.

-bn
marc bazimon
New member
Username: Marc_orange

Post Number: 11
Registered: 01-2007
Posted on Thursday, August 30, 2007 - 02:31 pm:   

hi Bryce
Thanks for your reply,
for visio , dont worry i did it intuitively so i think you won't have trouble , if you have some trouble , just comment. if you have not visio, your explanation are enough to my understanding.
Regards
Marc
marc bazimon
New member
Username: Marc_orange

Post Number: 12
Registered: 01-2007
Posted on Thursday, August 30, 2007 - 02:36 pm:   

Oups i forgot ,
could you tell me what happen when the mmsrouting url request exceed the time out. MMS are discard?
Regards
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7493
Registered: 10-2002
Posted on Monday, September 17, 2007 - 11:44 pm:   

Sorry Marc, I was negligent in replying promptly.

If the MMS Routing URL times out ... the MMSC uses whatever routing information is statically configured.

(By contrast, if an MMS Accounting PreAuth callback URL times out, the MMSC will refuse to accept the message.)

-bn