[asterisk-dev] chan_sip SIP Authentication

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jan 28 10:39:32 CST 2009



Johansson Olle E schrieb:
> 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 thought hints are for presence/dialogstate

>>> 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  
> RPID?

Using To: you assume that the To header contains the originally called 
number. But that depends on the setup of the trunking provider. (what if 
the trunking provider uses Asterisk?)

Yes you are right - SIP trunking is not specified somewhere.

The trunking provider I use maps the called number in the RURI (thus it 
ignores the userpart in the REGISTER contact but just uses the 
domainpart for routing). Of course this would cause problems if you 
register twice to a trunking provider and has do differ incoming call 
(which is done on the RURI).

Isn't there a dedicated P-.... header specified in IMS to signal the 
originally called number?

klaus




> 
> /O
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list