RE: [Asterisk-Users] SPA and NAT traversal

2005-04-10 Thread Jim Sturtevant
I appreciate everyone's help with setting up an external extension.


Here's a diagram

{SPA2000} - NAT1 - Internet - NAT2 - Asterisk - SIPPhone

SIPPhone is on the same internal subnet as *
NAT2 has a public/staic IP and ports are forwarded to Asterisk

I can successfully do the following:

1. call from SPA2000 - Asterisk VM
2. call from SPA2000 to SIPPhone
3. call from SPA2000 to outside PST as long as I'm using IAX to the ITSP

What I can't do is call from SPA2000 to an outside PSTN if the ITSP is SIP.
When I call the outside phone number I don't hear any ring back or when the
called party answers.   If I have RTP DEBUG on at the CLI I don't see any
RTP packets at all so it appears * is outside the media stream.

SIP-PSTN works great so long as the ITSP is being reached by IAX.

This situation exists regardless of the calue for canreinvite.

SIP PEER:
  * Name   : 202
  Secret   : Set
  MD5Secret: Not set
  Context  : sip
  Language :
  AMA flags: Unknown
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup:
  Pickupgroup  :
  Mailbox  :
  LastMsgsSent : -1
  Inc. limit   : 0
  Outg. limit  : 0
  Dynamic  : Yes
  Callerid :  
  Expire   : 2749
  Expiry   : 900
  Insecure : no
  Nat  : Always
  ACL  : No
  CanReinvite  : No
  PromiscRedir : No
  User=Phone   : No
  DTMFmode : rfc2833
  LastMsg  : 0
  ToHost   :
  Addr-IP : 24.6.249.xxx Port 5060
  Defaddr-IP  : 0.0.0.0 Port 5060
  Def. Username: 202
  Codecs   : 0x4 (ulaw)
  Codec Order  : (ulaw)
  Status   : UNKNOWN
  Useragent: Sipura/SPA2000-2.0.10(c)
  Reg. Contact : sip:[EMAIL PROTECTED]:5060


[202]   ;test ata
type=friend
username=202
secret=
host=dynamic
nat=no
reinvite=no ;stay in the call
canreinvite=no  ;keeps asterisk in the media stream
disallow=all
allow=ulaw
context=sip

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nabeel
Jafferali
Sent: Saturday, April 09, 2005 1:34 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] SPA and NAT traversal

 In your second option using a STUN server would I need to setup my
 own STUN server? 

No, use FWD or xten's STUN servers.

-- 
Nabeel Jafferali
X2 Networks
www.x2n.ca
T: 1.647.722.6900
   1.877.VOIP.X2N
F: 1.866.655.6698

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

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


Re: [Asterisk-Users] SPA and NAT traversal

2005-04-09 Thread Eric Wieling
Jim Sturtevant wrote:
I was hoping someone might help me diagnose a NAT issue with an SPA-2000 and
my * server.  

My SPA is behind a NAT accessing a server which is also behind a NAT but SIP
and RTP ports are forwarded to it.
My SPA can successfully register.  It can call another extension which is
inside the * local net and the inside phone can call the SPA.  But, no
speech path either way.  I have NAT=YES and the two invite parameters are
set to NO.
I'm desperately trying to get your sip.conf file telepathically but 
all I'm getting is images from your Martha Stewart porn collection. 
*shudder*

In addition to nat=yes you also need localnet= and externip= set, as 
shown in sip.conf.sample.

--
Always do right. This will gratify some people and astonish the rest.
Mark Twain
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] SPA and NAT traversal

2005-04-09 Thread Jim Sturtevant
Thank you for your reply.  There is a wealth of information on the wiki,
etc.   I turned on RTP debug and the SPA is not sending it's public IP it is
sending it's NAT IP (192.168.1.100) so *'s RTP packets are going nowhere...


The SPA is behind a NAT and traversing the public IP network to get to the *
server.  It is successfully registering, thus I can ring a phone registered
locally to the * server.

I made sure localnet=192.168.2.9/255.255.255.0 (my local cfg for *)  and
externip=65.87.x.x (which is the public IP of my * server).  The * server is
behind a NAT as well with the 5060 and 16384-32767 UDP ports open.  

Based on RTP debug it appears the RTP packets are making it to the * server,
the problem is the return address is the internal NAT address of the SPA
192.168.1.100 and not it's public address.

Are you willing to share your Martha collection or are you going to keep it
to yourself? :-)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Wieling
Sent: Saturday, April 09, 2005 11:25 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] SPA and NAT traversal

Jim Sturtevant wrote:

 I was hoping someone might help me diagnose a NAT issue with an SPA-2000
and
 my * server.  
 
 My SPA is behind a NAT accessing a server which is also behind a NAT but
SIP
 and RTP ports are forwarded to it.
 
 My SPA can successfully register.  It can call another extension which is
 inside the * local net and the inside phone can call the SPA.  But, no
 speech path either way.  I have NAT=YES and the two invite parameters are
 set to NO.

I'm desperately trying to get your sip.conf file telepathically but 
all I'm getting is images from your Martha Stewart porn collection. 
*shudder*

In addition to nat=yes you also need localnet= and externip= set, as 
shown in sip.conf.sample.


-- 
Always do right. This will gratify some people and astonish the rest.
Mark Twain
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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


Re: [Asterisk-Users] SPA and NAT traversal

2005-04-09 Thread Eric Wieling
Jim Sturtevant wrote:
Thank you for your reply.  There is a wealth of information on the wiki,
etc.   I turned on RTP debug and the SPA is not sending it's public IP it is
sending it's NAT IP (192.168.1.100) so *'s RTP packets are going nowhere...
nat=yes makes Asterisk use the public IP that is inserted by the far 
side NAT router instead of the private IP the SIP device puts in the 
packet.

Perhaps there is a problem in your sip.conf that is causing the SPA's 
packets not to match anything.

sip show peers will tell you if Asterisk is seeing the public or the 
private IP of the far end SPA.

--
Always do right. This will gratify some people and astonish the rest.
Mark Twain
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] SPA and NAT traversal

2005-04-09 Thread Nabeel Jafferali
 Thank you for your reply.  There is a wealth of information on the
 wiki, etc.   I turned on RTP debug and the SPA is not sending it's
 public IP it is sending it's NAT IP (192.168.1.100) so *'s RTP
 packets are going nowhere... 

Do I understand your question correctly:

You have an SPA behind NAT1 and * and a second SIP device behind NAT2. Both
devices register, but calls between the devices result in no audio?

If that is the case, you can do one of two things:

- set canreinvite=no for the devices' sip.conf entries, or
- teach both devices to *stop* using their internal IPs for all
communications and remove nat=yes from the entry for the SIP device inside
NAT2.

To set the SPA to give the correct IP, enable STUN, add a STUN server, and
say Yes to Substitue VIA Addr.

-- 
Nabeel Jafferali
X2 Networks
www.x2n.ca
T: 1.647.722.6900
   1.877.VOIP.X2N
F: 1.866.655.6698

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


RE: [Asterisk-Users] SPA and NAT traversal

2005-04-09 Thread Jim Sturtevant
In your second option using a STUN server would I need to setup my own STUN
server?

Thanks

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nabeel
Jafferali
Sent: Saturday, April 09, 2005 12:37 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] SPA and NAT traversal

 Thank you for your reply.  There is a wealth of information on the
 wiki, etc.   I turned on RTP debug and the SPA is not sending it's
 public IP it is sending it's NAT IP (192.168.1.100) so *'s RTP
 packets are going nowhere... 

Do I understand your question correctly:

You have an SPA behind NAT1 and * and a second SIP device behind NAT2. Both
devices register, but calls between the devices result in no audio?

If that is the case, you can do one of two things:

- set canreinvite=no for the devices' sip.conf entries, or
- teach both devices to *stop* using their internal IPs for all
communications and remove nat=yes from the entry for the SIP device inside
NAT2.

To set the SPA to give the correct IP, enable STUN, add a STUN server, and
say Yes to Substitue VIA Addr.

-- 
Nabeel Jafferali
X2 Networks
www.x2n.ca
T: 1.647.722.6900
   1.877.VOIP.X2N
F: 1.866.655.6698

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

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


RE: [Asterisk-Users] SPA and NAT traversal

2005-04-09 Thread Nabeel Jafferali
 In your second option using a STUN server would I need to setup my
 own STUN server? 

No, use FWD or xten's STUN servers.

-- 
Nabeel Jafferali
X2 Networks
www.x2n.ca
T: 1.647.722.6900
   1.877.VOIP.X2N
F: 1.866.655.6698

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


Re: [Asterisk-Users] SPA and NAT traversal

2005-04-09 Thread Michael D Schelin
The only way you ll be able to call extension to extension is if  
Asterisk is on the same node behind the nat. like the extensions or if 
each extension is on a different node.  I run a proxie server and have 
ran through this problem many time. I bet you can call out bound to the 
outside world just fine from every extension. .

Eric Wieling wrote:
Jim Sturtevant wrote:
I was hoping someone might help me diagnose a NAT issue with an 
SPA-2000 and
my * server. 
My SPA is behind a NAT accessing a server which is also behind a NAT 
but SIP
and RTP ports are forwarded to it.

My SPA can successfully register.  It can call another extension 
which is
inside the * local net and the inside phone can call the SPA.  But, no
speech path either way.  I have NAT=YES and the two invite parameters 
are
set to NO.

I'm desperately trying to get your sip.conf file telepathically but 
all I'm getting is images from your Martha Stewart porn collection. 
*shudder*

In addition to nat=yes you also need localnet= and externip= set, as 
shown in sip.conf.sample.


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