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