<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255); display: inline !important">Thanks for the answer Sergiu, Ovidiu</span>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
I don't know your setup but I use kamailio as load balancer with FS nodes (instead of kamailio's media proxy).</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
That is why I have FS node IP in the contact header of 200 OK message which go to MS teams (it's outbound call from MS to kam).</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
Like we all know MS doesn't like IP address at all (in contact and record-route). Thus I have to replace (at kamailio) FS node IP to fqdn of trunk I use with MS.</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
Also I had to comment record_route() for invites from MS. </div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
You mentioned that I should not change contact header but... really MS ignore my 200 OK for all other cases.</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
Also you mentioned that you have record route header in 200 OK, but again - MS do not ignore 200 OK only in case I have only one record route header which was in initial INVITE from MS.</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
You said it is working for you. Not sure why really. May be you use kamalio rtpproxy and that is why have correct contact at once.</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
As for record route header - I have no ideas why MS doesn't ignore several record route headter in 200 OK for your case.</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
With my changes i got ACK from MS. And also got voice call but obviously it is dopped in ~30 sec because kamialio do not know destination for ACK from MS (it has kamailio FQDN in URI)<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
Normally with my setup, 200 OK keeps ip address of FS node and MS should send ACK to kamilio IP but with FS IP address in URI. We all know that MS do not respect RFC and can not do so. They just said in docs  (we do not support sip proxy).</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
So... Now I should to think how re-direct such ACK to FS node. Should be possible to all this begin to be more and more complicated.</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: rgb(255, 255, 255)">
Any advice are welcome!</div>
<br>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>От:</b> sr-users <sr-users-bounces@lists.kamailio.org> от имени Sergiu Pojoga <pojogas@gmail.com><br>
<b>Отправлено:</b> 15 апреля 2020 г. 5:36<br>
<b>Кому:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Тема:</b> Re: [SR-Users] kamailio integration with MS teams.</font>
<div> </div>
</div>
<div>
<div dir="ltr">Also, you might want to check out this discussion from just a few days ago with a fellow comrade about a similar MS Teams problem:
<div><br>
</div>
<div><a href="https://lists.kamailio.org/pipermail/sr-users/2020-April/108868.html">https://lists.kamailio.org/pipermail/sr-users/2020-April/108868.html</a>  <br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Apr 14, 2020 at 4:23 PM Sergiu Pojoga <<a href="mailto:pojogas@gmail.com">pojogas@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">Well... most likely you didn't fix it, at least not properly. There's no such requirement to have a single RR in the 200 OK, especially only the one from the sender's original invite.
<div>By this logic, Kamailio can't insert it's own RR to keep itself in the call's path. I can assure you that's not the case in reality.</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Apr 14, 2020 at 3:12 PM Nasida Yuriy <<a href="mailto:nasida@live.ru" target="_blank">nasida@live.ru</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span></span></div>
<span>Yes, sure, need to fix Record-Route. The question was how exactly :)<br>
</span><span>Well.  I just fixed it by the way. 200 OK had to have only one record-route (which MS sent in initial invite). Otherwise MS ignore it without any response.</span>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
<span></span></div>
<div>
<div id="x_gmail-m_4754845163384090236gmail-m_2005434601293032074Signature"><br>
<br>
</div>
</div>
<div id="x_gmail-m_4754845163384090236gmail-m_2005434601293032074appendonsend"></div>
<hr style="display:inline-block; width:98%">
<div id="x_gmail-m_4754845163384090236gmail-m_2005434601293032074divRplyFwdMsg" dir="ltr">
<font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>От:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>> от имени Ovidiu Sas <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>><br>
<b>Отправлено:</b> 14 апреля 2020 г. 20:32<br>
<b>Кому:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Тема:</b> Re: [SR-Users] kamailio integration with MS teams.</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div>The instructions are pretty clear in the sense that you need to fix<br>
the Record-Route header.<br>
You don't need to touch the Contact header for in-dialog requests/replies.<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<br>
<br>
On Tue, Apr 14, 2020 at 12:19 PM Nasida Yuriy <<a href="mailto:nasida@live.ru" target="_blank">nasida@live.ru</a>> wrote:<br>
><br>
> Hi guys,<br>
><br>
><br>
> Do you have some expirience with kamailio integration with MS teams ?<br>
><br>
><br>
> I follow the instructon from here<br>
> <a href="https://skalatan.de/en/blog/kamailio-sbc-teams" target="_blank">https://skalatan.de/en/blog/kamailio-sbc-teams</a><br>
><br>
> TLS part is configured correctly. I also got OPTIONS pings working between MS teams and kamailio by following of  this instruction. That is very good.<br>
><br>
>  But... There is issues with outbound calls from MS teams to kamailo.<br>
><br>
><br>
> MS side send INVITE, kamailio responds with 180 and 200 OK, but looks like MS ignores us. I know that I probably should use record_route_preset function here to modify Record-Route headers to satisfy MS wishes.<br>
><br>
> But nothing helps. I also tried to modify contact header in 200 OK like it was done for OPTIONS - no luck.<br>
><br>
> Anyone has a working example of kamailio files for MS team ?<br>
> Or at least sucessful pcap with them.<br>
><br>
> I can be wrong but looks like MS doesn't respect RFC at all.<br>
><br>
><br>
> Thanks.<br>
><br>
><br>
><br>
><br>
> Regards,<br>
> Team lead<br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
<br>
-- <br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" target="_blank">http://www.voipembedded.com</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div>
</span></font></div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><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>
</blockquote>
</div>
</div>
</body>
</html>