loadmodule "avpops.so"
modparam("avpops", "uuid_column", "uuid")
########################################################################
# Request route 'usr-preferences-callee'
########################################################################
route[4] {
xlog("L_INFO", "[04] -----> Request route 'usr-preferences-callee'
- M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
xlog("L_INFO", "[04] Load callee preferences for uuid
'$avp(s:callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
avp_db_load("$avp(s:callee_uuid)", "*"); # load callee avps
if(is_avp_set("$avp(s:cfu)/s")) {
xlog("L_INFO", "[04] Call-forward-unconditional to
'$avp(s:cfu)' found - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
route(8); # Request route 'cfu-acc'
avp_delete("$avp(s:caller_uuid)/g");
avp_copy("$avp(s:callee_uuid)", "$avp(s:caller_uuid)/d");
avp_pushto("$ru", "$avp(s:cfu)");
route(3); # Request route 'usr-preferences-caller'
route(14); # Request route 'invite-find-callee'
exit;
}
if(is_avp_set("$avp(s:ringtimeout)/n")) {
xlog("L_INFO", "[04] Setting ring timeout to
$avp(s:ringtimeout) secs - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
avp_copy("$avp(s:ringtimeout)", "$avp(s:callee_fr_inv_timer)/d");
}
}
########################################################################
# Request route 'usr-preferences-caller'
########################################################################
route[3] {
xlog("L_INFO", "[03] -----> Request route 'usr-preferences-caller'
- M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
route(1); # Request route 'clear-usr-preferences-caller'
xlog("L_INFO", "[03] Load caller preferences for uuid
'$avp(s:caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
avp_db_load("$avp(s:caller_uuid)", "*"); # load caller avps
avp_copy("$avp(s:cli)", "$avp(s:caller_cli)/d");
if(is_avp_set("$avp(s:clir)/n") && avp_check("$avp(s:clir)",
"eq/i:1")) {
setflag(28); # mark for anonymization
}
}
On 13.08.2010 18:30, David J. wrote:
Thanks, Pasan, Jeff,
Jeff, when you query by uuid, can you show me a sample how to do it
that way?
On 8/13/10 9:15 AM, Jeff Pyle wrote:
David,
As Pasan mentioned, it can be used for the query key for whatever
value you're pulling. In my network, the uuid could be a trunk name
if I'm storing trunk attributes, a trunk group number if I'm storing
data about that group, or a phone number to hold call forwarding or
other information about that phone number...
There are several ways in the AVP environment to key values. I use
uuid rather than username or username/domain.
- Jeff
On Aug 13, 2010, at 8:08 AM, David J. wrote:
Thx...
Any idea what the purpose of the field is?
On 8/13/10 6:39 AM, Pasan Meemaduma wrote:
Hi David,
UUID field is not mandatory. you can just insert other fields
without UUID.
It could use as a reference key if you want.
+-------+------+------------+-----------+-----------+------+-------+---------------------+
| id | uuid | username | domain | attribute | type | value
| last_modified |
+-------+------+------------+-----------+-----------+------+-------+---------------------+
| 14497 | | xxx | xxxx | timeout | 0 | 50 | 2000-03-02
16:21:59 |
------------------------------------------------------------------------
*From:* David J. <da...@styleflare.com>
*To:* OpenSIPS users mailling list <users@lists.opensips.org>
*Sent:* Friday, August 13, 2010 15:57:28
*Subject:* [OpenSIPS-Users] UUID value in usr_preferences
List,
what value should I be using in the UUID field in the
usr_preferences table?
I was trying to manually insert into the table, and got stumbled by
this
field, the rest seem to make sense.
Thx.
_______________________________________________
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users