Sent via http to server Nowsms mms is not sent to the php host.

Sent via http to server Nowsms mms is not sent to the php host. SearchSearch
Author Message
Vladimir
New member
Username: Vb968

Post Number: 1
Registered: 05-2016
Posted on Friday, May 06, 2016 - 07:35 am:   

Hello.
I use gprs modem that is installed on the local computer with your application nowsms gateway. The nowsms gateway configured to forward all incoming MMS through MM7 on host php code that handles them.
When sending MMS through mobile phone network - everything is working properly.
But when you send MMS via http does not take place transfer it on a host with php script.
In the log servers nowsms SMSDEBUG.LOG, I found the following error:
06:36:48:207 [19] ThreadProcessInboundMMS: GET http://81.21.59.62:8080/20160506/06/A0FFEEBC.MMS?id=0505446333 HTTP/1.1
Accept: application/vnd.wap.mms-message
Host: 81.21.59.62:8080
User-Agent: iPhoneOS/4.2.1 (8C148)
x-wap-profile: http://iphonemms.apple.com/iphone/uaprof-2MB.rdf


06:36:48:897 [19] ThreadProcessInboundMMS: mm1 - got error response
06:36:48:897 [19] ThreadProcessInboundMMS: HTTP/1.1 403 Forbidden
Date: Fri, 06 May 2016 03:36:40 GMT
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 189
Connection: close

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Error page</TITLE>
</HEAD>
<BODY>
<H1 ALIGN="CENTER">
Service does not exist
</H1>
</BODY>
</HTML>

06:36:48:903 [19] ThreadProcessInboundMMS: Before WSPRasHangUp (#3) - Modem: Standard 33600 bps Modem
Attached is a file with all the logs nowsms
application/vnd.openxmlformats-officedocument.wordprocessingml.documentLogs nowsms
logs nowsms.docx (21.9 k)

Tell please what should be changed that the incoming MMS, would be forwarded to my php host?
Regards Vladimir Bulgakov.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5637
Registered: 08-2008
Posted on Friday, May 06, 2016 - 05:36 pm:   

Hi Vladimir,

I'm confused. (I assume you are also.)

I see and understand what is happening in the logs.

An MMS message is submitted via HTTP. NowSMS thinks the route for this message is direct delivery (internal MMSC), and not the operator MMSC. Because of this, MMS notifications are sent via SMS.

The message is being sent to the phone number of the modem, so the modem receive the MMS notification, but that mode of delivery is not supported either because of the mobile operator or for configuration reasons.

I assume you want all MMS messages routed via the modem and the operator MMSC.

If so, make sure there are no phone numbers are listed in the "MMSC Users" list. Maybe the modem phone number is listed here? That would be a problem.

Also, on the "MMSC Routing" page, make sure the "Default Route" is set to the modem.

--
Des
NowSMS Support
Vladimir
New member
Username: Vb968

Post Number: 2
Registered: 05-2016
Posted on Saturday, May 07, 2016 - 01:00 pm:   

Hi.
Yes, the modem number was listed in the "MMSC Users". Once I removed everything from the list the "MMSC Users", incoming MMS through http began to come okay. But now unstable began to arrive MMS sent via the mobile network. Please explain for what purpose the list "MMSC Users" is filled. And why there can not specify a modem telephone number?
Let me remind you that I want to redirect all incoming sms and mms to the host with the php scripting , where they will be parsing and transfer to mobile phones.
And another question. I did not find in the documentation describing how to forward incoming SMS to a host with a php script, similar to the description for mms http://www.nowsms.com/doc/2-way-mms-support/receiving-mms-messages-with-a-php-sc ript.
Maybe you give a link or explain how php script receives the SMS and how it to redirect.
Thanks for the help.
Vladimir.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5638
Registered: 08-2008
Posted on Saturday, May 07, 2016 - 06:39 pm:   

Hi Vladimir,

Before I answer your questions, a general point of advice.

If MMS is your primary application, consider using an Android device as a modem instead of a dedicated modem device. More of the processing logic can be done on the device, which removes the SMS/MMS mode switching overhead when using a dedicated modem. Especially if you will be using multiple modems, where the performance difference is more noticeable.


quote:

Please explain for what purpose the list "MMSC Users" is filled. And why there can not specify a modem telephone number?




There are many different use cases for NowSMS. One is as an MMSC (as opposed to as a gateway connecting to an MMSC). The "MMSC Users" list is the provisioning list for the MMSC, indicating that these numbers are directly service by NowSMS as an MMSC.


quote:

And another question. I did not find in the documentation describing how to forward incoming SMS to a host with a php script,




We call this 2-way SMS.

This link has the best explanation: http://www.nowsms.com/2-way-commands-for-sms-and-mms-processing-new-2014-feature s

There is a real simple PHP example here: http://support.nowsms.com/discus/messages/1/3991.html

That link is 12 years old...the first example (2way.php) is good for showing how to receive and send a simple reply. If you need a more complex scenario where you forward or send a message to someone else, instead of the redirect technique, use the PHP functions here: http://www.nowsms.com/nowsms-php-example-send-sms-text-message

--
Des
NowSMS Support
Vladimir
New member
Username: Vb968

Post Number: 3
Registered: 05-2016
Posted on Saturday, May 14, 2016 - 08:44 am:   

Hello.
Thank, your information helped me to set up receive MMS. But it turned out that there is a problem with the delivery of MMS.
I use the gprs modem and on tab "MMSC Routing" in the row "Default Route" specified "Direct Delivery (internal MMSC)". But MMS messages sent are not loaded directly on the phone, but come in the form of a notice with the button "Download" , as shown in the attached screenshot. After pressing the button, the phone tries to download them but to no avail.
SMS messages come normally.


The log says that MMS sent:
2016-05-13 19:22:38,MMSIN,172.16.90.15,0505446333,966555176715,20160513-19-2CFDCF80@81.21.59.62,SAR-966555176715-bf-2-1.req,1847703
2016-05-13 19:22:38,MMSIN,172.16.90.15,0505446333,966555176715,20160513-19-2CFDCF80@81.21.59.62,SAR-966555176715-bf-2-2.req,1847703
2016-05-13 19:22:44,MMSIN,172.16.90.15,0505446333,966555176715,20160513-19-6215E3BF@81.21.59.62,SAR-966555176715-c0-2-1.req,3141405
2016-05-13 19:22:44,MMSIN,172.16.90.15,0505446333,966555176715,20160513-19-6215E3BF@81.21.59.62,SAR-966555176715-c0-2-2.req,3141405
What need to specify in settings in order to MMS messages directly downloaded to the phone?
Thanks.
Vladimir.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5648
Registered: 08-2008
Posted on Saturday, May 14, 2016 - 06:51 pm:   


quote:

I use the gprs modem and on tab "MMSC Routing" in the row "Default Route" specified "Direct Delivery (internal MMSC)"





That is the problem. The default route should not be direct delivery.

The route name for the modem should be the default.


--
Des
NowSMS Support
Vladimir
New member
Username: Vb968

Post Number: 4
Registered: 05-2016
Posted on Saturday, May 14, 2016 - 07:52 pm:   

Hi.
I use two modems. In the drop-down list of field the "Default Router" , they are not. That is, these routes are to be created. When create a route what should I choose in "Route messages using:"? If I choose "Android Modem" my gprs modems do not appear in the list "Modem:".
The only option where gprs modem is referred to - "MM1". This option need to choose?
And which of the two gprs modems do I specify as "Default Router", if I'm going to use are both with different numbers?

Vladimir
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5649
Registered: 08-2008
Posted on Saturday, May 14, 2016 - 08:51 pm:   

Hi Vladimir,

The configuration of Android modems is a little different than USB modems. The Android configuration is easier.

In either case, I'd suggest starting by configuring only one modem...get that working, then add the second.

When you configure an android modem, and you check "Send MMS Messages", the "MMSC Routing" definition its added automatically. There's a good quick start guide on the process here: http://www.nowsms.com/now-sms-mms-android-modem-quick-start-guide

In this case, the modem will be automatically added to the MMSC routes.



USB modems require the MMS part to be added separately. Here's a quick start guide for that: http://www.nowsms.com/documentation/quickstartguide/NowSMSQuickStart3.pdf

For multiple modems as a default route, see http://support.nowsms.com/discus/messages/485/69728.html

--
Des
NowSMS Support
Vladimir
New member
Username: Vb968

Post Number: 5
Registered: 05-2016
Posted on Sunday, May 15, 2016 - 02:01 pm:   

Hello.
I set up modems, as described in your link above and initially they have earned. But then has appeared an error and message have ceased reach up.
14:44:30:824 [17] ThreadProcessVASPQ: MM1 - got http ok response
14:44:30:825 [17] ThreadProcessVASPQ: MM1 - MMS Response Status indicates error E1
14:44:30:825 [17] ThreadProcessVASPQ: MM1 - MMS Response Status indicates error

I restarted the Nowsms but it did not help.
What is this error and how to fix it? Log I apply.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
MMSCDEBUG.docx (21.9 k)

I send and receive MMS using php code via gprs modem.

With best regards, Vladimir.
Vladimir
New member
Username: Vb968

Post Number: 6
Registered: 05-2016
Posted on Wednesday, May 18, 2016 - 08:08 am:   

Hi.
I wrote to you about three days ago and still have not received a response. Could you give me an answer, so this error is repeated periodically and nowsms can not fully work.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8145
Registered: 10-2002
Posted on Wednesday, May 18, 2016 - 11:56 pm:   

Hi,


Sorry we missed your message.

This is an error coming from the operator indicating "service denied".

I assume this happens all the time for the USB modem. Have you ever successfully sent an MMS with the modem (using the SIM card currently in the modem)? If not, are you sure MMS is enabled on the SIM card? Try moving the SIM to a phone and verify the phone can send an MMS using that SIM. Many operators assume modems cannot send MMS and do not enable the capability if they know the SIM is for a modem. (This is one of the reasons we recommend Android devices as modems for MMS.)

If it worked before, but is not working now:

1.) Go into the "MMS Routing" definition where you setup the MMS connection parameters. Make sure the "Default Sender Address" field is blank. And make sure that "Allow Sender Address Override" is unchecked.

2.) Verify that the account has credit.

3.) Try moving the SIM from the modem to a phone and verify the phone can send an MMS using that SIM

-bn

Bryce Norwood
Now SMS/MMS Support
Vladimir
New member
Username: Vb968

Post Number: 7
Registered: 05-2016
Posted on Saturday, July 02, 2016 - 06:12 pm:   

Hello, thanks for previous answers, they helped me in setting up a server. But now I suddenly there was another problem. The server NowSms sends all incoming MMS to my server where they are processed php code.
About a week ago, for some reason not transmitted image files with the extension ".jpg". Files with the extension ".png", transferred to normal as other parameters. From the log can see that the server NowSms is trying to transfer the file. But my server shows an error in the array FILE[]. I enclose a log that shows the transfer of MMS with attachments file "book_1024_500.jpg" to the number 0505446333 with the server NowSms.
Here are printing the contents of the array FILE[] from my server log:
" name{ 0 = 0E397ACE.smil; 1 = ; } type{ 0 = application/smil; 1 = ; } tmp_name{ 0 = /tmp/phpFpgXG4; 1 = ; } error{ 0 = 0; 1 = 4; } size{ 0 = 376; 1 = 0; } ; File: 0E397ACE.smil; File: ; "
It can be seen that the second item of the array passed with error.
I ask to prompt a way to solve this problem.

Regards Vladimir Bulgakov.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Log_jpg.docx (19.1 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5686
Registered: 08-2008
Posted on Tuesday, July 05, 2016 - 09:18 pm:   

Hi Vladimir,

I am not able to recreate this problem.

But I do have an idea of what the problem might be.

First, let me make sure that I understand what you are doing.

1. You are submitting an MMS...how is this MMS being submitted? What protocol?

2. NowSMS is sending the MMS out via a modem.

3. NowSMS receives the MMS via the modem, and converts to PHP HTTP POST.

The problem seems to be an extra quote in a filename parameter:

Content-Disposition: form-data; name="MMSFile[]"; filename=""0E397ACE_1.txt"

However, I don't understand where the extra quote is coming from. I am guessing that it is an encoding error in the MMS submission. That is why I am asking for more info about that submission.

--
Des
NowSMS Support
Vladimir
New member
Username: Vb968

Post Number: 8
Registered: 05-2016
Posted on Wednesday, July 06, 2016 - 09:40 am:   

Hello.
"1. You are submitting an MMS...how is this MMS being submitted? What protocol? " - I send and receive MMS via PHP using HTTP. But in the attached log I sent MMS via NowSms server interface. For that what to exclude possible mistakes in my php code. I sent this mms on usb modem number. That is, as I understand it, the server NowSms first sends the MMS mobile operator and then took her by the operator and transferred to my php script.
"2. NowSMS is sending the MMS out via a modem.
3. NowSMS receives the MMS via the modem, and converts to PHP HTTP POST." - Yes everything is correct.
Specified you an error with double quotes arises when NowSms forwards the received message via PHP HTTP POST.
How to fix it? We need to fix something in the settings or completely reinstall NowSms? Or maybe to update NowSms? This version more than a year. Or it may be possible to edit the code by which NowSms forwards the incoming MMS?

Regards Vladimir Bulgakov.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8147
Registered: 10-2002
Posted on Thursday, July 07, 2016 - 04:34 am:   

Hi Vladimir,

I am also unable to recreate this problem, so we are trying to determine what might be unique or different about your system.

If I understand you correctly, in that log, you submitted an MMS from the NowSMS web interface.

If that is true, it means the operator MMSC is reencoding the message and adding an extra quote. It is unclear why this would be, but we have made a change to the PHP format converter to remove the extra quote.

We cannot easily test this, because it is not normal for an MMSC to do this.

Assuming that you are running a 2016 version of NowSMS, an updated mmsc.exe is available with this change. You need to stop the NowSMS MMSC service and manually update mmsc.exe from the ZIP at http://www.nowsms.com/download/mmsc20160706.zip

If you are running an earlier version, update first to a 2016 version at http://www.nowsms.com/download-free-trial

-bn

Bryce Norwood
Now SMS/MMS Support

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: