Hi Ricardo,
You can have two values for one attribute, but not in the same database
entry. So in a table, you need two entries, "domain/attr/value1" and
"domain/attr/value2", avp_db_load can load both. However it is hard to use
if two values are totally different, e.g. in your case, one number and one
ip address.
You can have attr1/value1, attr2/value2, then use check/pushto to manipulate
the values.
Richard
-----Original Message-----
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of Ricardo Martinez
Sent: Thursday, January 13, 2005 5:54 AM
To: 'serusers(a)lists.iptel.org'
Subject: RE: [Serusers] AVPOPS Module Usage Help.
Hello.
Is possible to have a table with one avp and two values?. For
example:
Domain Attribute Value1 Value2
domain1 "Code" 0056 192.168.0.10
domain1 "Code" 0054 192.168.0.20
domain1 "Code" 001 192.168.0.30
So when i load the table with
avp_db_load("$ruri/domain","s:Code/Table_Name") to use the
valu1 or value2 to check and push?
Thanks in advance.
Best Regards,
Ricardo.-
-----Mensaje original-----
De: Ricardo Martinez [mailto:rmartinez@redvoiss.net]
Enviado el: MiƩrcoles, 12 de Enero de 2005 18:16
Para: 'serusers(a)lists.iptel.org'
Asunto: [Serusers] AVPOPS Module Usage Help.
Hello.
I was wondering if anyone could help me to understand how can i use
avpops module to make dynamic rounting. First. I was looking the
examples
in the webpage and i saw the tables have just one "ATTRIBUTE" column and
one
"VALUE" column, suppose that i created a table like this.
+------+----------+--------+-----------+---------------+------+-----------
--
---+
| uuid | username | domain | attribute | value | type | modified
|
+------+----------+--------+-----------+---------------+------+-----------
--
---+
| | | domain1| 00562 | 192.168.1.254 | 0
|20050111152728 |
+------+----------+--------+-----------+---------------+------+-----------
--
---+
| | | domain1| 00511 | 192.168.1.230 | 0
|23123123123213 |
+------+----------+--------+-----------+---------------+------+-----------
--
---+
I was thinking in something like this, but is still a first approach..
if (method="INVITE") {
if (!(avp_db_load("NOTE1") && avp_check("NOTE2"))) {
........... };
};
t_relay( )
NOTE1 : I don't know which (source, name) use here, i was hopping that
someone could give me a clue.
NOTE2: How can i check the attribute "00562" with the R-URI from INVITE?
I really hope that someone could give me a hand here.
Thanks in advance.
Best Regards,
Ricardo Martinez Ogalde.-
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers