Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML response not understood by sipgate.io's server #6

Closed
danielberlin opened this issue Oct 15, 2014 · 7 comments
Closed

XML response not understood by sipgate.io's server #6

danielberlin opened this issue Oct 15, 2014 · 7 comments
Labels

Comments

@danielberlin
Copy link
Contributor

Testing the provided reject.php (from examples) on my server with curl and a certain combination of from and to parameters, I get:

HTTP/1.1 200 OK
Date: [...] GMT
Server: Apache/2.2
Content-Length: 84
Content-Type: application/xml

[XML output here which is not shown in github's comment for unknown reason]

I noticed that the provided reject.php produces an XML output slightly different from that one shown on the documentation (https://github.com/sipgate/sipgate.io) where under "Example 2" the keyword "busy" is followed by a space before the terminating slash where there is no space in reject.php's output between "busy" and the slash.

Having a look in the log on the dashboard for a request generated in real with the same from and to numbers as the curl request above, I get:

500 - Internal Server Error
Request:
from=491234567&to=49876543
Response:
Socket is closed

However, the exactly same request which the dashboard log declares as 500 is logged as 200 on my web server:

push-api.sipgate.net - - [...] "POST /path/reject.php HTTP/1.1" 401 1411 "-" "sipgate.io"
push-api.sipgate.net - authuser [...] "POST /path/reject.php HTTP/1.1" 200 84 "-" "sipgate.io"

Any manual curl testing never produces an 500 Internal Server Error, I always get my application/xml output with a HTTP 200 response.

What can I do for further debugging?

@TheCK
Copy link
Member

TheCK commented Oct 15, 2014

Thanks for opening the issue. We'll have a look into it first thing in the morning.

@TheCK TheCK added the bug label Oct 15, 2014
@ghost
Copy link

ghost commented Oct 15, 2014

Can confirm this. Have the same issue here

@tpxtron
Copy link
Contributor

tpxtron commented Oct 16, 2014

Strange. I just tested the PHP example script on my vServer running PHP 5.4.33-1~dotdeb.0 as CGI module within a Lighttpd web server, and it worked fine.
What PHP versions are you guys using?

@ghost
Copy link

ghost commented Oct 16, 2014

I'm using Apache 2.2.16 with PHP Version 5.3.3-7+squeeze22

I'm using a script to send me a mail, if the callers number has a bad rating in tellows.
I can receive the mails. So the script is working.
If I open the URL in my browser I will see the result, so this is working without problems

@TheCK
Copy link
Member

TheCK commented Oct 16, 2014

could you retry with with your script? This should be fixed now.

@ghost
Copy link

ghost commented Oct 16, 2014

Yes, now it works! Thanks :)

@danielberlin
Copy link
Contributor Author

Now also working very well for me, no more Internal Server Error. Thanks for quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants