How to store outbound messages in mysql?

How to store outbound messages in mysql? SearchSearch
Author Message
alberto fernadez
New member
Username: Bluesnatural

Post Number: 3
Registered: 02-2009
Posted on Tuesday, March 03, 2009 - 12:05 pm:   

I need to know how Outbound messages are stored on a bd.
Thanks
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 531
Registered: 08-2008
Posted on Tuesday, March 03, 2009 - 05:31 pm:   

Hi,

Do you mean "db", as in database? Since you're asking about mysql in the subject, I'm guessing that is what you mean.

NowSMS only stores this information in comma delimited log files.

However, there is an HTTP-based accounting interface that you can implement so that everytime NowSMS processes a message, it calls your URL ... and you can use this callback to store information in your database.

This link explains the basics of the accounting callbacks:

http://www.nowsms.com/support/bulletins/tb-nowsms-001.htm

However, you will notice that the information in referenced those callbacks is rather sparse.

That link is a bit old, and needs to be updated ... as the callback actually does include more information, including the message content.

The following link provides more information about the parameters that are currently included in the SMS HTTP accounting callbacks:

http://blog.nowsms.com/2009/01/dynamic-sms-message-routing-with-http.html

(Only the response code handling for dynamic message routing requires the latest version ... the other parameters have been implemented for awhile.)

So ... as an example, if you configure an accounting URL of http://server/path, when a message is submitted, you'll get a callback like this, allowing you to record the information:

http://server/path?Type=SMSSend&From=UserAccount&To=%2B447777777777&SubmitIP=127 .0.0.1&Text=This%20is%20a%20test.

--
Des
NowSMS Support