Smartswitch
User.ice
Go to the documentation of this file.
1 #pragma once
2 
3 [["python:pkgdir:Smartswitch/Peer"]]
4 
5 #include <Config.ice>
6 #include <Glacier2/Session.ice>
7 #include <Common.ice>
8 #include <Telephony/Cdr.ice>
9 #include <Peer/GenericPeer.ice>
10 #include <AccessException.ice>
13 #include <DuplicateException.ice>
14 #include <Peer/UserCallerId.ice>
15 #include <Peer/UserGroup.ice>
16 #ifdef CONFIG_CALL_GENERATION
18 #endif
19 #ifdef CONFIG_FORWARDING
21 #endif
22 #ifdef CONFIG_SIP
24 #endif
25 #ifdef CONFIG_BILLING
26 #include <Billing/Transaction.ice>
27 #include <Billing/Service.ice>
28 #endif
29 
30 module Smartswitch
31 {
32  module Peer
33  {
35  {
36  User,
38  };
39 
40  dictionary<string, string> SpeedDialNumberMap;
41 
45  interface User extends GenericPeer
46 #ifdef CONFIG_CALL_GENERATION
48 #endif
49  {
56  idempotent string getLogin() throws AccessException;
57 
64  idempotent void setLogin(string login) throws AccessException;
65 
72  idempotent string getMd5Password() throws AccessException;
73 
80  idempotent void setPassword(string password) throws AccessException,
83 
89  idempotent UserGroup* getUserGroup() throws AccessException;
90 
91 #ifdef CONFIG_SIP
92 
97  idempotent UserSipParameters* getSipParameters() throws AccessException;
98 #endif
99 
100 #ifdef CONFIG_BILLING
101 
106  Billing::CurrencyAmountSequence getBalance();
107 #endif
108 
109 #ifdef CONFIG_SPEED_DIAL
110 
115  idempotent SpeedDialNumberMap getSpeedDialNumberMap() throws AccessException;
116 
122  idempotent string getSpeedDialNumber(string shortNumber) throws AccessException;
123 
131  void replaceSpeedDialNumber(string shortNumber, string fullNumber) throws AccessException,
133 
139  idempotent void removeSpeedDialNumber(string shortNumber) throws AccessException;
140 #endif
141  ["deprecate:getCallerIds() has been deprecated at 2020-08-03 and will be removed after 2021-08-03, use getCallerIdSequence() instead"]
142  StringSequence getCallerIds() throws AccessException;
143 
144  ["deprecate:insertCallerId() has been deprecated at 2020-08-03 and will be removed after 2021-08-03, use addCallerId() instead"]
145  void insertCallerId(string callerId) throws AccessException;
146 
147  ["deprecate:deleteCallerId() has been deprecated at 2020-08-03 and will be removed after 2021-08-03, use getCallerIdSequence() and remove() instead"]
148  void deleteCallerId(string callerId) throws AccessException;
149 
160  UserCallerIdSequence getCallerIdSequence() throws AccessException;
161 
174  UserCallerId* addCallerId(string callerNumber,
175  string calleeIdPattern,
176  string realCalleeIdPattern) throws AccessException,
178 
187  StringSequence getAuthorizedNumbers() throws AccessException;
188 
194  void insertAuthorizedNumber(string number) throws AccessException;
195 
201  void deleteAuthorizedNumber(string number) throws AccessException;
202 
210  StringSequence getExtensions() throws AccessException;
211 
218  void insertExtension(string extension) throws AccessException;
219 
226  void deleteExtension(string extension) throws AccessException;
227 
240  Telephony::CdrSequence getCdr(string from,
241  string to,
242  long offset);
243 
244 #ifdef CONFIG_BILLING
245 
255  Billing::TransactionSequence getTransactions(string from, string to);
256 
263  bool refill(Billing::Service* service, Billing::CurrencyAmount amount) throws AccessException;
264 
271  bool writeOff(Billing::Service* service, Billing::CurrencyAmount amount) throws AccessException;
272 
279  bool refillBy(int serviceId,
280  string secret
281 #ifdef CONFIG_REFILL_VOUCHERS
282  , RefillSource rs
283 #endif
284  );
285 #endif
286 
292  void setDescription(string description) throws AccessException;
293 
299  void setEmail(string email) throws AccessException;
300 
306  void setEnabled(bool enabled) throws AccessException;
307 
316  void setActivated(bool activated) throws AccessException;
317 
325  bool isActivated() throws AccessException;
326 
327 #ifdef CONFIG_FORWARDING
328 
335  Telephony::Forwarding::RuleSequence getForwardingRules();
336 #endif
337  };
338  };
339 };
This interface enables to manipulate the SIP parameters of a User.
Definition: UserSipParameters.ice:21
dictionary< string, string > SpeedDialNumberMap
Definition: User.ice:40
Peer is a User.
Definition: PeerType.ice:17
sequence< Cdr > CdrSequence
Definition: Cdr.ice:50
Definition: AccessException.ice:7
A peer to dial then the callee answers.
Definition: AnswerPeer.ice:25
This interface allows to manipulate a Service.
Definition: Service.ice:19
Interface to modify caller ID replacement for a User.
Definition: UserCallerId.ice:20
The exception is thrown when you specify an insecure argument.
Definition: InsecureArgumentException.ice:17
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 struct defines an amount of money in a given Currency.
Definition: CurrencyAmount.ice:16
RefillSource
Definition: User.ice:34
The exception is thrown when the entry you try to add already exists.
Definition: DuplicateException.ice:15
sequence< Rule > RuleSequence
Definition: Rule.ice:97
sequence< UserCallerId > UserCallerIdSequence
Definition: UserCallerId.ice:115
sequence< CurrencyAmount > CurrencyAmountSequence
Definition: CurrencyAmount.ice:21
Refill from the RefillVoucher.
Definition: User.ice:37
sequence< Transaction > TransactionSequence
Definition: Transaction.ice:35
This interface allows to manipulate a User.
Definition: User.ice:45
This is a generic interface to each of the peers.
Definition: GenericPeer.ice:16
sequence< string > StringSequence
Definition: Common.ice:7