Hi Arsen,

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.

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?

Note: If the IPs are public, and you don't want to share them, you may email them to [email protected]

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 29.03.2016 18:08, Arsen wrote:
Hi guys,

We have an issue with cache_fetch function.

In the per_branch_route I store destination numbers as following (we have multiple choice gateways here):

cache_store("local","bran$ci$rd","$rU",90);

In the on_reply_route in case of 200-OK I can successfully fetch the destination number:

cache_fetch("local","bran$ci$si", $avp(cached_dst));

But in case of the failed call the same function always return <null>

failure_route[FAILURE_REDIR] {

  if (!t_check_status("[1|2|3][0-9][0-9]")) {

     cache_fetch("local","bran$ci$si", $avp(cached_dst));

  }

}

Can we use cache_fetch in the on_failure route?

Please advice

Thanks,

--
Regards,
Arsen.


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to