SIP Trunk Config+ Failed to authenticate on INVITE

Hello everyone,

i’m trying to use Asterisk to call phone on the normal cabled line using a “VoipCheap” account.

I’ve followed this tutorial to create my sip.conf and extensions.conf:

These are my configuration file:

  • sip.conf:
[general]
context=incoming

register => fabrizio_masvis:aaaaaa@sip.voipcheap.com

[voipcheap]
type=friend
secret=aaaaa
username=fabrizio_masvis
host=sip.voipcheap.com
nat=yes
fromuser=fabrizio_masvis
fromdomain=sip.voipcheap.com
context=incoming
disallow=all
allow=alaw
insecure=invite

[6001]
type=friend
host=dynamic
secret=aaaaa
context=phones
dtmfmode=rfc2833
callerid="primo" <6001>
canreinvite=no

[6002]
type=friend
host=dynamic
secret=aaaaa
context=phones
dtmfmode=rfc2833
callerid="secondo" <6002>
canreinvite=no
  • extension.conf:
[general]
static=yes
writeprotect=no
clearglobalvars=no

[globals]
;variabili globali

[incoming]
exten => s,1,Log(NOTICE, Incoming call from ${CALLERID(all)})
exten => s,n,Dial(SIP/6002)
exten => s,n,Hangup()

[phones]
exten => 6001,1,Dial(SIP/6001)
exten => 6001,n,Hangup()

exten => 6002,1,Dial(SIP/6002)
exten => 6002,n,Hangup()

exten => 201,1,Answer()
exten => 201,n,Playback(miomessaggio)
exten => 201,n,Hangup()

exten => _3xxx.,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${EXTEN} bla bla)
exten => _3xxx.,n,Dial(SIP/sip.voipcheap.com/${EXTEN},60)
exten => _3xxx.,n,Playtones(congestion)
exten => _3xxx.,n,Hangup()

Every time i start a call from my phone to a number for the exten “_3xxxx” (i use linphone on Android ), the console returns me the “failed to authenticate on invite” (here the complete log: pastebin.com/9FkY9K4k).

Where is the problem?
Let me know if i can attacch other info to help solve the problem.

Thanks

Please embed your files in code sections. I’m not going to hop between multiple external pages to diagnose this.

Also, you will almost certainly need sip debugging.

[quote=“david55”]Please embed your files in code sections. I’m not going to hop between multiple external pages to diagnose this.

Also, you will almost certainly need sip debugging.[/quote]

Hi, thanks for the reply.
I have modified my first post and embedded my file in code section.

Also, how can i active the sip debugging? What should i post to help solving the problem?

Thanks.

change this line [quote]exten => _3xxx.,n,Dial(SIP/sip.voipcheap.com/${EXTEN},60)[/quote]

for this :

[quote]exten => _3xxx.,n,Dial(SIP/voipcheap/${EXTEN},60)
[/quote]

and reload asterisk