Hello,

Maybe a bug ?
This is with Kamailio 5.6.4.


I'm trying to use KEMI (python) with xhttp module event_callback function.
>From the callback function, I'm using the following KEMI function (test 
>example):

KSR.xhttp.xhttp_reply(404, "Not Found", "text/html", 
"<html><body>OK</body></html>")

This does not work. The response body is not sent back in the reply.
In the logs I see the following:

 6(38195) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): 
parse_first_line: bad message (offset: 16)
 6(38195) ERROR: <core> [core/parser/msg_parser.c:749]: parse_msg(): ERROR: 
parse_msg: message=<HTTP/1.1 404 Not Found
Sia: SIP/2.0/TCP 127.0.0.1:63090
Content-Type: text/html
Server: kamailio (5.6.4 (x86_64/linux))
Content-Length: 28

<html><body>OK</body></html>>
 6(38195) ERROR: <core> [core/msg_translator.c:3256]: build_sip_msg_from_buf(): 
parsing failed


When I do the same thing using Kamailio script, it works.


Also, in KEMI python if I use "jsonrpcs.dispatch" instead of 
"xhttp.xhttp_reply", I don't have this issue.
E.g.:

KSR.jsonrpcs.dispatch()


It seems that when using KEMI "xhttp.xhttp_reply", Kamailio tries to parse the 
HTTP response as SIP, which fails.


Regards,
Nicolas.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to