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)
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)
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)
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)
def edited(user): event = EditFuncKeyTemplateEvent(user.id) send_bus_event(event, event.routing_key)
def deleted(func_key): builder = delete_events[func_key.__class__] event = builder(func_key) bus_manager.send_bus_event(event, event.routing_key)
def deleted(line): data = _new_sysconfd_data() sysconfd_connector.exec_request_handlers(data) event = DeleteLineEvent(line.id) send_bus_event(event, event.routing_key)
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)
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)
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()
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)
def deleted(device): event = DeleteDeviceEvent(device.id) send_bus_event(event, event.routing_key)
def edited(device): event = EditDeviceEvent(device.id) send_bus_event(event, event.routing_key)
def created(device): event = CreateDeviceEvent(device.id) send_bus_event(event, event.routing_key)
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)
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)
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)
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)
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)
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)
def deleted(user): event = DeleteFuncKeyTemplateEvent(user.id) send_bus_event(event, event.routing_key)
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)