[asterisk-users] FW: clients unable to auth
Joshua Colp
jcolp at digium.com
Wed Apr 16 06:06:04 CDT 2014
Peter Reid wrote:
> Hi Guys,
Kia ora,
> Just new to Asterisk and am completely stumped. I have created two
> accounts as instructed. Please see below for the config of the user
> accounts.
>
> [Peter]
>
> type=friend
>
> host=IP address
>
> disallow=all
>
> allow=ulaw
>
> allow=alaw
>
> callerid=Peter <6004>
>
> secret=XXXXXXX
>
> context=default
>
> port=9060
>
> nat=force_rport,comedia
>
> deny=0.0.0.0
>
> permit=IP/255.255.0.0,IP/255.255.0.0,PrvIP/255.255.0.0, PrvIP/255.255.0.0
>
> When attempting to register there appears to be something not allowing
> the authentication of the client against Asterisk. I am getting a 401
> Unauthorized on first attempt and then 403 (Bad auth) on second. Is
> there any ACL config that I have missed which is not allow a good
> authentication. I have enabled nat and allowed all public and private
> IP’s of the two clients with masks.
>
> The CLI console returns the following:
>
> ignore - Apr 16 11:09:57] NOTICE[24359]: chan_sip.c:27724
> handle_request_register: Registration from
> '"6004"<sip:6004 at xx.xx.xx.xx:9060>' failed for 'IP:57836' - No matching
> peer found
>
> [Apr 16 11:09:57] NOTICE[24359]: chan_sip.c:27724
> handle_request_register: Registration from '"6004"<sip:6004 at IP:9060>'
> failed for 'IP:57836' - No matching peer found
Your client is configured to use "6004" as the username while your above
configuration uses "Peter". Since the usernames differ, it fails.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-users
mailing list