Failed to authenticate SIP peer

0

I am trying to connect an SIP peer using Zoiper to my asterisk server. The peer is a soft-phone on my server. I have the following config for the peer:

[201]
disallow=all
allow=alaw
host=192.168.1.180
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.0.0
secret=apassword
type=peer
context=incoming-internal
canreinvite=no
qualify=yes
nat=no
srtpcapable=no
encryption=no

When I do not use host=dynamic the peer is reachable. However, when I go to make a call I get:

Zoiper gives a SIP 403 -Forbidden error, bearer capability not authorized and Asterisk gives:

NOTICE[17637]: chan_sip.c:23540 handle_request_invite: Failed to authenticate device <sip:201@192.168.1.180;transport=UDP>;tag=81635b62

When I put the configuration to host=dynamic the peer connects and then becomes unreachable. Any ideas how to fix this?

dylan7

Posted 2015-06-15T01:57:04.903

Reputation: 221

Answers

0

change type=peer to type=friend make a sip reload and try again.

SIP clients must use type=friend to let them be able to authenticate, receive and and send calls.

jcbermu

Posted 2015-06-15T01:57:04.903

Reputation: 15 868

I changed it. Now I'm getting Registration from <sip...> failed for 192.168.1.180:33820- Peer is not suppose to register This happens when I try to create a Zoiper account for the peer. When I do dynamic, I get the Host is my router's public ip and that it is unreachable. – dylan7 – 2015-06-15T17:13:44.003

Are Asterisk and Zoiper client on the same LAN or is there a NAT between them? – jcbermu – 2015-06-16T07:35:19.593

They are on the same machine. So no NAT. – dylan7 – 2015-06-16T16:20:07.597

0

I had same issue. I did following changes: nat=yes and made sure the Zoiper used udp and STUN

Jens

Posted 2015-06-15T01:57:04.903

Reputation: 1