Summary: | ASTERISK-01668: Duplicate codec entries in SDP | ||
Reporter: | octothorpe (octothorpe) | Labels: | |
Date Opened: | 2004-05-20 19:01:46 | Date Closed: | 2008-01-15 14:55:43.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Looking at "sip debug" output I noticed times when the same codec is duplicated in the SDP body: v=0 o=root 13611 13611 IN IP4 172.21.18.204 s=session c=IN IP4 172.21.18.204 t=0 0 m=audio 19640 RTP/AVP 0 2 97 0 8 3 101 a=rtpmap:0 PCMU/8000 a=rtpmap:2 G726-32/8000 a=rtpmap:97 iLBC/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - (PCMU occurs twice) ****** ADDITIONAL INFORMATION ****** This should fix it: Index: chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.393 diff -u -r1.393 chan_sip.c --- chan_sip.c 20 May 2004 07:52:07 -0000 1.393 +++ chan_sip.c 20 May 2004 22:46:52 -0000 @@ -3088,7 +3088,7 @@ /* Start by sending our preferred codecs */ cur = prefs; while(cur) { - if (p->jointcapability & cur->codec) { + if ((p->jointcapability & cur->codec) && !(alreadysent & cur->codec)) { if (sip_debug_test_pvt(p)) ast_verbose("Answering with preferred capability 0x%x(%s)\n", cur->codec, ast_getformatname(cur->codec)); codec = ast_rtp_lookup_code(p->rtp, 1, cur->codec); | ||
Comments: | By: Mark Spencer (markster) 2004-05-20 20:46:30 Fixed in CVS. We've never seen this before because nobody has listed the same codec more than once in the "general" section. Good catch. By: Digium Subversion (svnbot) 2008-01-15 14:55:43.000-0600 Repository: asterisk Revision: 3033 U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r3033 | markster | 2008-01-15 14:55:43 -0600 (Tue, 15 Jan 2008) | 2 lines Don't send the same codec twice even if listed twice in allow section (bug ASTERISK-1668) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=3033 |