<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 08.08.2024 17:52, Alexander Perkins
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALLkTp32rO0R778AV8G2=yRt7NMtnc9P_Mbtdo=YfD_CJp9HaA@mail.gmail.com">If
I want to have a variable set in the route block and available to
the failure route, which would be the appropriate way to do so?
An AVP? Or is there a better way?<br>
<div><br>
</div>
</blockquote>
<p><font face="monospace">Hello Alexander,</font></p>
<p><font face="monospace">AVPs are still lightweight (not as
lightweight as <b>$var</b>, but still fast), so storing data as
<b>$avp</b> holders across one or more failure routes seems like
the ideal approach.</font></p>
<p><font face="monospace">Optimization: If your data is binary
("A"/"B", True/False, etc.), see Pavel's suggestion on using the
<b>message flags</b>, which will also persist across the initial
and re-tried messages, as you perform serial forking using one
or more <b>failure_route</b>'s.<br>
</font></p>
<p><font face="monospace">Best regards,</font><br>
</p>
<pre class="moz-signature" cols="72">--
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
</body>
</html>