My unit file switches to user/group freeswitch. As such it does not return a result for "pa devlist." That only happens if I start freeswitch from the command line using sudo as root. Freeswitch user doesn't have a shell and even if it did, I suspect switching to that user would yield the same result. Swapping pi/pi in for the user and group in the unit file also results in the same no response. Only user=root context is successful in yielding a device list, as you say.
ON this raspberry pi, I have only the 3.5mm jack and the bluetooth devices. Following your instructions, the bluetooth works and is more convenient for testing than wired headphones in the jack.
first: I hope that you noticed that in
my latest email, I reported that I am still not able to make use
of mod_portaudio; so the instructions I provided on Aug 26 helped
to have some progress on my side, but they have not been
sufficient...
Now, you said: you "just need to be in
the proper group"; I would just add the importance of the proper
user to this statement, as well.
The page
https://freeswitch.org/confluence/display/FREESWITCH/Debian+Post-Install+Tasks
suggests a systemd unit file for FS that includes the directive
"User=root". But, there is also the comment saying that FS starts
"as root, so Freeswitch can set its priority, create some
directories if needed, etc. Then it will drop privileges to
continue running as user and group Freeswitch."
Are you using that same unit file? If
so, then the following part of my instructions will be essential
for the success:
sudo adduser
freeswitch audio
sudo adduser freeswitch bluetooth
Otherwise, you must find out as which
user the FS is eventually running in your system and then run the
above two commands for that user.
I gave up using the jack because it is
only for output, but in my application I need both input and
output. In the beginning that I didn't know this and was hoping to
use the jack for my application, I used the amixer command few
times, but I am not very familiar with this command, nor with
alsamixer.
From what I have understood so far:
aplay -l and arecord -l will show only your audio devices on
sound cards of type hardware (I think that
/usr/share/alsa/alsa.conf is somehow involved in this)
aplay -L and arecord -L will also show additional devices
defined in /etc/asound.conf and the current user's ~/.asoundrc
(such as virtual devices and real devices on virtual sound
cards)
mod_portaudio has been only able to see my real devices via
bluealsa which acts as a kind of virtual sound card, nothing
else!!! This is very strange to me and I haven't found any
explanation for that....
You are a very determined man! I followed your
instructions and yes, this works when I run it from the
command line as root. Again, when launched by systemd I
come up with no reply when I run pa devlist in fs_cli.
When free time is more plentiful, I will investigate
trying to run this as a different user. I think I just need
to be in the proper group. I will also need to adapt this
to use the 3.5mm output of the pi. Where do you see the
device names, in the alsa mixer?
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.