<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Mr. Burke,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Yes indeed, I looked into how I was using loose_route and that was the problem!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for the great find!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Louis Rochon<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Users <users-bounces@lists.opensips.org> on behalf of John Burke via Users <users@lists.opensips.org><br>
<b>Sent:</b> August 27, 2021 3:45 PM<br>
<b>To:</b> users@lists.opensips.org <users@lists.opensips.org><br>
<b>Subject:</b> Re: [OpenSIPS-Users] Route Header removal</font>
<div> </div>
</div>
<div>
<div></div>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal" style="margin-bottom:3.0pt"><strong><span style="font-size:12.0pt; color:red; padding:0in; background:lightgrey; border:4px solid gray">WARNING: External Email: Exercise Caution</span></strong><span style="font-size:12.0pt; font-family:"Times New Roman",serif"><br>
<span style="font-size:8pt; line-height:8pt; font-family:'Cambria','times roman',serif"></span></span></p>
<div>Hey Louis,<br>
<br>
I thought I might jump in here about your point (2). If you are referring to preloaded Route header(s) in the initial request, then you just need to take care when calling the loose_route [1] method. If you don't trust, or want to disregard, any preloaded
Routes then don't call loose_route and remove the header via remove_hf to prevent downstream proxies from potentially mis-routing the request. There are cases when you may want to allow loose routing of preloaded sets, such as in the case of a mid-registrar
with Path support [2]. <br>
<br>
[1] <a class="x_moz-txt-link-freetext" href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopensips.org%2Fhtml%2Fdocs%2Fmodules%2Fdevel%2Frr.html%23func_loose_route&data=04%7C01%7CLouis.Rochon%40comtechtel.com%7Cfa785681107c4848338c08d969934aa7%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637656903637083313%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6VQl33o3LiPX%2Bf%2Buzk1Vh9JYTiLgnJfUHcVuUcnt1%2Bo%3D&reserved=0" originalsrc="https://opensips.org/html/docs/modules/devel/rr.html#func_loose_route" shash="Q03Cz00atc1miNkxfyAfx9d+zQH3507lHhARHHlHKWl9OJLvSWtxeL+UYPY3+hvlhMcWtKDAK6dxvPoraj0g3K4YboIilJawz/QboI9yByKWSAW+xNwMYpUw0KQPMCBRGNR8yQlOEy5735+G3pWDV2s2t/XXFEKLKFFWKBl3Wrg=">
https://opensips.org/html/docs/modules/devel/rr.html#func_loose_route</a><br>
[2] <a class="x_moz-txt-link-freetext" href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopensips.org%2Fhtml%2Fdocs%2Fmodules%2Fdevel%2Fpath.html&data=04%7C01%7CLouis.Rochon%40comtechtel.com%7Cfa785681107c4848338c08d969934aa7%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637656903637093269%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qvZvtxuyAjEYdQhdvEFLj8zReoo3wHEpnC1%2BAfi6sK4%3D&reserved=0" originalsrc="https://opensips.org/html/docs/modules/devel/path.html" shash="HVrqLkodV/948OwAUZ5zA2HX2oCgx9Ag3lpfRZOb+AsPDOeyqD01pHanmxEEF8ZbdoOGXDR0MGRA7KGE8PKaARCTKpN7IxM0AZomOrqQ8gD94Bc7RYyDbn/VY8CQoCGKR3xHTybZFdHhFbkKQ7rDoMbugwyLBZ7dMXzwO51qABM=">
https://opensips.org/html/docs/modules/devel/path.html</a><br>
<br>
<u>Example:</u><br>
route {<br>
...<br>
#sequential routing<br>
...<br>
#process preloaded routes<br>
if (is_present_hf("Route")) {<br>
if (...) { # honor routes<br>
loose_route();<br>
t_relay();<br>
exit;<br>
} else { # don't process and strip routes<br>
remove_hf("Route");<br>
}<br>
}<br>
...<br>
}<br>
<br>
<br>
Thanks,<br>
John Burke<br>
<span style="color:rgb(128,128,128); font-family:arial,helvetica,sans-serif; font-size:11pt"><strong></strong></span>
<div class="x_moz-signature">
<div><span style="color:rgb(128,128,128); font-family:arial,helvetica,sans-serif; font-size:11pt"><strong><br>
</strong></span></div>
</div>
<div class="x_moz-cite-prefix">On 8/27/21 9:01 AM, Louis Rochon wrote:<br>
</div>
<blockquote type="cite">
<pre class="x_moz-quote-pre">Răzvan,
Thank you for the quick response. 2 Notes:
1. I saw another post about the visibility of header changes post manipulation. I now understand the subtleties of that mechanism. Thanks!
2. I am trying to remove the "Route" header, and not the "Record-Route" header. From my understanding, the Route header as the ability or override the R-URI. OpenSIPS does exactly that (as per spec.), which is why I want to remove it.
However, even " remove_hf("Route");" OpenSIPS still attempts to route based on the contents of the "Route" header.
Louis
-----Original Message-----
From: Users <a class="x_moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a> On Behalf Of Razvan Crainea
Sent: August 25, 2021 6:04 AM
To: <a class="x_moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>
Subject: Re: [OpenSIPS-Users] Route Header removal
WARNING: External Email: Exercise Caution
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
<a class="x_moz-txt-link-freetext" href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opensips-solutions.com%2F&data=04%7C01%7CLouis.Rochon%40comtechtel.com%7Cfa785681107c4848338c08d969934aa7%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637656903637093269%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2F1leryLAZUa5VH97%2BoHFQFhYfp%2B6dsQ%2F1hxsLT8FMSU%3D&reserved=0" originalsrc="http://www.opensips-solutions.com/" shash="T3N56LI0V12FP++qDVD+v67+ORgazvqMM2G3+8BIXe0RkS2ES0I0XM5iJuiWK/ziQXaRGboXbO8m8lTl3ajXWav447ZDyZXrdKqScKaCrJmiIqES7/1LCENo/2tqK6kbXaL4CLqpDZ5asYqL8J+H7IEZJQ1M+wn19+KVV/Zsi3s=">https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opensips-solutions.com%2F&data=04%7C01%7CLouis.Rochon%40comtechtel.com%7Cac163de2930d4203b8b508d967afbbdb%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637654826786421255%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9Fz%2FcUnMykh6fP8LgaDgVSF%2FKEbdKIaXA%2FEkACXvTKQ%3D&reserved=0</a>
On 8/24/21 10:34 PM, Louis Rochon wrote:
</pre>
<blockquote type="cite">
<pre class="x_moz-quote-pre">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
<a class="x_moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="x_moz-txt-link-freetext" href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists">https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists</a>
.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=04%7C01%
7CLouis.Rochon%40comtechtel.com%7Cac163de2930d4203b8b508d967afbbdb%7Ca
9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637654826786421255%7CUnknown
%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
XVCI6Mn0%3D%7C1000&sdata=SQ6Z9NSskYelktXtqBTHCBy73ryDA0FdRdSdhmJXI
yc%3D&reserved=0
</pre>
</blockquote>
<pre class="x_moz-quote-pre">
_______________________________________________
Users mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="x_moz-txt-link-freetext" href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=04%7C01%7CLouis.Rochon%40comtechtel.com%7Cfa785681107c4848338c08d969934aa7%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637656903637093269%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6fhr7Rovr7dKqRmXWuziuMlsvIvdoi5Dt%2F8JylZGJXk%3D&reserved=0" originalsrc="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" shash="JQY7bmN10T3YUhTsxyvzvQL3WXQtwMcWn9OEZ6uvxIW/fZVNmIrjHc1rVAb70kitXXuS4BvM5Z1+u5wmxydo1nvdt0njPmUyKH0pqnbIC68COIOrHy+VgL4EYUn9F8moJ0o93YY2o3QYo0z98ZZtetXI8F28hf1vq1RisAS7qms=">https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=04%7C01%7CLouis.Rochon%40comtechtel.com%7Cac163de2930d4203b8b508d967afbbdb%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637654826786421255%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=SQ6Z9NSskYelktXtqBTHCBy73ryDA0FdRdSdhmJXIyc%3D&reserved=0</a>
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
<a class="x_moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="x_moz-txt-link-freetext" href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=04%7C01%7CLouis.Rochon%40comtechtel.com%7Cfa785681107c4848338c08d969934aa7%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637656903637103219%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NCOpfsMk%2BPKlnkiPHEuAd5FgcPqiusPQstBUcmWsaAc%3D&reserved=0" originalsrc="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" shash="CXzzzPHCa3bc7lAYn+lsaKNB09yqC5Jsu+cSs3YznCE/bVSOVwyfsD7VU4PSr1L5LH1q7vhxzqtimd7muQhNI1v884WW5Job/wBkgPqcKBIWqvB+wB46Y+VjDOCYOkrO4zm8ylbNOY8x4KpQcmYWOJdvhWPs2UW5gvvfhWbnFJ8=">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</div>
</body>
</html>