Sailfish OS and the Jolla phone use the tone generator daemon [1] for local playback of DTMF sounds. These D-Bus calls start and stop playing a DTMF tone that is equivalent to pressing key '5' during a voice call:
dbus-send --system --type=method_call --dest=com.Nokia.Telephony.Tones /com/Nokia/Telephony/Tones com.Nokia.Telephony.Tones.StartEventTone uint32:5 int32:0 uint32:1000
dbus-send --system --type=method_call --dest=com.Nokia.Telephony.Tones /com/Nokia/Telephony/Tones com.Nokia.Telephony.Tones.StopTone
tone-generator has its origin in Nokia Maemo / MeeGo, and is LGPL-licensed. From a quick glance, tone-generator seems to depend only on PulseAudio, GLib/GObject and D-Bus. It should be possible to use it (or parts of it) on Ubuntu.
For reference, in Sailfish OS the tone generation daemon is used by 'voicecall manager' ([2] , roughly equivalent to Ubuntu's telephony-service) for DTMF sounds, and by telepathy-ring ([3], roughly equivalent to Ubuntu's telepathy-ofono) for call event sounds and, in some circumstances, for alerting sounds.
I'm not sure if this is directly helpful, but:
Sailfish OS and the Jolla phone use the tone generator daemon [1] for local playback of DTMF sounds. These D-Bus calls start and stop playing a DTMF tone that is equivalent to pressing key '5' during a voice call: com.Nokia. Telephony. Tones /com/Nokia/ Telephony/ Tones com.Nokia. Telephony. Tones.StartEven tTone uint32:5 int32:0 uint32:1000 com.Nokia. Telephony. Tones /com/Nokia/ Telephony/ Tones com.Nokia. Telephony. Tones.StopTone
dbus-send --system --type=method_call --dest=
dbus-send --system --type=method_call --dest=
tone-generator has its origin in Nokia Maemo / MeeGo, and is LGPL-licensed. From a quick glance, tone-generator seems to depend only on PulseAudio, GLib/GObject and D-Bus. It should be possible to use it (or parts of it) on Ubuntu.
For reference, in Sailfish OS the tone generation daemon is used by 'voicecall manager' ([2] , roughly equivalent to Ubuntu's telephony-service) for DTMF sounds, and by telepathy-ring ([3], roughly equivalent to Ubuntu's telepathy-ofono) for call event sounds and, in some circumstances, for alerting sounds.
[1] https:/ /github. com/nemomobile/ tone-generator /github. com/nemomobile/ voicecall/ blob/master/ plugins/ tonegend/ src/tonegenerat orplugin. cpp /github. com/nemomobile/ telepathy- ring/blob/ master/ modem/tones. c
[2] https:/
[3] https:/