Hello,
1. for websocket the connection has to be reused, the server cannot open
a connection towards the browser. So you don't have to force any socket,
if kamailio doesn't find the address matching the target ws address,
then will throw an error, otherwise will use it.
2. have you enabled xhttp and websocket modules properly?
Cheers,
Daniel
On 02/06/16 17:13, Nagorny, Dimitry wrote:
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
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://www.asipto.com -
http://www.kamailio.org
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda