Asterisk 14.2.1 ARI codec negociation problem

Hi guys, i’m using ari to create the channels then add to the bridge .

First i specify all my sip client with only one codec : opus.
No problem with add two channel to the bridge but when the third was added , it left immediately(see from the asterisk console log below) and then it led the caller channel left.

from the sip packet i can see when the client answered , the 200ok all sepcify to the opus codec(a=rtpmap:107 opus/48000/2)
from asterisk console i got a info:bridge swiched to softmix, i cant know whether this cause the problem.

Could someone help me out PLZZZZZZ!

Here are the logs when the third channel answered:
– Channel PJSIP/45398810014-00000030 joined ‘simple_bridge’ stasis-bridge <22>
>Bridge 22: switching from simple_bridge technology to softmix

[Nov 17 11:08:06] WARNING[32314]: translate.c:481 ast_translator_build_path: No translator path: (starting codec is not valid)
[Nov 17 11:08:06] WARNING[32314]: channel.c:5607 set_format: Unable to find a codec translation path: (slin) -> (h264|opus)
[Nov 17 11:08:06] WARNING[32314]: translate.c:481 ast_translator_build_path: No translator path: (starting codec is not valid)
[Nov 17 11:08:06] WARNING[32314]: channel.c:5607 set_format: Unable to find a codec translation path: (slin) -> (h264|opus)
[Nov 17 11:08:06] WARNING[32314]: translate.c:481 ast_translator_build_path: No translator path: (starting codec is not valid)
[Nov 17 11:08:06] WARNING[32314]: channel.c:5607 set_format: Unable to find a codec translation path: (slin) -> (h264|opus)
– Channel PJSIP/45398810014-00000030 left ‘softmix’ stasis-bridge <22>
> Bridge 22: switching from softmix technology to simple_bridge
– Channel PJSIP/45398810008-0000002e left ‘simple_bridge’ stasis-bridge <22>
– Channel PJSIP/45398810009-0000002f left ‘simple_bridge’ stasis-bridge <22>

Here r the endpoint info:
Endpoint: 45398810008/unknown In use 1 of inf
InAuth: 45398810008/45398810008
Aor: 45398810008 1
Channel: PJSIP/45398810008-00000027/Stasis Up 16:52:45
Exten: s CLCID: “45398810011:27:2” <>

ParameterName : ParameterValue

100rel : yes
accountcode :
acl :
aggregate_mwi : true
allow : (g722|ulaw|alaw|opus|h264)
allow_subscribe : true
allow_transfer : true
aors : 45398810008
asymmetric_rtp_codec : false
auth : 45398810008
bind_rtp_to_media_address : false
call_group :
callerid : unknown
callerid_privacy : allowed_not_screened
callerid_tag :
connected_line_method : invite
contact_acl :
context : default
cos_audio : 0
cos_video : 0
device_state_busy_at : 0
direct_media : false
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false

You appear not to have an opus codec, so it will work in pass through, but will fail the first time you try to conference. (I suppose you might get a similar effect if your codec options were unsupported by the opus codec, but I’m not certain that would happen so late.)

Ok, after some research , it seems clear but haven’t prove it.

  1. After reading the article ARI and Bridges found the section:
    Multi-party mixing - when there are more than two channels in a mixing bridge, Asterisk will **transcode** the media from each participant into signed linear, mix the media from all participants together into a new media frame, then write the media back out to all participants.
    So when i add the third channel into the bridge , it automatically does the transcode stuff.

  2. Knowing this, i searched why asterisk cant transcode the opus codec! Then i found this article asterisk audio Capabilities and seems that asterisk not handle opus codec by default.

  3. then i found this :[Asterisk14 OPUS transcoding](http://asterisk enable opus transcode)

Now i’m trying install codec_opus

Thanks & What a coincidence :smile: When i was editting my post i saw your reply.

Oh i forget another critical problem i meet caused by this scenario, after the third channel was kicked from the bridge

– Channel PJSIP/45398810014-00000030 left ‘softmix’ stasis-bridge <22>

the channel cant be destroyed!!! I tried with “channel request hangup” command in asterisk cli nothing happened!!!

then i use ARI DELETE /channels/{channelId}, nothing happened!!

Unless i restart my server!

It seems a bug of asterisk

issue1
another same question

The issue you referenced is not the same. Additionally you are using an older version of 14, and there were fixes in this area since then.

1 Like