SOLVED BYE has bad Via header

Status
Not open for further replies.

hhijawi

New Member
Nov 10, 2020
13
0
1
35
Hi,
I am getting this error when calling an extension. Both extensions are behind the NAT, the call is started and I can hear the voice. but hangup fails with the following error.
If I used a 3G connection for both extensions, start and end call work fine.


tport.c:3286 tport_tsend() tport_tsend(0x7f2de4040620) tpn = TCP/46.244.66.80:16143
tport.c:3623 tport_vsend() tport_vsend(0x7f2de4040620): 1249 bytes of 1249 to tcp/46.244.66.80:16143
tport.c:3521 tport_send_msg() tport_vsend returned 1249
tport.c:2311 tport_set_secondary_timer() tport(0x7f2de4040620): reset timer
nta.c:7209 _nta_incoming_timer() nta_incoming_timer: 1/1 resent, 0/1 tout, 0/1 term, 0/2 free
nta.c:1300 agent_timer() nta: timer set next to 4000 ms
tport.c:2770 tport_wakeup_pri() tport_wakeup_pri(0x7f2de407f890): events IN
tport.c:2893 tport_recv_event() tport_recv_event(0x7f2de407f890)
tport.c:3234 tport_recv_iovec() tport_recv_iovec(0x7f2de407f890) msg 0x7f2de40f54d0 from (udp/80.240.28.174:5060) has 376 bytes, veclen = 1
tport.c:3052 tport_deliver() tport_deliver(0x7f2de407f890): msg 0x7f2de40f54d0 (376 bytes) from udp/46.244.66.80:5060/sip next=(nil)
nta.c:2895 agent_recv_request() nta: received ACK sip:*723@80.240.28.174:5060;transport=udp SIP/2.0 (CSeq 18505)
nta.c:2957 agent_recv_request() nta: ACK has bad Via header
tport.c:2770 tport_wakeup_pri() tport_wakeup_pri(0x7f2de407f890): events IN
tport.c:2893 tport_recv_event() tport_recv_event(0x7f2de407f890)
tport.c:3234 tport_recv_iovec() tport_recv_iovec(0x7f2de407f890) msg 0x7f2de40f54d0 from (udp/80.240.28.174:5060) has 400 bytes, veclen = 1
tport.c:3052 tport_deliver() tport_deliver(0x7f2de407f890): msg 0x7f2de40f54d0 (400 bytes) from udp/46.244.66.80:5060/sip next=(nil)
nta.c:2895 agent_recv_request() nta: received BYE sip:*723@80.240.28.174:5060;transport=udp SIP/2.0 (CSeq 18506)
nta.c:2957 agent_recv_request() nta: BYE has bad Via header
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
How about posting an sngrep of an affected call then we can see the flow much easier.
 

hhijawi

New Member
Nov 10, 2020
13
0
1
35
Thanks for the response, following the trace. Now even the invite fails.

nta.c:9165 outgoing_timer_dk() nta: timer K fired, terminate OPTIONS (28015997)
nta.c:8837 outgoing_reclaim_queued() outgoing_reclaim_all((nil), (nil), 0x7f51e2f43d00)
nta.c:8984 _nta_outgoing_timer() nta_outgoing_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free
nta.c:1293 agent_timer() nta: timer not set
tport.c:2770 tport_wakeup_pri() tport_wakeup_pri(0x7f51cc07f5d0): events IN
tport.c:2893 tport_recv_event() tport_recv_event(0x7f51cc07f5d0)
tport.c:3234 tport_recv_iovec() tport_recv_iovec(0x7f51cc07f5d0) msg 0x7f51cc0946d0 from (udp/80.240.28.174:5060) has 1024 bytes, veclen = 1
recv 1024 bytes from udp/[5.43.221.226]:18876 at 09:45:20.586843:
------------------------------------------------------------------------
INVITE sip:*723@80.240.28.174 SIP/2.0
Via: SIP/2.0/UDP 5.43.221.226:18876:18876;rport;branch=z9hG4bKPj102911d4-9423-4549-8793-6dba7055ba6b
Max-Forwards: 70
From: sip:11@80.240.28.174;tag=963d83e5-25f3-46c4-bff2-041c35f5247d
To: sip:*723@80.240.28.174
Contact: <sip:11@5.43.221.226:18876;ob>
Call-ID: 1c841bac-136a-4b20-b172-f7ad915d3480
CSeq: 20258 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: FREESWITCH
Content-Type: application/sdp
Content-Length: 399

v=0
o=- 3814249519 3814249519 IN IP4 5.43.221.226
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 19200 RTP/AVP 120 8 0 96
c=IN IP4 5.43.221.226
b=TIAS:96000
a=rtcp:19201 IN IP4 192.168.1.100
a=sendrecv
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
m=video 0 RTP/AVP 31
c=IN IP4 127.0.0.1
tport.c:3052 tport_deliver() tport_deliver(0x7f51cc07f5d0): msg 0x7f51cc0946d0 (1024 bytes) from udp/5.43.221.226:5060/sip next=(nil)
nta.c:2895 agent_recv_request() nta: received INVITE sip:*723@80.240.28.174 SIP/2.0 (CSeq 20258)
nta.c:2957 agent_recv_request() nta: INVITE has bad Via header
tport.c:2770 tport_wakeup_pri() tport_wakeup_pri(0x7f51cc07f5d0): events IN
tport.c:2893 tport_recv_event() tport_recv_event(0x7f51cc07f5d0)
tport.c:3234 tport_recv_iovec() tport_recv_iovec(0x7f51cc07f5d0) msg 0x7f51cc079290 from (udp/80.240.28.174:5060) has 1024 bytes, veclen = 1
recv 1024 bytes from udp/[5.43.221.226]:18876 at 09:45:21.174212:
------------------------------------------------------------------------
INVITE sip:*723@80.240.28.174 SIP/2.0
Via: SIP/2.0/UDP 5.43.221.226:18876:18876;rport;branch=z9hG4bKPj102911d4-9423-4549-8793-6dba7055ba6b
Max-Forwards: 70
From: sip:11@80.240.28.174;tag=963d83e5-25f3-46c4-bff2-041c35f5247d
To: sip:*723@80.240.28.174
Contact: <sip:11@5.43.221.226:18876;ob>
Call-ID: 1c841bac-136a-4b20-b172-f7ad915d3480
CSeq: 20258 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: FREESWITCH
Content-Type: application/sdp
Content-Length: 399

v=0
o=- 3814249519 3814249519 IN IP4 5.43.221.226
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 19200 RTP/AVP 120 8 0 96
c=IN IP4 5.43.221.226
b=TIAS:96000
a=rtcp:19201 IN IP4 192.168.1.100
a=sendrecv
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
m=video 0 RTP/AVP 31
c=IN IP4 127.0.0.1
tport.c:3052 tport_deliver() tport_deliver(0x7f51cc07f5d0): msg 0x7f51cc079290 (1024 bytes) from udp/5.43.221.226:5060/sip next=(nil)
nta.c:2895 agent_recv_request() nta: received INVITE sip:*723@80.240.28.174 SIP/2.0 (CSeq 20258)
nta.c:2957 agent_recv_request() nta: INVITE has bad Via header
tport.c:2770 tport_wakeup_pri() tport_wakeup_pri(0x7f51cc07f5d0): events IN
tport.c:2893 tport_recv_event() tport_recv_event(0x7f51cc07f5d0)
tport.c:3234 tport_recv_iovec() tport_recv_iovec(0x7f51cc07f5d0) msg 0x7f51cc081300 from (udp/80.240.28.174:5060) has 2 bytes, veclen = 1
tport.c:3052 tport_deliver() tport_deliver(0x7f51cc07f5d0): bad msg 0x7f51cc081300 (2 bytes) from udp/5.43.221.226:5060/sip next=(nil)
tport.c:2770 tport_wakeup_pri() tport_wakeup_pri(0x7f51cc07f5d0): events IN
tport.c:2893 tport_recv_event() tport_recv_event(0x7f51cc07f5d0)
tport.c:3234 tport_recv_iovec() tport_recv_iovec(0x7f51cc07f5d0) msg 0x7f51cc079290 from (udp/80.240.28.174:5060) has 1024 bytes, veclen = 1
recv 1024 bytes from udp/[5.43.221.226]:18876 at 09:45:22.098065:
------------------------------------------------------------------------
INVITE sip:*723@80.240.28.174 SIP/2.0
Via: SIP/2.0/UDP 5.43.221.226:18876:18876;rport;branch=z9hG4bKPj102911d4-9423-4549-8793-6dba7055ba6b
Max-Forwards: 70
From: sip:11@80.240.28.174;tag=963d83e5-25f3-46c4-bff2-041c35f5247d
To: sip:*723@80.240.28.174
Contact: <sip:11@5.43.221.226:18876;ob>
Call-ID: 1c841bac-136a-4b20-b172-f7ad915d3480
CSeq: 20258 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: FREESWITCH
Content-Type: application/sdp
Content-Length: 399

v=0
o=- 3814249519 3814249519 IN IP4 5.43.221.226
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 19200 RTP/AVP 120 8 0 96
c=IN IP4 5.43.221.226
b=TIAS:96000
a=rtcp:19201 IN IP4 192.168.1.100
a=sendrecv
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
m=video 0 RTP/AVP 31
c=IN IP4 127.0.0.1
tport.c:3052 tport_deliver() tport_deliver(0x7f51cc07f5d0): msg 0x7f51cc079290 (1024 bytes) from udp/5.43.221.226:5060/sip next=(nil)
nta.c:2895 agent_recv_request() nta: received INVITE sip:*723@80.240.28.174 SIP/2.0 (CSeq 20258)
nta.c:2957 agent_recv_request() nta: INVITE has bad Via header
tport.c:2770 tport_wakeup_pri() tport_wakeup_pri(0x7f51cc07f5d0): events IN
tport.c:2893 tport_recv_event() tport_recv_event(0x7f51cc07f5d0)
tport.c:3234 tport_recv_iovec() tport_recv_iovec(0x7f51cc07f5d0) msg 0x7f51cc079290 from (udp/80.240.28.174:5060) has 1024 bytes, veclen = 1
recv 1024 bytes from udp/[5.43.221.226]:18876 at 09:45:24.248141:
------------------------------------------------------------------------
INVITE sip:*723@80.240.28.174 SIP/2.0
Via: SIP/2.0/UDP 5.43.221.226:18876:18876;rport;branch=z9hG4bKPj102911d4-9423-4549-8793-6dba7055ba6b
Max-Forwards: 70
From: sip:11@80.240.28.174;tag=963d83e5-25f3-46c4-bff2-041c35f5247d
To: sip:*723@80.240.28.174
Contact: <sip:11@5.43.221.226:18876;ob>
Call-ID: 1c841bac-136a-4b20-b172-f7ad915d3480
CSeq: 20258 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: FREESWITCH
Content-Type: application/sdp
Content-Length: 399

v=0
o=- 3814249519 3814249519 IN IP4 5.43.221.226
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 19200 RTP/AVP 120 8 0 96
c=IN IP4 5.43.221.226
b=TIAS:96000
a=rtcp:19201 IN IP4 192.168.1.100
a=sendrecv
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
m=video 0 RTP/AVP 31
c=IN IP4 127.0.0.1
tport.c:3052 tport_deliver() tport_deliver(0x7f51cc07f5d0): msg 0x7f51cc079290 (1024 bytes) from udp/5.43.221.226:5060/sip next=(nil)
nta.c:2895 agent_recv_request() nta: received INVITE sip:*723@80.240.28.174 SIP/2.0 (CSeq 20258)
nta.c:2957 agent_recv_request() nta: INVITE has bad Via header
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
The via header is bad: 5.43.221.226:18876:18876

It has the port in it twice, look at the device/whatever it is.
 

hhijawi

New Member
Nov 10, 2020
13
0
1
35
The via header is bad: 5.43.221.226:18876:18876

It has the port in it twice, look at the device/whatever it is.
so you think this is a device issue?
I thought it is something related to NAT configurations in fusionPBX, please note that the same device configurations is working fine with 3G
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
recv 1024 bytes from udp/[5.43.221.226]:18876 at 09:45:22.098065:
------------------------------------------------------------------------
INVITE sip:*723@80.240.28.174 SIP/2.0
Via: SIP/2.0/UDP 5.43.221.226:18876:18876;rport;branch=z9hG4bKPj102911d4-9423-4549-8793-6dba7055ba6b
100%: recv 1024 bytes from udp/[5.43.221.226]

The via coming in from 5.43.221.226 is bad. The fact that its working elsewhere means nothing.

If you would have used sngrep like I said you will see that this has nothing to do with the PBX, the raw data coming in is bad.
 

hhijawi

New Member
Nov 10, 2020
13
0
1
35
Thanks very much for your help, I was developing my android app using PJSIP.
there is an option to disable via rewrite, I disable it and it fixed my problem.
 
Status
Not open for further replies.