[OpenSIPS-Users] Remove Route Header!

morris edery morrisedery at gmail.com
Thu Jun 1 17:06:23 UTC 2023


Hello Team,
I am trying to remove Route Header (seems like preloaded)
remove_hf("Route")  but  it's not being removed.

i tried to put it in several places on the code but no success

  if (is_method("INVITE"))
                {
                  if (is_present_hf("Route"))
                  {
                    xlog("removing Route Header: $(hdr(Route)[0])\n");

                     remove_hf("Route");

                    xlog ( "Route Header still present?: $(hdr(Route)[0])\n"
);
                  }
                 route(RELAY);
                }


instead of it goes to


    if (loose_route())
                {
                  xlog("L_ERR","Attempt to route with preloaded Route's
[$fu/$tu/$ru/$ci]")

                    if (!is_method("ACK")){
                     send_reply("403","Preload Route denied");
                    exit;
                    }
                }



opensips 2.4.8


what i am doing wrong ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230601/b7286da2/attachment.html>


More information about the Users mailing list