[Home]

Summary:ASTERISK-16911: [regression] INVITEs forwarded to port 5060 instead of real port
Reporter:mfortini (mfortini)Labels:
Date Opened:2010-11-04 12:23:26Date Closed:2012-01-31 15:55:31.000-0600
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast1_6_2.log
( 1) ast1_8_0.log
Description:with two linphones on port 5062 registered on an * server 1.8.0, if I call from one to the other, the INVITEs received from one linphone are forwarded to the other @port 5060 instead of 5062, causing the call to be dropped after a while. The behavior is not the same in 1.6.2. See attached logs.

****** ADDITIONAL INFORMATION ******

This is the behavior in 1.8.0: http://asterisk.pastebin.com/BMNL1mvn
This is the behavior in 1.6.2: http://asterisk.pastebin.com/Sfkd6XrQ
Comments:By: Paul Belanger (pabelanger) 2010-11-04 13:46:07

Okay, something weird is going on with the 1.8 trace.  First, please collect a debug log (see below), enable SIP debugging.   Second, upload both good and bad traces to the issue tracker, pastebin is not acceptable.
---
We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Paul Belanger (pabelanger) 2010-11-04 14:20:06

What is the actual problem? If the INVITEs were being sent to the wrong port you would your phones would not be ringing or able to accept the call.  Are you having problems with audio dropping after X amount of minutes?

As for your previous 1.8 trace, the only thing I can see wrong ATM is:

line 70: ontact: <sip:cit02@192.168.12.103:5060>

The missing 'c'.

By: mfortini (mfortini) 2010-11-05 06:08:13

I added the two logs as per the doc. The problem is, after around 20s the call is ended in asterisk 1.8.0, while it works properly for hours in asterisk 1.6.2, same config.

By: Paul Belanger (pabelanger) 2010-11-05 07:50:02

I don't think I have ever seen: SIP/2.0 101 Dialog Establishement before.

By: mfortini (mfortini) 2010-11-05 08:17:39

Seems to bother only the newer release, though.

By: Matt Jordan (mjordan) 2012-01-31 15:55:23.292-0600

This is actually a bug in that particular version of linphone.  When we receive the 200 OK from cit03, the Contact header specifies an IP address with no port.  As such, we have to assume that it means the default SIP port, which is 5060.  This changes the destination that Asterisk sends the ACK to, from 192.168.12.102:5062 to 192.168.12.102:5060.  A snippet of the packet from the log is shown below:

<--- SIP read from UDP:192.168.12.102:5062 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.103:5060;branch=z9hG4bK5a51dfb3
From: "cit03" <sip:cit03@192.168.12.103>;tag=as635524c7
To: <sip:sax3n02.local:5062>;tag=1224461129
Call-ID: 48d016d22a0326e3111403d77c63fa9f@192.168.12.103:5060
CSeq: 102 INVITE
Contact: <sip:192.168.12.102>