[Kamailio-Users] 401 Unauthorized
Daniel-Constantin Mierla
miconda at gmail.com
Tue Nov 18 12:21:36 CET 2008
Hello,
On 11/10/08 21:39, Robert R wrote:
> Hi,
>
> When client trying to REGISTER, kamailio responses with 401 Unauthorized.
>
> if (is_method("REGISTER"))
> {
> if (!www_authorize("", "subscriber"))
> {
> www_challenge("", "0");
> exit;
> }
>
> if (!save("location"))
> sl_reply_error();
>
> exit;
> }
>
> Here is my debug log:
>
> Nov 10 13:52:46 kamailio: DBG:core:get_hdr_field: cseq <CSeq>: <1>
> <REGISTER>
> Nov 10 13:52:46 kamailio: DBG:tm:t_lookup_request: start searching:
> hash=39046, isACK=0
> Nov 10 13:52:46 kamailio: DBG:tm:matching_3261: RFC3261 transaction
> matching failed
> Nov 10 13:52:46 kamailio: DBG:tm:t_lookup_request: no transaction found
> Nov 10 13:52:46 kamailio: DBG:core:grep_sock_info: checking if
> host==us: 14==14 && [209.16.123.160 <http://209.16.123.160>] ==
> [209.16.123.160 <http://209.16.123.160>]
> Nov 10 13:52:46 kamailio: DBG:auth:pre_auth: credentials with given
> realm not found
> Nov 10 13:52:46 kamailio: DBG:auth:reserve_nonce_index: second= 36,
> sec_monit= -1, index= 0
> Nov 10 13:52:46 kamailio: DBG:auth:build_auth_hf: nonce index= 0
> Nov 10 13:52:46 kamailio: DBG:auth:build_auth_hf: 'WWW-Authenticate:
> Digest realm="xx.xx.xx.xx",
> nonce="4918842a00000000663ef5a903a02d6628e7e8e8b093c44b"^M '
>
> Am I missing something in the config?
config looks fine. Your phone should send another REGISTER, following
the 401, providing the credentials for authentication.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the Users
mailing list