[Home]

Summary:ASTERISK-03662: 4th Invite Causes One Way Voice or No Voice
Reporter:Lawrence (finejava)Labels:
Date Opened:2005-03-10 03:53:04.000-0600Date Closed:2011-06-07 14:10:16
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 1st
( 1) ethereal.dat
Description:I've got a big problem and desperately in the midst of seeking help from the expert out there.

Configuration
=============
sip.conf

; General peer configuration
[XXXX]
type=friend
host=dynamic
secret=XXXX
auth=md5
nat=yes
context=sip
disallow=all
allow=g723
allow=g729
callerid="XXXX" <XXXX>
canreinvite=yes
qualify=yes
;pendantic=yes => if i uncomment this, i can't terminate calls to the PSTN and it also cause several other app not working

Scenario
========
Our problem occurs when 1 of the VoIP(TA200) are sitting behind a certain router say e.g DLink 500g/DLink 804 is calling

another party VoIP(TA200) over the public IP. By analysing the 4th invite in the trace log, asterisk has set the  IP in the (c) header as LAN IP

instead of the WAN IP which causes both party not able to listen or talk to each other.

Is there solution to change the 4th invite (c) IP to WAN IP and only used the LAN IP if they are on the same network? or
Is there any other solution to solve the problem we are facing? or
Has anyone experiencing the same problem as we have, and have dealt with it? (similar to bug id = 0003250, and tried the fix by Mark but the pedantic=yes causes problem)


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

Trace Log
=========
Legend: XXX.XXX.XXX.XXX is WAN IP

INVITE sip:603200913@192.168.0.117;user=phone SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK558f96a3;rport
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>
Contact: <sip:603200001@XXX.XXX.XXX.XXX>
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 102 INVITE
User-Agent: GENME
Date: Mon, 07 Mar 2005 08:26:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 242

v=0
o=root 4613 4613 IN IP4 XXX.XXX.XXX.XXX
s=session
c=IN IP4 XXX.XXX.XXX.XXX
t=0 0
m=audio 17026 RTP/AVP 4 18 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
SIP/2.0 100 Trying
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 102 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK558f96a3;rport
Content-Length: 0
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

SIP/2.0 180 Ringing
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 102 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK558f96a3;rport
Content-Length: 0
Contact: <sip:603200913@192.168.0.117;user=phone>
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

SIP/2.0 200 OK
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 102 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK558f96a3;rport
Content-Length: 214
Allow: NOTIFY
Allow: REFER
Allow: OPTIONS
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Content-Type: application/sdp
Supported: replaces
Contact: <sip:603200913@192.168.0.117;user=phone>
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

v=0
o=MxSIP 0 841224053 IN IP4 192.168.0.117
s=SIP Call
c=IN IP4 192.168.0.117
t=0 0
m=audio 27002 RTP/AVP 4 18 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:603200913@192.168.0.117;user=phone SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK5676e665;rport
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Contact: <sip:603200001@XXX.XXX.XXX.XXX>
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 102 ACK
User-Agent: GENME
Content-Length: 0

INVITE sip:603200913@192.168.0.117 SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK6f1587a4;rport
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Contact: <sip:603200001@XXX.XXX.XXX.XXX>
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 103 INVITE
User-Agent: GENME
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 266

v=0
o=root 4613 4614 IN IP4 192.168.20.79
s=session
c=IN IP4 192.168.20.79
t=0 0
m=audio 27002 RTP/AVP 4 18 0 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
SIP/2.0 100 Trying
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 103 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK6f1587a4;rport
Content-Length: 0
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

SIP/2.0 200 OK
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 103 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK6f1587a4;rport
Content-Length: 214
Allow: NOTIFY
Allow: REFER
Allow: OPTIONS
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Content-Type: application/sdp
Supported: replaces
Contact: <sip:603200913@192.168.0.117;user=phone>
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

v=0
o=MxSIP 0 841224053 IN IP4 192.168.0.117
s=SIP Call
c=IN IP4 192.168.0.117
t=0 0
m=audio 27002 RTP/AVP 4 18 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:603200913@192.168.0.117 SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK182545e0;rport
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Contact: <sip:603200001@XXX.XXX.XXX.XXX>
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 103 ACK
User-Agent: GENME
Content-Length: 0

INVITE sip:603200913@192.168.0.117 SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK5e4c4de5;rport
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Contact: <sip:603200001@XXX.XXX.XXX.XXX>
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 104 INVITE
User-Agent: GENME
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 267

v=0
o=root 4613 4615 IN IP4 202.188.160.10
s=session
c=IN IP4 202.188.160.10
t=0 0
m=audio 1164 RTP/AVP 4 18 0 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
SIP/2.0 100 Trying
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 104 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK5e4c4de5;rport
Content-Length: 0
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

SIP/2.0 200 OK
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 104 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK5e4c4de5;rport
Content-Length: 214
Allow: NOTIFY
Allow: REFER
Allow: OPTIONS
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Content-Type: application/sdp
Supported: replaces
Contact: <sip:603200913@192.168.0.117;user=phone>
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

v=0
o=MxSIP 0 841224053 IN IP4 192.168.0.117
s=SIP Call
c=IN IP4 192.168.0.117
t=0 0
m=audio 27002 RTP/AVP 4 18 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:603200913@192.168.0.117 SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK0231e100;rport
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Contact: <sip:603200001@XXX.XXX.XXX.XXX>
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 104 ACK
User-Agent: GENME
Content-Length: 0

4th INVITE
==========

INVITE sip:603200913@192.168.0.117 SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK7dbdedbf;rport
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Contact: <sip:603200001@XXX.XXX.XXX.XXX>
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 105 INVITE
User-Agent: GENME
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 242

v=0
o=root 4613 4616 IN IP4 192.168.20.79
s=session
c=IN IP4 192.168.20.79  <--- Suppose to be XXX.XXX.XXX.XXX(WAN IP) instead of local LAN IP
t=0 0
m=audio 27002 RTP/AVP 4 18 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
SIP/2.0 100 Trying
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 105 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK7dbdedbf;rport
Content-Length: 0
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

SIP/2.0 200 OK
Call-ID: 39edec957c85895b1e73fd0f15f28a90@XXX.XXX.XXX.XXX
CSeq: 105 INVITE
From: "603200001" <sip:603200001@XXX.XXX.XXX.XXX>;tag=as5ab8bad0
To: <sip:603200913@192.168.0.117;user=phone>;tag=0219e174c881858
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK7dbdedbf;rport
Content-Length: 214
Allow: NOTIFY
Allow: REFER
Allow: OPTIONS
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Content-Type: application/sdp
Supported: replaces
Contact: <sip:603200913@192.168.0.117;user=phone>
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26

v=0
o=MxSIP 0 841224053 IN IP4 192.168.0.117
s=SIP Call
c=IN IP4 192.168.0.117
t=0 0
m=audio 27002 RTP/AVP 4 18 101
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
Comments:By: Olle Johansson (oej) 2005-03-10 09:33:38.000-0600

First, please don't add SIP debug in the bug report, add it as a .txt file attached, like your ethereal. Secondly, we need your sip.conf [general] section in this bug report to see your settings for NAT traversal.

Thank you.

By: Lawrence (finejava) 2005-03-10 11:22:10.000-0600

[general]
port=5060
bindaddr=0.0.0.0
context=SIP2SIP
accountcode=SIP
tos=reliability
defaultexpirey=600
maxexpirey=3600
rtptimeout=60
rtpholdtimeout=300
useragent=XXXX
realm=XXXX
callerid=XXXX
;pedantic=yes

disallow=all
allow=g723
allow=g729

above is my general settings in sip.conf

By: Olle Johansson (oej) 2005-03-10 11:38:03.000-0600

Since you are not setting localnet= Asterisk will base decisions upon your interface routing table. Check if adding localnet= and externIP will change the behaviour.

By: Mark Spencer (markster) 2005-03-10 19:50:12.000-0600

This is a configuration issue, not a bug.

By: Lawrence (finejava) 2005-03-10 21:10:18.000-0600

We have done the changes as advised by oej,

[general]
port=5060
bindaddr=0.0.0.0
context=SIP2SIP
accountcode=SIP
tos=reliability
defaultexpirey=600
maxexpirey=3600
rtptimeout=60
rtpholdtimeout=300
useragent=GENME
realm=GENME
callerid=GENME
externip=XXX.XXX.XXX.XXX
localnet=192.168.0.0/255.255.0.0
localnet=10.0.0.0/255.0.0.0
localnet=172.16.0.0/255.255.0.0
localnet=169.254.0.0/255.255.0.0

disallow=all
allow=g723
allow=g729

but we still find that the 4th invite is being sent with the local LAN IP in the SDP and subsequent INVITE is still being sent regardless the channel have been bridged and rtp packets is flowing. This causes voice to "disappear". In our scenario, we sometimes hear the first few words and then nothing, other times we hear nothing from the beginning. We have also tested with Linksys PAP2 and same thing occurs.

The 4th and subsequent INVITE are not nessecary. Is there anything in our configuration which is not right.

we have additional traces, but unable to upload because the bug is set to resolve. Can you please reopen the bug so that we can upload.

By: Mark Spencer (markster) 2005-03-11 00:18:30.000-0600

Disable reinvites if you want, but this is in any case a configuration issue.  Please do not reopen without discussing with a bug marshall first, or alternatively seek technical support in #asterisk or at Digium.