|Summary:||ASTERISK-20908: Asterisk presents media desc for video in SDP, missing terminating CRLF|
|Reporter:||Dennis DeDonatis (dennisd)||Labels:|
|Date Opened:||2013-01-08 13:46:31.000-0600||Date Closed:||2013-01-29 08:49:28.000-0600|
|Environment:||Fedora 17 - 3.6.11-1.fc17.x86_64 #1 SMP||Attachments:||( 0) asterisk-20908.diff|
( 1) ASTERISK-20933-11.diff
|Description:||I tried to use X-Lite 3.0 and before any RTP packets went through, X-Lite would send a Bye. X-Lite was logging "ParseException dereferenced ParseBuffer eof" in its debug log.
I tracked it down to the SDP message Asterisk sends for the OK after the INVITE doesn't end with a CRLF. RFC4566 says "The sequence CRLF (0x0d0a) is used to end a record," so I guess that means the last record should have a CRLF.
It's exceptionally rare I would use X-Lite 3.0, so this problem may exist in all of v11, but the issue intrigued me enough to track this down.
I've attached a patch against 11.2.0-rc1, but this most likely isn't the best fix (just tacking a CRLF to the end). It did prove out that adding a CRLF to the end of the SDP message allows the old X-Lite 3.0 to work with Asterisk 11.2.0-rc1. 11.1.0 has the same problem, although I did not try the patch with it.
|Comments:||By: Dennis DeDonatis (dennisd) 2013-01-08 13:55:11.452-0600|
Now that I play with it more, this patch causes calls with video to end up with a CRLFCRLF at the end instead of just CRLF.
By: Rusty Newton (rnewton) 2013-01-15 13:41:56.242-0600
Dennis, I don't see the issue described in any debug I've looked at recently. I looked at the end of the SDP in 200 OK responses to invites and see a '0d 0a' each time.
Can you provide a packet capture of a call demonstrating the issue? I recommend wireshark or tcpdump, please attach the .pcap to the issue.
By: Dennis DeDonatis (dennisd) 2013-01-15 14:45:17.524-0600
I'm guessing it might be because I have "preferred_codec_only=yes" set.
I'll get you the packet capture when Asterisk isn't in use (I don't have a Dev box).
By: Dennis DeDonatis (dennisd) 2013-01-15 15:51:32.581-0600
I've attached a packet capture showing it. If I patch using that Diff, X-lite is happy (for audio only calls at least).
Please delete that packet capture when you are done looking at it.
By: Rusty Newton (rnewton) 2013-01-15 19:40:37.890-0600
Dennis, I removed your pcap since you didn't want it exposed. Please don't upload anything you don't want on here. There is always the chance it is cached somewhere else.
Can you please provide your sip.conf, sanitized? I'd like to see if I can reproduce the issue with another softphone and your sip.conf settings to see if it's related to X-lite's specific requests or just your particular configuration.
By: Rusty Newton (rnewton) 2013-01-26 21:15:07.194-0600
Reproduced this with Jitsi 1.0.1 and Asterisk SVN-branch-11-r380043.
Using reporter's sip.conf (slightly modified to ignore ACLs) I setup a call from Jitsi to a Playback() on Asterisk.
Asterisk presents a media description in the SDP of 200OK to the INVITE like "m=video 0 RTP/AVP 115 34", but with no CRLF to end the record.
Looks like it only occurs when video has been declined.
On test calls where the client supports the codec's defined in sip.conf, the media description and follow attributes appear correct and end with a CRLF.
By: Matt Jordan (mjordan) 2013-01-26 21:38:27.959-0600
Can you try the attached patch?
By: Dennis DeDonatis (dennisd) 2013-01-28 10:50:56.877-0600
The patch seems to have corrected the no CRLF issue. The old X-Lite works for audio calls, now!
By: Stephan Schönberg (www.sberg.net) (derlinuxer) 2013-02-25 04:22:04.152-0600
I also want to prove the patch (ASTERISK-20933-11.diff). I had three unsupported media types and the remote parser already crashed on asterisk SDP answer. After adding the patch all is working fine.