<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Egil,<br>
<br>
$rP $oP are NULL as they take info from the RURI, and as you can
see, the RURI has no transport param.<br>
<br>
Maybe you should get the proto info from the network level, like
$socket_in(proto), see<br>
<a class="moz-txt-link-freetext" href="https://opensips.org/Documentation/Script-CoreVar-3-2#socket_in">https://opensips.org/Documentation/Script-CoreVar-3-2#socket_in</a><br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 5/10/23 12:08 PM, Egil Hasting via
Users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:31657a04-066e-494e-bbd2-2aca411bc41c@app.fastmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
<div>Hello List,<br>
</div>
<div><br>
</div>
<div>I have recently started dig into the opensips software, and
is without doubt impressed by its maturity and feature set.<br>
</div>
<div>However i have stumbled upon something i find weird (probably
due to my lack of competence). <br>
</div>
<div><br>
</div>
<div>I am setting up the opensips as a "transparent" proxy towards
B2BUA/Registrar<br>
</div>
<div><br>
</div>
<div>So current configuration is like this:<br>
</div>
<div><br>
</div>
<div>Video system -> OpenSIPS -> Cisco VCS<br>
</div>
<div><br>
</div>
<div>simplified cut from opensips configuration<br>
</div>
<div><br>
</div>
<div>...<br>
</div>
<div>record_route();</div>
<div>else if (is_method("REGISTER"))<br>
</div>
<div>{<br>
</div>
<div>xlog("L_INFO", "$socket_out $socket_in $ru $du $rP $oP $ou
$ru \n");<br>
</div>
<div>switch ($oP)<br>
</div>
<div>{<br>
</div>
<div> case "udp":<br>
</div>
<div> $ru = "sip:<vcs ip>:5060";<br>
</div>
<div> break;<br>
</div>
<div> case "tcp":<br>
</div>
<div> $ru = "sip:<vcs ip>:5060;transport=tcp";</div>
<div> break;<br>
</div>
<div> case "tls":<br>
</div>
<div> $ru = "sips:<vcs ip>:5061;transport=tls";</div>
<div> break;<br>
</div>
<div>}<br>
</div>
<div>if (!t_relay())<br>
</div>
<div>{<br>
</div>
<div> send_reply(500, "Server Internal Error 1");<br>
</div>
<div> exit;<br>
</div>
<div>}<br>
</div>
<div>exit;<br>
</div>
<div>}<br>
</div>
<div>...<br>
</div>
<div><br>
</div>
<div>What i see printed is: <br>
</div>
<div>$socket_out = tls:<opensips ip>:5061</div>
<div>$socket_in = tls:<opensips ip>:5061</div>
<div>$ru = sip:<registration domain></div>
<div>$du = null<br>
</div>
<div>$rP = udp<br>
</div>
<div>$oP = udp<br>
</div>
<div>$ou = sip:<registration domain></div>
<div><br>
</div>
<div>In the second leg where the Cisco VCS is, it also insist of
the inbound being UDP - even if UDP is disabled everywhere.<br>
</div>
<div>i am particularly interested in understand how it can be
flagged as a "udp" on both $rP and $oP in that case, when data
comes thru the TLS socket? <br>
</div>
<div><br>
</div>
<div>Rgs<br>
</div>
<div>Egil Hasting<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>