Hi Ben, thanks for the suggestion.
Doesn't seem to be working for me sadly. This is my code - xlog() confirms
that the variable is available and all of the other functions are doing as
they should.
This is OpenSIPS 2.4.7
...
$var(fqdn) ="my.fqdn";
...
} else if (is_from_gw("2")) {
xlog("CUSTOM_LOG: Call goes to Microsoft $rd");
uac_replace_from("sip:$fU@$var(fqdn)");
xlog("CUSTOM_LOG: SIP From: Set to sip:$fU@
$var(fqdn)");
uac_replace_to("sip:$rU@$rd");
xlog("CUSTOM_LOG: SIP To: Set to sip:$rU@$rd");
xlog("CUSTOM_LOG: Setting advertised address to
$var(fqdn)");
topology_hiding("UC");
set_advertised_address("$var(fqdn)");
if(remove_hf("P-Asserted-Identity")) {
insert_hf("P-Asserted-Identity: $fU
<sip:$fU@$var(fqdn)>\r\n");
xlog("CUSTOM_LOG: Changed PAI Header on
Outbound Call...");
}
}
...
Mark.
On Mon, 16 Mar 2020 at 13:04, Ben Newlin <[email protected]> wrote:
> Have you tried using set_advertised_address **after** engaging
> topology_hiding? We do this and it works fine for us.
>
>
>
> Ben Newlin
>
>
>
> *From: *Users <[email protected]> on behalf of Mark Farmer
> <[email protected]>
> *Reply-To: *OpenSIPS users mailling list <[email protected]>
> *Date: *Monday, March 16, 2020 at 8:29 AM
> *To: *OpenSIPS users mailling list <[email protected]>
> *Subject: *[OpenSIPS-Users] Dynamic Contact Hostname
>
>
>
> Hi everyone
>
>
>
> I am looking for a way to control the hostname part of the contact header.
> Reading the documentation I think set_advertised_address() is what I need
> but if I call set_advertised_address("FQDN") followed by
> topology_hiding("UC") the contact header is incorrect.
>
>
>
> If I set 'listen=tls:XXX.XXX.XXX.XXX:5061 as FQDN:5061' and only call
> topology_hiding("UC") then the contact header hostname is set to FQDN.
>
>
>
> How can I control this?
>
>
>
> Many thanks!
>
> Mark.
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Mark Farmer
[email protected]
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users