[OpenSIPS-Users] Cannot change Contact header URI in 200 OK reply to MS Teams to be FQDN instead of IP address with topology_hiding and rtpengine
peter.draganov at clunetech.com
Thu Feb 10 08:26:13 UTC 2022
I am new to OpenSIPS and I am trying to configure it as SBC between MS Teams (with TLS connection) and a FreePBX/Asterisk server (with UDP connection) with a private IP address.
In order for MS Teams to send the ACK to 200 OK reply through the same TLS connection it used to send INVITE request I have to configure OpenSIPS to send Contact header with URI containing its FQDN instead of its IP address. Unfortunately topology_hiding module sets IP address, so MS Teams tries to create a new TLS connection and most probably refuses the certificate, because it contains FQDN, not IP address.
I tried several approaches with configuring OpenSIPS:
- changed socket to be with FQDN and alias with IP address - topology hiding still sets IP address in Contact header
- tried to add manually second contact header - it was not recognized by MS Teams (it still used the first one and tries to create a new TLS connection) and I could not add thinfo parameter, needed by topology_hiding module
Is there another module in OpenSIPS which allows modifying Contact URI only of a reply?
Also I think that I have to add record-route header in my 200 OK reply, according to OpenSIP how-to:
UPDATE: Starting from 01.07.2020 Microsoft requires Route headers with SBC_FQDN in SIP replies too. Instead of simple record_route() for SIP request from MS servers OpenSIPS should add FQDN, but in different order:
I tried to add it in the main route script before calling topology_hiding() in order for it to be restored on replies, but this didn't work:
I noticed that topology_hiding creates a branch, so I tried to add the same record_route_preset in the branch_route also, but this didn't help - I just receive:
ERROR:rr:w_record_route_preset: Double attempt to record-route
Any help is welcome.
Data Classification: Confidential
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users