[Serusers] AVPOPS syntax help

Samuel Osorio Calvo samuel.osorio at nl.thalesgroup.com
Wed Oct 26 12:35:09 CEST 2005


I haven't played with AVP much so I might be wrong, but I think you should replace the $ from the username after the alias:

              avp_db_load($alias/$username,i:alias")--->  avp_db_load($alias/username,i:alias")
                                                                                                                   ^
And about the pushto....I have no idea if it accepts two headers, so somebody with more experience will tell you if it is possible to push the alias into the ruri and to in the same avp_pushto. Just a guess, try to do it in two different commands.

Hope it helps,

Samuel.

P.D. Espero q algú et pugui ajudar...sort!!

Unclassified
>>> Pol <kuroki at gmail.com> 10/19/05 09:27PM >>>
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 at 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 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 
> >
> >
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org 
> http://lists.iptel.org/mailman/listinfo/serusers 
>
> _____________________________________________________________________
> Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es 
>

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




More information about the sr-users mailing list