[OpenSIPS-Users] UUID value in usr_preferences

Jeff Pyle jpyle at fidelityvoice.com
Mon Aug 16 14:57:13 CEST 2010


David,

The documentation and examples included with opensips are excellent for this type of operation.  The first place I use it in my opensips.cfg is to load a trunk flag variable, using the To user of the registration as the key.  This key matches the UUID in my "trunk" table.

        if (is_method("REGISTER")) {
                if (is_avp_set("$avp(s:t_flags)")) avp_delete("$avp(s:t_flags)/g");
                avp_db_load("$tU", "$avp(s:t_flags)");

In this case, I load an avp called $avp(s:t_flags) based on the To user of the REGISTER packet (pseudo-variable $tU), clearing it out just in case it was already there.  Which is unlikely on a REGISTER.

Hopefully that's helpful.  Good luck.  I've found the best way to learn this is to make heavy use of xlog to look at what the inputs and outputs of the functions.  That way, you know what's going in, you can determine what the function is doing (with help from the docs!), and you see what comes out of it.


- Jeff


On Aug 13, 2010, at 10:30 AM, 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. <david at styleflare.com><mailto:david at styleflare.com>
To: OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at 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 at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100816/59bd8d02/attachment.htm 


More information about the Users mailing list