From outside I dial an asterisk user 3001 using their DID 7134443001 the call goes through
From inside I dial an asterisk user 3001 using an outside line using their DID 97134443001, the call fails because of authentication.
What seems to be happening is the SIP from header on the INVITE coming back from provider has the username of the calling device. So it is From: "ACME"sip:3000@10.0.1.100;user=phone;tag=abcde
Asterisk 1.4.22 appears to be using the 3000 in the FROM header and attempts to authenticate it against the 3000 user configured in SIP. What I am failing to understand is the call is coming from the provider which we’ve authenticated against so why isn’t it left alone?
Pointers? Config below.
; register with our provider
register => username:password@providerip/username
; provider user
[username]
type=user
host=10.0.1.100
insecure=port,invite
context=trunk-in
disallow=all
all=gsm
; provider peer
[telco]
type=peer
host=10.0.1.100
username=username
secret=password
disallow=all
allow=gsm
; phone making the call / user Asterisk is trying to authenticate the “INVITE” from provider against why???
[3000]
type=friend
host=dynamic
username=3000
secret=password
disallow=all
allow=gsm
; phone receiving the call
[3001]
type=friend
host=dynamic
username=3001
secret=password
disallow=all
allow=gsm