P.S. It looks that hangup takes some time, enough for half-a-second of ringtone to be heard in some cases. So muting the ringtone first turns out to be helpful:
QDBusMessage m = QDBusMessage::createMethodCall("org.nemomobile.voicecall",
"/calls/active",
"org.nemomobile.voicecall.VoiceCall",
"silenceRingtone");
QDBusConnection::sessionBus().call(m);