Re: [asterisk-users] Nat Issue - I think

2010-11-15 Thread Ishfaq Malik
On Sat, 2010-11-13 at 13:43 -0500, Dan Journo wrote:
 Hi,
 
  
 
 I'm using qualify= on my asterisk server that provides outgoing pstn
 calls to a few companies.
 
  
 
 I've got one client in particular that has their own asterisk server
 which is connected to my server.
 
  
 
 This client seems to be having a nat issue. It's not a connectivity
 issue as i've tried constant pings and the line is up constantly.
 
  
 
 I'm getting the following:
 
  
 
 [2010-11-13 17:56:27] NOTICE[26082] chan_sip.c: Peer 'client_201' is
 now UNREACHABLE!  Last qualify: 29
 
 [2010-11-13 17:56:37] NOTICE[26082] chan_sip.c: Peer 'client _201' is
 now Reachable. (26ms / 5000ms)
 
 [2010-11-13 17:58:12] NOTICE[26082] chan_sip.c: Peer 'client _201' is
 now UNREACHABLE!  Last qualify: 28
 
 [2010-11-13 17:58:22] NOTICE[26082] chan_sip.c: Peer 'client _201' is
 now Reachable. (27ms / 5000ms)
 
 [2010-11-13 17:59:58] NOTICE[26082] chan_sip.c: Peer 'client _201' is
 now UNREACHABLE!  Last qualify: 27
 
 [2010-11-13 18:00:08] NOTICE[26082] chan_sip.c: Peer 'client _201' is
 now Reachable. (27ms / 5000ms)
 
 [2010-11-13 18:01:43] NOTICE[26082] chan_sip.c: Peer 'client _201' is
 now UNREACHABLE!  Last qualify: 29
 
 [2010-11-13 18:01:53] NOTICE[26082] chan_sip.c: Peer 'client _201' is
 now Reachable. (28ms / 5000ms)
 
  
 
 Looking at the sip log, on the client's server, the sip OPTIONS
 packets arent being received. Then suddenly the sip packets start
 being received again. (without sending out a new packet to open up the
 nat mapping). I've tried replacing the router because I thought it was
 faulty.
 
  
 
 Here is the SIP log from my server: http://pastebin.com/ZbDYGG9R
 
  
 
 Finally, I tried mapping port 5060 so to avoid NAT issues, but that
 didnt help. Could there be an ISP problem?
 
  
 
 Any assistance would be appreciated.
 
 Many thanks
 
 Dan
 
These are always loads of fun to try and fix...

Check if the router has a sip ALG than needs disabling such as on XyZel
routers.

Try specifying a port on the phone if possible and forwarding it through
the router.

If you have the resources you could try creating a proxy server that
handles the natting

Ish
-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062


-- 
_
-- 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] NAT issue (i think?)

2010-10-04 Thread Ron
sorry for the late reply. got tied with something else. please see 
attached ngrep result.


my setup is simple, i add the user on the realtime database. i configure 
a phone to set my domain (i have DNS SRV enabled on my domain)


my clients are usually using ADSL links and have those SOHO ADSL router 
(usually linksys). IP Phones are on DHCP, i set NAT Keep-Alive to Yes 
and NAT Mapping to Yes, i also set the ffg, to Yes, Handle VIA received, 
Handle VIA rport,Insert VIA received and Insert VIA rport.


also if there are more than 1 phone behind the same NAT, i set different 
SIP port and each phone, i'm just wondering why it only happens on 
linksys phones, using yealink and grandstream it's ok.


Thanks again.

Regards
Ron


On 9/29/10 7:39 AM, Danny Dias wrote:

Hello Ron..

The answer that i see here is only a trying to a Register...means the
REGISTRATION procedures are taking a significant amount of time.

You should get a 200 OK

Can you lease make a simple draw of your architecture? seems to be a NAT
problem, that's for sure

REgards!

2010/9/28 Ronnha...@gmail.com


Hi Danny

On the pap2 by default it is set to 3600 and i have not change that.
by the way, is the NAT keep-alive same with the NOTIFY message? coz i am
seeing my asterisk respond to those as bad event could that be causing
it to loose the registration?

here's the registration from ngrep:

U 78.65.34.12:5094 -  12.34.56.78:5060
REGISTER sip:sip.mydomain.com SIP/2.0.
Via: SIP/2.0/UDP 78.65.34.12:5094;branch=z9hG4bK-25a5eec4;rport.
From: Kristinesip:456...@sip.mydomain.comsip%3a456...@sip.mydomain.com

;tag=68fc368d164925e0o0.

To: Kristinesip:456...@sip.mydomain.comsip%3a456...@sip.mydomain.com

.

Call-ID: c9bd8b57-f7bdc...@192.168.1.52.
CSeq: 116228 REGISTER.
Max-Forwards: 70.
Contact: Kristinesip:456...@78.65.34.12:5094;expires=3600.
User-Agent: Linksys/PAP2T-3.1.15(LS).
Content-Length: 0.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Supported: x-sipura.
.


U 12.34.56.78:5060 -  78.65.34.12:5094
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP
78.65.34.12:5094;branch=z9hG4bK-25a5eec4;received=78.65.34.12;rport=5094.
From: Kristinesip:456...@sip.mydomain.comsip%3a456...@sip.mydomain.com

;tag=68fc368d164925e0o0.

To: Kristinesip:456...@sip.mydomain.comsip%3a456...@sip.mydomain.com

.

Call-ID: c9bd8b57-f7bdc...@192.168.1.52.
CSeq: 116228 REGISTER.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.
Supported: replaces.
Content-Length: 0.


On 9/28/10 7:24 PM, Danny Dias wrote:

You have to increase the time of expiration for the Register...on linksys
devices is located on Proxy and Registration section under the EXTN:

(Where

N is the extension number)

Try putting this to: 3600

To check wheter or not is loosing Register, try with ngrep-sip and check

it:


ngrep -p -q -W byline port 5060register.pkt

Then post here the content of register.pkt; but please, after issuing the
change explained above!

Regards!

2010/9/28 Ronnha...@gmail.com


Hi All.

got this problem that IP phones could not re-register to my server. even
if device is power cycled it still would not register. the solution i
found was to change the SIP port settings on the phone and it will
register. but after registration expires and its time to re-register the
same thing will happen, so i have to update the port settings again just
to make it work which is troublesome.

i'm using Asterisk 1.4.31 with the following realtime config:

rtcachefriends=yes
rtsavesysname=yes
rtupdate=yes
rtautoclear=no

one thing i noticed is that it only seems to happen on linksys devices
e.g. PAP2 and SPA's. another phone i'm using is yealink and so far no
client has complain about it.

hope anyone can help. thank you.

regards
Ron


--
_
-- 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



#
U 40.30.20.10:5060 - 10.20.30.40:5060
  REGISTER sip:sip.mydomain.com SIP/2.0..Via: SIP/2.0/UDP 
40.30.20.10:5060;branch=z9hG4bK-8890bff6;rport..From: 123456 
sip:123...@sip.mydomain.com;tag=e9
  cb2ff4bca8b074o0..To: 123456 sip:123...@sip.mydomain.com..Call-ID: 
1da9d5f4-2eea4...@40.30.20.10..cseq: 1 REGISTER..Max-Forwards: 70..Contact: 
123456 sip:43
  9...@40.30.20.10:5070;expires=86400..User-Agent: 

Re: [asterisk-users] NAT issue (i think?)

2010-09-28 Thread Daniel Tryba
On Tue, Sep 28, 2010 at 09:28:24AM +0800, Ron wrote:
 got this problem that IP phones could not re-register to my server. even 
 if device is power cycled it still would not register. the solution i 
 found was to change the SIP port settings on the phone and it will 
 register. but after registration expires and its time to re-register the 
 same thing will happen, so i have to update the port settings again just 
 to make it work which is troublesome.

Sounds like NAT problems, do you have qualify enabled for these devices?
Also the Linksys devices have a keep alive option (NAT Keep Alive
Enable).

But even with both these setting enabled NAT gateways sometimes seem to
lose track of SIP sessions (I have more trouble with Cisco devices than
Linux routers), setting the UDP session timeout to 10m seems to help
(default is something like 3m).

-- 

   Daniel Tryba

-- 
_
-- 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] NAT issue (i think?)

2010-09-28 Thread Ron
hi daniel

thank you for your reply, i have enabled NAT keep-alive and NAT-Mapping 
on the Linksys devices.

i have enabled qualify before but it seems it's worst as the linksys 
devices keeps on rebooting and there was one issue that when i set 
qualify to all users my server bogged down and asterisk crashed.

where do i enable the UDP session timeout? on the linksys devices or the 
asterisk?

TIA

Regards
Ron

On 9/28/10 6:14 PM, Daniel Tryba wrote:
 On Tue, Sep 28, 2010 at 09:28:24AM +0800, Ron wrote:
 got this problem that IP phones could not re-register to my server. even
 if device is power cycled it still would not register. the solution i
 found was to change the SIP port settings on the phone and it will
 register. but after registration expires and its time to re-register the
 same thing will happen, so i have to update the port settings again just
 to make it work which is troublesome.

 Sounds like NAT problems, do you have qualify enabled for these devices?
 Also the Linksys devices have a keep alive option (NAT Keep Alive
 Enable).

 But even with both these setting enabled NAT gateways sometimes seem to
 lose track of SIP sessions (I have more trouble with Cisco devices than
 Linux routers), setting the UDP session timeout to 10m seems to help
 (default is something like 3m).


-- 
_
-- 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] NAT issue (i think?)

2010-09-28 Thread Danny Dias
You have to increase the time of expiration for the Register...on linksys
devices is located on Proxy and Registration section under the EXTN: (Where
N is the extension number)

Try putting this to: 3600

To check wheter or not is loosing Register, try with ngrep-sip and check it:

ngrep -p -q -W byline port 5060 register.pkt

Then post here the content of register.pkt; but please, after issuing the
change explained above!

Regards!

2010/9/28 Ron nha...@gmail.com

 Hi All.

 got this problem that IP phones could not re-register to my server. even
 if device is power cycled it still would not register. the solution i
 found was to change the SIP port settings on the phone and it will
 register. but after registration expires and its time to re-register the
 same thing will happen, so i have to update the port settings again just
 to make it work which is troublesome.

 i'm using Asterisk 1.4.31 with the following realtime config:

 rtcachefriends=yes
 rtsavesysname=yes
 rtupdate=yes
 rtautoclear=no

 one thing i noticed is that it only seems to happen on linksys devices
 e.g. PAP2 and SPA's. another phone i'm using is yealink and so far no
 client has complain about it.

 hope anyone can help. thank you.

 regards
 Ron


 --
 _
 -- 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] NAT issue (i think?)

2010-09-28 Thread Daniel Tryba
On Tue, Sep 28, 2010 at 07:08:36PM +0800, Ron wrote:
 i have enabled qualify before but it seems it's worst as the linksys 
 devices keeps on rebooting and there was one issue that when i set 
 qualify to all users my server bogged down and asterisk crashed.

Never seen these problems before related to qualify, how many devices
are there?

 where do i enable the UDP session timeout? on the linksys devices or the 
 asterisk?

Neither, that is a property of the NAT device. You should figure out
when the problem happens wether the NAT device has any knowledge of the
UDP session between the SIP device and Asterisk.

-- 

   Daniel Tryba

-- 
_
-- 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] NAT issue (i think?)

2010-09-28 Thread Ron
Hi Danny

On the pap2 by default it is set to 3600 and i have not change that.
by the way, is the NAT keep-alive same with the NOTIFY message? coz i am 
seeing my asterisk respond to those as bad event could that be causing 
it to loose the registration?

here's the registration from ngrep:

U 78.65.34.12:5094 - 12.34.56.78:5060
REGISTER sip:sip.mydomain.com SIP/2.0.
Via: SIP/2.0/UDP 78.65.34.12:5094;branch=z9hG4bK-25a5eec4;rport.
From: Kristine sip:456...@sip.mydomain.com;tag=68fc368d164925e0o0.
To: Kristine sip:456...@sip.mydomain.com.
Call-ID: c9bd8b57-f7bdc...@192.168.1.52.
CSeq: 116228 REGISTER.
Max-Forwards: 70.
Contact: Kristine sip:456...@78.65.34.12:5094;expires=3600.
User-Agent: Linksys/PAP2T-3.1.15(LS).
Content-Length: 0.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Supported: x-sipura.
.


U 12.34.56.78:5060 - 78.65.34.12:5094
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 
78.65.34.12:5094;branch=z9hG4bK-25a5eec4;received=78.65.34.12;rport=5094.
From: Kristine sip:456...@sip.mydomain.com;tag=68fc368d164925e0o0.
To: Kristine sip:456...@sip.mydomain.com.
Call-ID: c9bd8b57-f7bdc...@192.168.1.52.
CSeq: 116228 REGISTER.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.
Supported: replaces.
Content-Length: 0.


On 9/28/10 7:24 PM, Danny Dias wrote:
 You have to increase the time of expiration for the Register...on linksys
 devices is located on Proxy and Registration section under the EXTN: (Where
 N is the extension number)

 Try putting this to: 3600

 To check wheter or not is loosing Register, try with ngrep-sip and check it:

 ngrep -p -q -W byline port 5060register.pkt

 Then post here the content of register.pkt; but please, after issuing the
 change explained above!

 Regards!

 2010/9/28 Ronnha...@gmail.com

 Hi All.

 got this problem that IP phones could not re-register to my server. even
 if device is power cycled it still would not register. the solution i
 found was to change the SIP port settings on the phone and it will
 register. but after registration expires and its time to re-register the
 same thing will happen, so i have to update the port settings again just
 to make it work which is troublesome.

 i'm using Asterisk 1.4.31 with the following realtime config:

 rtcachefriends=yes
 rtsavesysname=yes
 rtupdate=yes
 rtautoclear=no

 one thing i noticed is that it only seems to happen on linksys devices
 e.g. PAP2 and SPA's. another phone i'm using is yealink and so far no
 client has complain about it.

 hope anyone can help. thank you.

 regards
 Ron


 --
 _
 -- 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] NAT issue (i think?)

2010-09-28 Thread Danny Dias
Hello Ron..

The answer that i see here is only a trying to a Register...means the
REGISTRATION procedures are taking a significant amount of time.

You should get a 200 OK

Can you lease make a simple draw of your architecture? seems to be a NAT
problem, that's for sure

REgards!

2010/9/28 Ron nha...@gmail.com

 Hi Danny

 On the pap2 by default it is set to 3600 and i have not change that.
 by the way, is the NAT keep-alive same with the NOTIFY message? coz i am
 seeing my asterisk respond to those as bad event could that be causing
 it to loose the registration?

 here's the registration from ngrep:

 U 78.65.34.12:5094 - 12.34.56.78:5060
 REGISTER sip:sip.mydomain.com SIP/2.0.
 Via: SIP/2.0/UDP 78.65.34.12:5094;branch=z9hG4bK-25a5eec4;rport.
 From: Kristine sip:456...@sip.mydomain.comsip%3a456...@sip.mydomain.com
 ;tag=68fc368d164925e0o0.
 To: Kristine sip:456...@sip.mydomain.com sip%3a456...@sip.mydomain.com
 .
 Call-ID: c9bd8b57-f7bdc...@192.168.1.52.
 CSeq: 116228 REGISTER.
 Max-Forwards: 70.
 Contact: Kristine sip:456...@78.65.34.12:5094;expires=3600.
 User-Agent: Linksys/PAP2T-3.1.15(LS).
 Content-Length: 0.
 Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
 Supported: x-sipura.
 .


 U 12.34.56.78:5060 - 78.65.34.12:5094
 SIP/2.0 100 Trying.
 Via: SIP/2.0/UDP
 78.65.34.12:5094;branch=z9hG4bK-25a5eec4;received=78.65.34.12;rport=5094.
 From: Kristine sip:456...@sip.mydomain.comsip%3a456...@sip.mydomain.com
 ;tag=68fc368d164925e0o0.
 To: Kristine sip:456...@sip.mydomain.com sip%3a456...@sip.mydomain.com
 .
 Call-ID: c9bd8b57-f7bdc...@192.168.1.52.
 CSeq: 116228 REGISTER.
 User-Agent: Asterisk PBX.
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.
 Supported: replaces.
 Content-Length: 0.


 On 9/28/10 7:24 PM, Danny Dias wrote:
  You have to increase the time of expiration for the Register...on linksys
  devices is located on Proxy and Registration section under the EXTN:
 (Where
  N is the extension number)
 
  Try putting this to: 3600
 
  To check wheter or not is loosing Register, try with ngrep-sip and check
 it:
 
  ngrep -p -q -W byline port 5060register.pkt
 
  Then post here the content of register.pkt; but please, after issuing the
  change explained above!
 
  Regards!
 
  2010/9/28 Ronnha...@gmail.com
 
  Hi All.
 
  got this problem that IP phones could not re-register to my server. even
  if device is power cycled it still would not register. the solution i
  found was to change the SIP port settings on the phone and it will
  register. but after registration expires and its time to re-register the
  same thing will happen, so i have to update the port settings again just
  to make it work which is troublesome.
 
  i'm using Asterisk 1.4.31 with the following realtime config:
 
  rtcachefriends=yes
  rtsavesysname=yes
  rtupdate=yes
  rtautoclear=no
 
  one thing i noticed is that it only seems to happen on linksys devices
  e.g. PAP2 and SPA's. another phone i'm using is yealink and so far no
  client has complain about it.
 
  hope anyone can help. thank you.
 
  regards
  Ron
 
 
  --
  _
  -- 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

-- 
_
-- 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