From phonehook sources I can see that it doesn’t take anything special. It’s actually as easy as listening for incoming calls, like
QDBusInterface voiceCallIf("org.nemomobile.voicecall",
"/calls/active",
"org.nemomobile.voicecall.VoiceCall",
QDBusConnection::sessionBus());
if(!voiceCallIf.property("isIncoming").toBool()) {
qDebug() << "ignore outgoing call";
return;
}
comparing their numbers with user’s blacklist, and if there’s a match simply doing
m = QDBusMessage::createMethodCall("org.nemomobile.voicecall",
"/calls/active",
"org.nemomobile.voicecall.VoiceCall",
"hangup");
QDBusConnection::sessionBus().call(m);
I think I will do it myself when I manage to find some spare time for it.