Smartswitch
Session.ice
Go to the documentation of this file.
1 #pragma once
2 
3 [["python:pkgdir:Smartswitch"]]
4 
5 #include <Config.ice>
6 
7 #include <Peer/User.ice>
8 #include <Peer/Originator.ice>
9 #include <Peer/Terminator.ice>
10 #include <Peer/Gateway.ice>
11 #include <Peer/UserGroup.ice>
12 #include <Telephony/Cdr.ice>
13 #include <Telephony/CdrFilter.ice>
14 #include <AccessException.ice>
17 #ifdef CONFIG_USER_GENERATION
22 #endif
23 #include <Peer/Company.ice>
24 #ifdef CONFIG_REFILL_VOUCHERS
26 #endif
27 #ifdef CONFIG_BILLING
28 #include <Billing/Currency.ice>
29 #include <Billing/Service.ice>
30 #endif
32 #include <Glacier2/Session.ice>
33 #ifdef CONFIG_HLR
36 #endif
37 #ifdef CONFIG_LNP_MNP
40 #endif
42 #ifdef CONFIG_CALL_CENTER
43 #include <Telephony/Queue.ice>
44 #endif
45 #ifdef CONFIG_MESSAGING
46 #include <Messaging/Message.ice>
49 #endif
50 #ifdef CONFIG_CALL_GENERATION
52 #endif
53 
54 module Smartswitch
55 {
61  enum SpyMode
62  {
66  };
67 
71  dictionary<Peer::PeerType, LongOpt> PeerDesc;
72 
76  interface Session extends Glacier2::Session
77  {
83  Peer::User* getUser();
84 
90  Peer::User* findUserById(int userId) throws AccessException;
91 
97  Peer::User* findUserByName(string userName) throws AccessException;
98 
104  Peer::User* findUserByLogin(string login) throws AccessException;
105 
106 #ifdef CONFIG_USER_GENERATION
107 
118  ["deprecate:generateUsers() has been deprecated at 2018-10-01 and will be removed after 2021-10-01, use generateUsersWithInfo() instead"]
119  StringSequence generateUsers(string profile,
120  int groupId,
121  int count,
122  int attempts) throws AccessException,
128 
137  Peer::UserGeneration::UserInfoSequence generateUsersWithInfo(string profile,
138  int groupId,
139  int count) throws AccessException,
145 #endif
146 
154  Peer::Originator* findOriginatorById(int id) throws AccessException;
155 
163  Peer::Terminator* findTerminatorById(int id) throws AccessException;
164 
172  Peer::Gateway* findGatewayById(int id) throws AccessException;
173 
181  Peer::UserGroup* findUserGroupById(int id) throws AccessException;
182 
190  Peer::GenericPeer* findPeerById(Peer::PeerType peerType, int id) throws AccessException;
191 
199  Peer::Company* findCompanyById(long id) throws AccessException;
200 
208  Peer::Company* findCompanyByName(string name) throws AccessException;
209 
215  Telephony::ChannelInfoSequence getChannels() throws AccessException;
216 
217  ["deprecate:hangupChannel() has been deprecated at 2018-11-19 and will be removed after 2021-11-19, use hangupChannels() instead"]
218  void hangupChannel(string channelId) throws AccessException;
219 
227  void hangupChannels(StringSequence channelIds) throws AccessException;
228 
239  Telephony::CdrSequence getCdr(PeerDesc peerDesc,
240  Telephony::CdrFilter filter,
241  long offset) throws AccessException,
243 
244 #ifdef CONFIG_CALL_CENTER
245 
252  Telephony::Queue* findQueueById(long id) throws AccessException;
253 
261  Telephony::Queue* findQueueByName(string name) throws AccessException;
262 
269  Telephony::Queue* addQueue(string name) throws AccessException,
271 #endif
272 
273 #ifdef CONFIG_REFILL_VOUCHERS
274 
281  Billing::RefillVoucher* findRefillVoucher(string code) throws AccessException;
282 #endif
283 #ifdef CONFIG_BILLING
284 
291  Billing::Currency* findCurrencyByName(string name) throws AccessException;
292 
300  Billing::Service* findServiceByName(string name) throws AccessException;
301 
309  Billing::Service* findServiceById(long id) throws AccessException;
310 
316  Billing::ServiceSequence getServices();
317 #endif
318 #ifdef CONFIG_TELEPHONY
319 
333  void callback(string callbackCallerName,
334  string callbackCalleeNumber,
335  string dialNumber,
337 #endif
338 #ifdef CONFIG_MESSAGING
339 
347 
355 #endif
356 #ifdef CONFIG_HLR
357 
363  HlrDipping::DippingResult dipHlr(string number) throws EmptyArgumentException,
365 
373 #endif
374 #ifdef CONFIG_LNP_MNP
375 
381  LnpMnpDipping::DippingResult dipLnpMnp(string numbers) throws EmptyArgumentException,
383 
391 #endif
392 #ifdef CONFIG_CRM
393 
403  void spyChannel(string channelName,
404  string displayName,
405  SpyMode mode) throws AccessException;
406 
416  void pickupChannel(string channelName,
417  string displayName) throws AccessException;
418 #endif
419 
420 #ifdef CONFIG_CALL_GENERATION
421 
427  Telephony::CallGeneration::Task* addCallGenerationTask() throws AccessException;
428 
435  Telephony::CallGeneration::TaskSequence getCallGenerationTasks(long offset) throws AccessException;
436 #endif
437  };
438 };
Listen and whisper to all channels involved in a call.
Definition: Session.ice:65
sequence< Task > TaskSequence
Definition: Task.ice:213
This interface allows to manipulate a Queue.
Definition: Queue.ice:24
This exception is thrown when there is no more attempts left to generate an unique alphanumeric User ...
Definition: DuplicateNameException.ice:23
This interface allows to modify a Task of call generation.
Definition: Task.ice:63
This struct is returned as a result of sending a Message.
Definition: SendingResult.ice:18
This struct is returned as a result of a HLR dipping.
Definition: DippingResult.ice:19
This struct is returned as a result of a LNP/MNP dipping.
Definition: DippingResult.ice:19
This struct allows to apply a filter when fetching CDR.
Definition: CdrFilter.ice:14
Listen and whisper to spied channel.
Definition: Session.ice:64
The exception is thrown on adding a new GenericPeer when the limit of created peers is reached.
Definition: DescendantLimitReachedException.ice:17
This exception is thrown on integer overflow on unique consecutive alphanumeric User name generation.
Definition: IntegerOverflowException.ice:23
sequence< Cdr > CdrSequence
Definition: Cdr.ice:50
This interface allows to manipulate the Gateway.
Definition: Gateway.ice:14
This exception is thrown when there is no more attempts left to generate a strong password for a User...
Definition: WeakPasswordException.ice:24
Definition: AccessException.ice:7
PeerType
List of available GenericPeer descendants.
Definition: PeerType.ice:12
The interface to manipulate with the partner Company.
Definition: Company.ice:41
dictionary< Peer::PeerType, LongOpt > PeerDesc
Contains a mapping of Peer::PeerType to IDs of peers of this type.
Definition: Session.ice:71
This interface allows to manipulate a Service.
Definition: Service.ice:19
Thrown when a user specifies wrong argument to a method.
Definition: ArgumentException.ice:12
sequence< BatchDippingResult > BatchDippingResultSequence
Definition: BatchDippingResult.ice:27
This interface allows to manipulate the Originator.
Definition: Originator.ice:14
This is the main interface from which you can gain access to other Smartswitch entities.
Definition: Session.ice:76
sequence< ChannelInfo > ChannelInfoSequence
Definition: ChannelInfo.ice:54
This interface allows to manipulate a UserGroup.
Definition: UserGroup.ice:17
The exception is thrown when you specify empty argument while Smartswitch expects it to be non-empty.
Definition: EmptyArgumentException.ice:14
Thrown when a user tries perform an action which is not allowed for him.
Definition: AccessException.ice:20
The exception is thrown when a database query takes longer than allowed by a Smartswitch administrato...
Definition: DbQueryTooLongException.ice:14
CallbackMode
Select a mode to perform a callback.
Definition: CallbackMode.ice:14
Only listen to spied channel.
Definition: Session.ice:63
The exception is thrown when the entry you try to add already exists.
Definition: DuplicateException.ice:15
The base class for every exception thrown by Smartswitch.
Definition: GenericException.ice:10
sequence< Message > MessageSequence
Definition: Message.ice:32
This struct is used to send a Message.
Definition: Message.ice:20
This interface allows to manipulate a User.
Definition: User.ice:45
sequence< Service > ServiceSequence
Definition: Service.ice:35
SpyMode
Selects a mode of spying.
Definition: Session.ice:61
This interface allows to access the Currency entity.
Definition: Currency.ice:18
This interface allows to manipulate the Terminator.
Definition: Terminator.ice:14
sequence< UserInfo > UserInfoSequence
Definition: UserInfo.ice:35
This is a generic interface to each of the peers.
Definition: GenericPeer.ice:16
sequence< BatchSendingResult > BatchSendingResultSequence
Definition: BatchSendingResult.ice:26
sequence< string > StringSequence
Definition: Common.ice:7
This interface allows to manipulate a RefillVoucher.
Definition: RefillVoucher.ice:20