[Serusers] AVPOPS syntax help

Iqbal iqbal at gigo.co.uk
Thu Oct 13 03:14:54 CEST 2005


Hi

I think you have the source syntax written below in the avp_db_load
statements

so the source will have $from or $to or $ruri optionally followed by the
words "username" or domain

eg

avp_db_load($from/username) of avp_db_load($to/domain) ---note these are
not completed syntax

OR instead of the sip_uri which is $from,$to,$ruri you can have avp_alias

which is exactly what it says, its an alias,

Str_value this is the number directly related to the predefined alias in
the line above

The name can be a string S:
interger i:

or you can leave out the S: and just use the name

or of course an alias

I know thats probably not clear...in fact I just read it myself, the best
thing with avpops , is to look at the db, and create a few, and then see
how to pop them out and play with 'em

Iqbal


On 10/12/2005, "Lenir" <lenirsantiago at yahoo.com> wrote:

>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
>
>
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>




More information about the sr-users mailing list