Hello together,
currently i'm trying to configure a freeswitch to setup a sip-trunk for direct-routing with Microsoft Teams.
So far i had no luck to get a registed sip-trunk.
Does anyone has so far a working config for a registed sip-trunk with MS-Teams ?
 
On two websited with a Sample-Configuration with a diffrent-system:
https://skalatan.de/en/blog/kamailio-sbc-teams
https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/
they talk about two header-settings that are not correct in my config or are missing
 
1. Microsoft needs a contact header in form of:
--
Contact: <sip:FQDN-SERVER:5061;transport=tls>
--
my contact-header looks like:
Contact: <sip:FQDN-SERVER@IP-SERVER:5061;tport=tcp;transport=tls;gw=ms-teams>
--
How do i get rid of "@IP-SERVER" and ";gw=ms-teams" from the contact-header in freeswitch ?

2. there is a "record-route-header" missing in the format:
--
"FQDN-SERVER:5061;transport=tls", "IP-SERVER:5060"
--
How do i set this record-route-header in freeswitch ?
 
 
 
 
here is my config so far:
--
<profile name="teams">
  <gateways>
  <gateway name="ms-teams">
        <param name="realm" value="sip.pstnhub.microsoft.com:5061"/>
        <param name="from-domain" value="FQDN-SERVER"/>
        <param name="contact-host" value="FQDN-SERVER"/>
        <param name="extension-in-contact" value="true"/>
        <param name="register" value="false"/>
        <param name="register-transport" value="tls"/>
        <param name="caller-id-in-from" value="true"/>
        <param name="contact-in-ping" value="true"/>
        <param name="retry-seconds" value="3600"/>
        <param name="username" value="testuser"/>
  <domains>
    <domain name="all" alias="false" parse="false"/>
  </domains>
  <settings>
        <param name="debug" value="0"/>
        <param name="sip-trace" value="no"/>
        <param name="rfc2833-pt" value="101"/>
        <param name="sip-port" value="5060"/>
        <param name="dialplan" value="XML"/>
        <param name="context" value="teams"/>
        <param name="apply-inbound-acl" value="microsoft"/>
        <param name="codec-prefs" value="PCMA"/>
        <param name="inbound-codec-negotiation" value="greedy"/>
        <param name="inbound-late-negotiation" value="true"/>
        <param name="disable-transfer" value="true"/>
        <param name="disable-hold" value="true"/>
        <param name="dtmf-duration" value="100"/>
        <param name="use-rtp-timer" value="true"/>
        <param name="rtp-timer-name" value="soft"/>
        <param name="media_timeout" value="300"/>
        <param name="media_hold_timeout" value="1800"/>
        <param name="tls" value="true"/>
        <param name="tls-only" value="true"/>
        <param name="tls-bind-params" value="transport=tls"/>
        <param name="tls-sip-port" value="5061"/>
        <param name="tls-cert-dir" value="/etc/freeswitch/tls"/>
        <param name="tls-version" value="tlsv1.2"/>
        <param name="tls-passphrase" value="PASSWORD-FROM-CERT"/>
        <param name="rtp-ip" value="PUBLIC-IP-SERVER"/>
        <param name="sip-ip" value="PUBLIC-IP-SERVER"/>
        <param name="ext-rtp-ip" value="PUBLIC-IP-SERVER"/>
        <param name="ext-sip-ip" value="PUBLIC-IP-SERVER"/>
        <param name="sip-invite-record-route" value="sip:testuser@FQDN-SERVER:5061;transport=tls"/>
  </settings>
</profile>
--
as fas as i could see everything including the exchange of the public-certificate works fine, but afterwards i get a timeout for that trunk.
 
Thanks, Andreas