Hi David,
I've previously looked at $conid and I was under the impression it was only
available as the *source* connection ID for received messages, not the
destination connection ID. Some experiments confirmed this, although I
didn't dig too deeply into the code.
It's inferred in the docs
<https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#conid_-_tcp_connection_id>
that it's only for messages arriving at Kamailio: "The TCP connection ID of
the connection the current message *arrived* on for TCP, TLS, WS, and WSS.
Set to $null for SCTP and UDP."
There is however tcp_get_conid
<https://www.kamailio.org/docs/modules/5.3.x/modules/tcpops.html#tcpops.f.tcp_get_conid>
available
in the TCPOPS module in 5.3 and up which will retrieve the destination
connection ID.
Cheers
On Tue, May 4, 2021 at 2:50 PM David Villasmil <
david.villasmil.work(a)gmail.com> wrote:
Hello guys,
Ok i got this with (WITHINDLG):
if ($du == "") {
if (!handle_ruri_alias()) {
xlog("L_ERR", "[$ci][$rm]: bad alias <$ru>");
sl_send_reply("400", "Bad Request");
exit;
} else {
$var(tmp) = $(du{s.replace,sip:,}{re.subst,/;.*//});
xlog("L_ERR", "[$ci][$rm]: Packet is going to
<$var(tmp)>");
if(tcp_get_conid("$var(tmp)", "$var(conid)")) {
xlog("connection id is: $var(conid)\n");
}
}
}
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
On Tue, May 4, 2021 at 2:16 PM David Villasmil <
david.villasmil.work(a)gmail.com> wrote:
Hello guys,
I don't have a lot of experience with webrtc (websocket).
I'm trying to get $conid when i receive an INVITE via UDP which is GOING
to a ws, how do i do that?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to
the sender!
Edit mailing list options or unsubscribe:
*
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users