Want to switch to NowSMS... but how do I do it w/ my simple app?

Want to switch to NowSMS... but how do I do it w/ my simple app? SearchSearch
Author Message
TJ ELm
New member
Username: Brownchild

Post Number: 1
Registered: 07-2010
Posted on Sunday, July 18, 2010 - 06:35 am:   

Hello all,

i've been reading around the forums trying out your software, and doing trial and error to get some answers but it's just getting more confused. So I hope you dont mind if I ask some rather noobie questions here to get me up to speed w/ things.

First off, i have been developing SMS applications for some time now, but only in the PHP / APACHE/MSQL / FLASH sense.. never did any C+ or GSM stuffs, and I've always relied on middle ware apps to cary out these things for me. I'm looking to change platform and I really would love to jump onto the NowSMS boat.

To get down to the point, my sms application (php/mysql/apache based) does everything except send and receive sms, and currently it does this by adding/retrieving records from the database. The gateway software i'm using now basically queries mySQL at a 2 second interval. I dont deal w/ MMS and other complicated stuffs really, just plain sms , up to 3-part sms (w/c i believe is not a problem w/ NowSMS)

The RECEIVING part of the NowSMS software is pretty clear already for me..

but the SENDING SMS is the one that im really having a hard time comprehending so here's my current situation.

The current gateway queries the mySQL Database for outbox records

eg (where status='send' LIMIT 1)

and updates that particular outbox record as:

eg.
(set status='sending') - as soon as it retrieves it and attempts to send
(set status='sent') - when message is successfully transmitted
(set status='retry') - skips the message after 3 failed attemps and que's it for retry when there's no SMS to send anymore
(set status='failed') - after 3 attempts to send it (coming from a retry status)

So as you can see it's so convinient for me for my sms app to just deal w/ the database and everything that has to do w/ actual gsm modem send/receive stuff is automatic...


Obviously NowSMS doesnt have this SQL feature, but i believe it's very capable of the sending/receiving part. So my plan is to add an additional module to my application to mimic the SQL processing that my current gateway is using.. this is really basic stuff..

Sp in general, to do this, i need to:

1) Tell NowSMS to send a particular message via my script php http: link as per NowSMS documentation

PROBLEMS:
a) STATUS RESPONSE
I would've expected a boolean response or something for my php script to process, instead the return is an HTML document saying " MESSAGE SUBMITTED" etc..

Now, I can parse this response (at an additional overhead for my server) but that doesnt really tell me anything significant.. it just tells me the message is QUE for submission in the NOWSMS Engine...

Q1: Is there any way I can make NowSMS respond w/ a simple status variable or something simplier?

Q2: How do I further get the STATUS of the message for my script as per the stats examples above??? right now all i can do is look at the NowSMS GUI for status,errors etc.. (w/c i should not need to look at anymore once it's up and connected to the modems, everything should be in my application only, nowSMS will basically be just a simple send/receive/status engine)

Q4: Given that nowSMS works different from my current gateway, i'm willing to forgo some limitations... but i really need to know the following status when sending an sms:
- in que/sending (nowSMS trying to send that)
- transmitted/sent (successfully transmitted)
- failed (and if possible tell me d reason like modem response failure, etc)

and i need this to be fed into my application/database.

How do i do this in nowSMS? Can it actively call a script as soon as there is a status update on the msg to be sent? perhaps call the follwing url at least?
eg. http://localhost/setsms_status.php?id=254&status=sent
eg. http://localhost/setsms_status.php?id=254&status=failed&reason=modem+error

Q5: Will it be easier for me to do all this i need to do if I just used CLI instead of HTTP interfacing? I dont mind developing a win32 app that simply issues the required commands .. but i really need to have a way to extract those valuable status for use w/ my database and the whole application in general. It's useless for me if they're just there in NowSMS GUI, coz that's just too much 3rd party dependency.

Q6: How do I tell NowSMS w/c gateway/operator to use w/o having to set it in the routing options? I would like full control over the routing options from my script rather than relying on NowSMS for this for the purpose of updating the rules w/o needing to access NowSMS. Not that important but would be great if i had this capability.



I got some more questions really but right now I need to know the above before it's even worth for me to explore the other questions i have hehe


I'm sorry for the long post, I know ya'll are busy, I just wanted to be clear. I spent much time trying to explain myself, as a proof of my interest to port my current app into NowSMS. I hope someone can help..


Thanks very much you guys

Regards

TJ
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2336
Registered: 08-2008
Posted on Sunday, July 18, 2010 - 11:40 pm:   

Hi TJ,

Apologies, but it will take some time to reply to your message in sufficient detail. I will reply with more detail by late Tuesday.

-- Des NowSMS Support
TJ ELm
New member
Username: Brownchild

Post Number: 3
Registered: 07-2010
Posted on Monday, July 19, 2010 - 06:42 am:   

haha ok.
sorry to be consuming so much of ur time on this.. was actually hoping fellow users would help me but i would appreciate it if you could personally also
thanks much i'll wait.

:-)