[asterisk-dev] chan_sip SIP Authentication

Johansson Olle E oej at edvina.net
Wed Jan 28 08:47:47 CST 2009

28 jan 2009 kl. 15.41 skrev Klaus Darilion:

> Johansson Olle E schrieb:
>> Well,
>> The problem arises since you use phone numbers as identifiers for the
>> users. This is not a good thing (TM) and should be avoided. The
>> dialplan is where you route phone numbers. Devices should have device
>> names that you address in the dialplan on the extension that is
>> supposed to connect to one or several devices.
> That's the more elegant version, but then you need a mapping from  
> number
> to user. Thats why I use name=number to avoid this mapping
That is why you have hints, Klaus.

>> I guess we have no make this need of namespace separation clear in  
>> the
>> documentation.
>> If we go ahead and change matching order, I'm afraid it will break
>> backwards compatibility and stop many systems from working properly.
>> We don't want that.
>> The real solution to this users/peers/friends thing is to create a
>> better solution and implement it. The first big step towards it was  
>> to
>> kill the sip_user structure,
>> and thus the need for users at all in 1.6.1. We now also match peers
>> by name before we match IP.
> Does this mean that my setups do not work anymore in 1.6.1. Does all
> peers use this name checking or is this an configuration option?
If you set type=peer it won't. type=friend will. But a friend is still  
a peer
in memory. I have not changed configuration ...yet.

>> This implements a way to
>> - register with SIp services
>> - get the call back
>> - match the proper peer, even if you have five accounts, we will  
>> match
>> the proper peer
>> - send the call to the called number (to: header), not using a  
>> pseudo-
>> exten that overrides.
> ahh. It took us many yours to tell vendors that To-based routing is  
> wrong.
Oh yes, it is. In theory you should never do that, but...

But if you register for a service, the request URI is whatever
you register with and can't really be used for any routing decisions  
in a b2bua.
For a simple phone, it doesnt matter. Registration for a trunk service  
doesn't really work,
which might be a design flaw in SIP.

How on earth do you get the requested number without checking To: or  


More information about the asterisk-dev mailing list