[asterisk-users] username ignored when trying to auth incoming invites
John Wolthuis
john.wolthuis at gmail.com
Thu Oct 4 22:00:34 CDT 2012
Hello All,
I am trying to debug an odd issue. I have two UACs that are sending
INVITEs to my asterisk 1.8 server. I want to start authenticating
these incoming invite requests with digest auth. The UACs are not
registered and I am using host ip to match them with a sip.conf peer.
The issue I am seeing is that an incoming invite matches a specific
peer (by host ip), but refuses to use the "username" parameter value
for digest auth, it will only use the peer name. I see the following
error:
"chan_sip.c: username mismatch, have <node-a>, digest has <test>"
I have the following sip.conf:
[node-a]
type=friend
disallow=all
allow=ulaw
context=incoming-context
host=XXX.XXX.XXX.XXX
transport=udp
username=test
secret=1234
[node-b]
type=friend
disallow=all
allow=ulaw
context=incoming-context
host=YYY.YYY.YYY.YYY
transport=udp
username=test
secret=1234
If I auth using "node-a" as the username when sending an invite from
that host, everything works. If I auth with "test" as the username
from node-a, it fails with the error above. It appears that peer name
is always being used for digest auth, rather than the contents of
username. Is "username" the wrong place to specify this?
Thanks for your help!
More information about the asterisk-users
mailing list