I try to make outbound calls with Asterisk 11.22 on Centos 6 through a SIP provider but I always receive this type of error :
chan_sip.c: Failed to authenticate on INVITE to
SIP DEBUG
Reliably Transmitting (no NAT) to 87.238.30.10:5060:
INVITE sip:6554476278@myproviderdomain SIP/2.0
Via: SIP/2.0/UDP 80.235.141.12:5060;branch=z9hG4bK61bbb255
Max-Forwards: 70
From: sip:08119681236@80.235.141.12;tag=as19d7b836
To: sip:6554476278@myproviderdomain
Contact: sip:08119681236@80.235.141.12:5060
Call-ID: 04d165525824113456692b612e6c73b1@80.235.141.12:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.22.0
Date: Fri, 08 Jul 2016 19:44:24 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 281
v=0
o=root 45837109 45837109 IN IP4 80.235.141.12
s=Asterisk PBX 11.22.0
c=IN IP4 80.235.141.12
t=0 0
m=audio 12568 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<— SIP read from UDP:87.238.30.10:5060 —>
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 80.235.141.12:5060;branch=z9hG4bK61bbb255;rport=58313
From: sip:08119681236@80.235.141.12;tag=as19d7b836
To: sip:6554476278@myproviderdomain;tag=91c09b70a4e647f95f6f7f5cc9dec973.ec7d
Call-ID: 04d165525824113456692b612e6c73b1@80.235.141.12:5060
CSeq: 102 INVITE
Proxy-Authenticate: Digest realm=“myproviderdomain”, nonce=“577fe69700012cb5469269f67c44d2b8dbed061adfcaab00”
Content-Length: 0
<------------->
— (8 headers 0 lines) —
Transmitting (no NAT) to 87.238.30.10:5060:
ACK sip:6554476278@myproviderdomain SIP/2.0
Via: SIP/2.0/UDP 80.235.141.12:5060;branch=z9hG4bK61bbb255
Max-Forwards: 70
From: sip:08119681236@80.235.141.12;tag=as19d7b836
To: sip:6554476278@myproviderdomain;tag=91c09b70a4e647f95f6f7f5cc9dec973.ec7d
Contact: sip:08119681236@80.235.141.12:5060
Call-ID: 04d165525824113456692b612e6c73b1@80.235.141.12:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 11.22.0
Content-Length: 0
My SIP configuration is this:
[CheapVoIP]
type=peer
defaultuser=6554476278@myproviderdomain
remotesecret=**********
secret=**********
fromuser=6554476278
fromdomain=myproviderdomain
host=myproviderdomain
;outboundproxy=myproviderdomain
insecure = invite,port
;nat=yes
;realm=myproviderdomain
context=outgoing
qualify=yes
regseconds=60
disallow=all
allow=alaw
allow=ulaw
allow=g729