MMS Request via mobile

MMS Request via mobile SearchSearch
Author Message
Anonymous
Posted on Monday, July 28, 2003 - 04:27 pm:   

Hi, I've managed to download and install the program and it's been working great so far. I've got a Nokia 7650 which i am using to recieve the messages. When i send from the web interface, there's no problem. Is there a way for me to do requests from the mobile, instead of the web interface? ( e.g. via short code or something? )

Say for example i want to request A.jpg and B.amr from my server, how do i get around to that?
Bryce Norwood - NowSMS Support
Posted on Tuesday, July 29, 2003 - 10:22 pm:   

It takes some programming work, but the easiest way to do things is to send requests in to the gateway via SMS (send to a phone number where SMS is received by the gateway).

Configure a command on the "2-way" page of the configuration dialog to execute a script that you create running on another server.

That script can then generate a request to send an MMS message back to the SMS message sender (based upon text in the SMS message, the script might decide which MMS message to reply back with).

To reply back with an MMS is a little tough. I'd suggest setting up the script to first reply back with an SMS message.

When that is working, then to reply back with an MMS messgae, it's easiest if you start with a precompiled MMS message (use MMSCOMP to create the message, then store the message file on another web server and be sure to configure the MIME type for the file as "application/vnd.wap.mms-message"), then your script could reply with a redirect message to send the pre-compiled MMS file (e.g., http://127.0.0.1:8800/?PhoneNumber=####&mmsurl=http://server/path/file.mms).

See this document http://www.nowsms.com/support/bulletins/tb-nowsms-003.htm for some information about how your script can return a redirect response.

Of course, all of this is a bit complicated.

Suppose that you want instant gratification.

Let's take your original example. A user sends an SMS message in to your Now SMS/MMS gateway, and you want to then reply back to them with an MMS message that contains A.jpg and B.amr from your server.

I'm going to use a trick that requires a new feature in the v5.0 beta release of NowSMS. (You can find the beta release at http://www.nowsms.com/beta5)

And to make it a functional example, rather than sending files from your web server (since I don't know the address of your web server), I'm going to setup my example to reply with an image from this web site. (We'll use http://www.nowsms.com/media/logo.gif as the image.)

Ok. Ready?

First, we're going to make sure that we're enabled to receive SMS. Go to the "SMSC" page of the configuration dialog, highlight the SMSC connection that you're using, and select "Properties". If you're using a GSM Modem, simply check "Receive SMS Messages". If you're using a different type of SMSC, you can enable the setting for receiving messages, but you'll have to make sure that your provider is configured to route received messages to your account.

On the "2-way" page of the configuration dialog, make sure that "Process Received SMS Messages" is checked. Then in the "SMS Command Prefix" field, enter MMSTEST. In the "Command to Execute" field, enter:

http://127.0.0.1:8800/?PhoneNumber=@@Sender@@&MMSFILE=http://support.nowsms.com/discus/medi a/logo.gif&MMSTEXT=Here+is+the+image+you+requested.

(Note: If you have authentication enabled on your Now SMS/MMS Gateway, which is recommended, so that you have to login to submit a message, then change this URL to:

http://username:password@127.0.0.1:8800/?PhoneNumber=@@Sender@@&MMSFILE=http://w ww.nowsms.com/media/logo.gif&MMSTEXT=Here+is+the+image+you+requested.

Where "username" and "password" correspond to an account defined on the "SMS Users" page of the configuration dialog.)


"Command returns response text" should NOT be checked.

Click "Add" so that the entry gets added to the "Received SMS Command Table".

Apply your changes, and restart the SMS service.

Send an SMS message in to the gateway with "MMSTEST" as the first text in the message ... and the gateway will execute the command associated with that command prefix, causing an MMS message to be sent as a reply, including the referenced image.

If people are going to have a lot of different commands, I usually recommend that rather than using the command table in NowSMS, they should direct all inbound messages to a single command, which is an intelligent script running on another web server. That way when you want to add a new command, you don't have to go to the NowSMS configuration screens, you just edit your script.

-bn