[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

Ovidiu Sas osas at voipembedded.com
Thu Feb 10 17:50:37 UTC 2022


The MS OpenSIPS tutorial doesn't mention topology_hiding. If you
follow the tutorial, you will be able to set up OpenSIPS to connect to
MS.
If you want to use topology_hiding, then you need to take a different
approach because there will be no Route/Record-Route headers to adjust
(that's one of the points of topology hiding). With topology hiding,
you can simply set the FQDN as advertised on the tls socket and
everything should work out of the box.

-ovidiu

On Thu, Feb 10, 2022 at 3:26 AM Peter Draganov
<peter.draganov at clunetech.com> wrote:
>
> 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:
>
> record_route_preset("LAN_IP:5060", "SBC_FQDN:5061;transport=tls");
>
> add_rr_param(";r2=on");
>
> 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:
>
> record_route_preset("sbc.tbgit.com:5067;transport=tls");
>
> 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.
>
>
>
> Peter
>
>
>
> Data Classification: Confidential
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com



More information about the Users mailing list