Auto respond from now sms/mms

Auto respond from now sms/mms SearchSearch
Author Message
Desy
New member
Username: Echy

Post Number: 1
Registered: 07-2009
Posted on Thursday, July 02, 2009 - 06:27 pm:   

hello

first time i try now sms/mms application and i don't know why how to setting auto respond from now sms/mms application to send mms from server PC to client HP??could you help me please!!!

thanks
best regards

echy
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 981
Registered: 08-2008
Posted on Friday, July 03, 2009 - 02:50 pm:   

Hi echy,

Auto responding to an SMS is pretty easy.

However, auto-responding to an MMS is more complicated. It requires some programming.

The reason that MMS is so complicated is because MMS messages have multiple content objects in them (usually images) that you need to process, whereas an SMS message just has text.

What I usually recommend is that you take gradual steps to make sure that everything is working and configured properly first. This will also help you understand how things work.

First, make sure you can send SMS and MMS messages ok from the NowSMS web interface.

Next, make sure that you can receive SMS and MMS messages ok. The "View" buttons on the "2-way" page of NowSMS should show SMS and MMS messages that you have received.

(Many phone modems do not support receiving messages via the GSM modem interface, so this is why I suggest that you confirm that you are successfully receiving messages first.)

For processing received SMS messages, this thread has some good examples:

http://support.nowsms.com/discus/messages/1/4520.html

Processing received MMS messages is more complicated.

You basically have two choices for how to do it.

OPTION 1:

PHP - NowSMS can post the content objects from an MMS message to a PHP script.

There's an example PHP script described at the following link:

http://www.nowsms.com/download/php2waymms.pdf

As you'll see, the PHP script is passed variables that give you the sender address and subject of the MMS message, and then one or more file objects that contain the content of the MMS message.

The example script stores writes the received MMS messages to HTML pages as a simple mobile blogging service.

If you wanted to reply back to the sender with an MMS message, there is an additional PHP example for sending an MMS message at the following link:

http://blog.nowsms.com/2008/11/nowsms-php-example-send-mms-message.html

If you wanted to reply to the MMS message with an SMS message, there is an example for sending an SMS message from a PHP script at the following link:

http://blog.nowsms.com/2008/10/nowsms-php-example-send-sms-text.html

OPTION 2:

The other option is using the file/directory interface, which is the default configuration. In this case, what happens is that received messages get written to the MMS-IN subdirectory of NowSMS.

The format is that there is a text file that has the MMS message headers in text format. This file has an extension of ".hdr". An example of the format is shown at the following link:

http://www.nowsms.com/documentation/ProductDocumentation/mms_notifications_and_c ontent/Creating_MMS_Message_Files.htm

(The format that we convert these messages to is compatible with the format that is input to MMSCOMP.)

Each of the message components (including any text components) are written to a separate file. They are referenced by an "X-NowMMS-Content-Location: filename" header (one for each component). "filename" is relative to the directory in which the ".hdr" file exists. Generally, NowSMS creates a separate directory to hold these content files for each of the content files, here's an old example that I copied from another thread:

In this case, the filename in the MMS-IN directory is 3F287A4A.hdr:


Message-type: m-retrieve-conf
Transaction-id: 3F287A46
MMS-version: 1.0
From: +44xxxxxxxxxx/TYPE=PLMN
To: +44xxxxxxxxxx/TYPE=PLMN
Date: Mon, 20 Dec 2003 20:28:37 GMT
Message-class: Personal
Message-size: 20796
Subject: Test MMS
Content-type: application/vnd.wap.multipart.related; start=<testmms.smil>; type=application/smil
X-NowMMS-Content-Location: 3F287A4A\testmms.smil;application/smil;charset=utf-8
X-NowMMS-Content-Location: 3F287A4A\testlogo.gif;image/gif
X-NowMMS-Content-Location: 3F287A4A\catchy_g.amr;audio/amr
X-NowMMS-Content-Location: 3F287A4A\testmms.txt;text/plain;charset=utf-8

In this case, the X-NowMMS-Content-Location header includes a directory name in the file path, and that means that the file is in that named subdirectory beneath the MMS-IN subdirectory. (NowSMS creates a subdirectory name that matches the ".hdr" file without the extension, so after processing the ".hdr" file, delete the corresponding directory.)

You can either scan the MMS-IN directory from your application, or there is also a configuration option where NowSMS can run a command every time it places a new MMS message in the MMS-IN directory:

To define a callback to be triggered every time an MMS message is received to the MMS-IN directory. Under the [SMSGW] header, add ReceiveMMSCallback=xxxxxx, where xxxxxx is a local executable command or an HTTP URL. A replaceable variable named @@Filename@@ can be included to specify the name of the header file (without path) for the received MMS message.

For example:

ReceiveMMSCallback=c:\windows\system32\cscript.exe c:\scripts\receivemms.js @@Filename@@

When 3F287A4A.hdr is created, the following command would be run:

c:\windows\system32\cscript.exe c:\scripts\receivemms.js 3F287A4A.hdr

--
Des
NowSMS Support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 987
Registered: 08-2008
Posted on Friday, July 03, 2009 - 03:32 pm:   

I've probably already given you a longer response than you were hoping for ... however I realised that in my description of how you process received MMS messages via the file/directory based interface, I did not explain how you would be able to send a reply back to the MMS message sender.

There is an example of how to send an MMS message from a command line interface at the following link:

http://blog.nowsms.com/2007/07/sending-mms-from-command-line.html

And there is an example for sending an SMS message here:

http://blog.nowsms.com/2008/10/nowsms-php-example-send-sms-text.html

--
Des
NowSMS Support
Desy
New member
Username: Echy

Post Number: 2
Registered: 07-2009
Posted on Sunday, July 05, 2009 - 05:24 pm:   

Thanks for your explaination about autorespond Des...

But I have a problem, I can send mms from the web interface to the HP client, but HP client can not receive or open a picture image that I sent. Is it because one of the settings or any configuration on MMSC? When I've tried, as there is a tutorial on nowsms, but it failed. Can you explain to me how the steps in the right settings on nowsms this application to send the image to the HP client?


thanks
best regards

echy
Desy
New member
Username: Echy

Post Number: 3
Registered: 07-2009
Posted on Sunday, July 05, 2009 - 05:28 pm:   

Thanks for your explaination about autorespond Des...

But I have a problem, I can send mms from the web interface to the HP client, but HP client can not receive or open a picture image that I sent. Is it because one of the settings or any configuration on MMSC? When I've tried, as there is a tutorial on nowsms, but it failed. Can you explain to me how the steps in the right settings on nowsms this application to send the image to the HP client?


thanks
best regards

echy
Desy
New member
Username: Echy

Post Number: 4
Registered: 07-2009
Posted on Sunday, July 05, 2009 - 05:36 pm:   

Thanks for your explaination about autorespond Des...

But I have a problem, I can send mms from the web interface to the HP client, but HP client can not receive or open a picture image that I sent. Is it because one of the settings or any configuration on MMSC? When I've tried, as there is a tutorial on nowsms, but it failed. Can you explain to me how the steps in the right settings on nowsms this application to send the image to the HP client?


thanks
best regards

echy
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 992
Registered: 08-2008
Posted on Sunday, July 05, 2009 - 07:23 pm:   

Hi echy,

The default configuration is for NowSMS to act as a direct delivery MMSC.

In most mobile operator networks, this will not work, as all messages must be delivered via the operator MMSC.

You need to configure an "MMSC Routing" definition to send outbound MMS messages over the modem through the operator MMSC.

This link explains the configuration:

http://www.nowsms.com/documentation/ProductDocumentation/mms_notifications_and_c ontent/Connecting_to_operator_MMSC.htm

And this link explains more about how MMS works if you are curious:

http://www.nowsms.com/howmmsworks.htm.

--
Des
NowSMS Support