Hello,
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...
Many thanks!
Sebastian
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
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@inode.info To: "Sebastian Kühner" skuehner@veraza.com Cc: serusers@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
Sebastian Kühner wrote:
Thanks! The problem is that there are examples for every command. But how do I connect them? I've problems to understand them...
I'm not familiar with avpops, but chapter 8 of the link I sent shows some real-world examples which use avp_db_load, maybe these help...
Andy
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@inode.info To: "Sebastian Kühner" skuehner@veraza.com Cc: serusers@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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
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@teigre.com To: "Sebastian Kühner" skuehner@veraza.com; serusers@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@inode.info To: "Sebastian Kühner" skuehner@veraza.com Cc: serusers@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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hello,
Now I've got the caller_id variable in the memory with avp_db_load (I tried it with avp_check).
I want to replace the number of the from header with the value that is saved in $avp(s:caller_id)... is there any way to do that. I don't find a UAC module in the internet that supports pseudo-variables. That would be the best solution...
Thanks!
Sebastian
----- Original Message ----- From: "Andreas Granig" andreas.granig@inode.info To: "Sebastian Kühner" skuehner@veraza.com Cc: serusers@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
Hello,
On 09/14/05 00:10, Sebastian Kühner wrote:
Hello,
Now I've got the caller_id variable in the memory with avp_db_load (I tried it with avp_check).
I want to replace the number of the from header with the value that is saved in $avp(s:caller_id)... is there any way to do that. I don't find a UAC module in the internet that supports pseudo-variables. That would be the best solution...
pseudo-variables in core are specific to openser. the uac module from openser has support for pseudo-variables in parameters (see http://openser.org/docs/modules/0.10.x/uac.html#AEN99), but it cannot be ported to ser since the core has changed radically in this respect.
Daniel
Thanks!
Sebastian
----- Original Message ----- From: "Andreas Granig" andreas.granig@inode.info To: "Sebastian Kühner" skuehner@veraza.com Cc: serusers@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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi!
Does anyone know another method (without pseudo variables) to change the from header with an avpops-variable?
Thanks!
Sebastian
----- Original Message ----- From: "Daniel-Constantin Mierla" daniel@voice-system.ro To: "Sebastian Kühner" skuehner@veraza.com Cc: serusers@lists.iptel.org Sent: Wednesday, September 14, 2005 6:05 AM Subject: Re: [Serusers] avpops
Hello,
On 09/14/05 00:10, Sebastian Kühner wrote:
Hello,
Now I've got the caller_id variable in the memory with avp_db_load (I
tried
it with avp_check).
I want to replace the number of the from header with the value that is
saved
in $avp(s:caller_id)... is there any way to do that. I don't find a UAC module in the internet that supports pseudo-variables. That would be the best solution...
pseudo-variables in core are specific to openser. the uac module from openser has support for pseudo-variables in parameters (see http://openser.org/docs/modules/0.10.x/uac.html#AEN99), but it cannot be ported to ser since the core has changed radically in this respect.
Daniel
Thanks!
Sebastian
----- Original Message ----- From: "Andreas Granig" andreas.granig@inode.info To: "Sebastian Kühner" skuehner@veraza.com Cc: serusers@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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers