<div dir="ltr">Hello , and thanks for the reply,  i removed the  send_reply(403...)  but now on my outbound call Route Header still exist <div><br></div><div><img src="cid:ii_lievz0eo0" alt="image.png" width="536" height="240"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 2, 2023 at 6:13 AM Răzvan Crainea <<a href="mailto:razvan@opensips.org">razvan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, Morris!<br>
<br>
The code you are trying to run removes the Route header for the outgoing <br>
message, but the inbound/received INVITE still has the Route header, <br>
hence loose_route() sees it and denies it.<br>
Do note that loose_route() itself removes the route, if its preloaded, <br>
so if you do want to accept preloaded routes, simply don't drop them :) <br>
(i.e. comment the send_reply(403...))<br>
<br>
Best regards,<br>
<br>
Răzvan Crainea<br>
OpenSIPS Core Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 6/1/23 20:06, morris edery wrote:<br>
> Hello Team,<br>
> I am trying to remove Route Header (seems like preloaded) <br>
> remove_hf("Route")  but  it's not being removed.<br>
> <br>
> i tried to put it in several places on the code but no success<br>
> <br>
>    if (is_method("INVITE"))<br>
>                  {<br>
>                    if (is_present_hf("Route"))<br>
>                    {<br>
>                      xlog("removing Route Header: $(hdr(Route)[0])\n");<br>
> <br>
>                       remove_hf("Route");<br>
>                      xlog ( "Route Header still present?: <br>
> $(hdr(Route)[0])\n");<br>
>                    }<br>
>                   route(RELAY);<br>
>                  }<br>
> <br>
> <br>
> instead of it goes to<br>
> <br>
> <br>
>      if (loose_route())<br>
>                  {<br>
>                    xlog("L_ERR","Attempt to route with preloaded Route's <br>
> [$fu/$tu/$ru/$ci]")<br>
>                      if (!is_method("ACK")){<br>
>                       send_reply("403","Preload Route denied");<br>
>                      exit;<br>
>                      }<br>
>                  }<br>
> <br>
> <br>
> <br>
> opensips 2.4.8<br>
> <br>
> <br>
> what i am doing wrong ?<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>