Hello, I'm facing to some challenge in my learning process and using Kamalio as MS Teams SBC, the request I receive from MS Teams seems to be correct but I need to overwrite the Original Domain, which is the FQDN of Kamailio itself, to another domain name: INVITE sip:+15142144069@dev-sbc.openfabrik.com:5061;user=phone;transport=tls SIP/2.0Record-Route: sip:155.138.140.233;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541Record-Route: sip:155.138.140.233:5061;transport=tls;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541FROM: Victor Velosip:+14507001777@sip.pstnhub.microsoft.com:5061;user=phone;tag=3e2ca0c5d0da4335b121f205a6f20541TO: sip:+15142144069@dev-sbc.openfabrik.com:5061;user=phone rewrite to: INVITE sip:+15142144069@dev-sbc.openfabrik.com:5061;user=phone;transport=tls SIP/2.0Record-Route: sip:155.138.140.233;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541Record-Route: sip:155.138.140.233:5061;transport=tls;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541FROM: Victor Velosip:+14507001777@sip.pstnhub.microsoft.com:5061;user=phone;tag=3e2ca0c5d0da4335b121f205a6f20541TO: sip:+15142144069@dev.myinternaldomain.openfabrik.com:5061;user=phone What would the best why to achieve this rewriting? Thanks, Victor
On 5/14/21 2:49 PM, Victor Velo wrote:
Hello,
the request I receive from MS Teams seems to be correct but I need to overwrite the Original Domain, which is the FQDN of Kamailio itself, to another domain name:
TO: sip:+15142144069@*dev-sbc.openfabrik.com:5061*;user=phone
rewrite to: TO: sip:+15142144069@*dev.myinternaldomain.openfabrik.com*:5061;user=phone
What would the best why to achieve this rewriting?
Take a look at UAC module: https://www.kamailio.org/docs/modules/stable/modules/uac.html
In your case: uac_replace_to_uri
You can also use replace_all within textops: https://www.kamailio.org/docs/modules/stable/modules/textops.html
Hello Fred, Thank you, that did replace the to_uri. I'm now facing with another thing: "407 Proxy Authentication Required". I already added the 3 MS Teams GW to trusted source in the FreeSwitch ACL: But still getting this Proxy Authentication Required error. Any tips for investigation is welcome. Thanks,Victor On Friday, May 14, 2021, 03:12:40 p.m. EDT, Fred Posner fred@palner.com wrote:
On 5/14/21 2:49 PM, Victor Velo wrote:
Hello,
the request I receive from MS Teams seems to be correct but I need to overwrite the Original Domain, which is the FQDN of Kamailio itself, to another domain name:
TO: sip:+15142144069@*dev-sbc.openfabrik.com:5061*;user=phone
rewrite to: TO: sip:+15142144069@*dev.myinternaldomain.openfabrik.com*:5061;user=phone
What would the best why to achieve this rewriting?
Take a look at UAC module: https://www.kamailio.org/docs/modules/stable/modules/uac.html
In your case: uac_replace_to_uri
You can also use replace_all within textops: https://www.kamailio.org/docs/modules/stable/modules/textops.html