Summary:ASTERISK-09456: Invalid BYE generated
Reporter:coredump (coredump)Labels:
Date Opened:2007-05-16 12:19:09Date Closed:2011-06-07 14:07:20
Versions:Frequency of
Environment:Attachments:( 0) broken_bye.trace.txt
Description:Seeing invalid URI generated from 1.2.17 on BYE.

Call flow is:

[SNOM320] -SIP- [openser v1.1.0] -SIP- [server_A v1.2.17] -SIP- [server_B v1.2.9.1] -PRI- [PSTN]

Call originated from SNOM, out to PSTN.

PSTN side hangs up.

BYE sent from server_B to server_A, correct.

BYE sent from server_A to openser has invalid URI, and openser reports error, and does not forward BYE to SNOM phone which leaves call up until user hangs up SNOM.

Here's the pertinent BYE message:

Scheduling destruction of call '3c56efb32bf2-yl1a6dbv3ugu@snom320-000413246168' in 32000 ms
set_destination: Parsing <sip:;lr=on;ftag=gs5uxr1gli> for address/port to send to
set_destination: set destination to, port 5060
Reliably Transmitting (NAT) to
BYE <sip:PIPEOUT@ SIP/2.0  <----------- ERROR!
v: SIP/2.0/UDP;branch=z9hG4bK22b21baa;rport
Route: <sip:;lr=on;ftag=gs5uxr1gli>
f: <sip:12246239233@;user=phone>;tag=as5baa3629
t: "PIPEOUT" <sip:PIPEOUT@>;tag=gs5uxr1gli
i: 3c56efb32bf2-yl1a6dbv3ugu@snom320-000413246168
CSeq: 102 BYE
User-Agent: PAETEC VoIP
Max-Forwards: 70
l: 0

If SNOM hangs up call, server_A sends the same invalid BYE URI to server_B, but server_B is able to parse it and hangs up the call.


full 'sip debug' from server_A in file: 'broken_bye.trace.txt'

Comments:By: coredump (coredump) 2007-05-16 12:22:38

Adding some debug messages to chan_sip.c in 'check_user_full':
        ast_verbose("SNI: In 'check_user_full'\n");
        ast_verbose("SNI:    Contact: %s\n", get_header(req, "Contact"));

Debug output, I get:

SNI: In 'check_user_full'
SNI:    Contact: <sip:PIPEOUT@;line=omx8fo7q


It seems that Contact header is being truncated/corrupted, or 'get_header()' is not working properly?

By: Joshua C. Colp (jcolp) 2007-05-16 13:19:41

Please provide your sip.conf minus passwords as well. I have been unable to reproduce this thus far, and may require access to the box if the sip.conf does not yield anything as well.

By: Olle Johansson (oej) 2007-05-16 15:28:48

This is filed in teh wrong category. moving to SIP

By: Olle Johansson (oej) 2007-05-16 15:40:48

From invite:
Contact: <sip:PIPEOUT@;line=omx8fo7q>;flow-id=1

Bye request uri:

We've cut it at the wrong semicolon.

We've added a lot of fixes to this part. Can you please try latest 1.2 from svn and see if the problem is still there? That would be really helpful. Thanks.

By: Joshua C. Colp (jcolp) 2007-05-24 09:22:39

It's been over a week now with no response to either oej or myself. Hopefully the latest version from SVN fixed this. If not please reopen with the needed information.