[Serusers] How to use avp_aliases?

Charles Wang lazy.charles at gmail.com
Sat Feb 19 10:15:00 CET 2005


Dear ALL:

I have defined these lines at my ser.cfg.

modparam("avpops", "avp_url", "mysql://ser:heslo@localhost/ser")
modparam("avpops", "avp_table", "usr_preferences")
modparam("avpops", "uuid_column", "uuid")
modparam("avpops", "username_column", "username")
modparam("avpops", "domain_column", "domain")
modparam("avpops", "attribute_column", "attribute")
modparam("avpops", "value_column", "value")
modparam("avpops", "type_column", "type")
modparam("avpops", "avp_aliases",
"voicemail=i:500;calltype=i:700;fwd_no_answer_type=i:701;fwd_busy_type=i:702")

Q1: If I use usr_preferences as default table, should I insert some
initial data to it?
      Can you give me some example?
      Schema List below:

mysql> desc usr_preferences;
+-----------+---------------+------+-----+---------+-------+
| Field     | Type          | Null | Key | Default | Extra |
+-----------+---------------+------+-----+---------+-------+
| uuid      | varchar(64)   |      |     |         |       |
| username  | varchar(100)  |      | PRI |         |       |
| domain    | varchar(128)  |      | PRI |         |       |
| attribute | varchar(32)   |      | PRI |         |       |
| value     | varchar(128)  |      | PRI |         |       |
| type      | int(11)       |      |     | 0       |       |
| modified  | timestamp(14) | YES  |     | NULL    |       |
+-----------+---------------+------+-----+---------+-------+


And I have refered to http://www.voice-system.ro/docs/avpops

And find many examples in it.

But I still can't understand what it mean about avp_db_load().

my avp table is named as "usr_preferences" and it is empty before I
use avpops modules.

For this web page said:
   avp_db_load("$ruri/domain","i:/domain_preferences");
              - loads all AVPs with ID from 'domain_preferences'
                table for domain from RURI
Q2: Is "$ruri" the caller user's URI? and the "domain" is the same?
    Is "domain_preferences"  table name? Is it equal to my "usr_preferences"?
    Or it is just a virtual table in memory?

Thank you for your answer my stupid questions.

Best Regard
Charles




More information about the sr-users mailing list