[OpenSIPS-Users] cache_fetch on failure route issue

Liviu Chircu liviu at opensips.org
Tue Mar 29 17:19:47 CEST 2016


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 liviu at opensips.org

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
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160329/a817c38d/attachment.htm>


More information about the Users mailing list