<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Hello,</p>
<p>it does not work if you do:</p>
<p>$var(rruser) = "mo";</p>
<p>
record_route_preset(<a class="moz-txt-link-rfc2396E" href="mailto:$var(rruser)@1.2.3.4:5060">"$var(rruser)@1.2.3.4:5060"</a>);</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 25.06.21 09:58, Valentin Christoph
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:PAXPR10MB4993B71E271A2B4B1FDD05F995069@PAXPR10MB4993.EURPRD10.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@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;}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;}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]-->
<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 style="font-size:14.0pt;color:red"
lang="EN-US"><a
href="mailto:mo@my-scscf.my-network.com;lr"
moz-do-not-send="true">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 <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a>
<br>
<b>Gesendet:</b> Donnerstag, 24. Juni 2021 22:02<br>
<b>An:</b> Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a>; Valentin Christoph
<a class="moz-txt-link-rfc2396E" href="mailto:Christoph.Valentin@kontron.com"><Christoph.Valentin@kontron.com></a><br>
<b>Cc:</b> Onic Roman <a class="moz-txt-link-rfc2396E" href="mailto:Roman.Onic@kontron.com"><Roman.Onic@kontron.com></a><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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
</body>
</html>