The call to linphone_core_stop_dtmf() was accidentally creating a ringstream, which it obviously should not do.