<p>This code tries to store and fetch an AVP with multiple values in cache:</p>
<pre><code>timer_route[test, 3]
{
...
set_count("$avp(destinations)", "$var(total_destinations)");
xlog("$var(total_destinations) destinations found!");
cache_store("local","destinations","$avp(destinations)");
cache_fetch("local","destinations", $avp(test));
avp_print();
}
</code></pre>
<p>But with current OpenSIPS versions only the topmost value can be fetched:</p>
<pre><code>opensips[458]: 2 destinations found!
opensips[458]: INFO:avpops:ops_print_avp: p=0x36e47f60, flags=0x0002
opensips[458]: INFO:avpops:ops_print_avp: name=<test>
opensips[458]: INFO:avpops:ops_print_avp: id=<2>
opensips[458]: INFO:avpops:ops_print_avp: val_str=<sip:10.10.10.169:5060 / 21>
opensips[458]: INFO:avpops:ops_print_avp: p=0x36e67d9c, flags=0x0002
opensips[458]: INFO:avpops:ops_print_avp: name=<destinations>
opensips[458]: INFO:avpops:ops_print_avp: id=<8>
opensips[458]: INFO:avpops:ops_print_avp: val_str=<sip:10.10.10.169:5060 / 21>
opensips[458]: INFO:avpops:ops_print_avp: p=0x36e47f9c, flags=0x0002
opensips[458]: INFO:avpops:ops_print_avp: name=<destinations>
opensips[458]: INFO:avpops:ops_print_avp: id=<8>
opensips[458]: INFO:avpops:ops_print_avp: val_str=<sip:10.10.11.169:5060 / 21>
</code></pre>
<p>I would like to request a feature to make it possible to store and fetch an AVP with multiple values in cache.<br>
Thanks in advance!</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/OpenSIPS/opensips/issues/151'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/5479561__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwMjkwNDMwMCwiZGF0YSI6eyJpZCI6MjIyODUyMTd9fQ==--18bdbcb8ec066fc1e5285948bb5d343c040b6717.gif' height='1' width='1'></p>