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
lost: lost_held_dereference do not handles error message #2724
Comments
Thanks, actually this was a small error that affected almost every lost function. The error variable was set to 0 before return, and thus there was no error ode returned. The fix (committed to master) now returns 500 in case of error (error code/string of the response is found in pvar/err) and otherwise 200, 201, 202, or 203. 200 neither pidf-lo nor reference, 201 pidf-lo, 202 url, 203 pidf-lo and url found in the response. Please verify using the latest commit. |
@sergey-safarov: Just seen that it may be better to change the response codes as follows: 200 neither pidf-lo nor reference, 201 url, 202 pidf-lo, 203 pidf-lo and url found in the response - so anything >201 returns a pidf-lo and could be added to the multipart body. If you find it useful, I'll change it. Actually 200 should never occur (kept it just in case there might be other content returned in a 200 OK) - if an error message is returned in a 200 OK the return code is set to 500. |
Generally LIS code and error message also important for error handling. Error code may be used for <?xml version="1.0"?>
<error xmlns="urn:ietf:params:xml:ns:geopriv:held" code="locationUnknown">
<message xml:lang="en">Unable to determine location
</message>
</error> my use case <?xml version="1.0" encoding="UTF-8"?>
<urn:error xmlns:urn="urn:ietf:params:xml:ns:geopriv:held" code="generalLisError">
<urn:message>An unspecified error occurred while handling LocationRequest.</urn:message>
</urn:error> So I can use a
For me more preferable to define module param
If
If returned HTTP code 200 and XML that cannot be parsed then set |
As an option, we can set HELD_ERROR_CODE for normal HELD response and use Kamailio config like
|
@sergey-safarov: this sounds reasonable and would also fit well for other lost functions - let's leave the issue open and I will think of something. Further inputs are always welcome. |
@wkampich is this issue still relevant, or maybe already solved by some additions/changes to the lost module in the last months? |
@henningw this is still relevant ... unfortunately I have not had time to work on it yet |
This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks. |
Description
When LIS server failed, then LIS send a message like
Here is HTTP code is 200.
lost_held_dereference now simply check HTTP code and do not check XML body.
Expected XML content check for:
locationResponse/presence
element check if HELD requestgeodetic
orcivic
;locationResponse/locationUriSet/locationURI
presence if HELD requestlocationURI
..This check is important because PIDF-LO object may be added to the multipart body. And HELD XML error handling prevents error message addition as PDF-LO object.
The text was updated successfully, but these errors were encountered: