<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Great addition, thanks Karsten!<br>
</p>
<div class="moz-cite-prefix">Am 30.10.19 um 08:08 schrieb Karsten Horsmann:<br>
</div>
<blockquote type="cite" cite="mid:CAFArqsb8ATu759KJq=6+o5who=HXgEBgaytXhMhCudqwVwdo7w@mail.gmail.com">
<div dir="ltr">
<div dir="auto">Hi Henning,
<div dir="auto"><br>
</div>
<div dir="auto">nice to see that howto. Thanks. </div>
<div dir="auto"><br>
</div>
<div>Maybe interesting for the list - i try to verify the ms-teams calls with tls and use the permission module functions as "helper":</div>
<div><br>
</div>
<div>        # account only INVITEs<br>
        if (is_method("INVITE")) {<br>
                setflag(FLT_ACC); # do accounting<br>
<br>
                xlog("L_INFO", "-----------> tls_peer_subject <$tls_peer_subject> tls_peer_subject_cn <$tls_peer_subject_cn> tls_peer_verified <$tls_peer_verified> tls_peer_server_name <$tls_peer_server_name> \n");<br>
                xlog("L_INFO", "-----------> $Ri:$Rp src_user=$fU src_domain=$fd src_ip=$si dst_ouser=$tU dst_user=$rU dst_domain=$rd\n");<br>
<br>
<br>
                if($tls_peer_verified == -1) {<br>
                        xlog("L_INFO", "tls_peer_subject_cn $tls_peer_subject_cn is NOT verfied!\n");<br>
                        return;<br>
                }<br>
                $var(dns) = $tls_peer_subject_cn;<br>
                $var(group) = allow_address_group($var(dns), $Rp);<br>
                xlog("L_INFO", "-----------> allow_address_group var(group) $var(group) var(dns) $var(dns) Rp $Rp\n");<br>
                if ($var(group) == -1) {<br>
                        xlog("L_INFO", "Trunk is not activate for registrar DNS_GROUP:[$var(dns)], Source: [$si], Destination: [$Ri] Port:[$Rp]\n");<br>
                        return;<br>
                }<br>
        }<br>
<br>
<br>
Oct 30 07:55:46 sbc1 /usr/sbin/kamailio[2689]: INFO: {1 1 INVITE 34b77c805b475a39a669b03544f87fae} <script>: -----------> tls_peer_subject <<null>> tls_peer_subject_cn <<a href="http://sip.pstnhub.microsoft.com" moz-do-not-send="true">sip.pstnhub.microsoft.com</a>>
 tls_peer_verified <1> tls_peer_server_name <SBC-DNS-NAME><br>
Oct 30 07:55:46 sbc1 /usr/sbin/kamailio[2689]: INFO: {1 1 INVITE 34b77c805b475a39a669b03544f87fae} <script>: -----------> allow_address_group var(group) 1 var(dns)
<a href="http://sip.pstnhub.microsoft.com" moz-do-not-send="true">sip.pstnhub.microsoft.com</a> Rp 5061<br>
</div>
<div><br>
</div>
<div>less /etc/kamailio/database/address<br>
id(int,auto) grp(int) ip_addr(string) mask(int) port(int) tag(string,null)<br>
1:1:sip.pstnhub.microsoft.com:0:0:msteams<br>
2:1:sip2.pstnhub.microsoft.com:0:0:msteams<br>
3:1:sip3.pstnhub.microsoft.com:0:0:msteams<br>
4:1:sip-all.pstnhub.microsoft.com:0:0:msteams</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank" moz-do-not-send="true">hw@skalatan.de</a>> schrieb am Mo., 28. Okt. 2019, 17:22:<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 lang="DE">
<div>
<p class="MsoNormal"><span lang="EN-GB">Hello,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">I have created a “How-To” blog post on using Kamailio as “session border controller” for Microsoft Teams Direct Routing:</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"><a href="https://skalatan.de/en/blog/kamailio-sbc-teams" rel="noreferrer" target="_blank" moz-do-not-send="true">https://skalatan.de/en/blog/kamailio-sbc-teams</a>
</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">You can this way use all the existing possibilities that Kamailio provide to interact with MS Teams as well.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Best regards,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">-- </span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning Westerholt - </span><a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank" moz-do-not-send="true"><span style="color:rgb(5,99,193)" lang="EN-GB">https://skalatan.de/blog/</span></a><span lang="EN-GB"></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kamailio services - </span><a href="https://skalatan.de/services" rel="noreferrer" target="_blank" moz-do-not-send="true"><span style="color:rgb(5,99,193)" lang="EN-GB">https://skalatan.de/services</span></a><span lang="EN-GB"></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Kamailio Merchandising - <a class="moz-txt-link-freetext" href="https://skalatan.de/merchandising/">https://skalatan.de/merchandising/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a>
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a></pre>
</body>
</html>