[Freeswitch-users] multiple gateways and NAT

Michael Collins msc at freeswitch.org
Mon Mar 14 23:32:05 MSK 2011


On Mon, Mar 14, 2011 at 10:07 AM, Mario G <mario_fs at mgtech.com> wrote:

> I'll tell you what I know/observed: Based on web searches you need address
> and port. Here is an example of what happened to me during testing:
>
> I have multiple user IDs on my internal phone, so each phone registers
> multiple times, one for each extension. When I configured the phone (SPA962)
> to use the same port (5060) for all extensions the phones had problems such
> as not ringing when they should. When I gave each extension its own port and
> problems solved.
>
> As for ITSPs, I remember that I could not get the ITSP that had 2 accounts
> working right until each account had its own port. My guess is that the
> connection between the ITSP is registered with the user ID, but then that ID
> is no longer used, just the IP and port. Since FS had the same ip addr and
> port for both accounts there is no way to know what data belonged to what
> account. Making separate ports fixed the problem.
>
> I also am very confused about FS ports. In vars.xml there is only one port
> that can be setup for internal and external. However, I have separate
> external profiles each with its own port that is required to make things
> work. But.... I only have 1 internal profile and yet all extensions work
> even though they are setup with different ports for each extension. You
> would think FS would require different internal profiles for each ID as it
> does for external. Go figure.... Hope this helps a little.
>

Keep in mind that the ports specified in vars.xml are for the SIP profiles.
Each SIP profile is a user agent. A user agent can service exactly one
IP:Port. So if your internal profile is set with IP of 10.10.1.1 and port
5060, then that's where internal is listening and responding. So, the
internal profile is listening for traffic coming into 10.10.1.1:5060 and
responds from the same IP:port. The phones in the above scenario have their
own user agents who are doing the same thing with their own IPs and ports.
So you could have line key 1 listening/responding on 10.10.1.2:5060 and line
key 2 listening/responding on 10.10.1.2:5062. They both send their SIP
traffic *to* 10.10.1.1:5060 (FS, internal profile) and FS knows which
IP:port to use for responding to traffic "from" each line key. That's an
imperfect explanation, but I hope it illustrates the point.

-MC

>
> As for using port in registrations I am not sure. The reason is while
> testing dual WAN I had a call going on one WAN then pulled the plug. The
> other took over and FS kept the conversation going. So in that case even the
> IP address changed! But... I am having other major FS problems trying to get
> a working backup so had to abandon the FS dual wan setup and stick to 1 wan
> connection for FS.
>
> Mario G
>
>
> On Mar 14, 2011, at 2:03 AM, Johan Helsingius wrote:
>
> >> I remembered why I needed to use different ports in one case: Two
> >> of the three accounts are at the same ITSP, in this case since the
> >> IP address is the same on the two accounts you need to use different
> ports.
> >
> > Ah, I have sort of the same case - 4 accounts with one ITSP providing
> > 4 different incoming DID's (replacing an old ISDN connection), and
> > 2 separate single ITSP accounts for international calls.
> >
> > But I am still very confused about the need for different ports.
> > This is not a complaint, just an observation, but I do think the
> > multiple port thing is one of the more confusing aspects of FS,
> > and something other SIP switches seem to do without.
> >
> > On outgoing connections, we register with the ITSP gateway (by the
> > way, does the SIP registration register both an ip address and
> > a port number, or just the ip address?), and on incoming connections
> > they either have a destination number/DID that routes them to the
> > right place in the dialplan, or they register with us (using
> > username/password) in the case of SIP clients. Security can be
> > handled with ACL's. So I can't get my head around to why separate
> > ports are needed - maybe someone can point out what I am missing?
> >
> >       Julf
> >
> >
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110314/7de3a774/attachment-0001.html 


More information about the FreeSWITCH-users mailing list