[Home]

Summary:ASTERISK-16268: [patch] Linksys SPA94x keep-alive reply replies to wrong address
Reporter:James Lamanna (jlamanna)Labels:
Date Opened:2010-06-18 17:41:52Date Closed:2010-06-23 12:25:34
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) keep_alive_fix.diff
Description:It appears as though the 489 Bad Event response to the NAT keep alive event responds to the local address, instead of responding to the NATted address.
This causes Linksys phones to go amber (no registration) after a short amount of time after placing calls.
Turning the Linksys NAT keep alive off is a workound.

SIP trace:

U external.ip:9375 -> asterisk.ip:5060
 NOTIFY sip:asterisk.ip SIP/2.0..Via: SIP/2.0/UDP 10.10.30.65:9375;branch=z9hG4bK-8ebce8bc..From: "xxx-xxx-xxxx" <sip:9497197231@asterisk.ip>;tag=3a6a735864619b8bo0..To: <sip:asterisk.ip>..Call-ID: 19a0bd7
 c-3cb137b7@10.10.30.65..CSeq: 395 NOTIFY..Max-Forwards: 70..Contact: "xxx-xxx-xxxx" <sip:xxxxxxxxxx@10.10.30.65:9375>..Event: keep-alive..User-Agent: Linksys/SPA942-6.1.3(a)-000e08d87445..Content-Length: 0....            
#
U asterisk.ip:5060 -> 10.10.30.65:9375
 SIP/2.0 489 Bad event..Via: SIP/2.0/UDP 10.10.30.65:9375;branch=z9hG4bK-8ebce8bc;received=external.ip..From: "xxx-xxx-xxxx" <sip:9497197231@asterisk.ip>;tag=3a6a735864619b8bo0..To: <sip:asterisk.ip>;tag=as4a
 4466b0..Call-ID: 19a0bd7c-3cb137b7@10.10.30.65..CSeq: 395 NOTIFY..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces..Content-Length: 0....  

Comments:By: Paul Belanger (pabelanger) 2010-06-18 18:54:37

Thanks for your comments. This does not appear to be a bug report and we are closing it. We appreciate the difficulties you are facing, but it would make more sense to raise your question in the support tracker, http://www.asterisk.org/support

By: James Lamanna (jlamanna) 2010-06-18 19:16:09

Huh?
How is sending a response to the wrong address for a NATed host not a BUG?
I've given you a SIP trace outlining the bug!

By: Paul Belanger (pabelanger) 2010-06-18 19:52:20

This is configuration issue; not a bug.

By: James Lamanna (jlamanna) 2010-06-18 20:44:24

Please explain how this is a configuration issue.
All other SIP packets to the device are sent to the correct NAT IP address.
The responses to these NOTIFY packets are the only ones that are broken.

If you are saying turning on NAT keep-alive is a configuration issue, then I would argue that Asterisk should support this or at least not break the device's registration.

By: Paul Belanger (pabelanger) 2010-06-18 20:54:40

This is not the place for theses question, see the first post. Do not reopen this issue unless you have A) read http://www.asterisk.org/support and B) http://www.asterisk.org/developers/bug-guidelines

By: Paul Belanger (pabelanger) 2010-06-18 21:45:43

For the record, upgrading to 1.6.2 will resolve your problems.  Otherwise, you will need to backport the patch from 15084

By: James Lamanna (jlamanna) 2010-06-23 12:00:59

I have submitted a patch that fixes this issue and provides PROPER "200 OK" responses for keep-alive messages that are sent.
This patch is against 1.4.32.
The problem is that NOTIFY messages are not allowed to create a dialog.
That ends up with the current 489 Bad Event being sent back to the WRONG address when the response is sent, as my SIP trace on this bug shows.

This patch allows NOTIFY message with the "keep-alive" event to create a SIP dialog, thus following the proper NAT rules and allowing the phone behind NAT to receive a 200 OK reply to the packet.

By: Paul Belanger (pabelanger) 2010-06-23 12:05:50

Does the problem exist with 1.6.2?  I don't expect this patch will be applied to 1.4 since it is a new feature.

By: Paul Belanger (pabelanger) 2010-06-23 12:25:34

Closing since this is a duplicate (see below).  Follow along in issue 0017379.
--
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. Thanks!