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

2016-09-21 Thread xiaofeng
On Wed, Sep 21, 2016 at 9:02 PM, Bogdan-Andrei Iancu 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(domain

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

2016-09-21 Thread Bogdan-Andrei Iancu
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

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

2016-09-21 Thread xiaofeng
Hi, Bogdan, > In your script, not sure if it is the indented behavior, but when looping through the loaded AVPs, you are pushing in cache the same key ("domain") for all the values -> this will overwrite any previous value and you will end up storing only the last value. Yes, I want all values bi

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

2016-09-21 Thread Bogdan-Andrei Iancu
Hello Xiaofeng, In your script, not sure if it is the indented behavior, but when looping through the loaded AVPs, you are pushing in cache the same key ("domain") for all the values -> this will overwrite any previous value and you will end up storing only the last value. The second "while"