Opus Codec For aarch64

Hi,
I have Asterisk 18 on Raspberry Pi with arm64 (aarch64) architecture. Whenever I use Answer() in Dialplan with an Opus call, it gives me this error below:

ERROR[111860]: res_pjsip_session.c:937 handle_incoming_sdp: phone: Couldn’t negotiate stream 0:audio-0:audio:sendrecv (nothing)

It seems like I can’t use the Opus codec in ARM architecture. I tried to install the codec_opus.so manually, but Digium only supports it on x86 architectures.

Does anyone have any idea?

Do you need the codec, or would a VP8 format module be sufficient (pass through only)? It looks like the former is not in the standard Asterisk “for legal reasons”. There seems to have been discussions of an official format_vp8 module, but there still doesn’t seem to be one.

Hi David, thank you for your quick reply.
AFAIK VP8 is a video codec. I need a high-quality audio codec (like opus) for my softphones. I want to play something for them with these configurations if the users do not answer.

Here is my configuration on extensions.conf:

...
exten => 1,1,Answer()
 same => n,Dial(PJSIP/phone)
 same => n,Playback(vm-nobodyavail)
 same => n,Hangup()
...

pjsip.conf

[phone]
...
disallow=all
allow=opus
...

But everytime I make a call this error will raise:

ERROR[111860]: res_pjsip_session.c:937 handle_incoming_sdp: phone: Couldn’t negotiate stream 0:audio-0:audio:sendrecv (nothing)

Have you actually looked at the SIP traffic (pjsip set logger on) to see what is being offered?

1 Like

Yes, I did. I hope I looking into the right place:

--- Received SIP request (2043 bytes) from TLS:1.2.3.4:54478 --->
INVITE sip:1@ domain. net SIP/2.0
Via: SIP/2.0/TLS 1.2.3. 4:54478;branch=z9hh4fK.fNYsh2mIm;rport
From: <sip:3@ 1.2.3. 4>;tag=vz1PDpBoS
To: sip:1 @domain. net
CSeq: 21 INVITE
Call-ID: f6vhxID-O-
Max-Forwards: 70
Supported: replaces, outbound, gruu
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE
Content-Type: application/sdp
Content-Length: 1117
Contact: <sip:3 @1.2.3 .4:54478;transport=tls>;expires=599;+sip.instance="<urn:uuid:29a22bec-375d-0025-999e-4be36be9e158>"
User-Agent: Linphone Desktop/ (Debian, Qt 5.15.2) LinphoneCore/4.4.21
...
v=0
o=3 1413 2122 IN IP4 1.2.3.4
s=Talk
c=IN IP4 1.2.3.4
t=0 0
a=ice-pwd:abcdefghijklmnop
a=ice-ufrag:33f3c434
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
m=audio 7078 RTP/SAVPF 96 101
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:101 telephone-event/48000
...
[Jul 14 12:50:46] ERROR[124737]: res_pjsip_session.c:937 handle_incoming_sdp:  3: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)

And what is the PJSIP endpoint configuration?

It’s the same as other phones and they’re all under NAT.
pjsip.conf:

[3]
type=aor
max_contacts=1
remove_existing=yes

[3]
type=auth
username=3
password=removed

[3]
type=endpoint
moh_suggest=default
context=main
subscribe_context=subscriptions
message_context=main-sms
auth=3
outbound_auth=3
aors=3
callerid=yooo <3>
disallow=all
allow=opus
allow=h264
force_rport=yes
media_encryption=sdes
rewrite_contact=yes
ice_support=yes
rtp_symmetric=yes
direct_media=no

It seems like I do not have any translation path for opus.

core show translation paths opus
--- Translation paths SRC Codec "opus" sample rate 48000 ---
	opus:48000       To codec2:8000     : No Translation Path                                         
	opus:48000       To g723:8000       : No Translation Path                                         
	opus:48000       To ulaw:8000       : No Translation Path                                         
	opus:48000       To alaw:8000       : No Translation Path                                         
	opus:48000       To gsm:8000        : No Translation Path                                         
	opus:48000       To g726:8000       : No Translation Path                                         
	opus:48000       To g726aal2:8000   : No Translation Path                                         
	opus:48000       To adpcm:8000      : No Translation Path                                         
	opus:48000       To slin:8000       : No Translation Path                                         
	opus:48000       To slin:12000      : No Translation Path                                         
	opus:48000       To slin:16000      : No Translation Path                                         
	opus:48000       To slin:24000      : No Translation Path                                         
	opus:48000       To slin:32000      : No Translation Path                                         
	opus:48000       To slin:44100      : No Translation Path                                         
	opus:48000       To slin:48000      : No Translation Path                                         
	opus:48000       To slin:96000      : No Translation Path                                         
	opus:48000       To slin:192000     : No Translation Path                                         
	opus:48000       To lpc10:8000      : No Translation Path                                         
	opus:48000       To g729:8000       : No Translation Path                                         
	opus:48000       To speex:8000      : No Translation Path                                         
	opus:48000       To speex:16000     : No Translation Path                                         
	opus:48000       To speex:32000     : No Translation Path                                         
	opus:48000       To ilbc:8000       : No Translation Path                                         
	opus:48000       To g722:16000      : No Translation Path                                         
	opus:48000       To siren7:16000    : No Translation Path                                         
	opus:48000       To siren14:32000   : No Translation Path                                         
	opus:48000       To g719:48000      : No Translation Path                                         
	opus:48000       To none:8000       : No Translation Path                                         
	opus:48000       To silk:8000       : No Translation Path                                         
	opus:48000       To silk:12000      : No Translation Path                                         
	opus:48000       To silk:16000      : No Translation Path                                         
	opus:48000       To silk:24000      : No Translation Path               

Also Module ‘codec_resample’ already loaded and running.

You are not going to be able to transcode without codec_opus.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.