Thank you guys! It was exactly evaluation of the p-vars issue. Replacing $si with $rd in the on_failure route solved this issue.
Regards, Arsen. On Tue, Mar 29, 2016 at 6:23 PM, Newlin, Ben <[email protected]> wrote: > In on_reply_route all pseudo-variables are evaluated by default in the > context of the reply, but in failure_route they are evaluated by default in > the context of the request. I think you are probably getting a different > value for $si than you are expecting in the failure_route case and there is > no entry in the cache so it returns <null>. You can check this by printing > your key values ("bran$ci$rd” and "bran$ci$si”)before each use to see if > they are all the same. I think they will be different. > > You can use the <reply> context, but I’m not sure if it will work for $si. > See this: http://www.opensips.org/Documentation/Script-CoreVar-2-1 > > Ben Newlin > > From: <[email protected]> on behalf of Arsen < > [email protected]> > Reply-To: OpenSIPS users mailling list <[email protected]> > Date: Tuesday, March 29, 2016 at 11:08 AM > To: OpenSIPS users mailling list <[email protected]> > Subject: [OpenSIPS-Users] cache_fetch on failure route issue > > 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 > > -- Regards, Arsen.
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
