JR Richardson
2010-Feb-13 15:57 UTC
[asterisk-users] 1.6.x SIP allow incoming calls based on from ip address?
Hi All, I read some discussions about the new SIP authentication methods for 1.6.X branches and possible addition of new type of user, type=trunk. I'm wondering about the disposition about this. Will it be added? In 1.2 and 1.4 branch, a SIP invite was first checked for a valid [user] then a valid host=ip, then if not present send call to [general] context=incoming. In 1.6, a SIP invite checks for valid [user] then TO: domain=abc.com,context, then if not present [general] context=incoming. This is fine and I think I understand the reasoning behind the new method. But we have lost the ability to route calls based on 'from' ip address. What I'm curious about is if we will be able to configure a sip [user] type=trunk with host=ip address based on FROM: IP Address and direct it to a specific context. sip.conf [provider_1_trunk] type=trunk host=ip address context=provider_1_incoming or something like this: [from ip address] type=trunk context=provider_1_incoming authentication=none Thanks. JR -- JR Richardson Engineering for the Masses
Olle E. Johansson
2010-Feb-13 18:16 UTC
[asterisk-users] 1.6.x SIP allow incoming calls based on from ip address?
13 feb 2010 kl. 16.57 skrev JR Richardson:> Hi All, > > I read some discussions about the new SIP authentication methods for > 1.6.X branches and possible addition of new type of user, type=trunk. > I'm wondering about the disposition about this. Will it be added?Not to the 1.6 branches, but we hope to have something for 1.8. This is all based on very old discussions that have matured over the years. Check http://www.codename-pineapple.org/newtypes.shtml> > In 1.2 and 1.4 branch, a SIP invite was first checked for a valid > [user] then a valid host=ip, then if not present send call to > [general] context=incoming.Yes. The host=ip is a peer, so first user, then peer, then to a context specified in the [general] section or a context named "default".> > In 1.6, a SIP invite checks for valid [user] then TO: > domain=abc.com,context, then if not present [general] > context=incoming. This is fine and I think I understand the reasoning > behind the new method. But we have lost the ability to route calls > based on 'from' ip address.No, 1.6.x should work exactly the same as 1.4. The domains are in 1.4 too, and precedes the [general] section as you say. We still have users and peers.> > What I'm curious about is if we will be able to configure a sip [user] > type=trunk with host=ip address based on FROM: IP Address and direct > it to a specific context. > > sip.conf > > [provider_1_trunk] > type=trunk > host=ip address > context=provider_1_incoming > > or something like this: > > [from ip address] > type=trunk > context=provider_1_incoming > authentication=noneSomething like that, yes. Type=trunk will be replacing some usage of type=peer today and have both IP and domain based matching of incoming calls. /O
JR Richardson
2010-Feb-14 16:53 UTC
[asterisk-users] 1.6.x SIP allow incoming calls based on from ip address?
>> In 1.6, a SIP invite checks for valid [user] then TO: >> domain=abc.com,context, then if not present [general] >> context=incoming. ?This is fine and I think I understand the reasoning >> behind the new method. ?But we have lost the ability to route calls >> based on 'from' ip address. > No, 1.6.x should work exactly the same as 1.4. The domains are in 1.4 too, and precedes the [general] section as you say. We still have users and peers.Hmm, well this is not happening like you say. I'm currently using 1.6.0 latest release and the 'host=ip address' is not being looked up. It works in 1.4 but not in this version. I'll do some more debugging and try to figure out what is going on. Thanks. JR -- JR Richardson Engineering for the Masses