Is it possible to get sip to listen on two ports (say 5060 and 5061)? Maybe its not necessary, but I'm trying to get a PAP2 to work with 2 lines configured behind a Linksys router with NAT. I've noticed the default config in the PAP2 is to use 5060 for line 1 and 5061 for line 2. I'm guessing this is to assist in the handling of SIP through a NAT. If I try using 5060 for both lines I never see a registration for line 2. Any ideas? TIA
Mr. Jones
2006-Aug-26 09:42 UTC
[asterisk-users] Re: getting SIP to listen on multiple ports
Please disregard this message. Evidently changing the port required a power cycle on the PAP2. On 8/26/06, Mr. Jones <worldsense@gmail.com> wrote:> Is it possible to get sip to listen on two ports (say 5060 and 5061)? > > Maybe its not necessary, but I'm trying to get a PAP2 to work with 2 > lines configured behind a Linksys router with NAT. > > I've noticed the default config in the PAP2 is to use 5060 for line 1 > and 5061 for line 2. > > I'm guessing this is to assist in the handling of SIP through a NAT. > > If I try using 5060 for both lines I never see a registration for line 2. > > Any ideas? > > TIA >
Gary G. Hendershot
2006-Aug-26 16:08 UTC
[asterisk-users] getting SIP to listen on multiple ports
I use a PAP2 device to register both lines to my Asterisk server ... Both the server and the PAP2 are inside my firewall and are on the same IP subnet ... In Asterisk's SIP.CONF I have the second "line" setup expecting SIP to use 5061 ... One rings a wireless phone while the other rings a CO line on my ancient KSU ... Works fine ... Bottom line is the PAP2 and the service registered to have to agree to the port being used ... Both "lines" are being accessed using the same IP address so you must designate unique ports to keep them separate ... I use this config every day as described above and know it works ... I suspect this would also work across NAT but the service you are registering to will have to expect you to be talking on 5061 instead of the default 5060 ... Not tough if you are controlling the config but might be a problem if you are trying to register to the same commercial SIP provider twice ... You will need to ask your provider to set up his side to expect you on 5061 if this is the case ... I have not tried this but can think of no reason why it would not work if the provider was willing to cooperate ... You can also use the PAP2 device to register to two separate providers ... But because the PAP2 uses a single IP address, the only way it can keep the two "lines" separate, is to use a unique port for each "line" ... So if I wanted to register to an external provider, I would set that channel up to use the default 5060, then use the second channel to register to my internal Asterisk system where I have the flexibility to configure the port expected to 5061 ... I have experimented with this config and know it works ... Hope this clears up the question for you ... If not let me know off list and I will see if I can take some screen shots of my PAP2 config and get together a sample of my SIP.CONF file for you to use as an exaple setup ... G.Hendershot -----Original Message----- From: Mr. Jones [mailto:worldsense@gmail.com] Sent: Saturday, August 26, 2006 12:33 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] getting SIP to listen on multiple ports Is it possible to get sip to listen on two ports (say 5060 and 5061)? Maybe its not necessary, but I'm trying to get a PAP2 to work with 2 lines configured behind a Linksys router with NAT. I've noticed the default config in the PAP2 is to use 5060 for line 1 and 5061 for line 2. I'm guessing this is to assist in the handling of SIP through a NAT. If I try using 5060 for both lines I never see a registration for line 2. Any ideas? TIA