<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Consolas",serif;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Daniel, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you, but this is a misconception.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I mean the user part of the URI in the Record-Route header, eg.    “Record-Route:
</span><b><span lang="EN-US" style="font-size:14.0pt;color:red"><a href="mailto:mo@my-scscf.my-network.com;lr">mo<span style="font-size:11.0pt;font-weight:normal">@my-scscf.my-network.com;lr</span></a></span></b><span lang="EN-US">”,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Which is either taken from the Request URI (what I do not need), or set by the AVP  “RR_CUSTOM_USER_AVP” (what I need).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The record_route_preset() and record_route_advertised_address() functions both ignore the RR_CUSTOM_USER_AVP (what is in my humble opinion a bug in the rr module and I am going to correct it).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Christoph <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> Daniel-Constantin Mierla <miconda@gmail.com>
<br>
<b>Gesendet:</b> Donnerstag, 24. Juni 2021 22:02<br>
<b>An:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; Valentin Christoph <Christoph.Valentin@kontron.com><br>
<b>Cc:</b> Onic Roman <Roman.Onic@kontron.com><br>
<b>Betreff:</b> Re: [SR-Users] rr module: record_route_advertised_address()/record_route_preset() do ignore custom user AVP<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal">On 24.06.21 21:41, Valentin Christoph wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hi,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Maybe a discussion for the DEV mailing list????</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Want to overwrite the FQDN by a NATed IP address in the topmost Record-Route of an outgoing INVITE request.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Cannot set the advertise parameter (this must tell the FQDN for all other situations), only in some special situations I want to overwrite the FQDN in Record-Route.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">My solution would be to implement in the Kamailio source code (rr module) that not only record_route() uses the get_custom_user() function, but the other both functions uses it, too.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Any better proposals?</span><o:p></o:p></p>
</blockquote>
<p>the record_route_preset() supports variables inside its parameters, so you can do:<o:p></o:p></p>
<p>$var(rr) = "1.2.3.4:5060";<o:p></o:p></p>
<p>record_route_preset("$var(rr)");<o:p></o:p></p>
<p>Cheers,<br>
Daniel<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla -- <a href="https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com%2F&data=04%7C01%7CChristoph.Valentin%40kontron.com%7C98367d7cefa346c726b008d9374b0141%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637601618270351401%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BvfDkhXGCnaqEC9rxSdYG1S%2FlzH9aElkbzcRPlI1JGw%3D&reserved=0">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fmiconda&data=04%7C01%7CChristoph.Valentin%40kontron.com%7C98367d7cefa346c726b008d9374b0141%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637601618270351401%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=dK8%2BRhGHE1i9dBij93DsKhVZz8FMSRCxTnfzUIW6ujw%3D&reserved=0">www.twitter.com/miconda</a> -- <a href="https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmiconda&data=04%7C01%7CChristoph.Valentin%40kontron.com%7C98367d7cefa346c726b008d9374b0141%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637601618270361356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zQJ3lKi1bYpUB862HHRNYszED%2B%2Bjf5USQ3W3jXuzIT4%3D&reserved=0">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
</body>
</html>