Exemplo n.º 1
0
def edited(voicemail):
    data = _new_sysconfd_data(
        'xivo[voicemail,edit,%s]' % voicemail.id,
        ['voicemail reload', 'sip reload', 'module reload chan_sccp.so'])
    sysconfd_connector.exec_request_handlers(data)
    event = EditVoicemailEvent(voicemail.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 2
0
def edited(voicemail):
    data = _new_sysconfd_data('xivo[voicemail,edit,%s]' % voicemail.id,
                              ['voicemail reload',
                               'sip reload',
                               'module reload chan_sccp.so'])
    sysconfd_connector.exec_request_handlers(data)
    event = EditVoicemailEvent(voicemail.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 3
0
def bus_event_agent_removed_from_queue(agent_id, queue_id):
    bus_event = event.AgentRemovedFromQueueEvent(agent_id, queue_id)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 4
0
def bus_event_dissociated(user_line):
    bus_event = event.UserLineDissociatedEvent(user_line.user_id,
                                               user_line.line_id,
                                               user_line.main_user,
                                               user_line.main_line)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 5
0
def edited(user):
    event = EditFuncKeyTemplateEvent(user.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 6
0
def deleted(func_key):
    builder = delete_events[func_key.__class__]
    event = builder(func_key)
    bus_manager.send_bus_event(event, event.routing_key)
Exemplo n.º 7
0
def deleted(line):
    data = _new_sysconfd_data()
    sysconfd_connector.exec_request_handlers(data)
    event = DeleteLineEvent(line.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 8
0
def bus_event_associated(user_voicemail):
    bus_event = event.UserVoicemailAssociatedEvent(user_voicemail.user_id,
                                                   user_voicemail.voicemail_id,
                                                   user_voicemail.enabled)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 9
0
def bus_event_dissociated(user_line):
    bus_event = event.UserLineDissociatedEvent(user_line.user_id,
                                               user_line.line_id,
                                               user_line.main_user,
                                               user_line.main_line)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 10
0
def bus_event_dissociated(user_voicemail):
    bus_event = event.UserVoicemailDissociatedEvent(user_voicemail.user_id,
                                                    user_voicemail.voicemail_id,
                                                    False)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 11
0
def live_reload_status_changed(data):
    bus_event = event.LiveReloadEditedEvent(data['enabled'])
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
    if data['enabled']:
        _send_sysconfd_command()
Exemplo n.º 12
0
def edited(user_cti_profile):
    bus_event = event.UserCtiProfileEditedEvent(user_cti_profile.user_id,
                                                user_cti_profile.cti_profile_id,
                                                user_cti_profile.enabled)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
    _send_sysconfd_command(user_cti_profile)
Exemplo n.º 13
0
def deleted(device):
    event = DeleteDeviceEvent(device.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 14
0
def edited(device):
    event = EditDeviceEvent(device.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 15
0
def created(device):
    event = CreateDeviceEvent(device.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 16
0
def bus_event_agent_removed_from_queue(agent_id, queue_id):
    bus_event = event.AgentRemovedFromQueueEvent(agent_id, queue_id)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 17
0
def bus_event_agent_queue_associated(queue_member):
    bus_event = event.AgentQueueAssociatedEvent(queue_member.queue_id,
                                                queue_member.agent_id,
                                                queue_member.penalty)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 18
0
def live_reload_status_changed(data):
    bus_event = event.LiveReloadEditedEvent(data['enabled'])
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
    if data['enabled']:
        _send_sysconfd_command()
Exemplo n.º 19
0
def deleted(voicemail):
    data = _new_sysconfd_data('xivo[voicemail,delete,%s]' % voicemail.id,
                              ['voicemail reload'])
    sysconfd_connector.exec_request_handlers(data)
    event = DeleteVoicemailEvent(voicemail.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 20
0
def bus_event_associated(user_voicemail):
    bus_event = event.UserVoicemailAssociatedEvent(user_voicemail.user_id,
                                                   user_voicemail.voicemail_id,
                                                   user_voicemail.enabled)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 21
0
def send_bus_dissociation_events(line_extension):
    bus_event = event.LineExtensionDissociatedEvent(
        line_extension.line_id, line_extension.extension_id)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 22
0
def deleted(extension):
    sysconfd_connector.exec_request_handlers(sysconfd_base_data)
    event = DeleteExtensionEvent(extension.id, extension.exten, extension.context)
    send_bus_event(event, event.routing_key)
Exemplo n.º 23
0
def deleted(voicemail):
    data = _new_sysconfd_data('xivo[voicemail,delete,%s]' % voicemail.id,
                              ['voicemail reload'])
    sysconfd_connector.exec_request_handlers(data)
    event = DeleteVoicemailEvent(voicemail.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 24
0
def edited(user_cti_profile):
    bus_event = event.UserCtiProfileEditedEvent(
        user_cti_profile.user_id, user_cti_profile.cti_profile_id,
        user_cti_profile.enabled)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
    _send_sysconfd_command(user_cti_profile)
Exemplo n.º 25
0
def deleted(user):
    data = _new_sysconfd_data('xivo[user,delete,%s]' % user.id)
    sysconfd_connector.exec_request_handlers(data)
    event = DeleteUserEvent(user.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 26
0
def bus_event_dissociated(user_voicemail):
    bus_event = event.UserVoicemailDissociatedEvent(user_voicemail.user_id,
                                                    user_voicemail.voicemail_id,
                                                    False)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 27
0
def bus_event_agent_queue_associated(queue_member):
    bus_event = event.AgentQueueAssociatedEvent(queue_member.queue_id,
                                                queue_member.agent_id,
                                                queue_member.penalty)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)
Exemplo n.º 28
0
def deleted(user):
    event = DeleteFuncKeyTemplateEvent(user.id)
    send_bus_event(event, event.routing_key)
Exemplo n.º 29
0
def send_bus_dissociation_events(line_extension):
    bus_event = event.LineExtensionDissociatedEvent(line_extension.line_id, line_extension.extension_id)
    bus_manager.send_bus_event(bus_event, bus_event.routing_key)