Exemple #1
0
def delete_voicemail(user):
    try:
        voicemail = voicemail_dao.get(user.voicemail_id)
    except LookupError:
        return
    else:
        voicemail_dao.delete(voicemail)
Exemple #2
0
    def test_delete_with_dialaction(self):
        voicemail = self.create_voicemail(number='42', context='default')
        incall = self.create_incall_for_voicemail(voicemail, did='42', context='from-extern')

        voicemail_dao.delete(voicemail)

        self.check_voicemail_table(voicemail.id)
        self.check_incall_associated_to_nothing(incall.id)
Exemple #3
0
def delete(voicemail):
    validator.validate_delete(voicemail)
    voicemail_dao.delete(voicemail)
    notifier.deleted(voicemail)
    try:
        sysconfd_connector.delete_voicemail_storage(voicemail.number, voicemail.context)
    except Exception as e:
        raise SysconfdError(str(e))
Exemple #4
0
def delete(voicemail):
    validator.validate_delete(voicemail)
    voicemail_dao.delete(voicemail)
    notifier.deleted(voicemail)
    try:
        sysconfd_connector.delete_voicemail_storage(voicemail.number,
                                                    voicemail.context)
    except Exception as e:
        raise SysconfdError(str(e))
Exemple #5
0
    def test_delete(self):
        voicemail = self.create_voicemail(number='42', context='default')
        voicemail_dao.delete(voicemail)

        self.check_voicemail_table(voicemail.id)