[asterisk-bugs] [JIRA] (ASTERISK-26901) OPUS doesn't generate SDP accordingly to codecs.conf

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Wed Mar 29 11:22:10 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236185#comment-236185 ] 

Kevin Harwell edited comment on ASTERISK-26901 at 3/29/17 11:21 AM:
--------------------------------------------------------------------

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.


was (Author: kharwell):
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:

[Configuration 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.

> OPUS doesn't generate SDP accordingly to codecs.conf
> ----------------------------------------------------
>
>                 Key: ASTERISK-26901
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26901
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/CodecHandling
>    Affects Versions: 13.14.0, 14.3.0
>            Reporter: TSAREGORODTSEV Yury
>
> 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 at 10.0.151.1:5065>
> Call-ID: 3ae4b0d36d96054955ea4e440cd3bb30 at 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 at 10.0.151.1:5065>;tag=as2e7fddcc
> To: <sip:100 at xxxxxx:5065>;tag=as3579828e
> Call-ID: 259150181ae3c91f3a2521ab6d740cec at 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 at 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list