[Asterisk-Dev] Re: [Asterisk-Users] Asterisk and SIP phones
John Todd
jtodd at loligo.com
Thu Oct 7 18:47:47 MST 2004
At 6:56 AM +0900 on 10/8/04, Benjamin on Asterisk Mailing Lists wrote:
>On Thu, 7 Oct 2004 17:49:56 -0400 (EDT), alex at pilosoft.com
><alex at pilosoft.com> wrote:
>> Yeah, only it wouldn't be "correct" - You have no idea if 66.250.54.1 and
>> 66.250.54.9 are on the same subnet (in fact, they aren't), as you have no
>> idea what is the netmask in use.
>
>Yes you do.
>
>We are only talking about the scenario where the Asterisk server is on
>the LAN where the phones are. So the netmask will be the netmask of
>that NIC of the Asterisk server which is used to talk to the local SIP
>phones.
>
>rgds
>benjk
>
>--
>Sunrise Telephone Systems, 9F Shibuya Daikyo Bldg., 1-13-5 Shibuya,
>Tokyo, Japan.
Why limit yourself? If someone is going to take the trouble of
writing a widget to allow IP addresses on the same network as the
Asterisk server talk to each other, why not make it a list?
I'm actually not in favor or disagreement with making such a local
exception, but if it's done, someone should do it correctly.
In the [general] section of sip.conf, there could be statements like this:
net-group-1 = 10.10.0.0/20,192.168.3.0/24,172.16.0.0/15
net-group-2 = 204.33.12.0/24,204.33.13.0/24
net-group-3 = 24.0.0.0/8,net-group-2
then, in each SIP instance, you could do something like:
<blah blah blah>
nat = yes
canreinvite = no
rtp-allow-reinvite = net-group1,net-group2
Any time that there was a match where the two endpoints where inside
of "net-group1" or "net-group2" then REINIVITEs would be allowed,
despite the "canreinvite" setting. I'd suggest that the
configuration did not allow REINIVTEs outside of a particular
net-group-X boundary. In our example, for instance, if the one
endpoint was in 10.0.1.0/24 and the other was in 192.168.3.0/24, then
it would allow a REINVITE. But if one endpoint was in 10.0.1.0/24
and the other endpoint was in 204.33.12.0/24, then it would not allow
a REINVITE. The "net-group-3" example would allow that type of
crossover by allowing specification of other net-group-X sets as
subsets of itself. In other words, overlaps would be done when
specifying the net-group-X configuration lists, and not in the SIP
instance ordering.
I'm having a tough time throwing this onto the now extremely high
pile of things that I'll never see implemented in Asterisk; my
pitching arm isn't able to reach the top of such a lofty trash heap.
;-)
JT
More information about the asterisk-dev
mailing list