SIP/2.0 401 Unauthorized

I’m using Lylix (VPS) with Trixbox 2.8 and an Aastra 55i. I can receive incoming calls but I can’t do any outgoing calls. However, I can do outgoing calls with a 3CX softphone (so trunks should be configured correctly). I’ve attached the asterisk logs. They display a “SIP/2.0 401 Unauthorized” error when I try to make an outgoing call. Any idea how to fix?

Log file available here: gespaq.com/full.gz

Thanks.

sip.conf file:

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by trixbox. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications. ;
;--------------------------------------------------------------------------------;
;

[2001]
deny=0.0.0.0/0.0.0.0
type=friend
secret=
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=2001@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/2001
context=from-internal
canreinvite=no
callgroup=
callerid=device <2001>
accountcode=
call-limit=50

[2002]
deny=0.0.0.0/0.0.0.0
type=friend
secret=
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=2002@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/2002
context=from-internal
canreinvite=no
callgroup=
callerid=device <2002>
accountcode=
call-limit=50

[2003]
deny=0.0.0.0/0.0.0.0
type=friend
secret=
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=2003@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/2003
context=from-internal
canreinvite=no
callgroup=
callerid=device <2003>
accountcode=
call-limit=50

[2101]
deny=0.0.0.0/0.0.0.0
type=friend
secret=
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=2101@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/2101
context=from-internal
canreinvite=no
callgroup=
callerid=device <2101>
accountcode=
call-limit=50

[2102]
deny=0.0.0.0/0.0.0.0
type=friend
secret=
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=2102@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/2102
context=from-internal
canreinvite=no
callgroup=
callerid=device <2102>
accountcode=
call-limit=50

[vitel-inbound]
disallow=all
type=friend
username=gespaq
secret=
insecure=port,invite
context=from-trunk
canreinvite=no
host=inbound23.vitelity.net
allow=ulaw

[vitel-outbound]
disallow=all
type=friend
username=gespaq
secret=
fromuser=gespaq
trustrpid=yes
sendrpid=yes
context=from-trunk
canreinvite=no
host=outbound.vitelity.net
allow=ulaw

Configure the phone to use the user ID and password that you have in sip.conf. Asterisk will respond with 401 if they are not provided, and will repeat it until the correct one is provided. Having one such response is normal, the phone should silently add the authentication data and resubmit the request.