#!/usr/bin/env python3 # encoding:utf-8 from enum import Enum class CallType(Enum): IM = (0, 'IM') INBOUND_CALL = (1, '呼入') OUTBOUND_CALL = (2, '手动外呼') AUTO_CALL = (3, '预测外呼') BOOT_CALL = (4, '机器人外呼') BOTH_CALL = (5, '双向外呼') SIP_OUTBOUND_CALL = (6, '硬话机外呼') INNER_CALL = (7, '内呼') def __init__(self, code, description): self.code = code self.description = description class Direction(Enum): INBOUND = (1, '呼入') OUTBOUND = (2, '外呼') def __init__(self, code, description): self._code = code self.description = description class NextType(Enum): NORNAL = (1, '默认') NEXT_CALL_OTHER = (2, '呼叫另外一测') NEXT_CALL_BRIDGE = (3, '桥接') NEXT_CONSULT_AGENT = (4, '咨询坐席') NEXT_CONSULT_CALLOUT = (5, '咨询外线') NEXT_CALL_AGENT = (6, '转到坐席') NEXT_TRANSFER_SUCCESS = (7, '完成转接') NEXT_TRANSFER_BRIDGE = (8, '转接后桥接') NEXT_TRANSFER_CALL = (9, '电话转接') NEXT_INSERT_CALL = (10, '强插电话') NEXT_LISTEN_CALL = (11, '监听电话') NEXT_WHISPER_CALL = (12, '耳语电话') NEXT_VDN = (13, '进vdn') NEXT_GROUP = (14, '进技能组') NEXT_IVR = (15, '进ivr') NEXT_HANGUP = (16, '挂机处理') NEXT_QUEUE_PLAY = (17, '放音queue') NEXT_QUEUE_OVERFLOW_GROUP = (18, '溢出队列') NEXT_QUEUE_OVERFLOW_IVR = (19, '溢出进IVR') NEXT_QUEUE_OVERFLOW_VDN = (20, '溢出进vdn') NEXT_PLAY_START = (21, '播放音频') NEXT_WAIT_KEY = (22, '等待按键播放音频') NEXT_NOTICE_MUSIC_DONE = (23, '通知音频播放结束') NEXT_PLAY_KEY_MUSIC = (24, '播放音频') NEXT_QUEUE_PLAY_STOP = (25, '停止放音') def __init__(self, code, description): self.code = code self.description = description class CallCauseEnum(Enum): DEFAULT = (0, "默认") RESTART = (2, "服务重启") CALL_TIMEOUT = (3, "呼叫超时") PLAY_TIMEOUT = (5, "播放音超时") WAITING_TIMEOUT = (6, "等待超时") AGENT_HANGUP_CALL = (7, "坐席挂断请求") HANGUP_EVENT = (8, "挂断事件") PLAYBACK_STOP = (9, "等待音结束") ROBOT_MONITOR = (10, "机器人挂断监听") LINE_BREAK = (11, "线路故障") ROBOT_TRANSFER = (12, "机器人转接") ROBOT_FULL = (13, "机器人话路数满额") NO_MUSIC_HANGUP = (14, "无挂断播放音挂断") PLAY_KEY_DONE_HANGUP = (15, "按键播放音播完挂断") PLAY_TIMEOUT_HANGUP = (16, "通知播放超时挂断") WAITING_KEY_TIMEOUT_HANGUP = (17, "等待按键超时挂断") def __init__(self, code, description): self.code = code self.description = description