[Home]

Summary:ASTERISK-05894: Speex and iLBC have the same rtpmap when speex only is offered
Reporter:hypherion (hypherion)Labels:
Date Opened:2005-12-22 17:04:25.000-0600Date Closed:2008-01-15 16:44:16.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/RTP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When using a client that has only Speex enabled, the speex and ilbc codecs in Asterisk are presented as the same rtpmap number during media negotiation.

In the sip debug below, I'm using an Eyebeam client to dial the echo test at 613.

<-- SIP read from *ASTERISK IP*:5060:
INVITE sip:613@mydomain.com SIP/2.0
Record-Route: <sip:*ASTERISK IP*;ftag=cb60897a;lr=on>
Via: SIP/2.0/UDP *ASTERISK IP*;branch=z9hG4bK7851.678229c7.0
Via: SIP/2.0/UDP *FIREWALL IP*:7206;branch=z9hG4bK-d87543-4d5c00428218db74-1--d87543-;rport=7206
Max-Forwards: 16
Contact: <sip:302@*FIREWALL IP*:7206>
To: <sip:613@mydomain.com>
From: "Adrian "<sip:302@mydomain.com>;tag=cb60897a
Call-ID: e21bd959921e1e7c@d2Fyc2F3LmludGVybmFsLnh0ZW4ubmV0
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: eventlist
User-Agent: eyeBeamInternal release 3013v stamp 23729
Content-Length: 318

v=0
o=- 279700044 279700111 IN IP4 *FIREWALL IP*
s=eyeBeamInternal
c=IN IP4 *FIREWALL IP*
t=0 0
m=audio 7208 RTP/AVP 97 101
a=alt:1 1 : 89A4A5A5 6AE8417A *FIREWALL IP* 7208
a=alt:2 3 : A22D0FE6 650CD54C 192.168.0.135 7208
a=fmtp:101 0-15
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

--- (15 headers 12 lines)---
Using INVITE request as basis request - e21bd959921e1e7c@d2Fyc2F3LmludGVybmFsLnh0ZW4ubmV0
Sending to *ASTERISK IP* : 5060 (non-NAT)
Found peer '298'
Found RTP audio format 97
Found RTP audio format 101
Peer audio RTP is at port *FIREWALL IP*:7208
Found description format speex
Found description format telephone-event
Capabilities: us - 0x1c060e (gsm|ulaw|alaw|speex|ilbc|h261|h263|h263p), peer - audio=0x200 (speex)/video=0x0 (nothing), combined - 0x200 (speex)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Looking for 613 in default (domain mydomain.com)
list_route: hop: <sip:*ASTERISK IP*;ftag=cb60897a;lr=on>
Transmitting (no NAT) to *ASTERISK IP*:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP *ASTERISK IP*;branch=z9hG4bK7851.678229c7.0;received=*ASTERISK IP*
Via: SIP/2.0/UDP *FIREWALL IP*:7206;branch=z9hG4bK-d87543-4d5c00428218db74-1--d87543-;rport=7206
From: "Adrian "<sip:302@mydomain.com>;tag=cb60897a
To: <sip:613@mydomain.com>
Call-ID: e21bd959921e1e7c@d2Fyc2F3LmludGVybmFsLnh0ZW4ubmV0
CSeq: 2 INVITE
User-Agent:  Phone
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: <sip:613@*ASTERISK IP*:5070>
Content-Length: 0


---
   -- Executing ControlPlayback("SIP/298-0bc6", "demo-echotest") in new stack
We're at *ASTERISK IP* port 16442
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x400 (ilbc) to SDP
Adding codec 0x200 (speex) to SDP
Adding codec 0x40000 (h261) to SDP
Adding codec 0x80000 (h263) to SDP
Adding codec 0x100000 (h263p) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to *ASTERISK IP*:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP *ASTERISK IP*;branch=z9hG4bK7851.678229c7.0;received=*ASTERISK IP*
Via: SIP/2.0/UDP *FIREWALL IP*:7206;branch=z9hG4bK-d87543-4d5c00428218db74-1--d87543-;rport=7206
Record-Route: <sip:*ASTERISK IP*;ftag=cb60897a;lr=on>
From: "Adrian "<sip:302@mydomain.com>;tag=cb60897a
To: <sip:613@mydomain.com>;tag=as3c8f63d4
Call-ID: e21bd959921e1e7c@d2Fyc2F3LmludGVybmFsLnh0ZW4ubmV0
CSeq: 2 INVITE
User-Agent:  Phone
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: <sip:613@*ASTERISK IP*:5070>
Content-Type: application/sdp
Content-Length: 291

v=0
o=root 14140 14140 IN IP4 *ASTERISK IP*
s=session
c=IN IP4 *ASTERISK IP*
t=0 0
m=audio 16442 RTP/AVP 0 8 3 97 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
Comments:By: Olle Johansson (oej) 2006-01-09 14:07:07.000-0600

This is bad. Need to be fixed.

By: Justin Unger (justinu) 2006-01-09 20:01:10.000-0600

I've confirmed this with eyebeam/speex.

By: Olle Johansson (oej) 2006-01-30 12:24:41.000-0600

bugs is not letting me change subcategory to "RTP"

By: Kevin P. Fleming (kpfleming) 2006-02-13 17:47:11.000-0600

This has been fixed in 1.2, but will get a more complete fix in the trunk (that tolerates broken peers who can't handle mismatched codec numbers).

By: Kevin P. Fleming (kpfleming) 2006-02-14 11:31:27.000-0600

Fixed in SVN branch-1.2 and trunk... we will no longer send codecs that the peer didn't offer to us in the INVITE (we wouldn't end up using them anyway), which will eliminate this problem.

By: Digium Subversion (svnbot) 2008-01-15 16:42:28.000-0600

Repository: asterisk
Revision: 9818

U   branches/1.2/rtp.c

------------------------------------------------------------------------
r9818 | kpfleming | 2008-01-15 16:42:28 -0600 (Tue, 15 Jan 2008) | 2 lines

don't try to use peer's dynamic codec numbers, it leads to duplication (issue ASTERISK-5894)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=9818

By: Digium Subversion (svnbot) 2008-01-15 16:44:12.000-0600

Repository: asterisk
Revision: 9953

U   branches/1.2/rtp.c

------------------------------------------------------------------------
r9953 | kpfleming | 2008-01-15 16:44:11 -0600 (Tue, 15 Jan 2008) | 2 lines

revert yesterday's temporary fix for issue ASTERISK-5894

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=9953

By: Digium Subversion (svnbot) 2008-01-15 16:44:15.000-0600

Repository: asterisk
Revision: 9958

U   branches/1.2/channels/chan_sip.c

------------------------------------------------------------------------
r9958 | kpfleming | 2008-01-15 16:44:15 -0600 (Tue, 15 Jan 2008) | 2 lines

when answering INVITE, don't send codecs the peer didn't offer (issue ASTERISK-5894)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=9958

By: Digium Subversion (svnbot) 2008-01-15 16:44:16.000-0600

Repository: asterisk
Revision: 9959

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r9959 | kpfleming | 2008-01-15 16:44:16 -0600 (Tue, 15 Jan 2008) | 10 lines

Merged revisions 9958 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9958 | kpfleming | 2006-02-14 12:30:10 -0600 (Tue, 14 Feb 2006) | 2 lines

when answering INVITE, don't send codecs the peer didn't offer (issue ASTERISK-5894)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=9959