Copyright © 2004 Voice Sistem
Revision History | |
---|---|
Revision $Revision: 1.3 $ | $Date: 2005/08/24 22:26:17 $ |
AVPops (AVP-operations) modules implements a set of script functions which allow access and manipulation of user AVPs (preferences). AVPs are a powerful tool for implementing services/preferences per user/domain. Now they are usable directly from configuration script. Functions for interfacing DB resources (loading/storing/removing), functions for swapping information between AVPs and SIP messages, function for testing/checking the value of an AVP.
An up-to-date tutorial providing more information (detailed explanations and commented examples) can be found on Voice Sistem documentation web page at http://voice-system.ro/docs/avpops.
DB URL for database connection.
This parameter is optional, it's default value being NULL.
DB table to be used.
This parameter is optional, it's default value being NULL.
Contains a multiple definition of aliases for AVP names.
This parameter is optional.
If the domain part of the an URI should be used for identifying an AVP in DB operations.
Default value is 0 (no).
Name of column containing the uid (unique user id).
Default value is "uid".
Name of column containing the username.
Default value is "username".
Name of column containing the domain name.
Default value is "domain".
Name of column containing the attribute name (AVP name).
Default value is "attribute".
Name of column containing the AVP value.
Default value is "value".
Name of column containing the AVP type.
Default value is "type".
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
Stores to DB the AVPs corresponding to the given source.
The meaning and usage of the parameters are identical as for avp_db_load(source,name) function. Please refer to its description.
Deletes from DB the AVPs corresponding to the given source.
The meaning and usage of the parameters are identical as for avp_db_load(source,name) function. Please refer to its description.
The function writes some value (given) or some information from the SIP message into a new AVP.
Meaning of the parameters is as follows:
value - the value to be written into the AVP. Parameter syntax:
value = (variable) | (fix_value) variable = '$src_ip' | '$dst_ip' | '$hdr[name]' | (sip_uri) [ '/' ( 'username' | 'domain' ) ] ) sip_uri = '$from' | '$to' | '$ruri' fix_value = 'i:'integer | 's:'string | string
name - the name of the new written AVP. Parameter syntax is:
name = avp_name | avp_alias
Deletes from memory the AVPs with name or, if empty, all AVPs.
Meaning of the parameters is as follows:
name - which AVPs will be deleted from memory. Parameter syntax is:
name = ('' | 's:' | 'i:' | avp_name | avp_alias ) [ '/' flag ] flag = 'g' | 'G'
Pushes the value of AVP(s) into the SIP message.
Meaning of the parameters is as follows:
destination - as what will be the AVP value pushed into SIP message. Parameter syntax:
destination = ruri_dst | hdr_dst ruri_dst = '$ruri' [ '/' ( 'username' | 'domain' ) ] hdr_dst = '$hdr_name' [ '/' ( 'request' | 'reply' ) ]
name - which AVP(s) should be pushed into the SIP message. Parameter syntax is:
name = ( avp_name | avp_alias ) [ '/' flags ] flags = 'g'
Checks the value of the AVP(s) against an operator and value.
Meaning of the parameters is as follows:
name - which AVP(s) should be checked. Parameter syntax is:
name = ( avp_name | avp_alias )
op_value - define the operator, the value and flags for checking. Parameter syntax is:
op_value = operator '/' value [ '/' flags ] operator = 'eq' | 'lt' | 'gt' | 're' | 'fm' value = variable | fix_value variable = '$from' | '$ruri' | '$from' | '$src_ip' | '$dst_ip' | avp_alias fix_value = 'i:' integer | 's:' string | string flags = 'g' | 'G' | 'i' | 'I'
Copy / move an AVP under a new name.
Meaning of the parameters is as follows:
name1 - which AVP(s) should be copied/moved. Parameter syntax is:
name = ( avp_name | avp_alias )
name2 - the new name of the copied/moved AVP(s). Parameter syntax is:
name = ( avp_name | avp_alias ) [ '/' flags ] flags = 'g' | 'G' | 'd' | 'D'
1. | Where can I find more documentation about this module? |
An up-to-date tutorial providing more information (detailed explanations and commneted examples) can be found on Voice Sistem documentation web page at http://voice-system.ro/docs/avpops. | |
2. | Where can I post a question about this module? |
Sent an email to <support@voice-system.ro> or, if you want to keep the mail private, send it to <ramona@voice-system.ro>. Remember: first at all, check if your question was already answered on one of SER mailing lists: | |
3. | How can I report a bug? |
Accumulate as much as possible information (SER version, ser -V output, your OS (uname -a), SER logs, network dumps, core dump files, configuration file) and send a mail to <support@voice-system.ro> |