Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-11 Thread Kevin P. Fleming
On 10/09/2010 01:34 PM, bruce bruce wrote:
 And that is exactly what is done on the device: Nat=yes but Asterisk
 still sees the SIP packet coming in to register with a local IP an so it
 responds to a local IP which doesn't even exist on the Asterisk network.
 This is what frustrates me that it's not so straight forward to Asterisk
 to obtain the proper public IP of the device from the IP packet headers
 rather than the SIP packets.

'nat=yes on the device' doesn't really make any sense; does that mean
you set some sort of NAT setting on the *device* itself, or does it mean
you set 'nat=yes' in the device's peer entry in the Asterisk sip.conf file?

If 'nat=yes' is set in the relevant sip.conf peer entry for that device,
and Asterisk is properly selecting that entry when the device registers,
then Asterisk *will* respond the device's apparent IP address and port
number, regardless of the address the device includes in the Contact
header of the REGISTER request. Setting 'nat=yes' is exactly how you
tell Asterisk to use the IP address from the IP header of the packet
instead of the address in the SIP message.

As I said before, there are likely hundreds of thousands (if not
millions) of endpoints registering to Asterisk systems all over the
world every day using this mechanism and it works just fine. If it's not
working for you, there is some sort of configuration problem.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kflem...@digium.com
Check us out at www.digium.com  www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-09 Thread Kevin P. Fleming
On 10/08/2010 10:16 PM, bruce bruce wrote:

 I said previously, Asterisk receives packets like extens...@192.168.0.10
 mailto:extens...@192.168.0.10 is trying to register to it. So,
 Asterisk sends out to local LAN an ACK which obviously is not right.
 SPA-2102 should send SIP request like extens...@123.123.123.123
 mailto:extens...@123.123.123.123 (public IP).

If you set 'nat=yes' in the sip.conf peer entry for that device in
Asterisk, Asterisk will reply to the IP address and port number the
REGISTER request was received from, not the address in the Contact
header provided in the request itself. It will also record this address
and port number as the location of that peer for future INVITE messages
to be sent to it.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kflem...@digium.com
Check us out at www.digium.com  www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-09 Thread bruce bruce
And that is exactly what is done on the device: Nat=yes but Asterisk still
sees the SIP packet coming in to register with a local IP an so it responds
to a local IP which doesn't even exist on the Asterisk network. This is what
frustrates me that it's not so straight forward to Asterisk to obtain the
proper public IP of the device from the IP packet headers rather than the
SIP packets.

Thanks

On Sat, Oct 9, 2010 at 8:27 AM, Kevin P. Fleming kpflem...@digium.comwrote:

 On 10/08/2010 10:16 PM, bruce bruce wrote:

  I said previously, Asterisk receives packets like extens...@192.168.0.10
  mailto:extens...@192.168.0.10 is trying to register to it. So,
  Asterisk sends out to local LAN an ACK which obviously is not right.
  SPA-2102 should send SIP request like extens...@123.123.123.123
  mailto:extens...@123.123.123.123 (public IP).

 If you set 'nat=yes' in the sip.conf peer entry for that device in
 Asterisk, Asterisk will reply to the IP address and port number the
 REGISTER request was received from, not the address in the Contact
 header provided in the request itself. It will also record this address
 and port number as the location of that peer for future INVITE messages
 to be sent to it.

 --
 Kevin P. Fleming
 Digium, Inc. | Director of Software Technologies
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 skype: kpfleming | jabber: kflem...@digium.com
 Check us out at www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-09 Thread Stefan Schmidt
Am 09.10.2010 20:34, schrieb bruce bruce:
 And that is exactly what is done on the device: Nat=yes but Asterisk still
 sees the SIP packet coming in to register with a local IP an so it responds
 to a local IP which doesn't even exist on the Asterisk network. This is what
 frustrates me that it's not so straight forward to Asterisk to obtain the
 proper public IP of the device from the IP packet headers rather than the
 SIP packets.
 
 Thanks
 
when you do a sip debug do you see something like this:

SIP read from 192.168.0.2 for example
or do you see the internal ip only in the contact header?

if its only in the contact header everything is ok. if not you maybe
have a network problem like SIP ALG on your router.

Asterisk can only work with the data which are received. turning NAT on
or off only switch between the IP in the contact header or the source IP
but if your device in between like a router does something wrong like
faking packet source ips asterisk cant fix this.

i dont know what kind of router you use, but have a look at SIP ALG and
turn this off, if possible.

best regards

stefan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-08 Thread bruce bruce
Kyle,

Got an empty response from you. Were you intending to give your feedback?

Regards,
Bruce

On Wed, Oct 6, 2010 at 8:10 PM, Kyle Kienapfel doctor.w...@gmail.comwrote:



 On Wed, Oct 6, 2010 at 12:50 PM, bruce bruce bruceb...@gmail.com wrote:

 Hi Guys,

 This is such an annoying issue whenever it comes up. The sender and
 receive always receive the source public IP no matter what in the IP packets
 but then SIP packets go out with something like 192.168.0.20.

 In this instance, a Bell Canada DSL modem is installed and I saw the
 SPA-2102 register properly but only to fail later on due to sending it's LAN
 IP to the Asterisk server.

 So, I put NAT=yes and NAT_ALIVE=yes but that didn't help at all. I also
 put the device on DMZ in the Bell Canada DSL modem and still the same issue.

 I am wondering when would manufacturers finally fully comply the SIP RFC?!

 I don't have the luxury to put SIP proxy, do a VPN, install a server or
 anything on client site.

 Diagram:

 Asterisk Server = Internet = Bell Canada Modem = SPA2102

 Please send me your suggestions on how to fix this if you have this type
 of experience with SPA-2102

 Thanks for the input,
 Bruce


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


 Are you using stun?
 http://en.wikipedia.org/wiki/Session_Traversal_Utilities_for_NAT


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-08 Thread Andrew Latham
He sent a two liner

On Fri, Oct 8, 2010 at 2:25 PM, bruce bruce bruceb...@gmail.com wrote:
 Kyle,
 Got an empty response from you. Were you intending to give your feedback?
 Regards,
 Bruce

 Are you using stun?
 http://en.wikipedia.org/wiki/Session_Traversal_Utilities_for_NAT

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-08 Thread Kevin P. Fleming
On 10/06/2010 02:50 PM, bruce bruce wrote:
 Hi Guys,
 
 This is such an annoying issue whenever it comes up. The sender and
 receive always receive the source public IP no matter what in the IP
 packets but then SIP packets go out with something like 192.168.0.20. 
 
 In this instance, a Bell Canada DSL modem is installed and I saw the
 SPA-2102 register properly but only to fail later on due to sending it's
 LAN IP to the Asterisk server.
 
 So, I put NAT=yes and NAT_ALIVE=yes but that didn't help at all. I also
 put the device on DMZ in the Bell Canada DSL modem and still the same issue.
 
 I am wondering when would manufacturers finally fully comply the SIP RFC?!

Exactly how is this behavior non-compliant with the (sic) SIP RFC?
There is nothing in any SIP RFC that mandates that a SIP UA must be
aware of multiple IP addresses over which it can be reached, and select
the proper one to include in SIP requests and responses.

In fact, many SIP UAs, Asterisk included, work just fine behind NAT
devices without ever knowing what their external IP addresses are.

If you had actually described how the device failed, we might be able to
tell you what you could do to resolve the problem. In general, Asterisk
works just fine with endpoints that are behind NAT devices and never
send their external IP addresses in their SIP messages... there are
probably millions of devices working that way every day.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kflem...@digium.com
Check us out at www.digium.com  www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-08 Thread bruce bruce
Thanks for the feedback.

I said previously, Asterisk receives packets like extens...@192.168.0.10 is
trying to register to it. So, Asterisk sends out to local LAN an ACK which
obviously is not right. SPA-2102 should send SIP request like
extens...@123.123.123.123 (public IP).

Thanks

On Fri, Oct 8, 2010 at 3:32 PM, Kevin P. Fleming kpflem...@digium.comwrote:

 On 10/06/2010 02:50 PM, bruce bruce wrote:
  Hi Guys,
 
  This is such an annoying issue whenever it comes up. The sender and
  receive always receive the source public IP no matter what in the IP
  packets but then SIP packets go out with something like 192.168.0.20.
 
  In this instance, a Bell Canada DSL modem is installed and I saw the
  SPA-2102 register properly but only to fail later on due to sending it's
  LAN IP to the Asterisk server.
 
  So, I put NAT=yes and NAT_ALIVE=yes but that didn't help at all. I also
  put the device on DMZ in the Bell Canada DSL modem and still the same
 issue.
 
  I am wondering when would manufacturers finally fully comply the SIP
 RFC?!

 Exactly how is this behavior non-compliant with the (sic) SIP RFC?
 There is nothing in any SIP RFC that mandates that a SIP UA must be
 aware of multiple IP addresses over which it can be reached, and select
 the proper one to include in SIP requests and responses.

 In fact, many SIP UAs, Asterisk included, work just fine behind NAT
 devices without ever knowing what their external IP addresses are.

 If you had actually described how the device failed, we might be able to
 tell you what you could do to resolve the problem. In general, Asterisk
 works just fine with endpoints that are behind NAT devices and never
 send their external IP addresses in their SIP messages... there are
 probably millions of devices working that way every day.

 --
 Kevin P. Fleming
 Digium, Inc. | Director of Software Technologies
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 skype: kpfleming | jabber: kflem...@digium.com
 Check us out at www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] SPA-2102 sending local IP instead of WAN IP in SIP packets

2010-10-06 Thread Kyle Kienapfel
On Wed, Oct 6, 2010 at 12:50 PM, bruce bruce bruceb...@gmail.com wrote:

 Hi Guys,

 This is such an annoying issue whenever it comes up. The sender and receive
 always receive the source public IP no matter what in the IP packets but
 then SIP packets go out with something like 192.168.0.20.

 In this instance, a Bell Canada DSL modem is installed and I saw the
 SPA-2102 register properly but only to fail later on due to sending it's LAN
 IP to the Asterisk server.

 So, I put NAT=yes and NAT_ALIVE=yes but that didn't help at all. I also put
 the device on DMZ in the Bell Canada DSL modem and still the same issue.

 I am wondering when would manufacturers finally fully comply the SIP RFC?!

 I don't have the luxury to put SIP proxy, do a VPN, install a server or
 anything on client site.

 Diagram:

 Asterisk Server = Internet = Bell Canada Modem = SPA2102

 Please send me your suggestions on how to fix this if you have this type of
 experience with SPA-2102

 Thanks for the input,
 Bruce


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Are you using stun?
http://en.wikipedia.org/wiki/Session_Traversal_Utilities_for_NAT
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users