Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

123 Zeilen
3.0 KiB

  1. import frappe
  2. call_initiation_data = frappe._dict(
  3. {
  4. "CallSid": "23c162077629863c1a2d7f29263a162m",
  5. "CallFrom": "09999999991",
  6. "CallTo": "09999999980",
  7. "Direction": "incoming",
  8. "Created": "Wed, 23 Feb 2022 12:31:59",
  9. "From": "09999999991",
  10. "To": "09999999988",
  11. "CurrentTime": "2022-02-23 12:32:02",
  12. "DialWhomNumber": "09999999999",
  13. "Status": "busy",
  14. "EventType": "Dial",
  15. "AgentEmail": "test_employee_exotel@company.com",
  16. }
  17. )
  18. call_end_data = frappe._dict(
  19. {
  20. "CallSid": "23c162077629863c1a2d7f29263a162m",
  21. "CallFrom": "09999999991",
  22. "CallTo": "09999999980",
  23. "Direction": "incoming",
  24. "ForwardedFrom": "null",
  25. "Created": "Wed, 23 Feb 2022 12:31:59",
  26. "DialCallDuration": "17",
  27. "RecordingUrl": "https://s3-ap-southeast-1.amazonaws.com/random.mp3",
  28. "StartTime": "2022-02-23 12:31:58",
  29. "EndTime": "1970-01-01 05:30:00",
  30. "DialCallStatus": "completed",
  31. "CallType": "completed",
  32. "DialWhomNumber": "09999999999",
  33. "ProcessStatus": "null",
  34. "flow_id": "228040",
  35. "tenant_id": "67291",
  36. "From": "09999999991",
  37. "To": "09999999988",
  38. "RecordingAvailableBy": "Wed, 23 Feb 2022 12:37:25",
  39. "CurrentTime": "2022-02-23 12:32:25",
  40. "OutgoingPhoneNumber": "09999999988",
  41. "Legs": [
  42. {
  43. "Number": "09999999999",
  44. "Type": "single",
  45. "OnCallDuration": "10",
  46. "CallerId": "09999999980",
  47. "CauseCode": "NORMAL_CLEARING",
  48. "Cause": "16",
  49. }
  50. ],
  51. }
  52. )
  53. call_disconnected_data = frappe._dict(
  54. {
  55. "CallSid": "d96421addce69e24bdc7ce5880d1162l",
  56. "CallFrom": "09999999991",
  57. "CallTo": "09999999980",
  58. "Direction": "incoming",
  59. "ForwardedFrom": "null",
  60. "Created": "Mon, 21 Feb 2022 15:58:12",
  61. "DialCallDuration": "0",
  62. "StartTime": "2022-02-21 15:58:12",
  63. "EndTime": "1970-01-01 05:30:00",
  64. "DialCallStatus": "canceled",
  65. "CallType": "client-hangup",
  66. "DialWhomNumber": "09999999999",
  67. "ProcessStatus": "null",
  68. "flow_id": "228040",
  69. "tenant_id": "67291",
  70. "From": "09999999991",
  71. "To": "09999999988",
  72. "CurrentTime": "2022-02-21 15:58:47",
  73. "OutgoingPhoneNumber": "09999999988",
  74. "Legs": [
  75. {
  76. "Number": "09999999999",
  77. "Type": "single",
  78. "OnCallDuration": "0",
  79. "CallerId": "09999999980",
  80. "CauseCode": "RING_TIMEOUT",
  81. "Cause": "1003",
  82. }
  83. ],
  84. }
  85. )
  86. call_not_answered_data = frappe._dict(
  87. {
  88. "CallSid": "fdb67a2b4b2d057b610a52ef43f81622",
  89. "CallFrom": "09999999991",
  90. "CallTo": "09999999980",
  91. "Direction": "incoming",
  92. "ForwardedFrom": "null",
  93. "Created": "Mon, 21 Feb 2022 15:47:02",
  94. "DialCallDuration": "0",
  95. "StartTime": "2022-02-21 15:47:02",
  96. "EndTime": "1970-01-01 05:30:00",
  97. "DialCallStatus": "no-answer",
  98. "CallType": "incomplete",
  99. "DialWhomNumber": "09999999999",
  100. "ProcessStatus": "null",
  101. "flow_id": "228040",
  102. "tenant_id": "67291",
  103. "From": "09999999991",
  104. "To": "09999999988",
  105. "CurrentTime": "2022-02-21 15:47:40",
  106. "OutgoingPhoneNumber": "09999999988",
  107. "Legs": [
  108. {
  109. "Number": "09999999999",
  110. "Type": "single",
  111. "OnCallDuration": "0",
  112. "CallerId": "09999999980",
  113. "CauseCode": "RING_TIMEOUT",
  114. "Cause": "1003",
  115. }
  116. ],
  117. }
  118. )