ms teams kamailio and opensips

Status
Not open for further replies.

phonesimon

Member
Apr 21, 2017
87
16
8
44
No. Just curious, what are people stuck on? I haven’t seen a write up for freeswitch specifically but configuring the profile and gateway according to the Microsoft SBC specifications document worked fine for me. Disable REFER because freeswitch can’t handle the odd REFER that the MS gateway sends without a username part in the URI. If you don’t show support for it then they use reinvite instead.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
I am using freeswitch as an a b2bua with my version and am slowly stripping out bits of kamailio as I'm realising I don't need them. How do you go about generating the options ping?
 

andycol

Member
Jun 18, 2020
48
14
8
37
I am using freeswitch as an a b2bua with my version and am slowly stripping out bits of kamailio as I'm realising I don't need them. How do you go about generating the options ping?
Yes im curious about the same as wouldn't mind to rather use freeswitch too, also how do you get it to work multi tenant?
 

phonesimon

Member
Apr 21, 2017
87
16
8
44
I am using freeswitch as an a b2bua with my version and am slowly stripping out bits of kamailio as I'm realising I don't need them. How do you go about generating the options ping?

Gateway parameter "ping" with value 60 will generate one every minute toward the gateway.
 

andycol

Member
Jun 18, 2020
48
14
8
37
I would be interested to see your gateway config as when i add them i just see state as "down"
 

phonesimon

Member
Apr 21, 2017
87
16
8
44
Enabling SIP debugs will help you see what is going on. I'm not trying to be tricky but at the same time I'm not going to post everything verbatim as it took me numerous hours of research to work through the Microsoft specifications and configure the FreeSWITCH profile and gateway accordingly. That said - if you follow the specifications Microsoft laid out in their Direct Routing documentation it will work, no code changes or tricks. Just look at the SIP and see if MS gives you any errors returned.
 

bcmike

Active Member
Jun 7, 2018
337
58
28
54
I just wanted to see if anyone else has had success setting up a teams gateway directly from Fusion PBX. I have been using Kamailio as a proxy with limited success. I'm thinking it would just be better to directly route to teams from Fusion.

I've seen this posted in another forum:

Hi,

there were a few critical things, here are the ones that caused me some headaches:

1) Gateway needs "contact-in-ping" set to true, otherwise Teams will reject OPTIONS
( Which does exist since freeswitch 1.10.3 as i understand, so pretty new. )

1.1) It takes a little time for Microsoft Teams to recognize the sbc to be active in their SBC Overview.

2) "sip-ip" and "ext-sip-ip" have to be set to the sbc-domain you use in Teams.
( Which is sort of strange, because in my profile configs it says "do not use domains", so ... we will see if that causes any trouble. Hasn't so far. )

3) TLS - we tried letsencrypt for a very long time, but it didnt work, so we got our certificate from godaddy, which works like a charm.
( I've read that others got it to work with letsencrypt, so it might just be my incompetence )

4) Debugging is sort of hard to do since communication with teams is encrypted.
Use "sofia profile xxx siptrace on" in fs_cli. Once you see the decrypted messages, Microsoft sometimes has useful Error-messages in their sip-responses.

We now have a fully compatible multi-tenant setup, which is sort of cool.
For this, you need at least 4 defined Gateways per customer ( at least one for the provider side, and three for teams, because they have three proxies ) but we used mod_lua to load the configuration dynamically, so thats managable.
But i can remember that there are some limitations when it comes to gateways.
Something like, you can have a maximum of 255 gateways.
Please correct me if im wrong here.
If anyone has any other information to point me in the right direction it would be appreciated, Thanks
 

phonesimon

Member
Apr 21, 2017
87
16
8
44
That looks right to me. Instead of using local siptrace I enabled HEP and pick it up with sngrep, for when I had to do tricky SIP debugging.
 
  • Like
Reactions: bcmike

bcmike

Active Member
Jun 7, 2018
337
58
28
54
How do you guys handle the inbound from teams? As far as I can see it just goes to the public context. I suppose you could set up inbound routes for each of your extensions but how do you then route calls to the PSTN. Maybe I'm missing something..
 

bcmike

Active Member
Jun 7, 2018
337
58
28
54
I'm still struggling with this. I'd be willing to pay a few bucks if someone who's done a successful integration could answer a couple of questions and point me in the right direction.
 

phonesimon

Member
Apr 21, 2017
87
16
8
44
How do you guys handle the inbound from teams? As far as I can see it just goes to the public context. I suppose you could set up inbound routes for each of your extensions but how do you then route calls to the PSTN. Maybe I'm missing something..
I used an ACL to match calls coming in from the Microsoft gateway and then transfer those to internal context.
 

Scubadave112

Member
Jan 24, 2020
122
20
18
37
I'm still struggling with this. I'd be willing to pay a few bucks if someone who's done a successful integration could answer a couple of questions and point me in the right direction.
I second this.. I would even pool money together for someone to make a step by step on this with a fresh install of fusion. I would lay out a couple bills for this and im sure others would
 

andycol

Member
Jun 18, 2020
48
14
8
37
I second this.. I would even pool money together for someone to make a step by step on this with a fresh install of fusion. I would lay out a couple bills for this and im sure others would
Maybe explain what you want to achieve and maybe i can help with kamailio
 

Scubadave112

Member
Jan 24, 2020
122
20
18
37
Maybe explain what you want to achieve and maybe i can help with kamailio
make teams and FusionPBX work together. via direct routing. I work for Microsoft as a Premier Support TL for EXO but with covid there has been massive growth with everyone using teams and my superiors know I also run a VoIP company on the side and assumed that somehow qualifies me for supporting very high level customers and I would like to get my labs operating with a fusion lab in order to fully understand the various aspects of this. I have basically unlimited licenses of every kind in my Microsoft tenant and Even have a GCC High/DoD lab as well, I have tons of resources but just don't have the bandwidth for weeks of trial and error and a learning curve (I know that is how you learn the most), so it would be nice if someone had a step by step guide on how to get this working with clean boxes and assuming I know nothing... a lot to ask I know but I am confident that myself along with others would pay for this information if it is all open source and saved the money I would have to spend on an official SBC like audio codes or something similar
 

phonesimon

Member
Apr 21, 2017
87
16
8
44
You work for Microsoft but you are not able to get access to a Microsoft-certified SBC?

One issue that has been a snag with the FreeSWITCH SBC solution for Teams is that it is not certified and Microsoft's documentation says they reserve the right to reject any support requests related to Direct Routing if you aren't using a certified SBC. That's a show-stopper for many serious companies.

I'm not saying it's completely useless to you but I don't understand the point of playing around with an open source SBC when your own company is saying it's not a supported method of connecting.

I can do a step-by-step if you guys are serious about a bounty.
 

andycol

Member
Jun 18, 2020
48
14
8
37
You work for Microsoft but you are not able to get access to a Microsoft-certified SBC?

One issue that has been a snag with the FreeSWITCH SBC solution for Teams is that it is not certified and Microsoft's documentation says they reserve the right to reject any support requests related to Direct Routing if you aren't using a certified SBC. That's a show-stopper for many serious companies.

I'm not saying it's completely useless to you but I don't understand the point of playing around with an open source SBC when your own company is saying it's not a supported method of connecting.

I can do a step-by-step if you guys are serious about a bounty.
I will put together a doc on how i did it.

And also wouldnt complain if you gave me a a ms license :)
Ps dont need money happy to help. Give me a few days
 
Status
Not open for further replies.