How to set up Ubuntu PC as bluetooth headset to attend calls

Bluez has experimental support for this but I have not got it to work properly before.

apparently it's possible if you use Bluez 5 and install "ofono"

then in /etc/pulse/default.pa modify the line:

 load-module module-bluetooth-discover

to:

 load-module module-bluetooth-discover headset=ofono

then restart pulseaudio

For now it seems that: - if in /etc/pulse/default.pa you have added headset=ofono you will have the headset; - if not you will have a2dp (restart pulseaudio every time).

This info is from the bottom of this long thread, which was last updated a few days ago


I've solved it this way:

  1. in /etc/pulse/default.pa find the line load-module module-bluetooth-discover and change it to load-module module-bluetooth-discover headset=ofono
  2. Add the user "pulse" to group "bluetooth" to grant the permission: sudo useradd -g bluetooth pulse (probably it's already correct)
  3. VERY IMPORTANT: To grant the permission, add this to /etc/dbus-1/system.d/ofono.conf (before </busconfig> ;-)):

    <policy user="pulse">
    <allow send_destination="org.ofono"/> 
    </policy>
    

    See: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/

Now in pavucontrol I can see that the profile changes automatically from A2DP to HSP / HFP if I make a phone call, and then it magically returns to A2DP!**