Hi!
I use a simple b2bua-setup for top hiding. The call is set up correctly, but when I hang it up from the callee-side, Opensips tries to forward the BYE to my client's internal ip-adress (behind nat).
Trace between opensips and end-user (end-user is initiating the call):
INVITE sip:48485858@85.19.212.36;transport=tcp SIP/2.0
To: <sip:48485858@10.3.8.20:5060>
From: "Unknown" <sip:38531300@dialer2.krs>;tag=209566
Via: SIP/2.0/TCP 10.3.8.20:5060;branch=z9hG4bK34022d4918236c6b79e8bc8e6, SIP/2.0/TCP 10.3.8.19:5062;branch=z9hG4bK536e622d0c249aa3042893620
Call-ID: b0ca7cda89995eb8f605efbb1df30a59@10.3.8.19
CSeq: 1 INVITE
Contact: <sip:38531300@10.3.8.19:5062;transport=tcp>
Max-Forwards: 69
x-inin-crn: 1001102458;loc=Kristiansand;ms=NECIC4
Supported: join, replaces
User-Agent: ININ-TsServer/3.11.11.12100
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, SUBSCRIBE
Accept: application/sdp
Accept-Encoding: identity
Content-Type: application/sdp
Content-Length: 197
Record-Route: <sip:10.3.8.20:5060;lr;transport=tcp>
v=0
o=ININ 2715879025 2715879026 IN IP4 10.3.8.19
s=Interaction
c=IN IP4 10.3.8.20
t=0 0
m=audio 21568 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
SIP/2.0 100 Trying
To: <sip:48485858@10.3.8.20:5060>
From: "Unknown" <sip:38531300@dialer2.krs>;tag=209566
Via: SIP/2.0/TCP 10.3.8.20:5060;received=80.239.13.209;rport=1321;branch=z9hG4bK34022d4918236c6b79e8bc8e6, SIP/2.0/TCP 10.3.8.19:5062;branch=z9hG4bK536e622d0c249aa3042893620
Call-ID: b0ca7cda89995eb8f605efbb1df30a59@10.3.8.19
CSeq: 1 INVITE
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 0
SIP/2.0 183 Session Progress
To: <sip:48485858@10.3.8.20:5060>;tag=B2B.494.491
From: "Unknown" <sip:38531300@dialer2.krs>;tag=209566
Via: SIP/2.0/TCP 10.3.8.20:5060;received=80.239.13.209;rport=1321;branch=z9hG4bK34022d4918236c6b79e8bc8e6, SIP/2.0/TCP 10.3.8.19:5062;branch=z9hG4bK536e622d0c249aa3042893620
Call-ID: b0ca7cda89995eb8f605efbb1df30a59@10.3.8.19
CSeq: 1 INVITE
Record-Route: <sip:10.3.8.20:5060;lr;transport=tcp>
Content-Type: application/sdp
Supported: replaces, timer
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Contact: <sip:85.19.212.36:5060;transport=tcp>
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 264
v=0
o=root 2131121205 2131121205 IN IP4 85.19.212.13
s=Asterisk PBX 1.6.1.20
c=IN IP4 85.19.212.13
t=0 0
m=audio 18016 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 180 Ringing
To: <sip:48485858@10.3.8.20:5060>;tag=B2B.494.491
From: "Unknown" <sip:38531300@dialer2.krs>;tag=209566
Via: SIP/2.0/TCP 10.3.8.20:5060;received=80.239.13.209;rport=1321;branch=z9hG4bK34022d4918236c6b79e8bc8e6, SIP/2.0/TCP 10.3.8.19:5062;branch=z9hG4bK536e622d0c249aa3042893620
Call-ID: b0ca7cda89995eb8f605efbb1df30a59@10.3.8.19
CSeq: 1 INVITE
Record-Route: <sip:10.3.8.20:5060;lr;transport=tcp>
Supported: replaces, timer
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Contact: <sip:85.19.212.36:5060;transport=tcp>
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 0
SIP/2.0 200 OK
To: <sip:48485858@10.3.8.20:5060>;tag=B2B.494.491
From: "Unknown" <sip:38531300@dialer2.krs>;tag=209566
Via: SIP/2.0/TCP 10.3.8.20:5060;received=80.239.13.209;rport=1321;branch=z9hG4bK34022d4918236c6b79e8bc8e6, SIP/2.0/TCP 10.3.8.19:5062;branch=z9hG4bK536e622d0c249aa3042893620
Call-ID: b0ca7cda89995eb8f605efbb1df30a59@10.3.8.19
CSeq: 1 INVITE
Record-Route: <sip:10.3.8.20:5060;lr;transport=tcp>
Content-Type: application/sdp
Supported: replaces, timer
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Contact: <sip:85.19.212.36:5060;transport=tcp>
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 264
v=0
o=root 2131121205 2131121206 IN IP4 85.19.212.13
s=Asterisk PBX 1.6.1.20
c=IN IP4 85.19.212.13
t=0 0
m=audio 18016 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
ACK sip:85.19.212.36:5060;transport=tcp SIP/2.0
To: <sip:48485858@10.3.8.20:5060>;tag=B2B.494.491
From: "Unknown" <sip:38531300@dialer2.krs>;tag=209566
Call-ID: b0ca7cda89995eb8f605efbb1df30a59@10.3.8.19
CSeq: 1 ACK
Via: SIP/2.0/TCP 10.3.8.20:5060;branch=z9hG4bK9a21c71e601ee5f92b7457b36, SIP/2.0/TCP 10.3.8.19:5062;branch=z9hG4bKeb12274eeb5844f08483257d5
Max-Forwards: 69
x-inin-crn: 1001102458;loc=Kristiansand;ms=NECIC4
Supported: join, replaces
User-Agent: ININ-TsServer/3.11.11.12100
Content-Length: 0
Record-Route: <sip:10.3.8.20:5060;lr;transport=tcp>
Trace between opensips and gateway:
INVITE sip:48485858@85.19.212.13;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 85.19.212.36;branch=z9hG4bKa186.3ab03a12.0
To: sip:48485858@85.19.212.13
From: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
CSeq: 2 INVITE
Call-ID: B2B.245.1697878
Content-Length: 197
User-Agent: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Type: application/sdp
Supported: join, replaces
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, SUBSCRIBE
Max-Forwards: 68
Contact: <sip:85.19.212.36:5060;transport=tcp>
v=0
o=ININ 2715879025 2715879026 IN IP4 10.3.8.19
s=Interaction
c=IN IP4 10.3.8.20
t=0 0
m=audio 21568 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 85.19.212.36;branch=z9hG4bKa186.3ab03a12.0;received=85.19.212.36
From: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
To: sip:48485858@85.19.212.13
Call-ID: B2B.245.1697878
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.1.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:48485858@85.19.212.13;transport=TCP>
Content-Length: 0
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 85.19.212.36;branch=z9hG4bKa186.3ab03a12.0;received=85.19.212.36
From: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
To: sip:48485858@85.19.212.13
Call-ID: B2B.245.1697878
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.1.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:48485858@85.19.212.13;transport=TCP>
Content-Length: 0
SIP/2.0 183 Session Progress
Via: SIP/2.0/TCP 85.19.212.36;branch=z9hG4bKa186.3ab03a12.0;received=85.19.212.36
From: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
To: sip:48485858@85.19.212.13;tag=as70550b35
Call-ID: B2B.245.1697878
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.1.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:48485858@85.19.212.13;transport=TCP>
Content-Type: application/sdp
Content-Length: 264
v=0
o=root 2131121205 2131121205 IN IP4 85.19.212.13
s=Asterisk PBX 1.6.1.20
c=IN IP4 85.19.212.13
t=0 0
m=audio 18016 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 180 Ringing
Via: SIP/2.0/TCP 85.19.212.36;branch=z9hG4bKa186.3ab03a12.0;received=85.19.212.36
From: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
To: sip:48485858@85.19.212.13;tag=as70550b35
Call-ID: B2B.245.1697878
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.1.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:48485858@85.19.212.13;transport=TCP>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/TCP 85.19.212.36;branch=z9hG4bKa186.3ab03a12.0;received=85.19.212.36
From: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
To: sip:48485858@85.19.212.13;tag=as70550b35
Call-ID: B2B.245.1697878
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.1.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:48485858@85.19.212.13;transport=TCP>
Content-Type: application/sdp
Content-Length: 264
v=0
o=root 2131121205 2131121206 IN IP4 85.19.212.13
s=Asterisk PBX 1.6.1.20
c=IN IP4 85.19.212.13
t=0 0
m=audio 18016 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
ACK sip:48485858@85.19.212.13;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 85.19.212.36;branch=z9hG4bKa186.4ab03a12.0
To: <sip:48485858@85.19.212.13>;tag=as70550b35
From: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
CSeq: 2 ACK
Call-ID: B2B.245.1697878
Content-Length: 0
User-Agent: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Supported: join, replaces
Max-Forwards: 69
Contact: <sip:85.19.212.36:5060;transport=tcp>
BYE sip:85.19.212.36:5060;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 85.19.212.13:5060;branch=z9hG4bK7fd3a255;rport
Max-Forwards: 70
From: sip:48485858@85.19.212.13;tag=as70550b35
To: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
Call-ID: B2B.245.1697878
CSeq: 102 BYE
User-Agent: Asterisk PBX 1.6.1.20
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
SIP/2.0 408 Timeout
Via: SIP/2.0/TCP 85.19.212.13:5060;branch=z9hG4bK7fd3a255;rport=5060
From: sip:48485858@85.19.212.13;tag=as70550b35
To: <sip:38531300@dialer2.krs>;tag=b30b1ac3712d673c2b813c152c4aced8
Call-ID: B2B.245.1697878
CSeq: 102 BYE
Contact: <sip:85.19.212.36:5060;transport=tcp>
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 0
Error on opensips-server when BYE arrives:
Oct 3 14:31:57 sip3 /usr/sbin/opensips[13442]: ERROR:core:tcp_blocking_connect: timeout 10 s elapsed from 10 s
Oct 3 14:31:57 sip3 /usr/sbin/opensips[13442]: ERROR:core:tcpconn_connect: tcp_blocking_connect failed
Oct 3 14:31:57 sip3 /usr/sbin/opensips[13442]: ERROR:core:tcp_send: connect failed
Oct 3 14:31:57 sip3 /usr/sbin/opensips[13442]: ERROR:tm:msg_send: tcp_send failed
Oct 3 14:31:57 sip3 /usr/sbin/opensips[13442]: ERROR:tm:t_uac: attempt to send to 'sip:10.3.8.20:5060;lr;transport=tcp' failed
It seems like opensips/b2bua-module is trying to forward the message to the destination in the record-route header, which normaly is ok when end-user is not behind nat.
Best regards,
Morten Tryfoss
Hi Morten,
You would have the same problem even if you were not using B2BUA.
It seems like you have an equipment between the end user and OpenSIPS that adds that Record-Route header with a private IP, and also a Via header.
Via: SIP/2.0/TCP 10.3.8.20:5060;branch=z9hG4bK34022d4918236c6b79e8bc8e6,
Record-Route: <sip:10.3.8.20:5060;lr;transport=tcp>
So your problem seems like a setup problem on that equipment.
Regards,
Anca