[SR-Users] issue with uac_req_send to websocket peer

Vasiliy Ganchev vasiliy.ganchev at wildix.com
Tue Nov 10 16:26:49 CET 2015


Hi folk!

Have a scenario:

UA-A -> REGISTER -> kamailio
kamailio make auth, and save(location), 
after this, before exit, I want to send to UA-A a custom NOTIFY with
specific event
(this should be done without SUBSCRIBE/PUBLISH/NOTIFY logic)

....
	$uac_req(method) = "NOTIFY";
	$uac_req(ruri) = $sel(contact.uri);
	$uac_req(furi) = "sip:service@" + $rd;
	$uac_req(turi) = $sel(contact.uri);
	$uac_req(hdrs) = ......... here custom header is added
	xlog("L_ERR", "debuginfo, NOTIFY to  ru $uac_req(ruri), fu $uac_req(furi);

	uac_req_send();
............

when UA-A is connected via UDP/TCP/TLS - works OK
when UA-A connected via WS/WSS", have errors:

Nov 10 14:59:29 /usr/sbin/kamailio[6260]: ERROR: <script>: debuginfo, NOTIFY
to  ru sip:251 at 10.100.1.218:47114;transport=ws, fu sip:service at 10.100.1.85, 
Nov 10 14:59:29 /usr/sbin/kamailio[6260]: WARNING: <core>
[msg_translator.c:2799]: via_builder(): TCP/TLS connection (id: 0) for
WebSocket could not be found
Nov 10 14:59:29 /usr/sbin/kamailio[6260]: ERROR: tm [t_msgbuilder.c:1365]:
assemble_via(): assemble_via: via building failed
Nov 10 14:59:29 /usr/sbin/kamailio[6260]: ERROR: tm [t_msgbuilder.c:1545]:
build_uac_req(): build_uac_req(): Error while assembling Via
Nov 10 14:59:29 /usr/sbin/kamailio[6260]: ERROR: tm [uac.c:379]:
t_uac_prepare(): t_uac: Error while building message

I see no problem with ws connect (calls to/from this ws peer works OK),
immediately after registration:
root at local:/home/admin# kamctl fifo ws.dump
2: wss:127.0.0.1:40239 -> wss:127.0.0.1:5061 (state: OPEN,  last used 5s
ago, sub-protocol: sip)

The difference in UDP/TCP/TLS from WS/WSS - that first connects directly to
Kamailio to port 5060/5061, but second connects to custom ports, where
listen special daemon and proxy sip to kamailio 5060/5061 via localhost

I tried also to add in script
	$uac_req(sock) = "tls:127.0.0.1:5061";

but the result is the same

version: kamailio 4.2.5 (i386/linux)

any suggestion?

cheers



--
View this message in context: http://sip-router.1086192.n5.nabble.com/issue-with-uac-req-send-to-websocket-peer-tp142954.html
Sent from the Users mailing list archive at Nabble.com.



More information about the sr-users mailing list