MMS mobile to PC

MMS mobile to PC SearchSearch
Author Message
Jonathan Tindal
New member
Username: Jtindal

Post Number: 1
Registered: 02-2007
Posted on Monday, February 26, 2007 - 08:46 pm:   

I am trying to use NowSMS as an MMSC to run OMA test cases on a network simulator. The project requires that everything must be controlled programmatically by a LabVIEW driver. I have so far been able to send MMS messages from a PC to a mobile handset via the Now SMS/MMS proprietary URL Submission (using an HTTP GET that points to files on a webserver).

I have been trying without success to send an MMS message from the phone to the PC. So far I have tried enabling Process Received SMS Messages and Process Received MMS Messages and am not getting anything in the MMS-IN folder (C:\Program Files\NowSMS\MMS-IN is specified for MMS Directory).

What I really need to do is be able to access the data sent by the phone so that I can compare it with what was expected and determine if the network simulator fulfilled the OMA requirement. What would be the best way to configure NowSMS in order help accomplish this (of course considering the limitations listed above)?
Jonathan Tindal
New member
Username: Jtindal

Post Number: 2
Registered: 02-2007
Posted on Tuesday, February 27, 2007 - 04:52 pm:   

Actually, I have been able to upload the content of MMS messages from the phone by doing an HTTP file upload post with a PHP script (as described in TB-NOWSMS-016). I would also like to upload the .mms file and possibly a header file. Is it simply a matter of adding to the PHP script or is there more involved?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6934
Registered: 10-2002
Posted on Tuesday, March 06, 2007 - 08:32 pm:   

Hi Jonathan,

We have corresponded via e-mail via this issue, and I'm still confused.

After reviewing this thread, and the e-mails that you have sent ...

I think what you want to do is send an MMS message from a mobile phone ... into the NowSMS MMSC ... and then have the raw MMS message posted to your PHP script (instead of having NowSMS parse it into individual files).

I think you could do this by defining an "MMSC Routing" of the type MM1.

If you want this to happen only when you send a message to a particular virtual phone number, put this number into the "Route messages to this account for recipient phone number(s)" field. "Server Address" would be the HTTP URL to which the message should be posted.

Basically, the URL that you specify will receive an HTTP POST, with the binary MMS message file as the content of the post ... whenever an MMS message is sent to a phone number that matches the address mask(s) defined in "Route messages to this account for recipient phone number(s) field".

Normally this configuration is used for sending MMS messages to an operator MMSC over a GPRS modem. For your setup, you would want to make sure that "Allow Sender Address Override" is checked, so that there would be a sender address in the message that gets posted to you.

-bn
Jonathan Tindal
New member
Username: Jtindal

Post Number: 3
Registered: 02-2007
Posted on Wednesday, March 07, 2007 - 05:34 am:   

Hi Bryce,

My goal is to send a message from a mobile phone ... into the NowSMS MMSC ... and then save the raw MMS message as a file on a webserver. It doesn't really matter how this happens as long as it can be done. Is there a way to do this?

I tried your advice, and you were spot-on about using MM1 routing: NowSMS posted the raw MMS message to my PHP file when I sent the MM to the specified phone number. Unfortunately, since the HTTP POST had a content type of "application/vnd.wap.mms-message" instead of "multipart/form-data," the $_POST and $_FILE arrays in PHP were empty and no data could be retrieved by my script.

I hope that it's clear what I'm trying to do. My apologies for being somewhat cryptic earlier; I'm having to learn MMS, HTTP, SMIL, PHP, and HTML (all pretty much from scratch) as I experiment with NowSMS. Sometimes I'm not even sure what I mean. Thanks,

-Jonathan Tindal
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6941
Registered: 10-2002
Posted on Wednesday, March 07, 2007 - 07:14 pm:   

Hi Jonathan,

I'm not real good at PHP, but I think you could use the $HTTP_RAW_POST_DATA variable to get the MM1 content in this case.

Although, doing some web searches, I see that this variable requires a special PHP.INI setting ... and it is recommended that you use the predefined stream "php://input" to read raw post data.

I suspect that will do what you want.

-bn
Jonathan Tindal
New member
Username: Jtindal

Post Number: 4
Registered: 02-2007
Posted on Thursday, March 08, 2007 - 09:50 pm:   

Hi Bryce,

It's working; I'm now able to upload the raw MMS data to a webserver and save it to a file. I ended up going with $HTTP_RAW_POST_DATA. Modifying the ini file is really easy. Basically you just delete a semicolon.

Anyway, thanks for the continued assistance. It's been a lifesaver.

-Jonathan