=== modified file 'libtelephonyservice/ringtone.cpp'
--- libtelephonyservice/ringtone.cpp	2015-12-02 13:14:29 +0000
+++ libtelephonyservice/ringtone.cpp	2016-02-05 19:17:52 +0000
@@ -19,9 +19,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "telepathyhelper.h"
 #include "greetercontacts.h"
 #include "ringtone.h"
 
+#include <QDBusInterface>
+
 RingtoneWorker::RingtoneWorker(QObject *parent) :
     QObject(parent), mCallAudioPlayer(NULL), mCallAudioPlaylist(this),
     mMessageAudioPlayer(NULL)
@@ -32,27 +35,41 @@
 
 void RingtoneWorker::playIncomingCallSound()
 {
+    bool shouldPlay = true;
     if (!qgetenv("PA_DISABLED").isEmpty()) {
         return;
     }
 
-    if (GreeterContacts::instance()->silentMode()) {
-        return;
-    }
-
     // force delete all media player instances
     stopIncomingCallSound();
 
     // pick up the new ringtone in case it changed in the meantime
     mCallAudioPlaylist.addMedia(QUrl::fromLocalFile(GreeterContacts::instance()->incomingCallSound()));
     mCallAudioPlayer = new QMediaPlayer(this);
+
+    if (GreeterContacts::instance()->silentMode()) {
+        shouldPlay = false;
+        // then check if we have the headset plugged in
+        QDBusInterface *phoneAppHandler = TelepathyHelper::instance()->handlerInterface();
+        QString activeAudioOutput = phoneAppHandler->property("ActiveAudioOutput").toString();
+        bool isWiredHeadset = (activeAudioOutput == "wired_headset");
+        if (isWiredHeadset) {
+            // by default the stream goes to both speaker and wired_headset. let's change that.
+            phoneAppHandler->setProperty("ActiveAudioOutput", "wired_headset");
+            shouldPlay = true;
+        }
+    }
+
 #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
     mCallAudioPlayer->setAudioRole(QMediaPlayer::AlertRole);
 #else
     mCallAudioPlayer->setAudioRole(QAudio::RingtoneRole);
 #endif
     mCallAudioPlayer->setPlaylist(&mCallAudioPlaylist);
-    mCallAudioPlayer->play();
+
+    if (shouldPlay) {
+        mCallAudioPlayer->play();
+    }
 }
 
 void RingtoneWorker::stopIncomingCallSound()

