@ipcom/asterisk-ari 0.0.165 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +79 -118
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/esm/index.js +76 -115
- package/dist/esm/index.js.map +2 -2
- package/dist/types/ari-client/ariClient.d.ts +5 -12
- package/dist/types/ari-client/ariClient.d.ts.map +1 -1
- package/dist/types/ari-client/interfaces/applications.types.d.ts +2 -2
- package/dist/types/ari-client/interfaces/applications.types.d.ts.map +1 -1
- package/dist/types/ari-client/interfaces/events.types.d.ts +329 -324
- package/dist/types/ari-client/interfaces/events.types.d.ts.map +1 -1
- package/dist/types/ari-client/interfaces/index.d.ts +1 -1
- package/dist/types/ari-client/interfaces/index.d.ts.map +1 -1
- package/dist/types/ari-client/interfaces/websocket.types.d.ts +2 -4
- package/dist/types/ari-client/interfaces/websocket.types.d.ts.map +1 -1
- package/dist/types/ari-client/resources/bridges.d.ts +4 -22
- package/dist/types/ari-client/resources/bridges.d.ts.map +1 -1
- package/dist/types/ari-client/resources/channels.d.ts +4 -10
- package/dist/types/ari-client/resources/channels.d.ts.map +1 -1
- package/dist/types/ari-client/resources/playbacks.d.ts +4 -10
- package/dist/types/ari-client/resources/playbacks.d.ts.map +1 -1
- package/dist/types/ari-client/utils.d.ts +2 -2
- package/dist/types/ari-client/utils.d.ts.map +1 -1
- package/dist/types/ari-client/websocketClient.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -1,8 +1,299 @@
|
|
|
1
|
+
import type { BridgeInstance } from '../resources/bridges';
|
|
1
2
|
import type { ChannelInstance } from '../resources/channels';
|
|
2
|
-
import type { PlaybackInstance
|
|
3
|
+
import type { PlaybackInstance } from '../resources/playbacks';
|
|
3
4
|
import type { Bridge } from './bridges.types';
|
|
4
5
|
import type { Channel } from './channels.types';
|
|
5
6
|
import type { Playback } from './playbacks.types';
|
|
7
|
+
/**
|
|
8
|
+
* Event Map interface that maps each ARI event name to its payload.
|
|
9
|
+
* Extensible via declaration merging for custom events.
|
|
10
|
+
*/
|
|
11
|
+
export interface AriEventMap {
|
|
12
|
+
ChannelDtmfReceived: {
|
|
13
|
+
type: 'ChannelDtmfReceived';
|
|
14
|
+
digit: string;
|
|
15
|
+
duration_ms: number;
|
|
16
|
+
channel: Channel;
|
|
17
|
+
instanceChannel?: ChannelInstance;
|
|
18
|
+
application: string;
|
|
19
|
+
};
|
|
20
|
+
ChannelDialplan: {
|
|
21
|
+
type: 'ChannelDialplan';
|
|
22
|
+
channel: Channel;
|
|
23
|
+
instanceChannel?: ChannelInstance;
|
|
24
|
+
dialplan_app: string;
|
|
25
|
+
dialplan_app_data: string;
|
|
26
|
+
application: string;
|
|
27
|
+
};
|
|
28
|
+
ChannelVarset: {
|
|
29
|
+
type: 'ChannelVarset';
|
|
30
|
+
variable: string;
|
|
31
|
+
value: string;
|
|
32
|
+
channel?: Channel;
|
|
33
|
+
application: string;
|
|
34
|
+
instanceChannel?: ChannelInstance;
|
|
35
|
+
};
|
|
36
|
+
StasisStart: {
|
|
37
|
+
type: 'StasisStart';
|
|
38
|
+
args: string[];
|
|
39
|
+
channel: Channel;
|
|
40
|
+
instanceChannel?: ChannelInstance;
|
|
41
|
+
replace_channel?: Channel;
|
|
42
|
+
application: string;
|
|
43
|
+
};
|
|
44
|
+
PlaybackStarted: {
|
|
45
|
+
type: 'PlaybackStarted';
|
|
46
|
+
playback: Playback;
|
|
47
|
+
asterisk_id: string;
|
|
48
|
+
application: string;
|
|
49
|
+
instancePlayback?: PlaybackInstance;
|
|
50
|
+
};
|
|
51
|
+
PlaybackContinuing: {
|
|
52
|
+
type: 'PlaybackContinuing';
|
|
53
|
+
playback: Playback;
|
|
54
|
+
playbackId: string;
|
|
55
|
+
asterisk_id: string;
|
|
56
|
+
application: string;
|
|
57
|
+
instancePlayback?: PlaybackInstance;
|
|
58
|
+
};
|
|
59
|
+
PlaybackFinished: {
|
|
60
|
+
type: 'PlaybackFinished';
|
|
61
|
+
playback: Playback;
|
|
62
|
+
playbackId: string;
|
|
63
|
+
asterisk_id: string;
|
|
64
|
+
application: string;
|
|
65
|
+
instancePlayback?: PlaybackInstance;
|
|
66
|
+
};
|
|
67
|
+
BridgeCreated: {
|
|
68
|
+
type: 'BridgeCreated';
|
|
69
|
+
bridge?: Bridge;
|
|
70
|
+
instanceBridge?: BridgeInstance;
|
|
71
|
+
bridgeId: string;
|
|
72
|
+
bridgeType: string;
|
|
73
|
+
channels: Channel[];
|
|
74
|
+
application: string;
|
|
75
|
+
};
|
|
76
|
+
BridgeDestroyed: {
|
|
77
|
+
type: 'BridgeDestroyed';
|
|
78
|
+
bridge?: Bridge;
|
|
79
|
+
instanceBridge?: BridgeInstance;
|
|
80
|
+
bridgeId: string;
|
|
81
|
+
application: string;
|
|
82
|
+
};
|
|
83
|
+
ChannelCreated: {
|
|
84
|
+
type: 'ChannelCreated';
|
|
85
|
+
channel: Channel;
|
|
86
|
+
instanceChannel?: ChannelInstance;
|
|
87
|
+
application: string;
|
|
88
|
+
};
|
|
89
|
+
ChannelDestroyed: {
|
|
90
|
+
type: 'ChannelDestroyed';
|
|
91
|
+
channel: Channel;
|
|
92
|
+
instanceChannel?: ChannelInstance;
|
|
93
|
+
application: string;
|
|
94
|
+
};
|
|
95
|
+
ApplicationMoveFailed: {
|
|
96
|
+
type: 'ApplicationMoveFailed';
|
|
97
|
+
application: string;
|
|
98
|
+
channel: Channel;
|
|
99
|
+
instanceChannel?: ChannelInstance;
|
|
100
|
+
};
|
|
101
|
+
ApplicationReplaced: {
|
|
102
|
+
type: 'ApplicationReplaced';
|
|
103
|
+
application: string;
|
|
104
|
+
};
|
|
105
|
+
RecordingStarted: {
|
|
106
|
+
type: 'RecordingStarted';
|
|
107
|
+
recordingId: string;
|
|
108
|
+
name: string;
|
|
109
|
+
application: string;
|
|
110
|
+
};
|
|
111
|
+
RecordingFinished: {
|
|
112
|
+
type: 'RecordingFinished';
|
|
113
|
+
recordingId: string;
|
|
114
|
+
name: string;
|
|
115
|
+
application: string;
|
|
116
|
+
recording: {
|
|
117
|
+
name: string;
|
|
118
|
+
format: string;
|
|
119
|
+
state: string;
|
|
120
|
+
target_uri: string;
|
|
121
|
+
duration: number;
|
|
122
|
+
talking_duration: number;
|
|
123
|
+
silence_duration: number;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
RecordingFailed: {
|
|
127
|
+
type: 'RecordingFailed';
|
|
128
|
+
recordingId: string;
|
|
129
|
+
name: string;
|
|
130
|
+
reason: string;
|
|
131
|
+
application: string;
|
|
132
|
+
};
|
|
133
|
+
DeviceStateChanged: {
|
|
134
|
+
type: 'DeviceStateChanged';
|
|
135
|
+
device: string;
|
|
136
|
+
state: string;
|
|
137
|
+
application: string;
|
|
138
|
+
};
|
|
139
|
+
BridgeMerged: {
|
|
140
|
+
type: 'BridgeMerged';
|
|
141
|
+
bridge?: Bridge;
|
|
142
|
+
instanceBridge?: BridgeInstance;
|
|
143
|
+
bridgeId: string;
|
|
144
|
+
bridges: string[];
|
|
145
|
+
application: string;
|
|
146
|
+
};
|
|
147
|
+
BridgeBlindTransfer: {
|
|
148
|
+
type: 'BridgeBlindTransfer';
|
|
149
|
+
bridge?: Bridge;
|
|
150
|
+
instanceBridge?: BridgeInstance;
|
|
151
|
+
bridgeId: string;
|
|
152
|
+
channel: Channel;
|
|
153
|
+
instanceChannel?: ChannelInstance;
|
|
154
|
+
transferee: Channel;
|
|
155
|
+
application: string;
|
|
156
|
+
};
|
|
157
|
+
BridgeAttendedTransfer: {
|
|
158
|
+
type: 'BridgeAttendedTransfer';
|
|
159
|
+
bridge?: Bridge;
|
|
160
|
+
instanceBridge?: BridgeInstance;
|
|
161
|
+
bridgeId: string;
|
|
162
|
+
transferer: Channel;
|
|
163
|
+
transferee: Channel;
|
|
164
|
+
destination: Channel;
|
|
165
|
+
application: string;
|
|
166
|
+
};
|
|
167
|
+
BridgeVideoSourceChanged: {
|
|
168
|
+
type: 'BridgeVideoSourceChanged';
|
|
169
|
+
bridge?: Bridge;
|
|
170
|
+
instanceBridge?: BridgeInstance;
|
|
171
|
+
bridgeId: string;
|
|
172
|
+
old_video_source_id?: string;
|
|
173
|
+
new_video_source_id: string;
|
|
174
|
+
application: string;
|
|
175
|
+
};
|
|
176
|
+
ChannelEnteredBridge: {
|
|
177
|
+
type: 'ChannelEnteredBridge';
|
|
178
|
+
bridge?: Bridge;
|
|
179
|
+
instanceBridge?: BridgeInstance;
|
|
180
|
+
bridgeId: string;
|
|
181
|
+
channel: Channel;
|
|
182
|
+
instanceChannel?: ChannelInstance;
|
|
183
|
+
application: string;
|
|
184
|
+
};
|
|
185
|
+
ChannelLeftBridge: {
|
|
186
|
+
type: 'ChannelLeftBridge';
|
|
187
|
+
bridge?: Bridge;
|
|
188
|
+
instanceBridge?: BridgeInstance;
|
|
189
|
+
bridgeId: string;
|
|
190
|
+
channel: Channel;
|
|
191
|
+
instanceChannel?: ChannelInstance;
|
|
192
|
+
application: string;
|
|
193
|
+
};
|
|
194
|
+
ChannelStateChange: {
|
|
195
|
+
type: 'ChannelStateChange';
|
|
196
|
+
channel: Channel;
|
|
197
|
+
instanceChannel?: ChannelInstance;
|
|
198
|
+
application: string;
|
|
199
|
+
};
|
|
200
|
+
ChannelTalkingStarted: {
|
|
201
|
+
type: 'ChannelTalkingStarted';
|
|
202
|
+
channel: Channel;
|
|
203
|
+
instanceChannel?: ChannelInstance;
|
|
204
|
+
application: string;
|
|
205
|
+
};
|
|
206
|
+
ChannelTalkingFinished: {
|
|
207
|
+
type: 'ChannelTalkingFinished';
|
|
208
|
+
channel: Channel;
|
|
209
|
+
instanceChannel?: ChannelInstance;
|
|
210
|
+
application: string;
|
|
211
|
+
};
|
|
212
|
+
ChannelUnhold: {
|
|
213
|
+
type: 'ChannelUnhold';
|
|
214
|
+
channel: Channel;
|
|
215
|
+
instanceChannel?: ChannelInstance;
|
|
216
|
+
application: string;
|
|
217
|
+
};
|
|
218
|
+
ChannelHold: {
|
|
219
|
+
type: 'ChannelHold';
|
|
220
|
+
channel: Channel;
|
|
221
|
+
instanceChannel?: ChannelInstance;
|
|
222
|
+
application: string;
|
|
223
|
+
};
|
|
224
|
+
ContactStatusChange: {
|
|
225
|
+
type: 'ContactStatusChange';
|
|
226
|
+
contact_info: Record<string, any>;
|
|
227
|
+
status: string;
|
|
228
|
+
aor?: string;
|
|
229
|
+
application: string;
|
|
230
|
+
};
|
|
231
|
+
EndpointStateChange: {
|
|
232
|
+
type: 'EndpointStateChange';
|
|
233
|
+
endpoint: Record<string, any>;
|
|
234
|
+
state: string;
|
|
235
|
+
application: string;
|
|
236
|
+
};
|
|
237
|
+
Dial: {
|
|
238
|
+
type: 'Dial';
|
|
239
|
+
caller: Channel;
|
|
240
|
+
peer: Channel;
|
|
241
|
+
dialstring?: string;
|
|
242
|
+
application: string;
|
|
243
|
+
};
|
|
244
|
+
StasisEnd: {
|
|
245
|
+
type: 'StasisEnd';
|
|
246
|
+
channel: Channel;
|
|
247
|
+
instanceChannel?: ChannelInstance;
|
|
248
|
+
application: string;
|
|
249
|
+
};
|
|
250
|
+
TextMessageReceived: {
|
|
251
|
+
type: 'TextMessageReceived';
|
|
252
|
+
to: string;
|
|
253
|
+
from: string;
|
|
254
|
+
body: string;
|
|
255
|
+
variables?: Record<string, any>;
|
|
256
|
+
application: string;
|
|
257
|
+
};
|
|
258
|
+
ChannelConnectedLine: {
|
|
259
|
+
type: 'ChannelConnectedLine';
|
|
260
|
+
channel: Channel;
|
|
261
|
+
instanceChannel?: ChannelInstance;
|
|
262
|
+
application: string;
|
|
263
|
+
};
|
|
264
|
+
ChannelHangupRequest: {
|
|
265
|
+
type: 'ChannelHangupRequest';
|
|
266
|
+
cause: number;
|
|
267
|
+
soft: boolean;
|
|
268
|
+
channel: Channel;
|
|
269
|
+
instanceChannel?: ChannelInstance;
|
|
270
|
+
application: string;
|
|
271
|
+
};
|
|
272
|
+
PeerStatusChange: {
|
|
273
|
+
type: 'PeerStatusChange';
|
|
274
|
+
peer: string;
|
|
275
|
+
peer_status: string;
|
|
276
|
+
application: string;
|
|
277
|
+
};
|
|
278
|
+
ChannelCallerId: {
|
|
279
|
+
type: 'ChannelCallerId';
|
|
280
|
+
caller_presentation: number;
|
|
281
|
+
caller_presentation_txt: string;
|
|
282
|
+
channel: Channel;
|
|
283
|
+
instanceChannel?: ChannelInstance;
|
|
284
|
+
application: string;
|
|
285
|
+
};
|
|
286
|
+
ChannelUserevent: {
|
|
287
|
+
type: 'ChannelUserevent';
|
|
288
|
+
eventname: string;
|
|
289
|
+
channel?: Channel;
|
|
290
|
+
instanceChannel?: ChannelInstance;
|
|
291
|
+
userevent: Record<string, any>;
|
|
292
|
+
application: string;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
export type WebSocketEventType = keyof AriEventMap;
|
|
296
|
+
export type WebSocketEvent = AriEventMap[keyof AriEventMap];
|
|
6
297
|
export type ChannelEvent = Extract<WebSocketEvent, {
|
|
7
298
|
channel: Channel;
|
|
8
299
|
}>;
|
|
@@ -10,328 +301,42 @@ export type PlaybackEvent = Extract<WebSocketEvent, {
|
|
|
10
301
|
playback: Playback;
|
|
11
302
|
}>;
|
|
12
303
|
export type BridgeEvent = Extract<WebSocketEvent, {
|
|
13
|
-
bridge: Bridge;
|
|
14
|
-
}>;
|
|
15
|
-
export type WebSocketEventType = 'DeviceStateChanged' | 'PlaybackStarted' | 'PlaybackContinuing' | 'PlaybackFinished' | 'RecordingStarted' | 'RecordingFinished' | 'RecordingFailed' | 'ApplicationMoveFailed' | 'ApplicationReplaced' | 'BridgeCreated' | 'BridgeDestroyed' | 'BridgeMerged' | 'BridgeBlindTransfer' | 'BridgeAttendedTransfer' | 'BridgeVideoSourceChanged' | 'ChannelCreated' | 'ChannelDestroyed' | 'ChannelEnteredBridge' | 'ChannelLeftBridge' | 'ChannelStateChange' | 'ChannelDtmfReceived' | 'ChannelDialplan' | 'ChannelCallerId' | 'ChannelUserevent' | 'ChannelHangupRequest' | 'ChannelVarset' | 'ChannelTalkingStarted' | 'ChannelTalkingFinished' | 'ChannelHold' | 'ChannelUnhold' | 'ContactStatusChange' | 'EndpointStateChange' | 'Dial' | 'StasisEnd' | 'StasisStart' | 'TextMessageReceived' | 'ChannelConnectedLine' | 'PeerStatusChange';
|
|
16
|
-
export declare const bridgeEvents: string[];
|
|
17
|
-
export type ChannelDtmfReceived = Extract<WebSocketEvent, {
|
|
18
|
-
type: 'ChannelDtmfReceived';
|
|
19
|
-
}>;
|
|
20
|
-
export type ChannelDialplanEvent = Extract<WebSocketEvent, {
|
|
21
|
-
type: 'ChannelDialplan';
|
|
22
|
-
}>;
|
|
23
|
-
export type ChannelVarset = Extract<WebSocketEvent, {
|
|
24
|
-
type: 'ChannelVarset';
|
|
25
|
-
}>;
|
|
26
|
-
export type StasisStart = Extract<WebSocketEvent, {
|
|
27
|
-
type: 'StasisStart';
|
|
28
|
-
}>;
|
|
29
|
-
export type PlaybackStarted = Extract<WebSocketEvent, {
|
|
30
|
-
type: 'PlaybackStarted';
|
|
31
|
-
}>;
|
|
32
|
-
export type PlaybackContinuing = Extract<WebSocketEvent, {
|
|
33
|
-
type: 'PlaybackContinuing';
|
|
34
|
-
}>;
|
|
35
|
-
export type PlaybackFinished = Extract<WebSocketEvent, {
|
|
36
|
-
type: 'PlaybackFinished';
|
|
37
|
-
}>;
|
|
38
|
-
export type BridgeCreated = Extract<WebSocketEvent, {
|
|
39
|
-
type: 'BridgeCreated';
|
|
40
|
-
}>;
|
|
41
|
-
export type BridgeDestroyed = Extract<WebSocketEvent, {
|
|
42
|
-
type: 'BridgeDestroyed';
|
|
43
|
-
}>;
|
|
44
|
-
export type ChannelCreated = Extract<WebSocketEvent, {
|
|
45
|
-
type: 'ChannelCreated';
|
|
46
|
-
}>;
|
|
47
|
-
export type ChannelDestroyed = Extract<WebSocketEvent, {
|
|
48
|
-
type: 'ChannelDestroyed';
|
|
49
|
-
}>;
|
|
50
|
-
export type ApplicationMoveFailed = Extract<WebSocketEvent, {
|
|
51
|
-
type: 'ApplicationMoveFailed';
|
|
52
|
-
}>;
|
|
53
|
-
export type RecordingStarted = Extract<WebSocketEvent, {
|
|
54
|
-
type: 'RecordingStarted';
|
|
55
|
-
}>;
|
|
56
|
-
export type RecordingFinished = Extract<WebSocketEvent, {
|
|
57
|
-
type: 'RecordingFinished';
|
|
58
|
-
}>;
|
|
59
|
-
export type RecordingFailed = Extract<WebSocketEvent, {
|
|
60
|
-
type: 'RecordingFailed';
|
|
61
|
-
}>;
|
|
62
|
-
export type DeviceStateChanged = Extract<WebSocketEvent, {
|
|
63
|
-
type: 'DeviceStateChanged';
|
|
64
|
-
}>;
|
|
65
|
-
export type BridgeMerged = Extract<WebSocketEvent, {
|
|
66
|
-
type: 'BridgeMerged';
|
|
67
|
-
}>;
|
|
68
|
-
export type BridgeBlindTransfer = Extract<WebSocketEvent, {
|
|
69
|
-
type: 'BridgeBlindTransfer';
|
|
70
|
-
}>;
|
|
71
|
-
export type BridgeAttendedTransfer = Extract<WebSocketEvent, {
|
|
72
|
-
type: 'BridgeAttendedTransfer';
|
|
73
|
-
}>;
|
|
74
|
-
export type BridgeVideoSourceChanged = Extract<WebSocketEvent, {
|
|
75
|
-
type: 'BridgeVideoSourceChanged';
|
|
76
|
-
}>;
|
|
77
|
-
export type ChannelEnteredBridge = Extract<WebSocketEvent, {
|
|
78
|
-
type: 'ChannelEnteredBridge';
|
|
79
|
-
}>;
|
|
80
|
-
export type ChannelLeftBridge = Extract<WebSocketEvent, {
|
|
81
|
-
type: 'ChannelLeftBridge';
|
|
82
|
-
}>;
|
|
83
|
-
export type ChannelStateChange = Extract<WebSocketEvent, {
|
|
84
|
-
type: 'ChannelStateChange';
|
|
85
|
-
}>;
|
|
86
|
-
export type ChannelTalkingStarted = Extract<WebSocketEvent, {
|
|
87
|
-
type: 'ChannelTalkingStarted';
|
|
88
|
-
}>;
|
|
89
|
-
export type ChannelTalkingFinished = Extract<WebSocketEvent, {
|
|
90
|
-
type: 'ChannelTalkingFinished';
|
|
91
|
-
}>;
|
|
92
|
-
export type ChannelUnhold = Extract<WebSocketEvent, {
|
|
93
|
-
type: 'ChannelUnhold';
|
|
94
|
-
}>;
|
|
95
|
-
export type ChannelHold = Extract<WebSocketEvent, {
|
|
96
|
-
type: 'ChannelHold';
|
|
97
|
-
}>;
|
|
98
|
-
export type ContactStatusChange = Extract<WebSocketEvent, {
|
|
99
|
-
type: 'ContactStatusChange';
|
|
100
|
-
}>;
|
|
101
|
-
export type EndpointStateChange = Extract<WebSocketEvent, {
|
|
102
|
-
type: 'EndpointStateChange';
|
|
103
|
-
}>;
|
|
104
|
-
export type Dial = Extract<WebSocketEvent, {
|
|
105
|
-
type: 'Dial';
|
|
106
|
-
}>;
|
|
107
|
-
export type StasisEnd = Extract<WebSocketEvent, {
|
|
108
|
-
type: 'StasisEnd';
|
|
109
|
-
}>;
|
|
110
|
-
export type TextMessageReceived = Extract<WebSocketEvent, {
|
|
111
|
-
type: 'TextMessageReceived';
|
|
112
|
-
}>;
|
|
113
|
-
export type ChannelConnectedLine = Extract<WebSocketEvent, {
|
|
114
|
-
type: 'ChannelConnectedLine';
|
|
115
|
-
}>;
|
|
116
|
-
export type ChannelHangupRequest = Extract<WebSocketEvent, {
|
|
117
|
-
type: 'ChannelHangupRequest';
|
|
118
|
-
}>;
|
|
119
|
-
export type PeerStatusChange = Extract<WebSocketEvent, {
|
|
120
|
-
type: 'PeerStatusChange';
|
|
121
|
-
}>;
|
|
122
|
-
export type WebSocketEvent = {
|
|
123
|
-
type: 'ChannelDtmfReceived';
|
|
124
|
-
digit: string;
|
|
125
|
-
duration_ms: number;
|
|
126
|
-
channel: Channel;
|
|
127
|
-
instanceChannel?: ChannelInstance;
|
|
128
|
-
application: string;
|
|
129
|
-
} | {
|
|
130
|
-
type: 'ChannelDialplan';
|
|
131
|
-
channel: Channel;
|
|
132
|
-
instanceChannel?: ChannelInstance;
|
|
133
|
-
dialplan_app: string;
|
|
134
|
-
dialplan_app_data: string;
|
|
135
|
-
application: string;
|
|
136
|
-
} | {
|
|
137
|
-
type: 'ChannelVarset';
|
|
138
|
-
variable: string;
|
|
139
|
-
value: string;
|
|
140
|
-
channel?: Channel;
|
|
141
|
-
application: string;
|
|
142
|
-
instanceChannel?: ChannelInstance;
|
|
143
|
-
} | {
|
|
144
|
-
type: 'StasisStart';
|
|
145
|
-
args: string[];
|
|
146
|
-
channel: Channel;
|
|
147
|
-
instanceChannel?: ChannelInstance;
|
|
148
|
-
replace_channel?: Channel;
|
|
149
|
-
application: string;
|
|
150
|
-
} | {
|
|
151
|
-
type: 'PlaybackStarted';
|
|
152
|
-
playback: Playbacks;
|
|
153
|
-
asterisk_id: string;
|
|
154
|
-
application: string;
|
|
155
|
-
instancePlayback?: PlaybackInstance;
|
|
156
|
-
} | {
|
|
157
|
-
type: 'PlaybackContinuing';
|
|
158
|
-
playback: Playbacks;
|
|
159
|
-
playbackId: string;
|
|
160
|
-
asterisk_id: string;
|
|
161
|
-
application: string;
|
|
162
|
-
instancePlayback?: PlaybackInstance;
|
|
163
|
-
} | {
|
|
164
|
-
type: 'PlaybackFinished';
|
|
165
|
-
playback: Playbacks;
|
|
166
|
-
playbackId: string;
|
|
167
|
-
asterisk_id: string;
|
|
168
|
-
application: string;
|
|
169
|
-
instancePlayback?: PlaybackInstance;
|
|
170
|
-
} | {
|
|
171
|
-
type: 'BridgeCreated';
|
|
172
|
-
bridgeId: string;
|
|
173
|
-
bridgeType: string;
|
|
174
|
-
channels: Channel[];
|
|
175
|
-
application: string;
|
|
176
|
-
} | {
|
|
177
|
-
type: 'BridgeDestroyed';
|
|
178
|
-
bridgeId: string;
|
|
179
|
-
application: string;
|
|
180
|
-
} | {
|
|
181
|
-
type: 'ChannelCreated';
|
|
182
|
-
channel: Channel;
|
|
183
|
-
instanceChannel?: ChannelInstance;
|
|
184
|
-
application: string;
|
|
185
|
-
} | {
|
|
186
|
-
type: 'ChannelDestroyed';
|
|
187
|
-
channel: Channel;
|
|
188
|
-
instanceChannel?: ChannelInstance;
|
|
189
|
-
application: string;
|
|
190
|
-
} | {
|
|
191
|
-
type: 'ApplicationMoveFailed';
|
|
192
|
-
application: string;
|
|
193
|
-
channel: Channel;
|
|
194
|
-
instanceChannel?: ChannelInstance;
|
|
195
|
-
} | {
|
|
196
|
-
type: 'RecordingStarted';
|
|
197
|
-
recordingId: string;
|
|
198
|
-
name: string;
|
|
199
|
-
application: string;
|
|
200
|
-
} | {
|
|
201
|
-
type: 'RecordingFinished';
|
|
202
|
-
recordingId: string;
|
|
203
|
-
name: string;
|
|
204
|
-
application: string;
|
|
205
|
-
recording: {
|
|
206
|
-
name: string;
|
|
207
|
-
format: string;
|
|
208
|
-
state: string;
|
|
209
|
-
target_uri: string;
|
|
210
|
-
duration: number;
|
|
211
|
-
talking_duration: number;
|
|
212
|
-
silence_duration: number;
|
|
213
|
-
};
|
|
214
|
-
} | {
|
|
215
|
-
type: 'RecordingFailed';
|
|
216
|
-
recordingId: string;
|
|
217
|
-
name: string;
|
|
218
|
-
reason: string;
|
|
219
|
-
application: string;
|
|
220
|
-
} | {
|
|
221
|
-
type: 'DeviceStateChanged';
|
|
222
|
-
device: string;
|
|
223
|
-
state: string;
|
|
224
|
-
application: string;
|
|
225
|
-
} | {
|
|
226
|
-
type: 'BridgeMerged';
|
|
227
|
-
bridgeId: string;
|
|
228
|
-
bridges: string[];
|
|
229
|
-
application: string;
|
|
230
|
-
} | {
|
|
231
|
-
type: 'BridgeBlindTransfer';
|
|
232
|
-
bridgeId: string;
|
|
233
|
-
channel: Channel;
|
|
234
|
-
instanceChannel?: ChannelInstance;
|
|
235
|
-
transferee: Channel;
|
|
236
|
-
application: string;
|
|
237
|
-
} | {
|
|
238
|
-
type: 'BridgeAttendedTransfer';
|
|
239
|
-
bridgeId: string;
|
|
240
|
-
transferer: Channel;
|
|
241
|
-
transferee: Channel;
|
|
242
|
-
destination: Channel;
|
|
243
|
-
application: string;
|
|
244
|
-
} | {
|
|
245
|
-
type: 'BridgeVideoSourceChanged';
|
|
246
304
|
bridgeId: string;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
channel: Channel;
|
|
285
|
-
instanceChannel?: ChannelInstance;
|
|
286
|
-
application: string;
|
|
287
|
-
} | {
|
|
288
|
-
type: 'ContactStatusChange';
|
|
289
|
-
contact_info: Record<string, any>;
|
|
290
|
-
status: string;
|
|
291
|
-
aor?: string;
|
|
292
|
-
application: string;
|
|
293
|
-
} | {
|
|
294
|
-
type: 'EndpointStateChange';
|
|
295
|
-
endpoint: Record<string, any>;
|
|
296
|
-
state: string;
|
|
297
|
-
application: string;
|
|
298
|
-
} | {
|
|
299
|
-
type: 'Dial';
|
|
300
|
-
caller: Channel;
|
|
301
|
-
peer: Channel;
|
|
302
|
-
dialstring?: string;
|
|
303
|
-
application: string;
|
|
304
|
-
} | {
|
|
305
|
-
type: 'StasisEnd';
|
|
306
|
-
channel: Channel;
|
|
307
|
-
instanceChannel?: ChannelInstance;
|
|
308
|
-
application: string;
|
|
309
|
-
} | {
|
|
310
|
-
type: 'TextMessageReceived';
|
|
311
|
-
to: string;
|
|
312
|
-
from: string;
|
|
313
|
-
body: string;
|
|
314
|
-
variables?: Record<string, any>;
|
|
315
|
-
application: string;
|
|
316
|
-
} | {
|
|
317
|
-
type: 'ChannelConnectedLine';
|
|
318
|
-
channel: Channel;
|
|
319
|
-
instanceChannel?: ChannelInstance;
|
|
320
|
-
application: string;
|
|
321
|
-
} | {
|
|
322
|
-
type: 'ChannelHangupRequest';
|
|
323
|
-
cause: number;
|
|
324
|
-
soft: boolean;
|
|
325
|
-
channel: Channel;
|
|
326
|
-
instanceChannel?: ChannelInstance;
|
|
327
|
-
application: string;
|
|
328
|
-
} | {
|
|
329
|
-
type: 'PeerStatusChange';
|
|
330
|
-
peer: string;
|
|
331
|
-
peer_status: string;
|
|
332
|
-
application: string;
|
|
333
|
-
} | {
|
|
334
|
-
type: string;
|
|
335
|
-
[key: string]: any;
|
|
336
|
-
};
|
|
305
|
+
}>;
|
|
306
|
+
export declare const bridgeEvents: readonly ["BridgeCreated", "BridgeDestroyed", "BridgeMerged", "BridgeBlindTransfer", "BridgeAttendedTransfer", "BridgeVideoSourceChanged"];
|
|
307
|
+
export type ChannelDtmfReceived = AriEventMap['ChannelDtmfReceived'];
|
|
308
|
+
export type ChannelDialplanEvent = AriEventMap['ChannelDialplan'];
|
|
309
|
+
export type ChannelVarset = AriEventMap['ChannelVarset'];
|
|
310
|
+
export type StasisStart = AriEventMap['StasisStart'];
|
|
311
|
+
export type PlaybackStarted = AriEventMap['PlaybackStarted'];
|
|
312
|
+
export type PlaybackContinuing = AriEventMap['PlaybackContinuing'];
|
|
313
|
+
export type PlaybackFinished = AriEventMap['PlaybackFinished'];
|
|
314
|
+
export type BridgeCreated = AriEventMap['BridgeCreated'];
|
|
315
|
+
export type BridgeDestroyed = AriEventMap['BridgeDestroyed'];
|
|
316
|
+
export type ChannelCreated = AriEventMap['ChannelCreated'];
|
|
317
|
+
export type ChannelDestroyed = AriEventMap['ChannelDestroyed'];
|
|
318
|
+
export type ApplicationMoveFailed = AriEventMap['ApplicationMoveFailed'];
|
|
319
|
+
export type RecordingStarted = AriEventMap['RecordingStarted'];
|
|
320
|
+
export type RecordingFinished = AriEventMap['RecordingFinished'];
|
|
321
|
+
export type RecordingFailed = AriEventMap['RecordingFailed'];
|
|
322
|
+
export type DeviceStateChanged = AriEventMap['DeviceStateChanged'];
|
|
323
|
+
export type BridgeMerged = AriEventMap['BridgeMerged'];
|
|
324
|
+
export type BridgeBlindTransfer = AriEventMap['BridgeBlindTransfer'];
|
|
325
|
+
export type BridgeAttendedTransfer = AriEventMap['BridgeAttendedTransfer'];
|
|
326
|
+
export type BridgeVideoSourceChanged = AriEventMap['BridgeVideoSourceChanged'];
|
|
327
|
+
export type ChannelEnteredBridge = AriEventMap['ChannelEnteredBridge'];
|
|
328
|
+
export type ChannelLeftBridge = AriEventMap['ChannelLeftBridge'];
|
|
329
|
+
export type ChannelStateChange = AriEventMap['ChannelStateChange'];
|
|
330
|
+
export type ChannelTalkingStarted = AriEventMap['ChannelTalkingStarted'];
|
|
331
|
+
export type ChannelTalkingFinished = AriEventMap['ChannelTalkingFinished'];
|
|
332
|
+
export type ChannelUnhold = AriEventMap['ChannelUnhold'];
|
|
333
|
+
export type ChannelHold = AriEventMap['ChannelHold'];
|
|
334
|
+
export type ContactStatusChange = AriEventMap['ContactStatusChange'];
|
|
335
|
+
export type EndpointStateChange = AriEventMap['EndpointStateChange'];
|
|
336
|
+
export type Dial = AriEventMap['Dial'];
|
|
337
|
+
export type StasisEnd = AriEventMap['StasisEnd'];
|
|
338
|
+
export type TextMessageReceived = AriEventMap['TextMessageReceived'];
|
|
339
|
+
export type ChannelConnectedLine = AriEventMap['ChannelConnectedLine'];
|
|
340
|
+
export type ChannelHangupRequest = AriEventMap['ChannelHangupRequest'];
|
|
341
|
+
export type PeerStatusChange = AriEventMap['PeerStatusChange'];
|
|
337
342
|
//# sourceMappingURL=events.types.d.ts.map
|