[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serusers
Subject:    [SR-Users] Re: Need guidance on Teams interop with Kamailio
From:       Shah Hussain Khattak via sr-users <sr-users () lists ! kamailio ! org>
Date:       2024-03-17 4:21:04
Message-ID: KL1PR06MB644851C5D7ECADD0AA6F68F1CF2E2 () KL1PR06MB6448 ! apcprd06 ! prod ! outlook ! com
[Download RAW message or body]

Hi,

Thanks for the response. I managed to fix this by just adding a check in my route \
block based on incoming BYE message and simply relayed it:

 if (is_method("BYE") && $ua=~"FreeSwitch BOX/v1\\.0") {

               t_relay();
               exit;

             }

This fixed my issue.

Some other minor tweaks that I applied:

For blind and attended call transfers from MS Teams, I had to disable REFER support \
towards MS Teams, then you will be able to perform any kind of transfer from the \
Teams client.

Teams require SBC FQDN in the CONTACT header of the INVITE and 200 OK message.

To address the ringback tone issue for inbound calls, I converted the 183 response \
with SDP into a 180 response without SDP and relayed it towards my PSTN route.

After all, configuring Kamailio with MS Teams was a good learning experience; it \
works like a charm and opens door to many interesting interop scenarios.



Regards,
Shah Hussain
________________________________
From: Kjartan S via sr-users <sr-users@lists.kamailio.org>
Sent: Friday, March 15, 2024 4:23 PM
To: sr-users@lists.kamailio.org <sr-users@lists.kamailio.org>
Cc: Kjartan S <kjartan.solli@intility.no>
Subject: [SR-Users] Re: Need guidance on Teams interop with Kamailio

Your Kamailio is using the RURI for routing the BYE and not RR header.
My tip is to xlog your Kamailio config in order to see if the subsequent BYE request \
will run the loose_route function inside your route[WITHINDLG]. if (loose_route()) {
                if (is_method("BYE")) {
xlog("L_INFO","Running loose route for subsequent BYE request from $si : $sp \n");
}

I also recommend not to remove any record route headers when engaging with MS Teams - \
so do not remove any RR header and make sure your FreePBX include record route header \
originally received from Teams.

Regarding the call disconnect: Might be that the corresponding ACK or the 200 OK \
(depending on Teams being UAC/UAS`) is not handled from MS Teams side. Again, make \
sure not to replace to much of the headers received from Teams apart from what is \
mentioned in the MS Teams Kamailio guide. \
__________________________________________________________ Kamailio - Users Mailing \
List - Non Commercial Discussions To unsubscribe send an email to \
                sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> Hi,&nbsp;</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> Thanks for the response. I managed to fix \
this by just adding a check in my route block based on incoming BYE message and \
simply relayed it:</div> <div class="elementToProof" style="font-family: Calibri, \
Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> &nbsp;if (is_method(&quot;BYE&quot;) \
&amp;&amp; $ua=~&quot;FreeSwitch BOX/v1\\.0&quot;) {</div> <div style="font-family: \
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;t_relay();</div> <div style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;exit;</div> <div class="elementToProof" style="font-family: Calibri, \
Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;}</div> <div class="elementToProof" style="font-family: Calibri, Helvetica, \
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> This fixed my issue.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> Some other minor tweaks that I applied:</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> For blind and attended call transfers from MS \
Teams, I had to disable REFER support towards MS Teams, then you will be able to \
perform any kind of transfer from the Teams client.&nbsp;</div> <div \
class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: \
12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> Teams require SBC FQDN in the CONTACT header \
of the INVITE and 200 OK message.&nbsp;</div> <div style="font-family: Calibri, \
Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> To address the ringback tone issue for \
inbound calls, I converted the 183 response with SDP into a 180 response without SDP \
and relayed it towards my PSTN route.&nbsp;</div> <div class="elementToProof" \
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, \
0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 16px; color: rgb(0, 0, 0);"> <span style="background-color: rgb(255, 255, \
255);">After all, configuring Kamailio with MS Teams was a good learning experience; \
it works like a charm and opens door to many interesting interop \
scenarios.</span></div> <div class="elementToProof" style="font-family: Calibri, \
Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> <br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> Regards,&nbsp;</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> Shah Hussain <span style="font-family: \
Garamond; font-size: 24pt; color: rgb(147, 137, 83);"> <i></i></span></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>From:</b> Kjartan S via sr-users \
&lt;sr-users@lists.kamailio.org&gt;<br> <b>Sent:</b> Friday, March 15, 2024 4:23 \
PM<br> <b>To:</b> sr-users@lists.kamailio.org &lt;sr-users@lists.kamailio.org&gt;<br>
<b>Cc:</b> Kjartan S &lt;kjartan.solli@intility.no&gt;<br>
<b>Subject:</b> [SR-Users] Re: Need guidance on Teams interop with Kamailio </font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Your Kamailio is using the RURI for routing the BYE and not RR \
header.<br> My tip is to xlog your Kamailio config in order to see if the subsequent \
BYE request will run the loose_route function inside your route[WITHINDLG].<br> if \
(loose_route()) {<br> \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
if (is_method(&quot;BYE&quot;)) {<br> xlog(&quot;L_INFO&quot;,&quot;Running loose \
route for subsequent BYE request from $si : $sp \n&quot;);<br> }<br>
<br>
I also recommend not to remove any record route headers when engaging with MS Teams - \
so do not remove any RR header and make sure your FreePBX include record route header \
originally received from Teams.<br> <br>
Regarding the call disconnect: Might be that the corresponding ACK or the 200 OK \
(depending on Teams being UAC/UAS`) is not handled from MS Teams side. Again, make \
sure not to replace to much of the headers received from Teams apart from what is \
mentioned in  the MS Teams Kamailio guide.<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
To unsubscribe send an email to sr-users-leave@lists.kamailio.org<br>
Important: keep the mailing list in the recipients, do not reply only to the \
sender!<br> Edit mailing list options or unsubscribe:<br>
</div>
</span></font></div>
</body>
</html>



__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:

--===============1927674503==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic