Differences
This shows you the differences between two versions of the page.
old-content:how_to_use_attribute_value_pairs_avp_s_to_determine_if_both_the_caller_and_the_callee_are_in_the_same_group [2006/01/25 01:00] |
old-content:how_to_use_attribute_value_pairs_avp_s_to_determine_if_both_the_caller_and_the_callee_are_in_the_same_group [2006/01/25 01:00] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | How to use Attribute Value Pairs (AVP' | ||
+ | |||
+ | A real world example would be to limit friends to only calling friends that are in the same group of friends. | ||
+ | |||
+ | 1) Create two entries in the usr_preferences table.\\ | ||
+ | One entry is associated with the caller and the other is associated with the callee.\\ | ||
+ | Both entries use " | ||
+ | |||
+ | 2) Add the following AVP alias definition: | ||
+ | |||
+ | modparam(" | ||
+ | |||
+ | 3) Add the following code to the INVITE section of your configuration: | ||
+ | |||
+ | avp_db_load(" | ||
+ | avp_copy(" | ||
+ | avp_db_load(" | ||
+ | |||
+ | # xlog(" | ||
+ | # xlog(" | ||
+ | |||
+ | if (avp_check(" | ||
+ | xlog(" | ||
+ | xlog(" | ||
+ | };\\ | ||
+ | pp | ||