within session "ALL"
{
act on message where %DIRECTION="OUTBOUND" and %ENTRY_POINT="POST_ROUTING"
{
%HEADERS["Contact"][1].regex_replace("55\.55\.122\.19","mysbc.dr.mylab.com"); //MS wants to see FQDNs, not IPs
%HEADERS["Contact"][1].regex_replace("sip:","sip:+1");
%HEADERS["Record-Route"][1].regex_replace("55\.55\.122\.19","mysbc.dr.mylab.com"); //MS wants to see FQDNs, not IPs
%HEADERS["X-MS-SBC"][1] = "AVAYA SBCE-8.1.1.19158"; //Not sure if this has any functional purpose
%HEADERS["Allow"][1].regex_replace(" REFER,",""); //Let's see if this fixes hold...
}
}
within session "ALL"
{
act on message where %DIRECTION="INBOUND" and %ENTRY_POINT="AFTER_NETWORK"
{
%HEADERS["Request_Line"][1].regex_replace("mysbc\.dr\.mylab\.com","55.55.122.19"); //Avaya wants to see the SBC IP and not FQDN on incoming messages
%HEADERS["Route"][1].regex_replace("mysbc\.dr\.mylab\.com","55.55.122.19"); //Avaya wants to see the SBC IP and not FQDN on incoming messages
%HEADERS["Record-Route"][1].regex_replace("mysbc\.dr\.mylab\.com","55.55.122.19"); //Avaya wants to see the SBC IP and not FQDN on incoming messages
%BODY[1].regex_replace( "a=mid:1\r\n",""); //CM-21733. CM will CANCEL a call from TEAMS as soon as it gets this SDP attribute in a 183 or any other msg
remove(%HEADERS["Referred-BY"][1]); //Remove the header
}
}
within session "ALL"
{
act on message where %DIRECTION="OUTBOUND" and %ENTRY_POINT="POST_ROUTING"
{
remove(%HEADERS["p-asserted-identity"][1]); //Remove the header
remove(%HEADERS["Remote-Party-ID"][1]); //Remove the header
remove(%HEADERS["Remote-Address"][1]); //Remove the header
remove(%HEADERS["P-AV-Message-Id"][1]); //Remove the header
remove(%HEADERS["x-nt-e164-clid"][1]); //Remove the header
remove(%HEADERS["P-Charging-Vector"][1]); //Remove the header
remove(%HEADERS["Av-Global-Session-ID"][1]); //Remove the header
remove(%HEADERS["P-Location"][1]); //Remove the header
remove(%HEADERS["Server"][1]); //Remove the header
remove(%HEADERS["Av-Call-Appearance"][1]); //Remove the header
remove(%HEADERS["Contact"][1].URI.PARAMS["gsid"]);
remove(%HEADERS["Contact"][1].URI.PARAMS["asm"]);
remove(%HEADERS["Record-Route"][4]); //MS doesn't want these if we're always using the same SBC, we just want to send a contact header
remove(%HEADERS["Record-Route"][3]); //MS doesn't want these if we're always using the same SBC, we just want to send a contact header
remove(%HEADERS["Record-Route"][2]); //MS doesn't want these if we're always using the same SBC, we just want to send a contact header
remove(%HEADERS["Record-Route"][1]); //MS doesn't want these if we're always using the same SBC, we just want to send a contact header
}
}