[SR-Users] Kamailio Websocket Questions

Nagorny, Dimitry dimitry.nagorny at robot5.de
Thu Jun 2 17:13:33 CEST 2016


Hi List,

two questions regarding Kamailio Websockets:


1.       How do I send INVITE request TO the listening Websocket?
I usually used for UDP/TCP/TLS these format, but somehow this is not working for Websocket because it gets in an endless loop:
if ($rU=~"^(\+|00|0)?[1-9][0-9]{4,20}$") {

               $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ";user=phone;transport=udp";

               force_send_socket(udp:MY_EXTERN_IP:MY_EXTERN_PORT);

               rtpengine_offer("internal trust-address RTP AVP");

               route(RELAY);

               exit;

}


2.       Why do I get these errors every time my Websocket Client is registering, but it still works and DB is inserted with registered location:

ERROR: <core> [parser/parse_fline.c:257]: parse_first_line(): parse_first_line: bad message (offset: 22)

ERROR: <core> [parser/msg_parser.c:690]: parse_msg(): ERROR: parse_msg: message=<HTTP/1.1 101 Switching Protocols#015#012Sia: SIP/2.0/TCP 10.250.5.17:51283#015#012Sec-WebSocket-Protocol: sip#015#012Upgrade: websocket#015#012Connection: upgrade#015#012Sec-WebSocket-Accept: 6uLXlD/aBrzu/j3PYP3DWO7rvLE=#015#012Server: kamailio (4.3.5 (x86_64/linux))#015#012Content-Length: 0#015#012#015#012>

I am using Kamailio 4.3.5 + CentOS 7.2. I appreciate every help I can get.


Best Regards
Dimitry Nagorny
Trainee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160602/eab58084/attachment.html>


More information about the sr-users mailing list