Hi SerUsers! I'm completly crazy tryin' to do the following: I just want to load from DB user alias and rewrite it into "$to $ruri", because these calls shoud go directly to asterisk voicemail and they are numerical not alphanumeric. i tried to do the following:
if(avp_db_load($alias/$username,i:alias") avp_pushto("$ruri/$to","alias") just to load from alias table username into an integer called alias and then pushed to new $ruri.
I'm new in ser and avps module it's really usefull but a little bit "unreadable", plz this should work for tomorrow :$ any help plz!? be as much especific as can, because i don't know if i have done the proper modparams. these are:
modparam("avpops", "avp_url", "mysql://ser:heslo@localhost/ser") modparam("avpops", "avp_table", "usr_preferences") #modparam("avpops", "use_domain", "1") modparam("avpops", "uuid_column", "uuid") modparam("avpops", "username_column", "username") modparam("avpops", "domain_column", "domain") modparam("avpops", "attribute_column", "attribute") modparam("avpops", "value_column", "value") modparam("avpops", "type_column", "type")
THX
On 10/13/05, Iqbal iqbal@gigo.co.uk wrote:
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@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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es