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