All Classes Namespaces Files Functions Variables Groups
CallManager.idl
Go to the documentation of this file.
1 /**
2  * @file CallManager.idl
3  * @brief Can forward call request to operator
4  *
5  * @author Otakar Leopold
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  *
9  * @defgroup Server
10  * @{
11  */
12 
13 #import <kerio/web/idl/SharedStructures.idl>
14 
15 module kerio {
16 module jsonapi {
17 module webmail {
18 
20  kerio::web::KId extensionId; /* it is sipUsername */
21  string telNum;
22  string description;
23  boolean isRegistered;
24 };
25 
26 typedef sequence<OperatorExtension> OperatorExtensionList;
27 
28 enum OperatorCallStatus {
29  OcsUnknown, // Disconnected, invalid callId, or other error
30  OcsPickUp,
31  OcsRinging,
32  OcsConnected
33 };
34 
35 /**
36  * Manager to handle operator requests
37  */
38 interface CallManager {
39 
40  /**
41  * Obtain available extensions assigned to the user (only registered).
42  *
43  * empty extensions = no extension available
44  *
45  * @param extensions
46  */
47  void getExtensions(out OperatorExtensionList extensions);
48 
49  /*
50  * Dials requested phone number
51  *
52  * @param callId - returns id of phone call
53  * @param extensionId - is phone number from which will be call initiated
54  * @param phoneNumber - is phone number to call
55  */
56  void dial(out kerio::web::KId callId, in kerio::web::KId extensionId, in string phoneNumber);
57 
58  /*
59  * Dials requested phone number
60  *
61  * @param userName - user login name
62  * @param password - user password
63  */
64  void login(in string userName, in string password);
65 
66  void hangup(in kerio::web::KId callId);
67 
68  void getCallStatus(out OperatorCallStatus status, in OperatorCallStatus lastStatus, in kerio::web::KId callId);
69 };
70 
71 }; }; }; // end of namespace