Hi all,
i have a problem when using AVPs which are loaded on client registration by the "load_credentials".
in the "subscriber" table i have "rpid" column (value 12345), "email address" (bob@example.com) and "acl" (value 3). when client registers, these three AVPs are loaded as you can see in debug. But when i want to use these AVPs it seems that they are empty.
i don't understand if they are ready for use or do i need to load them and how? i'm not doing any actions on AVPs so i could by mistake delete or replace the original ones...
version of kamailio is 1.5.1
Thanks
Dubravko
modparam("auth_db", "load_credentials", "$avp(i:66)=rpid;email_address;$avp(i:67)=acl")
DBG:db_mysql:db_mysql_get_columns: allocate 16 bytes for RES_NAMES[0] at 0x783400 DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x783400)[0]=[password] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type DBG:db_mysql:db_mysql_get_columns: allocate 16 bytes for RES_NAMES[1] at 0x783420 DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x783420)[1]=[acl] DBG:db_mysql:db_mysql_get_columns: use DB_INT result type DBG:db_mysql:db_mysql_get_columns: allocate 16 bytes for RES_NAMES[2] at 0x783440 DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x783440)[2]=[email_address] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type DBG:db_mysql:db_mysql_get_columns: allocate 16 bytes for RES_NAMES[3] at 0x783460 DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x783460)[3]=[rpid] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type DBG:core:db_allocate_rows: allocate 16 bytes for rows at 0x783480 DBG:core:db_allocate_row: allocate 128 bytes for row values at 0x7834a0 DBG:core:db_str2val: converting STRING [1234] DBG:core:db_str2val: converting INT [3] DBG:core:db_str2val: converting STRING [bob@example.com] DBG:core:db_str2val: converting STRING [12345] DBG:auth_db:get_ha1: HA1 string calculated: 649766733fe475191f6c32d338aae51d DBG:auth:check_response: our result = 'f929dd9729d3c9447c4a4d632a762c85' DBG:auth:check_response: authorization is OK DBG:auth:post_auth: nonce index= 0 DBG:auth_db:generate_avps: set int AVP ""/67 = 3 DBG:auth_db:generate_avps: set string AVP "email_address"/0 = "bob@example.com" DBG:auth_db:generate_avps: set string AVP ""/66 = "12345" DBG:core:db_free_columns: freeing 4 columns
#################
if (is_method("INVITE")) { xlog("L_INFO", "RPID AVP VALUE $avp(i:66)\n"); xlog("L_INFO", "EMAIL AVP VALUE $avp(s:email_address)\n"); xlog("L_INFO", "ACL AVP VALUE $avp(i:67)\n"); }
./kamailio[21687]: PRID AVP VALUE <null> ./kamailio[21687]: EMAIL AVP VALUE <null> ./kamailio[21687]: ACL AVP VALUE <null>
On 02/04/2010 11:22 AM, Dubravko Caric wrote:
Hi all,
i have a problem when using AVPs which are loaded on client registration by the "load_credentials".
in the "subscriber" table i have "rpid" column (value 12345), "email address" (bob@example.com) and "acl" (value 3). when client registers, these three AVPs are loaded as you can see in debug. But when i want to use these AVPs it seems that they are empty.
i don't understand if they are ready for use or do i need to load them and how? i'm not doing any actions on AVPs so i could by mistake delete or replace the original ones...
version of kamailio is 1.5.1
You're not trying to use them after calling consume_credentials(), or before calling www_authorize(), are you?
Am 04.02.2010 17:24, schrieb Alex Balashov:
On 02/04/2010 11:22 AM, Dubravko Caric wrote:
Hi all,
i have a problem when using AVPs which are loaded on client registration by the "load_credentials".
in the "subscriber" table i have "rpid" column (value 12345), "email address" (bob@example.com) and "acl" (value 3). when client registers, these three AVPs are loaded as you can see in debug. But when i want to use these AVPs it seems that they are empty.
i don't understand if they are ready for use or do i need to load them and how? i'm not doing any actions on AVPs so i could by mistake delete or replace the original ones...
version of kamailio is 1.5.1
You're not trying to use them after calling consume_credentials(), or before calling www_authorize(), are you?
Or in other words: make sure you call one of the [www|proxy]_authorize functions before accessing the AVPs.
klaus
Thanks a lot guys,
this was my problem:
if (is_method("REGISTER")) { ...
} else {
- if (from_uri==myself) + if (is_uri_host_local()) { if (!proxy_authorize("", "subscriber")) { proxy_challenge("", "0"); exit; }
stupid mistake and i didn't quite understand how load_credentials suppose to work. now i think i do understand ;)
Thanks
Dubravko
----- Original Message ---- From: Klaus Darilion klaus.mailinglists@pernau.at To: Alex Balashov abalashov@evaristesys.com Cc: users@lists.kamailio.org Sent: Thu, February 4, 2010 5:55:00 PM Subject: Re: [Kamailio-Users] load_credentials problem
Am 04.02.2010 17:24, schrieb Alex Balashov:
On 02/04/2010 11:22 AM, Dubravko Caric wrote:
Hi all,
i have a problem when using AVPs which are loaded on client registration by the "load_credentials".
in the "subscriber" table i have "rpid" column (value 12345), "email address" (bob@example.com) and "acl" (value 3). when client registers, these three AVPs are loaded as you can see in debug. But when i want to use these AVPs it seems that they are empty.
i don't understand if they are ready for use or do i need to load them and how? i'm not doing any actions on AVPs so i could by mistake delete or replace the original ones...
version of kamailio is 1.5.1
You're not trying to use them after calling consume_credentials(), or before calling www_authorize(), are you?
Or in other words: make sure you call one of the [www|proxy]_authorize functions before accessing the AVPs.
klaus
_______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On 2/4/10 6:09 PM, Dubravko Caric wrote:
Thanks a lot guys,
this was my problem:
if (is_method("REGISTER")) { ...
} else {
- if (from_uri==myself)
- if (is_uri_host_local())
are you sure you do it right now? You test if the destination domain is local and authenticate the user. In some cases, if you allow calls from people registered to other servers (e.g., fwd.com) to your users, then you try to authenticate them.
If you have multi-domains, is_from_local() can be used to test if caller is using a local domain in URI.
Cheers, Daniel
{ if (!proxy_authorize("", "subscriber")) { proxy_challenge("", "0"); exit; }
stupid mistake and i didn't quite understand how load_credentials suppose to work. now i think i do understand ;)
Thanks
Dubravko
----- Original Message ---- From: Klaus Darilionklaus.mailinglists@pernau.at To: Alex Balashovabalashov@evaristesys.com Cc: users@lists.kamailio.org Sent: Thu, February 4, 2010 5:55:00 PM Subject: Re: [Kamailio-Users] load_credentials problem
Am 04.02.2010 17:24, schrieb Alex Balashov:
On 02/04/2010 11:22 AM, Dubravko Caric wrote:
Hi all,
i have a problem when using AVPs which are loaded on client registration by the "load_credentials".
in the "subscriber" table i have "rpid" column (value 12345), "email address" (bob@example.com) and "acl" (value 3). when client registers, these three AVPs are loaded as you can see in debug. But when i want to use these AVPs it seems that they are empty.
i don't understand if they are ready for use or do i need to load them and how? i'm not doing any actions on AVPs so i could by mistake delete or replace the original ones...
version of kamailio is 1.5.1
You're not trying to use them after calling consume_credentials(), or before calling www_authorize(), are you?
Or in other words: make sure you call one of the [www|proxy]_authorize functions before accessing the AVPs.
klaus
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hi Daniel,
----- Original Message ---- From: Daniel-Constantin Mierla miconda@gmail.com To: Dubravko Caric dubravko_caric@yahoo.com Cc: Klaus Darilion klaus.mailinglists@pernau.at; Alex Balashov abalashov@evaristesys.com; users@lists.kamailio.org Sent: Thu, February 4, 2010 6:48:11 PM Subject: Re: [Kamailio-Users] load_credentials problem
On 2/4/10 6:09 PM, Dubravko Caric wrote: Thanks a lot guys,
this was my problem:
if (is_method("REGISTER")) { ...
} else {
- if (from_uri==myself)
- if (is_uri_host_local())
are you sure you do it right now? You test if the destination domain is local and authenticate the user. In some cases, if you allow calls from people registered to other servers (e.g., fwd.com) to your users, then you try to authenticate them.
If you have multi-domains, is_from_local() can be used to test if caller is using a local domain in URI.
yes, I understand that, but as this configuration was just a quick testing configuration made from default cfg and I was using multi-domain setup I actually never get to proxy_authorize for other methods to access the AVPs. i didn't use ngrep to actually see what was happening, my mistake and i apologize to all of you that read and replied to this email
Thanks
Dubravko