[Serusers] avpops

Sebastian Kühner skuehner at veraza.com
Tue Sep 13 22:18:43 CEST 2005


OK,

If someone is interested... here my solution. Thanks for your help!!!

# ------------- avp parameters
modparam("avpops", "avp_url", "postgres://admin:xxxxxxxx@localhost/AAA")
modparam("avpops", "avp_table", "subscriber")
modparam("avpops","db_scheme",
"scheme1:uuid_col=username;value_col=caller_id;value_type=string;table=subsc
riber")

[...]

avp_db_load("$from/username", "s:caller_id/$scheme1");
uac_replace_from("", "$avp(s:caller_id)");

I'm downloading ser-0.9.4 at this moment... hoping that the
uac_replace_module supports pseudo-variables. If not, you can imagine my
next question ;-)

Sebastian




----- Original Message ----- 
From: "Greger V. Teigre" <greger at teigre.com>
To: "Sebastian Kühner" <skuehner at veraza.com>; <serusers at lists.iptel.org>
Sent: Tuesday, September 13, 2005 3:38 PM
Subject: Re: [Serusers] avpops


> Sebestian,
> The just recently released issue 5 of the Getting Started doc at onsip.org
> uses avpops to implement call forwarding etc. You can probably get some
help
> there :-)
> g-)
>
> Sebastian Kühner wrote:
> > Hi!
> >
> > Thanks! The problem is that there are examples for every command. But
> > how do I connect them? I've problems to understand them...
> >
> > Well, I guess (please help me with my "idea"):
> > To get a value from the database (Table: subscriber - column:
> > caller_id) for the calling user, I have to make:
> >
> > modparam("avpops", "avp_table", "subscriber")
> > modparam("avpops", "uuid_column", "id")
> > modparam("avpops", "username_column", "username")
> > modparam("avpops", "domain_column", "domain")
> > modparam("avpops", "value_column", "caller_id")
> >
> > avp_db_load("$uuid", "s:$uri");
> >
> > Thanks for your help!
> >
> > Sebastian
> >
> >
> > ----- Original Message -----
> > From: "Andreas Granig" <andreas.granig at inode.info>
> > To: "Sebastian Kühner" <skuehner at veraza.com>
> > Cc: <serusers at lists.iptel.org>
> > Sent: Tuesday, September 13, 2005 10:33 AM
> > Subject: Re: [Serusers] avpops
> >
> >
> >> Sebastian Kühner wrote:
> >>> Can anyone of you give me an example how to get data from a
> >>> database with the avpops-module? I want to get a value from a
> >>> special table and a special column...
> >>>
> >>> I didn't find any examples in the internet and the commands only
> >>> don't help me very much...
> >>
> >> http://www.voice-system.ro/docs/avpops/0.9.0/ has some examples.
> >>
> >> Andy
> >>
> >
> > _______________________________________________
> > Serusers mailing list
> > serusers at lists.iptel.org
> > http://lists.iptel.org/mailman/listinfo/serusers
>
>




More information about the sr-users mailing list