MMSC Accounting Callbacks? | Search |
NowSMS Support Forums ⬆ NowSMS Support - MMS & Advanced Issues ⬆ Archive through July 07, 2009 ⬆ |
◄ ► |
Author | Message | |||
Bigjack New member Username: Bigjack Post Number: 4 Registered: 11-2008 |
I'm trying to understand the options for interfacing NowMMSC with a billing system. I understand that there are two options: 1.) Process the MMSC-yyyymmdd.LOG files. 2.) Use MMSC accounting callbacks I've read the article about accounting callbacks, but I can be a bit dense at times. How does the accounting callback actually work? What exactly does it look like? Is there another option? Thanks, jack | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 872 Registered: 08-2008 |
Hi Jack, I always recommend using the MMSC accounting callbacks because they offer real time control. The accounting callbacks are described here: http://www.nowsms.com/support/bulletins/tb-nowsms-001.htm The first 2 callbacks are the ones that you would be primarily interested in ... MMSSend PreAuth and MMSSend Accounting. There are some additional parameters not mentioned in this older document. The "To=" field is included in the MMSSend PreAuth callback ... however, it may be truncated if it is an extremely long list of recipients. It is a comma delimited list of recipients for the PreAuth callback. (The accounting callback is repeated for each recipient.) There are also "VASPIN=" and "VASP=" parameters that might be present if a message was received from an external connection (VASPIN=), or if NowSMS believes the message must be routed to an external connection (VASP=). I realise that you're looking for an example ... so my explanation above probably only confused you more. Here's a simple example. Let's say that MMSAccountingURL=http://10.10.10.10/mmsact.php is set under the [MMSC] section of MMSC.INI. And, let's say +44777777777 is sending a message to +44777777771 and +44777777772. The following callback would occur when the MMSC asks for permission to accept the message: http://10.10.10.10/mmsact.php?PreAuth=Yes&Type=MMSSend&From=%2B44777777777&To=%2 B44777777771%2C44777777772&MsgCount=2&Size=xxxxxxxx If the callback returns an OK response, and PreAuth=Deny is not in the text of the response, then the following callbacks would occur as the MMSC processes the message: http://10.10.10.10/mmsact.php?Type=MMSSend&From=%2B44777777777&To=%2B44777777771 &Size=xxxxxxxx http://10.10.10.10/mmsact.php?Type=MMSSend&From=%2B44777777777&To=%2B44777777772 &Size=xxxxxxxx Now to explain some parts of this that might be confusing ... %2B is URL escaping for the "+" character. URL formatting rules require that the "+" character be escaped ... normally if you are using a development library that supports HTTP, this character will be escaped. Similarly, %2C is escaping for the "," character. Also ... a frequent question ... can you correlate the PreAuth with the accounting callback? You cannot. The PreAuth asks for permission, and the accounting callback records the charge. Just because there is a successful PreAuth does not guarantee that the MMSC will accept the message for processing. Hopefully that helps! -- Des NowSMS Support |