SIP/2.0 401 Unauthorized on incoming calls


#1

Hello,

I have ‘migrated’ from Asterisk 1.4 to 1.8 but with the same config I can’t get the incoming calls to work.

sip.conf looks like this:
[general]
bindaddr=0.0.0.0
bindport=5060
port=5060
srvlookup=yes
nat=yes
context=incoming

register => 09zzzzzzz:xxxxx@sip.3starsnet.com/09zzzzzzz

[to-3starsnet]
host=sip.3starsnet.com
fromdomain=sip.3starsnet.com
type=friend
context=incoming
insecure=very
username=09324zzzz
secret=p04w48
fromuser=09324zzzz
dtmfmode=rfc2833
rfc2833compensate=yes
canreinvite=no
nat=yes
disallow=all
allow=ulaw

And in extensions.conf:
[incoming]
exten => _09zzzzzzz,1,Dial(SIP/200)
exten => _09zzzzzzz,n,Voicemail(6004,u)
exten => _09zzzzzzz,n,Hangup()

exten => s,1,Dial(SIP/200)
exten => s,n,Voicemail(6004,u)
exten => s,n,Hangup()

Is there anything that i’m missing? Outgoing calls are ok, only incoming from the provider do give an error.

Thanks already,
J.


#2

insecure=very has been replaced. In any case, most SIP providers only need insecure=invite.

(Also, nat=yes probably doesn’t do what you think it does, and you appear to have allowguest defaulting to yes. peer should be better than friend.)


#3

[quote=“david55”]insecure=very has been replaced. In any case, most SIP providers only need insecure=invite.

(Also, nat=yes probably doesn’t do what you think it does, and you appear to have allowguest defaulting to yes. peer should be better than friend.)[/quote]

Well have you ever, works as a charm now, big thx!
I’ll have a look at your suggestions on NAT and allowguest too …

Cheers,
Jan.