FusionPBX and OPUS question

Status
Not open for further replies.

jrosetto

Member
Apr 29, 2020
71
6
8
38
So I have been reading a lot on opus and it seems like a great option for some of the mobile users we have that are having audio quality issues over ULAW/G729 but for the life of me I can't seem to get it to work.

I have a Yealink T58A as well as a few T46S models that support OPUS wideband. I have set only the OPUS codec on the phones account.

I have added OPUS to global_codec_prefs and outbound_codec_prefs.

INVITE
----------
INVITE sip:101@example.com:5060 SIP/2.0
Via: SIP/2.0/TCP 192.168.1.200:50150;branch=z9hG4bK58938284;rport
From: "Justin Rosetto" <sip:103@example.com:5060>;tag=2126336938
To: <sip:101@example.com:5060>
Call-ID: 0_1234785195@192.168.1.200
CSeq: 2 INVITE
Contact: <sip:103@192.168.1.200:50150;transport=TCP>
Proxy-Authorization: Digest username="103", realm="example.com", nonce="97d08c73-4778-4a03-a30e-479494239564", uri="sip:101@example.com:5060", response="7d3adf6f12811613a9f6878557744469", algorithm=MD5, cnonce="4109718445", qop=auth, nc=00000001
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T58 58.85.0.5
Supported: from-change
Allow-Events: talk,hold,conference,refer,check-sync
Supported: replaces
Content-Length: 335

v=0
o=- 20021 20021 IN IP4 192.168.1.200
s=SDP data
c=IN IP4 192.168.1.200
t=0 0
m=audio 50198 RTP/AVP 107 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 sprop-maxcapturerate=16000; maxaveragebitrate=20000; maxplaybackrate=48000; useylrtx=1; useinbandfec=1
a=ptime:20
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
----------

488 response
----------
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/TCP 192.168.1.200:50150;branch=z9hG4bK58938284;rport=50150;received=1.2.3.4
Max-Forwards: 70
From: "Justin Rosetto" <sip:103@example.com:5060>;tag=2126336938
To: <sip:101@example.com:5060>;tag=U5g487DyyU92S
Call-ID: 0_1234785195@192.168.1.200
CSeq: 2 INVITE
User-Agent: FreeSWITCH
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
Content-Length: 0
Remote-Party-ID: "101" <sip:101@example.com>;party=calling;privacy=off;screen=no
----------

What am I missing here?

I even tried adding every opus codec to the variables to no avail.
 

junction1153

Member
Jul 15, 2020
52
11
8
33
FreeSWITCH does its best to avoid transcoding. Go into your internal sip profile and make sure that codec negotiation is set to generous. Turn on late negotiation. there should also be something there about disable transcoding, make sure to turn that off. Finally, in your outbound routes, erase inherit_codec=true. One other bug I’ve noticed is that i had to add these parameters to the sip profile or I’d have issues with calls:

session-timeout - set to 0
enable-timer - set to false

make sure they are set to “true” to enable the actual function. Then restart FreeSWITCH and retest.
 

jrosetto

Member
Apr 29, 2020
71
6
8
38
FreeSWITCH does its best to avoid transcoding. Go into your internal sip profile and make sure that codec negotiation is set to generous. Turn on late negotiation. there should also be something there about disable transcoding, make sure to turn that off. Finally, in your outbound routes, erase inherit_codec=true. One other bug I’ve noticed is that i had to add these parameters to the sip profile or I’d have issues with calls:

session-timeout - set to 0
enable-timer - set to false

make sure they are set to “true” to enable the actual function. Then restart FreeSWITCH and retest.

Thanks for the response. I am swamped at the moment, if I get time this weekend I will try to implement the changes.
 

junction1153

Member
Jul 15, 2020
52
11
8
33
There’s a little more to it, you need to make sure that the opus module is loaded and running. Set the codec preference in variables. Also, if you have call recording turned on, it will not accept a reinvite to the codec; you’ll need to have recorded calls execute on answer instead
 

marc8lange

New Member
Oct 29, 2018
2
0
1
There’s a little more to it, you need to make sure that the opus module is loaded and running. Set the codec preference in variables. Also, if you have call recording turned on, it will not accept a reinvite to the codec; you’ll need to have recorded calls execute on answer instead
Advance--Module---Opus True,True that was the solution. Why oh why would one have a cryptic False setting for an opus module is beyond me when we already have to specify it opus elsewhere is beyond me. Thank you @junction1153
 

jrosetto

Member
Apr 29, 2020
71
6
8
38
Advance--Module---Opus True,True that was the solution. Why oh why would one have a cryptic False setting for an opus module is beyond me when we already have to specify it opus elsewhere is beyond me. Thank you @junction1153
Thank you for this. I abandoned the idea because I was struggling to make it work. I'll give this a shot again.
 

webo

New Member
Feb 27, 2021
1
0
1
45
I'm struggling to get Opus working as well. Using Zoiper 5 Pro on both endpoints with all Opus options at the very top of the list. I've also got mod_opus enabled and running and my global codec list looks like
Code:
opus@16000h@40i,G7221@32000h,G7221@16000h,G722,PCMU,PCMA

Are there step-by-step instructions somewhere on how to get it to use Opus by default?

EDIT: So the use case is extensions calling each other. When I add opus to the absolute codec string for each extension, then both softphones are able to use Opus.

Is there a way to enforce this across all internal calls instead of having to add the option for each extension?
 
Last edited:

Dee

Member
Jun 7, 2019
50
3
8
35
I'm struggling to get Opus working as well. Using Zoiper 5 Pro on both endpoints with all Opus options at the very top of the list. I've also got mod_opus enabled and running and my global codec list looks like
Code:
opus@16000h@40i,G7221@32000h,G7221@16000h,G722,PCMU,PCMA

Are there step-by-step instructions somewhere on how to get it to use Opus by default?

EDIT: So the use case is extensions calling each other. When I add opus to the absolute codec string for each extension, then both softphones are able to use Opus.

Is there a way to enforce this across all internal calls instead of having to add the option for each extension?
Advanced > module > set Opus to true true
Check the status should say running.

Then global codec, OPUS,G722,PCMU,PCMA
Outbound codec, OPUS,G722,PCMU,PCMA

save, flush cache, reload, xml, rescan your profile - Opus should be running
 
Status
Not open for further replies.