Yes, I know :-) We also use avpops for everything, and I still don't quite get the logic behind avpops...
Avpops will not likely disappear in the future; we know people used it for 0.9 (out of lack of something better). And if somebody using it wants to step forward and maintain it, I don't see why not.

Selects is not really that hard to understand, it is just a notation where a SIP message is seen as C/C++ struct called @ and where each header is the key. In addition, there are selects that can give you access to stuff not found in the SIP message, but that you cannot change.
What is missing is a good reference so you can quickly look up the select you need. As you may have seen, there is a project ongoing that will create a searchable documentation tool...
g-)

sip wrote:
You know, Greger... it's statements like that that absolutely terrify me away from trying to migrate our production setup to the new SER. :)

We use avpops for just about EVERYthing. :)  And I still don't understand the selects, though I've looked at them.

Daunting, I tell you.

N.

On Thu, 12 Apr 2007 21:09:59 +0200, Greger V. Teigre wrote

> Note that avpops is deprecated in upcoming SER 2.0  (still present, but not maintained). Selects, avps and a couple of more powerful modules take over.
> See docs:
> http://www.iptel.org/ser/doc/modules/avpops
> You need an attribute column defined (in your dbscheme), which should be identified in the second param to avp_db_delete.
> g-)
>
> chungyu wrote:

> Dear all:
>  avpops module' exported function avp_db_delete() can do delete one record?

>  
> example:
>            I use "test" as default table that has two fields.

>  
> username |  number
> -------------------
> bob      |  1
> alice    |  1
> bob      |  2

>  
> my configuration:
> modparam("avpops", "avp_url", "mysql://ser:heslo@localhost/ser")
> modparam("avpops", "avp_table", "test")
> modparam("avpops", "username_column", "username")
> modparam("avpops", "avp_aliases", "num=i:55")
> modparam("avpops", "db_scheme", "number_scheme:table=test;value_col=number;value_type=string")

>  
> if (method=="INVITE"){
>    avp_db_load("$from/username", "$num/$number_scheme");   //load from table "test" ,number column as string value into AVP name '$num'
>    avp_db_delete("$from/username", "s:test")      //delete all bob' record
> };

>  
> if bob calling then bob'record has deleted
>  
> username  |  number
> --------------------
> alice     |  1

>  
> But i want delete a record.
> ex: delete number value is 1 for bob

>  
> username  |  number
> --------------------
> alice     |   1
> ---------------------
> bob       |   2

>  
> avp_db_delete() can do delete one record?
>  
> Another question is avp_db_store() can do insert new data in table?
>  
> ex:  insert into test (username,number) values ("mary","3")
>  
> username  |  number
> -------------------
> alice     |    1
> -------------------
> bob       |    2
> -------------------
> mary      |    3

>  
> avp_db_store() can do it?
>  
> sorry,I still can't understand what it mean about avp_db_store() and avp_db_delete().
> Can tell me?
> Thanks a lot in advance

>  
> Chungyu
>  
>

_______________________________________________ Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers