Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know?
Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
Brett, I have never used avpairs with sql (I use radius), but I believe the avp_db_load statement should be removed alltogether. The avps_column_str instructs the auth module to load the value in the callscope column ON SUCCESSFUL AUTHENTICATION, i.e. when the user is authenticated, the avp is already loaded and ready to be used. g-)
----- Original Message ----- From: "brett-ser-list" brett-ser-list@worldcall.net To: serusers@lists.iptel.org Sent: Friday, November 04, 2005 2:30 AM Subject: [Serusers] avp_db_load fails with avp as source
Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know?
Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Greger,
how rare it occurs, I laregely disagree with you :-)
In interest of uniformity, I prefer use of usr_prefs table. It works for both callers and calles and introducing a new column does not take a change to the scheme.
-jiri
At 08:10 AM 11/4/2005, Greger V. Teigre wrote:
Brett, I have never used avpairs with sql (I use radius), but I believe the avp_db_load statement should be removed alltogether. The avps_column_str instructs the auth module to load the value in the callscope column ON SUCCESSFUL AUTHENTICATION, i.e. when the user is authenticated, the avp is already loaded and ready to be used. g-)
----- Original Message ----- From: "brett-ser-list" brett-ser-list@worldcall.net To: serusers@lists.iptel.org Sent: Friday, November 04, 2005 2:30 AM Subject: [Serusers] avp_db_load fails with avp as source
Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know?
Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
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
-- Jiri Kuthan http://iptel.org/~jiri/
Hi Jiri! You mean on using radius? ;-) It just so happens that we have a subscriber system already exposed through radius where complex evaluation of rights and configurations are done based on many parameters. Sending back avpairs was already implemented when ser came into the picture. The subscriber database supports many different services, where SIP-based is just one. I agree with you that using usr_prefs is maybe a better option (my quoted statement below was just related to Brett's config). g-)
----- Original Message ----- From: "Jiri Kuthan" jiri@iptel.org To: "Greger V. Teigre" greger@teigre.com; brett-ser-list@worldcall.net; serusers@lists.iptel.org Sent: Friday, November 04, 2005 12:24 PM Subject: Re: [Serusers] avp_db_load fails with avp as source
Greger,
how rare it occurs, I laregely disagree with you :-)
In interest of uniformity, I prefer use of usr_prefs table. It works for both callers and calles and introducing a new column does not take a change to the scheme.
-jiri
At 08:10 AM 11/4/2005, Greger V. Teigre wrote:
Brett, I have never used avpairs with sql (I use radius), but I believe the avp_db_load statement should be removed alltogether. The avps_column_str instructs the auth module to load the value in the callscope column ON SUCCESSFUL AUTHENTICATION, i.e. when the user is authenticated, the avp is already loaded and ready to be used. g-)
----- Original Message ----- From: "brett-ser-list" brett-ser-list@worldcall.net To: serusers@lists.iptel.org Sent: Friday, November 04, 2005 2:30 AM Subject: [Serusers] avp_db_load fails with avp as source
Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know?
Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
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
-- Jiri Kuthan http://iptel.org/~jiri/
On 11/04/05 09:10, Greger V. Teigre wrote:
Brett, I have never used avpairs with sql (I use radius), but I believe the avp_db_load statement should be removed alltogether. The avps_column_str instructs the auth module to load the value in the callscope column ON SUCCESSFUL AUTHENTICATION, i.e. when the user is authenticated, the avp is already loaded and ready to be used.
There are other common cases when you need to load an avp without authentication, for example a set of gateways to deliver the requests to - these are not user specific. Also, avp_db_load() offers a more powerful interface to database, allowing to load data from any table, regardless the table does not have the structure of usr_preferences table.
Daniel
g-)
----- Original Message ----- From: "brett-ser-list" brett-ser-list@worldcall.net To: serusers@lists.iptel.org Sent: Friday, November 04, 2005 2:30 AM Subject: [Serusers] avp_db_load fails with avp as source
Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know?
Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
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
On Fri, 04 Nov 2005 13:43:46 +0200, Daniel-Constantin Mierla wrote
On 11/04/05 09:10, Greger V. Teigre wrote:
Brett, I have never used avpairs with sql (I use radius), but I believe the avp_db_load statement should be removed alltogether. The avps_column_str instructs the auth module to load the value in the callscope column ON SUCCESSFUL AUTHENTICATION, i.e. when the user is authenticated, the avp is already loaded and ready to be used.
There are other common cases when you need to load an avp without authentication, for example a set of gateways to deliver the requests to - these are not user specific. Also, avp_db_load() offers a more powerful interface to database, allowing to load data from any table, regardless the table does not have the structure of usr_preferences table.
But note that, since not all the AVP commands work with db schemes (store, delete), it's either work with the usr_preferences table, ONE other table (set with columns via modparams), or work with more limited functionality.
Hi guys,
My setup authenticates users from radius. We set the RPID in the radius users file, I want to use the RPID to replace the address in the location database so I can always make sure my users have the right endpoint address (the address being the sip:<address>@host part, refered to as AOR in the location database I think.) FYI I'm not using a SQL database but just the memory table.
Thanks, Patrick
Hi Patrick, That's a bit backwards ;-) Your users will register using their username and domain in the form of sip:username@domain. That is the AOR that should be stored in the location db, because that's the AOR, not something else... However, you can make sure that your users can be reached through other addresses as well by registering a static mapping to the AOR using the alias table. RPID is not a SIP property, but rather a header field used to signal information about the caller to a PSTN gateway. Thus, you need to decide how to map the RPID to a SIP URI (as required in the alias table). You could use a tel: uri or you could create some sort of scheme sip:rpid@yourdomain.com (using plus and dashes or not). Most people would probably recommend you to use +countrycodeetc@ with no dashes or parenthises. You will have to manipulate the ruris on received calls from a gateway unless the ruris are already in that format. g-) Note that tel: uris have slightly different matching rules compared to sip uris.
----- Original Message ----- From: "Patrick Jordan-Smith" pjs@quicksilver.co.nz To: serusers@lists.iptel.org Sent: Sunday, November 06, 2005 9:18 PM Subject: [Serusers] Using RPID in location database
Hi guys,
My setup authenticates users from radius. We set the RPID in the radius users file, I want to use the RPID to replace the address in the location database so I can always make sure my users have the right endpoint address (the address being the sip:<address>@host part, refered to as AOR in the location database I think.) FYI I'm not using a SQL database but just the memory table.
Thanks, Patrick
-- Patrick Jordan-Smith Network Operations Mercury Telecommunications Ltd
voice +64-9-916-0300 paper +64-9-916-0301
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Thanks for your explination Greger :-)
I guess what I'm asking is that I want a way to enforce that the AOR is what it should be - the PBX contacts SER to get at the end user phones, but the end users are allowed to change the configuration on them. So we need some way to make sure someone doesn't register with someone elses address, since the address and the username seem to be seperate things.
Thanks,
On Mon, 2005-11-07 at 08:23 +0100, Greger V. Teigre wrote:
Hi Patrick, That's a bit backwards ;-) Your users will register using their username and domain in the form of sip:username@domain. That is the AOR that should be stored in the location db, because that's the AOR, not something else... However, you can make sure that your users can be reached through other addresses as well by registering a static mapping to the AOR using the alias table. RPID is not a SIP property, but rather a header field used to signal information about the caller to a PSTN gateway. Thus, you need to decide how to map the RPID to a SIP URI (as required in the alias table). You could use a tel: uri or you could create some sort of scheme sip:rpid@yourdomain.com (using plus and dashes or not). Most people would probably recommend you to use +countrycodeetc@ with no dashes or parenthises. You will have to manipulate the ruris on received calls from a gateway unless the ruris are already in that format. g-) Note that tel: uris have slightly different matching rules compared to sip uris.
----- Original Message ----- From: "Patrick Jordan-Smith" pjs@quicksilver.co.nz To: serusers@lists.iptel.org Sent: Sunday, November 06, 2005 9:18 PM Subject: [Serusers] Using RPID in location database
Hi guys,
My setup authenticates users from radius. We set the RPID in the radius users file, I want to use the RPID to replace the address in the location database so I can always make sure my users have the right endpoint address (the address being the sip:<address>@host part, refered to as AOR in the location database I think.) FYI I'm not using a SQL database but just the memory table.
Thanks, Patrick
-- Patrick Jordan-Smith Network Operations Mercury Telecommunications Ltd
voice +64-9-916-0300 paper +64-9-916-0301
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
How are you going to find out if somebody changed the config to another user? And how are you going to map that new user to the allowed user name? I assume you authenticate? Use check_to and check_from (search on the list). g-) ----- Original Message ----- From: "Patrick Jordan-Smith" pjs@quicksilver.co.nz To: "Greger V. Teigre" greger@teigre.com Cc: serusers@lists.iptel.org Sent: Monday, November 07, 2005 10:12 PM Subject: Re: [Serusers] Using RPID in location database
Thanks for your explination Greger :-)
I guess what I'm asking is that I want a way to enforce that the AOR is what it should be - the PBX contacts SER to get at the end user phones, but the end users are allowed to change the configuration on them. So we need some way to make sure someone doesn't register with someone elses address, since the address and the username seem to be seperate things.
Thanks,
On Mon, 2005-11-07 at 08:23 +0100, Greger V. Teigre wrote:
Hi Patrick, That's a bit backwards ;-) Your users will register using their username and domain in the form of sip:username@domain. That is the AOR that should be stored in the location db, because that's the AOR, not something else... However, you can make sure that your users can be reached through other addresses as well by registering a static mapping to the AOR using the alias table. RPID is not a SIP property, but rather a header field used to signal information about the caller to a PSTN gateway. Thus, you need to decide how to map the RPID to a SIP URI (as required in the alias table). You could use a tel: uri or you could create some sort of scheme sip:rpid@yourdomain.com (using plus and dashes or not). Most people would probably recommend you to use +countrycodeetc@ with no dashes or parenthises. You will have to manipulate the ruris on received calls from a gateway unless the ruris are already in that format. g-) Note that tel: uris have slightly different matching rules compared to sip uris.
----- Original Message ----- From: "Patrick Jordan-Smith" pjs@quicksilver.co.nz To: serusers@lists.iptel.org Sent: Sunday, November 06, 2005 9:18 PM Subject: [Serusers] Using RPID in location database
Hi guys,
My setup authenticates users from radius. We set the RPID in the radius users file, I want to use the RPID to replace the address in the location database so I can always make sure my users have the right endpoint address (the address being the sip:<address>@host part, refered to as AOR in the location database I think.) FYI I'm not using a SQL database but just the memory table.
Thanks, Patrick
-- Patrick Jordan-Smith Network Operations Mercury Telecommunications Ltd
voice +64-9-916-0300 paper +64-9-916-0301
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
What I can see in the log is that there is no avp with id integer 500 (defined by the avp alias callscope), which you use in avp_db_load(). There is an avp which has the name 'callscope'. So, there must be a value for the avp i:500.
Daniel
On 11/04/05 03:30, brett-ser-list wrote:
Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know?
Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Daniel-Constantin Mierla wrote:
What I can see in the log is that there is no avp with id integer 500 (defined by the avp alias callscope), which you use in avp_db_load(). There is an avp which has the name 'callscope'. So, there must be a value for the avp i:500.
Daniel
On 11/04/05 03:30, brett-ser-list wrote:
Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know? Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Hi Daniel, Your comments seem circular. You say: there is no avp with id integer 500 (defined by the avp alias callscope), Then you say: So, there must be a value for the avp i:500
And the avp_print even shows the alias "callscope" is actually populated. Am I missing something?
BTW, I know there are plenty of times when AVPs are useful without user auth.. but this seems like an important requirement for providing authenticated services (if you authenticate, you can do this). -Brett
On 11/04/05 17:33, Brett Nemeroff wrote:
Hi Daniel, Your comments seem circular. You say: there is no avp with id integer 500 (defined by the avp alias callscope), Then you say: So, there must be a value for the avp i:500
Maybe the phrases were confusing. There must be an avp which has the name (id) 500 (integer 500), and this avp must have a value. There is no such.
And the avp_print even shows the alias "callscope" is actually populated. Am I missing something?
The avp_print() shows that there is an avp with the name (id) "callscope". See: http://www.voice-system.ro/docs/avpops/0.9.0/
There is a difference between the name (id) and the alias of an avp.
BTW, I know there are plenty of times when AVPs are useful without user auth.. but this seems like an important requirement for providing authenticated services (if you authenticate, you can do this).
I wanted to point out that loading only upon authentication is not enough.
Daniel
-Brett
On 11/04/05 03:30, brett-ser-list wrote:
[...]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Forgot to comment on this. The format you use above in the first parameter is valid only for openser, you cannot use it with ser. For ser, the avpops turorial is: http://www.voice-system.ro/docs/avpops/0.9.0/
Daniel
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers