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@10.100.1.218:47114;transport=ws, fu sip:service@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@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... Sent from the Users mailing list archive at Nabble.com.
the solution is found, the root of the issue was in our proxy daemon, that received sip from outside world, and proxy it to kamailio (kamailio received sip via localhost)
My ws users, have such received in location: Received:: sip:127.0.0.1:36986;transport=ws
I added in NOTIFY construction (with some conditions, but the focus is here): $uac_req(ouri) = "sip:127.0.0.1:" + $sp + ";transport=ws";
and this helped (kamailio send to proxy daemon via localhost, which when receive on exact port, nows where to send it outside)
issue is no more relevant
cheers
-- View this message in context: http://sip-router.1086192.n5.nabble.com/issue-with-uac-req-send-to-websocket... Sent from the Users mailing list archive at Nabble.com.
Thanks for following up and explaining what was happening and how was solved -- it helps to mark the report closed as well as gives guidelines to other facing the same situation.
Cheers, Daniel
On 11/11/15 12:27, Vasiliy Ganchev wrote:
the solution is found, the root of the issue was in our proxy daemon, that received sip from outside world, and proxy it to kamailio (kamailio received sip via localhost)
My ws users, have such received in location: Received:: sip:127.0.0.1:36986;transport=ws
I added in NOTIFY construction (with some conditions, but the focus is here): $uac_req(ouri) = "sip:127.0.0.1:" + $sp + ";transport=ws";
and this helped (kamailio send to proxy daemon via localhost, which when receive on exact port, nows where to send it outside)
issue is no more relevant
cheers
-- View this message in context: http://sip-router.1086192.n5.nabble.com/issue-with-uac-req-send-to-websocket... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users