[OpenSIPS-Users] How to save avp-values to singal attribute name in cache_store?

jarrod at unixc.org jarrod at unixc.org
Wed Sep 21 19:08:03 CEST 2016


You could probably also built a JSON array from looping through the avp and store that as the value in the cache store.

> On Sep 21, 2016, at 8:18 AM, xiaofeng <wasphin at gmail.com> wrote:
> 
> 
> On Wed, Sep 21, 2016 at 9:02 PM, Bogdan-Andrei Iancu <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
> >
> > When you add the values in local cache, for each value you have to set a different key. Instead of :
> >        
> >     cache_store("local", "domain", "$(avp(domains)[$var(id)])");
> > do
> >     cache_store("local", "domain_$var(id)", "$(avp(domains)[$var(id)])");
> >
> > By doing that, you add one key for each domain value.
> >
> > Then you can iterate and fetch from cache the domain_$var(id) until nothing is returned anymore.
> >
> 
> Ah, yes, that should work, thanks, Bogdan.
> 
> Regards,
> 
> xiaofeng
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>_______________________________________________
> 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/20160921/d397ec2e/attachment.htm>


More information about the Users mailing list