Hi all,
This will sound similar to previous threads, but basically I’m wondering what magic I put in the allow=
line for PJSIP to permit Wideband/Ultra-Wideband speex
…
This will sound similar to previous threads that discussed the old chan_sip
driver on older releases of Asterisk. I’m using PJSIP with Asterisk 16.6.2. Thus the main difference is in what’s changed since those earlier releases.
Right now I have this:
allow=speex,g722,ilbc,g726,g729,alaw,ulaw
This worked tonight, I was using Twinkle as my client and it had G.722 (I’ve patched it to support this), UWB Speex, WB Speex then NB Speex, followed by G.711a and G.711u.
It negotiated NB Speex (8kHz sample rate). It worked, but definitely not ideal.
Long term I’d like to support Opus, but that’s a work-in-progress that can wait for now. (Can’t use Digium’s CODEC on OpenBSD. There are one or two open-source plug-ins though, so I’ll investigate those.)
A lot will depend on where I’m connecting from… and I understand the Asterisk server can’t know if I’m hitting it via a VPN or over Ethernet/WiFi, so I’m thinking I need the server to somehow prefer the client’s CODEC list over its own. (That way, I can just configure my client to suit my network connection.)
My preference would be:
- Opus or UWB Speex
- G.722 or WB Speex
- G.729
- G.711a if local, or NB Speex if remote.
- G.711u
In a perfect world I’d probably encode this as:
accept=opus,speex:32000,g722,speex:16000,g729,g711a,speex:8000,g711u
However, I’m not sure if it’s even possible to encode a sample rate in there. Do I have to define custom CODECs in codecs.conf
or is there some standard syntax for specifying wideband and ultra-wideband Speex modes?