예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #5
0
def edited(user):
    event = EditFuncKeyTemplateEvent(user.id)
    send_bus_event(event, event.routing_key)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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()
예제 #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)
예제 #13
0
def deleted(device):
    event = DeleteDeviceEvent(device.id)
    send_bus_event(event, event.routing_key)
예제 #14
0
def edited(device):
    event = EditDeviceEvent(device.id)
    send_bus_event(event, event.routing_key)
예제 #15
0
def created(device):
    event = CreateDeviceEvent(device.id)
    send_bus_event(event, event.routing_key)
예제 #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)
예제 #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)
예제 #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()
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #28
0
def deleted(user):
    event = DeleteFuncKeyTemplateEvent(user.id)
    send_bus_event(event, event.routing_key)
예제 #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)