[Asterisk-Dev] SIP peername==username equivalence

Olle E. Johansson oej at edvina.net
Thu Nov 11 02:40:01 MST 2004


>>I've gotten annoyed by the requirement in the sip_chan.c
>>file that the username must match the peer name. Since
>>the username is generally the same as the extension it leads
>>to less than descriptive names in the asterisk configuration
>>files.
Hmmm. I must be missing something here, because I do not understand. Please
help me!

There is no requirement that peer name is the same as extension. I feel
using extensions as peer names is confusing for most people, that anyway
have a steep learning curve.

Also, if we are going to fix anything in this area we might as well do
it right.

In chan_sip we match the user's From: header username part with the
peer name and apply the credentials from the [peer] section.
We simply throw away the domain part.

This is wrong. Totally and utterly wrong.
SIP Authentication should be based on the digest header's user name.
The address of record could match, in some networks it's a requirement.
In some cases it's not wanted. I want to use sip:oej at edvina.net regardless
of my account name. That works in e-mail - not many people use the
pop/imap account name as email address, do they?

So the digest user should match the [peer name].

This patch just changes the logic, but adds confusion and we are still
not following the specs. Again, I can be missing something. But if you
want to disconnect the user name in the From: header address of record
SIP address from the peer name in sip.conf, we should do it right, not
just make a quick patch.

In chan_sip2, I have implemented this partially but not fully. Please
test and give me feedback so I get the push to complete that work.
Or help me coding :-)

/O





More information about the asterisk-dev mailing list