[Serusers] AVPOPS Module Usage Help.

Ricardo Martinez rmartinez at redvoiss.net
Thu Jan 13 16:53:31 CET 2005


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 at redvoiss.net]
Enviado el: Miércoles, 12 de Enero de 2005 18:16
Para: 'serusers at 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 at lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list