DTMF tones not being generated locally

Bug #1187453 reported by Pat McGowan
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
dialer-app
Invalid
High
Martti Piirainen
dialer-app (Ubuntu)
Invalid
High
Martti Piirainen
telephony-service (Ubuntu)
Fix Released
High
Martti Piirainen

Bug Description

krillin, rtm 208 (also seen on mako vivid yesterday)

steps
1) launch dialer app
2) type a phone number quickly
EXPECTED: hear a tone for every number pressed
RESULT: some tones were dropped, approximately 2 out of a 10 digit sequence

----original bug----
DTMF tones are not always generated when the UI shows the number was entered.

Nexus 4 running build 150

Related branches

Changed in touch-preview-images:
status: New → Confirmed
description: updated
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

This may be a timing thing depending on how fast you type, it does not seem very consistent.
It definitely does not occur when long deliberate presses are used.

Turned debug on in ofonod then
tail -f /var/log/syslog | grep DTMF

You will often see the number of the phone app UI but not in the log

description: updated
tags: added: avengers
affects: touch-preview-images → dialer-app (Ubuntu)
Changed in dialer-app (Ubuntu Saucy):
assignee: Ricardo Salveti (rsalveti) → Gustavo Pichorim Boiko (boiko)
Revision history for this message
Bill Filler (bfiller) wrote :

tones need to be generated and played back in the local headset

summary: - DTMF not working with conference lines
+ DTMF tones not being generated locally
no longer affects: telephony-service (Ubuntu Saucy)
Changed in dialer-app (Ubuntu Saucy):
status: Confirmed → New
no longer affects: dialer-app (Ubuntu T-series)
Changed in telephony-service (Ubuntu):
assignee: nobody → Tiago Salem Herrmann (tiagosh)
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dialer-app (Ubuntu):
status: New → Confirmed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Add a new bug to track comment #1 which is not related to the tones per se bug #1268648

Revision history for this message
Martti Piirainen (piiramar) wrote :

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:
  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.

[1] https://github.com/nemomobile/tone-generator
[2] https://github.com/nemomobile/voicecall/blob/master/plugins/tonegend/src/tonegeneratorplugin.cpp
[3] https://github.com/nemomobile/telepathy-ring/blob/master/modem/tones.c

Revision history for this message
Martti Piirainen (piiramar) wrote :

Actually, tone-generator works as-is on Ubuntu Touch (image 123, mako HW), with these steps:
  # install dependencies
  apt-get install automake libtool pkg-config libdbus-glib-1-dev libglib2.0-dev libpulse-dev
  # compile
  ./autogen.sh && ./configure && make && make install
  # copy d-bus policy to correct place
  cp tone-generator.conf /etc/dbus-1/system.d/
  # run pulseaudio in system mode, and tone-generator as user 'pulse'
  start pulseaudio
  su -c tonegend -s /bin/sh pulse
I can now issue the abovementioned D-Bus calls. Note, the default volume of the generated sounds is VERY LOUD.

Revision history for this message
Martti Piirainen (piiramar) wrote :

Still evaluating tone-generator, some notes:
 - The volume of the DTMF sounds is set globally, via command line argument ' --volume-dtmf N' with N being 0 .. 100 percent of the maximum volume. The D-Bus interface's volume argument is ignored for DTMF sounds.
 - Two more command line arguments (buffer length; minimum recording length) need to be given to avoid a significant delay. "tonegend -b 100 -r 20 --volume-dtmf 30" seems to work well.
 - Haven't figured out yet why tonegend can't connect to PulseAudio if it's running in session mode, only in system mode (failing in pa_context_connect() in ausrv.c).

Revision history for this message
Martti Piirainen (piiramar) wrote :

DTMF tones are played locally when running tone-generator (not packaged yet, source and README at https://github.com/marttipiirainen/tone-generator) and adding some D-Bus calls to telepathy-ofono )https://code.launchpad.net/~piiramar/telepathy-ofono/dtmf-local-playback ). This is only a "proof of concept" currently.

Bill Filler (bfiller)
no longer affects: telephony-service (Ubuntu)
no longer affects: telephony-service (Ubuntu Trusty)
Changed in dialer-app (Ubuntu):
assignee: Gustavo Pichorim Boiko (boiko) → nobody
Changed in dialer-app (Ubuntu Saucy):
assignee: Gustavo Pichorim Boiko (boiko) → nobody
Changed in dialer-app:
milestone: none → beta-freeze
assignee: nobody → Martti Piirainen (piiramar)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Martti Piirainen (piiramar) wrote :

I added initial debian packaging to tone-generator, and moved the client-side code to telephony-service (instead of telepathy-ofono). Private branches:
  https://github.com/marttipiirainen/tone-generator
  https://code.launchpad.net/~piiramar/telephony-service/tone-generation

Bill Filler (bfiller)
tags: added: rtm14
Bill Filler (bfiller)
Changed in dialer-app (Ubuntu):
assignee: nobody → Martti Piirainen (piiramar)
no longer affects: dialer-app (Ubuntu Saucy)
Revision history for this message
Tony Espy (awe) wrote :

Closed out the dialer tasks as the fix involves creation of a new package ( tone-generator; in-progress ) and changes to telephony-service.

Changed in telephony-service (Ubuntu):
assignee: nobody → Martti Piirainen (piiramar)
importance: Undecided → High
status: New → In Progress
Changed in dialer-app:
status: Confirmed → Invalid
Changed in dialer-app (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package telephony-service - 0.1+14.10.20140813.1-0ubuntu1

---------------
telephony-service (0.1+14.10.20140813.1-0ubuntu1) utopic; urgency=low

  [ Ubuntu daily release ]
  * New rebuild forced

  [ Gustavo Pichorim Boiko ]
  * Check if the self contact actually exists before getting its
    presence. (LP: #1355388)
  * Do not update the .po files during `make`, update only the .pot
    file.

  [ Martti Piirainen ]
  * Adding support for tone generator (LP: #1187453). (LP: #1187453)

  [ Tiago Salem Herrmann ]
  * Use system settings to retrieve sim card display names.
  * Reduce vibration duration for text messages. Fix vibration in silent
    mode options for calls/messages (LP: #1347908)
 -- Ubuntu daily release <email address hidden> Wed, 13 Aug 2014 22:31:48 +0000

Changed in telephony-service (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Martti Piirainen (piiramar) wrote :

Works fine in mako HW, image 190.

kevin gunn (kgunn72)
Changed in dialer-app (Ubuntu):
status: Invalid → New
Changed in telephony-service (Ubuntu):
status: Fix Released → New
description: updated
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@kevin that seems to be a different issue, see bug #1403600

Revision history for this message
kevin gunn (kgunn72) wrote :

agreed, resetting states

no longer affects: dialer-app (Ubuntu RTM)
no longer affects: telephony-service (Ubuntu RTM)
Changed in dialer-app (Ubuntu):
status: New → Invalid
Changed in telephony-service (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.