Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
examples:caller-callee-same-group [2006/10/20 21:34] – created 86.121.131.153 | examples:caller-callee-same-group [2012/03/22 12:33] (current) – removed spam 80.250.1.245 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Determine if both the caller and the callee are in the same group ====== | ||
+ | |||
+ | |||
+ | 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(" | ||
+ | }; | ||
+ | </ | ||