Summary: | ASTERISK-26901: OPUS doesn't generate SDP accordingly to codecs.conf | ||||||
Reporter: | TSAREGORODTSEV Yury (tsarik) | Labels: | |||||
Date Opened: | 2017-03-28 18:20:35 | Date Closed: | |||||
Priority: | Major | Regression? | |||||
Status: | Open/New | Components: | Channels/chan_sip/CodecHandling Codecs/codec_opus | ||||
Versions: | 13.14.0 14.3.0 | Frequency of Occurrence | |||||
Related Issues: |
| ||||||
Environment: | Attachments: | ||||||
Description: | Testing opus between 2 asterisk hosts.
On 1st host config with parameters, 2nd host use SDP values. {noformat} 1st host codecs.conf [opus] type=opus packet_loss=40 complexity=10 max_playback_rate=8000 fec=1 dtx=1 2nd host codecs.conf: [opus] type=opus packet_loss=40 complexity=10 {noformat} {noformat} Contact: <sip:test_x-lite2@10.0.151.1:5065> Call-ID: 3ae4b0d36d96054955ea4e440cd3bb30@10.0.151.1:5065 CSeq: 102 INVITE User-Agent: Asterisk PBX 14.3.0 Date: Tue, 28 Mar 2017 23:11:38 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Type: application/sdp Content-Length: 219 v=0 o=root 569990228 569990228 IN IP4 10.0.151.1 s=Asterisk PBX 14.3.0 c=IN IP4 10.0.151.1 t=0 0 m=audio 32446 RTP/AVP 107 a=rtpmap:107 opus/48000/2 a=fmtp:107 useinbandfec=1;usedtx=1 a=maxptime:20 a=sendrecv {noformat} REPLY: <------------> Audio is at 21428 Adding codec opus to SDP {noformat} <--- Reliably Transmitting (no NAT) to 10.0.151.1:5065 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 10.0.151.1:5065;branch=z9hG4bK1ae768f6;received=10.0.151.1 From: "test_x-lite2" <sip:test_x-lite2@10.0.151.1:5065>;tag=as2e7fddcc To: <sip:100@xxxxxx:5065>;tag=as3579828e Call-ID: 259150181ae3c91f3a2521ab6d740cec@10.0.151.1:5065 CSeq: 102 INVITE Server: Asterisk PBX 14.3.0 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Session-Expires: 1800;refresher=uas Contact: <sip:100@xxxxxxx> Content-Type: application/sdp Require: timer Content-Length: 212 v=0 o=root 914654045 914654045 IN IP4 xxxxx s=Asterisk PBX 14.3.0 c=IN IP4 xxxxx t=0 0 m=audio 21428 RTP/AVP 107 a=rtpmap:107 opus/48000/2 a=fmtp:107 usedtx=1 a=maxptime:20 a=sendrecv {noformat} as result max_playback_rate is missing in original SDP and useinbandfec in SDP answer. What a mystique ? Of course none of sides using playback rate 8000. packet_loss also seems doesn't do any effect. bandwidth always same no matter if its 0 or 100. | ||||||
Comments: | By: Asterisk Team (asteriskteam) 2017-03-28 18:20:36.533-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Kevin Harwell (kharwell) 2017-03-29 11:18:45.649-0500 Given your setup I'd expect 'fec' to not be in the SDP of the 200 OK. Both sides have to be configured to use it. If either side is not configured for it then 'fec' is set to zero, which is the default so it is not included. 'dtx' is included if either side is configured for it. So that one shows up appropriately. Adjusting 'packet_loss' may or may not affect things. It's more of a hint to the encoder about how much expected packet loss may exist, thus also when to potentially start packet loss concealment. Here are a couple links that might be helpful (if you haven't already seen them) with regards to the the configuration options for Opus in Asterisk: [Configuring the Opus Encoder in Asterisk|http://blogs.asterisk.org/2017/01/18/configuring-opus-encoder-asterisk/] [Asterisk Codec Opus Wiki|https://wiki.asterisk.org/wiki/display/AST/Codec+Opus] These parameters however are mainly only going to adjust things on the encoding side. If you are negotiating opus to opus then Asterisk will not encode/decode the audio, but simply pass it through. Lastly, there does appear to be a bug though. Setting the 'max_playback_rate' should set the 'maxplaybackrate' value on the SDP. It appears it is not doing that. By: dimitripietro (dimitripietro) 2017-11-21 16:59:41.842-0600 Hi, I'm trying to use Opus on my system and I have the exact same issue. Everything I do in codecs.conf seem to be ignored... The issue seem to be moved to Digium Jira, can we have an update ? By: Joshua C. Colp (jcolp) 2017-11-21 17:02:52.839-0600 The issue is in queue. Any comments/etc will be posted here. By: Richard Mudgett (rmudgett) 2017-12-15 13:00:28.604-0600 This should be fixed by codec_opus v1.3.0. I also think this is a duplicate of ASTERISK-26870 By: Jens Vogler (JensV) 2018-05-15 13:45:44.245-0500 Using codec_opus v1.3.0 I still have the same issue with max_playback_rate. Asterisk Version: 13.14.1 {code:title=codecs.conf} [opus] type=opus packet_loss=75 complexity=5 signal=voice application=voip ; bitrate=8000 max_playback_rate=8000 ; max_bandwidth=narrow dtx=1 fec=yes {code} {code:title=200 OK Packet} SIP/2.0 200 OK Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:5080;branch=z9hG4bKPj1c1c95b1-b5d6-4789-8028-afd13f2e0e62;received=xxx.xxx.xxx.xxx;rport=5080 From: sip:testa_552@localhost;tag=cd1a8abc-3c27-4a94-bd2e-e4f4b057d522 To: sip:1testa_10@redacted.com;tag=as0b055cb0 Call-ID: 12788761-43b4-4199-be66-1445997d6047 CSeq: 28758 INVITE Server: Asterisk PBX 13.14.1~dfsg-2+deb9u3 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Session-Expires: 1800;refresher=uas Contact: <sip:1testa_10@xxx.xxx.xxx.xxx:5080> Content-Type: application/sdp Require: timer Content-Length: 305 v=0 o=root 543638521 543638522 IN IP4 xxx.xxx.xxx.xxx s=Asterisk PBX 13.14.1~dfsg-2+deb9u3 c=IN IP4 xxx.xxx.xxx.xxx t=0 0 m=audio 37472 RTP/AVP 120 96 a=rtpmap:120 opus/48000/2 a=fmtp:120 useinbandfec=1;usedtx=1 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ptime:20 a=maxptime:20 a=sendrecv {code} By: Roman Pertsev (romkazor) 2020-09-18 10:36:27.710-0500 3+ years, bug still here on aster 16+ By: Ruben Iniguez (rubenis) 2022-12-16 10:01:25.676-0600 Hi any update on this issue? By: Joshua C. Colp (jcolp) 2022-12-16 10:03:38.929-0600 Any updates would be posted on this issue. By: Ruben Iniguez (rubenis) 2022-12-16 10:51:37.181-0600 Is it possible to have visibility on what parameters are configurable? I see bitrate is one of them. By: Joshua C. Colp (jcolp) 2022-12-16 10:56:34.929-0600 The values given should be configurable to be the best of my knowledge, and should be documented as such if I recall correctly. By: Ruben Iniguez (rubenis) 2022-12-19 10:22:39.890-0600 I see the issue was closed finally. What was the outcome? any fix? I am finding the behaviour described here in Asterisk 18.15. Thank you very much By: Joshua C. Colp (jcolp) 2022-12-19 10:28:29.386-0600 I closed this one on accident because I thought it was the other issue that you opened. I've reopened this one. By: Ruben Iniguez (rubenis) 2022-12-19 10:41:22.135-0600 Ok. Sorry to have caused confusion. We are interested to have this configurability. Hope you can at some point figure out what is happening. If needed more symptoms form our side let me know. Thanks |