# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass CancelTransfer = CTICommandClass('cancel_transfer', None, None) CancelTransfer.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2015 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.status = msg.get('status') StartTLS = CTICommandClass('starttls', None, _parse) StartTLS.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass CompleteTransfer = CTICommandClass('complete_transfer', None, None) CompleteTransfer.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2015 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): voicemail = msg['voicemail'] if not isinstance(voicemail, basestring): raise ValueError('expected basestring: was {}'.format(type(voicemail))) if not voicemail.isalnum(): raise ValueError( 'expected alphanumeric string: was {}'.format(voicemail)) command.voicemail_number = voicemail BlindTransferVoicemail = CTICommandClass('blind_transfer_voicemail', None, _parse) AttendedTransferVoicemail = CTICommandClass('attended_transfer_voicemail', None, _parse) BlindTransferVoicemail.add_to_registry() AttendedTransferVoicemail.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2015-2016 Avencall # SPDX-License-Identifier: GPL-3.0+ import uuid from xivo_cti.cti.cti_command import CTICommandClass def _check_valid_uuid(value): uuid.UUID(value) return value def _parse(msg, command): command.alias = msg['alias'] command.remote_xivo_uuid = _check_valid_uuid(msg['to'][0]) command.remote_user_uuid = _check_valid_uuid(msg['to'][1]) command.text = msg['text'] Chat = CTICommandClass('chitchat', None, _parse) Chat.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass CancelTransfer = CTICommandClass('cancel_transfer', None, None) CancelTransfer.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.pattern = msg.get('pattern') Directory = CTICommandClass('directory', None, _parse) Directory.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2015 Avencall # SPDX-License-Identifier: GPL-3.0+ import logging from xivo_cti.cti.cti_command import CTICommandClass logger = logging.getLogger(__name__) def _parse(msg, command): command.user_ids = [(xivo_uuid, user_id) for (xivo_uuid, user_id) in msg['user_ids']] UnregisterUserStatus = CTICommandClass('unregister_user_status_update', None, _parse) UnregisterUserStatus.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass Logout = CTICommandClass('logout', None, None) Logout.add_to_registry()
# Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'queueremove' def _parse(msg, command): command.member = msg.get('member') command.queue = msg.get('queue') QueueRemove = CTICommandClass('ipbxcommand', _match, _parse) QueueRemove.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass GetSwitchboardDirectoryHeaders = CTICommandClass('get_switchboard_directory_headers', None, None) GetSwitchboardDirectoryHeaders.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass Logout = CTICommandClass('logout', None, None) Logout.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.invitee = msg['invitee'] InviteConfroom = CTICommandClass('invite_confroom', None, _parse) InviteConfroom.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass SubscribeToQueuesStats = CTICommandClass('subscribetoqueuesstats', None, None) SubscribeToQueuesStats.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.company = msg['company'] command.ident = msg['ident'] command.userlogin = msg['userlogin'] command.xivo_version = msg['xivoversion'] LoginID = CTICommandClass('login_id', None, _parse) LoginID.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'dial' def _parse(msg, command): command.destination = msg['destination'] Dial = CTICommandClass('ipbxcommand', _match, _parse) Dial.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.queue_name = msg['queue_name'] HoldSwitchboard = CTICommandClass('hold_switchboard', None, _parse) HoldSwitchboard.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'agentlogin' def _parse(msg, command): command.agent_phone_number = msg.get('agentphonenumber') command.agent_id = msg.get('agentids') AgentLogin = CTICommandClass('ipbxcommand', _match, _parse) AgentLogin.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.number = msg['number'] DirectTransfer = CTICommandClass('direct_transfer', None, _parse) DirectTransfer.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.unique_id = msg['unique_id'] Answer = CTICommandClass('answer', None, _parse) Answer.add_to_registry()
# Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'agentlogin' def _parse(msg, command): command.agent_phone_number = msg.get('agentphonenumber') command.agent_id = msg.get('agentids') AgentLogin = CTICommandClass('ipbxcommand', _match, _parse) AgentLogin.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass Hangup = CTICommandClass('hangup', None, None) Hangup.add_to_registry()
# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse_search(msg, command): command.pattern = msg.get('pattern') PeopleSearch = CTICommandClass('people_search', match_fun=None, parse_fun=_parse_search) PeopleSearch.add_to_registry() PeopleHeaders = CTICommandClass('people_headers', match_fun=None, parse_fun=None) PeopleHeaders.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.availstate = msg['availstate'] Availstate = CTICommandClass('availstate', None, _parse) Availstate.add_to_registry()
# Copyright (C) 2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse_search(msg, command): command.pattern = msg.get('pattern') PeopleSearch = CTICommandClass('people_search', match_fun=None, parse_fun=_parse_search) PeopleSearch.add_to_registry() PeopleHeaders = CTICommandClass('people_headers', match_fun=None, parse_fun=None) PeopleHeaders.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.number = msg['number'] AttendedTransfer = CTICommandClass('attended_transfer', None, _parse) AttendedTransfer.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'agentlogout' def _parse(msg, command): command.agent_id = msg.get('agentids') AgentLogout = CTICommandClass('ipbxcommand', _match, _parse) AgentLogout.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass SubscribeToQueuesStats = CTICommandClass('subscribetoqueuesstats', None, None) SubscribeToQueuesStats.add_to_registry()
command.contact_infos = msg.get('contact_infos') def _parse_personal_contact_raw(msg, command): command.source = msg.get('source') command.source_entry_id = msg.get('source_entry_id') def _parse_import_personal_contacts_csv(msg, command): command.csv_contacts = msg.get('csv_contacts') PeopleSearch = CTICommandClass('people_search', match_fun=None, parse_fun=_parse_search) PeopleSearch.add_to_registry() PeopleHeaders = CTICommandClass('people_headers', match_fun=None, parse_fun=None) PeopleHeaders.add_to_registry() PeopleFavorites = CTICommandClass('people_favorites', match_fun=None, parse_fun=None) PeopleFavorites.add_to_registry() PeopleSetFavorite = CTICommandClass('people_set_favorite', match_fun=None, parse_fun=_parse_set_favorite) PeopleSetFavorite.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.variables = msg.get('infos', {}).get('variables', {}) CallFormResult = CTICommandClass('call_form_result', None, _parse) CallFormResult.add_to_registry()
# Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'queuepause' def _parse(msg, command): command.member = msg.get('member') command.queue = msg.get('queue') QueuePause = CTICommandClass('ipbxcommand', _match, _parse) QueuePause.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass Hangup = CTICommandClass('hangup', None, None) Hangup.add_to_registry()
# -*- coding: utf-8 -*- # Copyright 2007-2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _parse_login_capas(msg, command): command.capaid = int(msg['capaid']) command.state = msg['state'] LoginCapas = CTICommandClass('login_capas', None, _parse_login_capas) LoginCapas.add_to_registry() def _parse_login_id(msg, command): command.company = msg['company'] command.ident = msg['ident'] command.userlogin = msg['userlogin'] # In wazo 17.16 the field was changed from xivoversion to wazoversion command.xivo_version = msg.get('wazoversion') or msg.get('xivoversion') LoginID = CTICommandClass('login_id', None, _parse_login_id) LoginID.add_to_registry() def _parse_login_pass(msg, command): command.password = msg['password']
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass GetSwitchboardDirectoryHeaders = CTICommandClass( 'get_switchboard_directory_headers', None, None) GetSwitchboardDirectoryHeaders.add_to_registry()
# Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'queueadd' def _parse(msg, command): command.member = msg.get('member') command.queue = msg.get('queue') QueueAdd = CTICommandClass('ipbxcommand', _match, _parse) QueueAdd.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'dial' def _parse(msg, command): command.destination = msg['destination'] Dial = CTICommandClass('ipbxcommand', _match, _parse) Dial.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2015 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.size = int(msg['size']) History = CTICommandClass('history', None, _parse) History.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.unique_id = msg['unique_id'] ResumeSwitchboard = CTICommandClass('resume_switchboard', None, _parse) ResumeSwitchboard.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # SPDX-License-Identifier: GPL-3.0+ from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'listen' def _parse(msg, command): command.destination = msg['destination'] Listen = CTICommandClass('ipbxcommand', _match, _parse) Listen.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _match(msg): return msg['command'] == 'listen' def _parse(msg, command): command.destination = msg['destination'] Listen = CTICommandClass('ipbxcommand', _match, _parse) Listen.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.pattern = msg.get('pattern') SwitchboardDirectorySearch = CTICommandClass('switchboard_directory_search', None, _parse) SwitchboardDirectorySearch.add_to_registry()
# -*- coding: utf-8 -*- # Copyright (C) 2007-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> from xivo_cti.cti.cti_command import CTICommandClass def _parse(msg, command): command.availstate = msg['availstate'] Availstate = CTICommandClass('availstate', None, _parse) Availstate.add_to_registry()