Where are the messages stored / queued?

22 views
Skip to first unread message

K

unread,
Feb 8, 2012, 12:56:00 AM2/8/12
to rapidsms
I have a system running now that is working (in terms of sending/
receiving messages), and I'd like to make RapidSMS the UI part of
things. How can I get messages into RapidSMS (command line / HTTP),
and in what format would it have to be?

And, how does RapidSMS send out messages? Does it create a text file
and put it in a queue somewhere?

Thanks,
Kay

K

unread,
Feb 8, 2012, 1:56:49 AM2/8/12
to rapidsms
OK - so after a bit more searching, it seems that I want to use the
bucket backend... only issue is that I don't see any documentation on
how to invoke it... Any thoughts??

Thank again,
Kay

Cory Zue

unread,
Feb 8, 2012, 5:50:36 AM2/8/12
to rapi...@googlegroups.com
2012/2/8 K <mehmet...@gmail.com>

OK - so after a bit more searching, it seems that I want to use the
bucket backend... only issue is that I don't see any documentation on
how to invoke it...  Any thoughts??


On Feb 8, 9:56 am, K <mehmet.no...@gmail.com> wrote:
> I have a system running now that is working (in terms of sending/
> receiving messages), and I'd like to make RapidSMS the UI part of
> things.  How can I get messages into RapidSMS (command line / HTTP),
> and in what format would it have to be?
>
> And, how does RapidSMS send out messages?  Does it create a text file
> and put it in a queue somewhere?
>
> Thanks,
> Kay

--
You received this message because you are subscribed to the Google Groups "rapidsms" group.
To post to this group, send email to rapi...@googlegroups.com.
To unsubscribe from this group, send email to rapidsms+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rapidsms?hl=en.


K

unread,
Feb 8, 2012, 6:13:50 AM2/8/12
to rapidsms
Thanks Cory... that's cool, but I need something that can be done via
command line/script. If I've got text files that contain the sms
message, is it possible to use something to get them into the rapidsms
system? I was thinking of the bucket one, but I can't see where it's
pulling from.

On Feb 8, 2:50 pm, Cory Zue <c...@dimagi.com> wrote:
> 2012/2/8 K <mehmet.no...@gmail.com>
>
> > OK - so after a bit more searching, it seems that I want to use the
> > bucket backend... only issue is that I don't see any documentation on
> > how to invoke it...  Any thoughts??
>
> Check out the httptester app:https://github.com/rapidsms/rapidsms/tree/master/lib/rapidsms/contrib...

Cory Zue

unread,
Feb 8, 2012, 6:21:32 AM2/8/12
to rapi...@googlegroups.com

Thanks Cory... that's cool, but I need something that can be done via
command line/script.  If I've got text files that contain the sms
message, is it possible to use something to get them into the rapidsms
system?  I was thinking of the bucket one, but I can't see where it's
pulling from.


Or you could write/call code that does something similar to that function.

K

unread,
Feb 8, 2012, 7:33:17 AM2/8/12
to rapidsms
Am trying to avoid the http endpoint, but will take a look. So
there's no way to use the bucket backend for what I am trying to
accomplish?

On Feb 8, 3:21 pm, Cory Zue <c...@dimagi.com> wrote:
> 012/2/8 K <mehmet.no...@gmail.com>
>
> > Thanks Cory... that's cool, but I need something that can be done via
> > command line/script.  If I've got text files that contain the sms
> > message, is it possible to use something to get them into the rapidsms
> > system?  I was thinking of the bucket one, but I can't see where it's
> > pulling from.
>
> I see. You could hit the httptester endpoint directly:https://github.com/rapidsms/rapidsms/blob/master/lib/rapidsms/contrib...

Tim Akinbo

unread,
Feb 8, 2012, 2:22:54 PM2/8/12
to rapi...@googlegroups.com
I've had to manually submit messages to RapidSMS before and that was accomplished using urllib and a http backend. It's equally possible to have a script that can take messages in a text file and submit to RapidSMS over http.

Tim Akinbo

K

unread,
Feb 9, 2012, 4:04:40 AM2/9/12
to rapidsms
OK, this is interesting. So I configured the http backend like this:

},
"my_http_backend" : {"ENGINE": "rapidsms.backends.http",
"port": 8888,
"gateway_url": "http://mydomain.org",
"params_outgoing": "user=my_username&password=my_password&id=%
(phone_number)s&text=%(message)s",
"params_incoming": "id=%(phone_number)s&text=%(message)s"
}


And that's where the documentation stops.

How do I post a message? I tried using mydomain.org:8888/
id=123&text=test and a few other combinations, but I get nothing other
than "Firefox can't establish a connection to the server at
mydomain.org:8888."

Any idea what I am doing wrong?

Thanks,
Kay

Victor Miclovich

unread,
Feb 9, 2012, 4:09:35 AM2/9/12
to rapi...@googlegroups.com
Messages should be stored in the messages table 

(A DLR can further be stored too ---> http://kannel.org/download/1.4.1/userguide-1.4.1/userguide.html#AEN2915 if you use Kannel too).

Nic Pottier

unread,
Feb 9, 2012, 4:10:53 AM2/9/12
to rapi...@googlegroups.com
Hi K,

A different direction, but depending on your needs, you may want to
look at rapidsms-httprouter:
http://pypi.python.org/pypi/rapidsms-httprouter

It should be pretty easy to instrument for what you are doing.

-Nic

Tim Akinbo

unread,
Feb 9, 2012, 5:12:53 AM2/9/12
to rapi...@googlegroups.com
K,

ENGINE: specifies what backend engine to use (in this case 'rapidsms.backends.http')
HOST: specifies what interface the http backend should listen on to accept messages for RapidSMS. Defaults to localhost
PORT: specifies what port the http backend would accept messages on. Defaults to 8080
GATEWAY_URL: this option specifies the url RapidSMS will send outgoing messages to.
PARAMS_INCOMING: specifies the format incoming messages are expected to be received in.
PARAMS_OUTGOING: specifies the format the outgoing gateway expects messages to be encoded in.

In your case, since you've specified port as 8888. Then a url invocation similar to http://localhost:8888/?id=08012345678&text=hello+world will submit the message hello world from 08012345678 to RapidSMS.

HTH.

Tim Akinbo

K

unread,
Feb 11, 2012, 12:54:11 AM2/11/12
to rapidsms
Thanks guys...

Regarding the port for this backend... I specified 8888, while I have
rapidsms running on port 8000. What else do I need to configure? If
I try the url: http://mydomain.org:8888/?id=08012345678&text=hello+world
I get a page in firfox that says the page couldn't be loaded.

If I configure settings.py to listen on 8000, and use:
http://mydomain.org:8000/?id=08012345678&text=hello+world
I get sent back to the default page for rapidsms and the message is
not entered/processed.

I must be missing one small piece...

K

unread,
Feb 11, 2012, 1:41:55 AM2/11/12
to rapidsms
OK - I have the incoming working - the HOST part of the config file
was undocumented, and I just saw it in Tim's post.

Now, for outgoing messages, I want to be able to send a message via
the web interface and/or URL post and somehow get the text of the
message so I can process it... how do I get access to that? Is it in
a database, and if so, where?
Reply all
Reply to author
Forward
0 new messages