<div dir="ltr">Ok i stumbled on to your email from back 2009 asking just about the same thing (<a href="https://users.opensips.narkive.com/W78SWsO9/opensips-users-remove-hf-doesn-t-always-work">https://users.opensips.narkive.com/W78SWsO9/opensips-users-remove-hf-doesn-t-always-work</a>)<div><br></div><div>I ended up doing </div><div>t_on_branch("1")</div><div><br></div><div># Add the header before sending it out the parameter server</div><div>branch_route[1] {<br> append_hf("X-MyHeader: 1\r\n");<br>}<br></div><div><br></div><div>then when actually sending it out to the termination provider:</div><div><br></div><div>t_on_branch("2");<br><br># Remove the header before seding it out to the termination<br>branch_route[2] {<br> remove_hf("X-MyHeader");<br>}<br></div><div><br></div><div>That's working perfectly!</div><div><br></div><div>Is this right or is there a more efficient/easier way to do it?</div><div><br></div><div>Thanks!</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 15, 2021 at 12:10 AM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</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"><div dir="ltr">Thanks Jeff,<div><br></div><div>That's not going to work for me, I don't want to add new branches. </div><div>What I'm doing is forwarding the call to a sip server that replies with a 302 and some extra headers. </div><div>I then need to get these headers and continue routing normally, one single branch.</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 14, 2021 at 11:12 PM Jeff Pyle <<a href="mailto:jeff@ugnd.org" target="_blank">jeff@ugnd.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"><div dir="ltr"><div>Add it in a branch_route. That way if you have to route advance, it'll already be gone because you'll be on a new branch.</div><div><br></div><div><br></div><div>- Jeff</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 14, 2021 at 5:52 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</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"><div dir="ltr">Hello guys,<div><br></div><div>So, I'm appending a header (append_hf("header")) to a forward.</div><div>That forward fails and I'm trying to remove it with remove_hf("header"), but it's not getting removed for some reason, what am I doing wrong?</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div>Thanks everyone!</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div></div></div>
_______________________________________________<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>
_______________________________________________<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>
</blockquote></div>