enumeration.py 2.7 KB

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