[Serusers] AVPOPS syntax help

Lenir lenirsantiago at yahoo.com
Thu Oct 13 00:23:27 CEST 2005


Hello list,

I'm reading the documentation for AVPOPS, and Im a little confused in this
section:

----------------------------------------------------------------------------
-----
#avp_db_load(source,name) 
#Loads from DB into memory the AVPs corresponding to the given source. 

Meaning of the parameters is as follows:


source - what info is used for identifying the AVPs. Parameter syntax: 


source = (sip_uri)['/'('username'|'domain')]) | (avp_alias) | str_value 

sip_uri = '$from' | '$to' | '$ruri' 


name - which AVPs will be loaded from DB into memory. Parameter syntax is: 


name = avp_spec['/'(table_name|'$'db_scheme)] 

avp_spec = ''|'s:'|'i:'|avp_name|avp_alias 


Example 1-12. avp_db_load usage

...
avp_db_load("$from","i:678");
avp_db_load("$ruri/domain","i:/domain_preferences");
avp_db_load("$uuid","s:404fwd/fwd_table");
avp_db_load("$ruri","i:123/$some_scheme");
...

----------------------------------------------------------------------------
-----

My question are:

Can someone explain the source syntax?
Can someone explain the name syntax?
what are i:, s:, avp_name and avp_alias?

Thanks!

Lenir






More information about the sr-users mailing list