[OpenSIPS-Users] Route Header removal

Răzvan Crainea razvan at opensips.org
Wed Aug 25 10:03:49 EST 2021


Hi, Louis!

Almost all changes (perhaps the only exception is the R-URI and parts of 
the Contact header) performed on the SIP message will only be visible in 
the outgoing message, but *NOT* reflected in the script. This means that 
whatever change you perform to the message will not be visible by the 
functions used - this is the intended behavior.
If you don't want to route according the the Record-Route algorithm, 
you'll have to catch the request in the local_route and force sending it 
to whatever other destination you want.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 8/24/21 10:34 PM, Louis Rochon wrote:
> We are trying to remove the Route header from an incoming Invite.
> 
> Even with remove_hf, Opensips still routes towards the content of the 
> Route header.
> 
> Opensips.cfg:
> 
> ------------------
> 
> route {
> 
> if ( is_method("INVITE") ) {
> 
> .
> 
> .
> 
> .
> 
> xlog("removing Route Header: $(hdr(Route)[0])\n");
> 
> remove_hf("Route");
> 
> xlog( "Route Header still present?: $(hdr(Route)[0])\n");
> 
> };
> 
> .
> 
> .
> 
> .
> 
> And then we send the call to a b2b_init_request line.
> 
> Both xlogs show the route header still there. And indeed, the opensips 
> attempts to route according to the contents of the route header.
> 
> Suggestions?
> 
> **
> 
> **
> 
> *Louis*
> 
> NOTICE TO RECIPIENT: This email, including attachments, may contain 
> information which is confidential, proprietary, attorney-client 
> privileged and / or controlled under U.S. export laws and regulations 
> and may be restricted from disclosure by applicable State and Federal 
> law. Nothing in this email shall create any legal binding agreement 
> between the parties unless expressly stated herein and provided by an 
> authorized representative of Comtech Telecommunications Corp. or its 
> subsidiaries. If you are not the intended recipient of this message, be 
> advised that any dissemination, distribution, or use of the contents of 
> this message is strictly prohibited. If you received this message in 
> error, please notify us immediately by return email and permanently 
> delete all copies of the original email and any attached documentation 
> from any computer or other media.
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 



More information about the Users mailing list