<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi Arsen,<br>
<br>
Yes, cache_fetch() should work in the failure route as well. From
the looks of it, the problem is related to building the key itself.<br>
<br>
Could you please insert some xlog() statements before each
cache_store() / cache_fetch() operation (request / onreply /
failure routes), and post the logs here, so we can see what's
really happening behind the hood?<br>
<br>
Note: If the IPs are public, and you don't want to share them, you
may email them to <a class="moz-txt-link-abbreviated" href="mailto:liviu@opensips.org">liviu@opensips.org</a><br>
</tt>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 29.03.2016 18:08, Arsen wrote:<br>
</div>
<blockquote
cite="mid:CABoraY7Q-OezWHgfXYntVf1d=4voFx9ba5aETzgMmFA5ZWQzHg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi guys,
<div><br>
</div>
<div>We have an issue with cache_fetch function. </div>
<div><br>
</div>
<div>In the per_branch_route I store destination numbers as
following (we have multiple choice gateways here):</div>
<div><br>
</div>
<div>cache_store("local","bran$ci$rd","$rU",90);</div>
<div><br>
</div>
<div>In the on_reply_route in case of 200-OK I can successfully
fetch the destination number:</div>
<div><br>
</div>
<div>cache_fetch("local","bran$ci$si", $avp(cached_dst));</div>
<div><br>
</div>
<div>But in case of the failed call the same function always
return <null><br clear="all">
<div><br>
</div>
<div>failure_route[FAILURE_REDIR] {</div>
<div><br>
</div>
<div> if (!t_check_status("[1|2|3][0-9][0-9]")) {<br>
</div>
<div><br>
</div>
<div> cache_fetch("local","bran$ci$si", $avp(cached_dst));</div>
<div><br>
</div>
<div> }</div>
<div><br>
</div>
<div>}</div>
<div><br>
</div>
<div>Can we use cache_fetch in the on_failure route? </div>
<div><br>
</div>
<div>Please advice</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
-- <br>
<div class="gmail_signature">Regards,<br>
Arsen.<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>