Hi,
Me again, sorry, but the docs aren't really noisy about AVP details...
So if I have user preferences for both the caller and callee and load them from DB and print them using the following:
avp_db_load("$avp($uuid_caller)", ""); avp_db_load("$avp($uuid_callee)", ""); avp_print();
then they may overlap because of the same ID (say "i:102" for toggling some specific feature on/off), but according to the debug output both are present:
INFO:avpops:print_avp: p=0x4056db90, flags=100 INFO: id=<102> INFO: val_int=<1>
INFO:avpops:print_avp: p=0x4056dc68, flags=100 INFO: id=<102> INFO: val_int=<0>
So is it possible to selectively access the avp-value of both $uuid_caller and $uuid_callee? Something like $avp(i:102)[0] and $avp(i:102)[1] maybe?
Thanks, Andy
Hi Andreas,
a fast solution will be rename the uuid avp of caller after loading ( use avp_copy() ).
a long term solution will be to have dynamic groups of avps - you set a group for an AVP and the group will become part of the AVP spec - so you will have same avp ID, but different groups.
regards, bogdan
Andreas Granig wrote:
Hi,
Me again, sorry, but the docs aren't really noisy about AVP details...
So if I have user preferences for both the caller and callee and load them from DB and print them using the following:
avp_db_load("$avp($uuid_caller)", ""); avp_db_load("$avp($uuid_callee)", ""); avp_print();
then they may overlap because of the same ID (say "i:102" for toggling some specific feature on/off), but according to the debug output both are present:
INFO:avpops:print_avp: p=0x4056db90, flags=100 INFO: id=<102> INFO: val_int=<1>
INFO:avpops:print_avp: p=0x4056dc68, flags=100 INFO: id=<102> INFO: val_int=<0>
So is it possible to selectively access the avp-value of both $uuid_caller and $uuid_callee? Something like $avp(i:102)[0] and $avp(i:102)[1] maybe?
Thanks, Andy
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Andreas,
maybe more appropriate than "groups" will be "classes" of avp. you can group different AVP in a class to be able to perform more complex identification/searches (like same AVPs as ID, but onebelongs to caller and other to callee).
in such a case you will define class CALLER and CALLEE when creating an avp, you will specify what class it should belong to (if any). Also when you identify and AVP (via avp specification) you will also be able to specify the class of the AVP.
regards, bogdan
Andreas Granig wrote:
Hi Bogdan,
a long term solution will be to have dynamic groups of avps - you set a group for an AVP and the group will become part of the AVP spec - so you will have same avp ID, but different groups.
I fear I don't really understand... how for example would this look like?
Andy
Hi Bogdan,
maybe more appropriate than "groups" will be "classes" of avp. you can group different AVP in a class to be able to perform more complex identification/searches (like same AVPs as ID, but onebelongs to caller and other to callee).
That's exactly what I'm looking for, but I can't find HOW to actually do that. Is this already possible? If so, how would such a class definition for an AVP look like in the config? Any links to some docs or maybe an example?
Thanks, Andy
Andreas,
this is not yet available - it's planed to be done in the future. In the mean while try to use the trick with renaming the AVPs belonging to caller to different IDs to avoid overlapping.
regards, bogdan
Andreas Granig wrote:
Hi Bogdan,
maybe more appropriate than "groups" will be "classes" of avp. you can group different AVP in a class to be able to perform more complex identification/searches (like same AVPs as ID, but onebelongs to caller and other to callee).
That's exactly what I'm looking for, but I can't find HOW to actually do that. Is this already possible? If so, how would such a class definition for an AVP look like in the config? Any links to some docs or maybe an example?
Thanks, Andy