Smartswitch
Operations | List of all members
Smartswitch::Peer::User Interface Reference

This interface allows to manipulate a User. More...

defined in <User.ice>

interface User extends Smartswitch::Peer::GenericPeer, Smartswitch::Telephony::CallGeneration::AnswerPeer { ... }

Inheritance diagram for Smartswitch::Peer::User:
Inheritance graph
[legend]
Collaboration diagram for Smartswitch::Peer::User:
Collaboration graph
[legend]

Operations

UserCallerIdaddCallerId (string callerNumber, string calleeIdPattern, string realCalleeIdPattern) throws AccessException, DuplicateException
 Attach the new UserCallerId object to the User. More...
 
void deleteAuthorizedNumber (string number) throws AccessException
 Delete the authorized number from the User. More...
 
void deleteCallerId (string callerId) throws AccessException
 
void deleteExtension (string extension) throws AccessException
 Delete the extension from the User. More...
 
StringSequence getAuthorizedNumbers () throws AccessException
 Obtain a sequence of authorized numbers attached to the User. More...
 
Billing::CurrencyAmountSequence getBalance ()
 Obtain the current balance of the User. More...
 
StringSequence getCallerIds () throws AccessException
 
UserCallerIdSequence getCallerIdSequence () throws AccessException
 Obtain the UserCallerId objects attached to the User. More...
 
Telephony::CdrSequence getCdr (string from, string to, long offset)
 Obtain the Telephony CDR for the User. More...
 
StringSequence getExtensions () throws AccessException
 Obtain a sequence of extensions assigned to the User. More...
 
Telephony::Forwarding::RuleSequence getForwardingRules ()
 Obtain Forwarding::Rule sequence for the User. More...
 
idempotent string getLogin () throws AccessException
 Obtain the login used for the web access. More...
 
idempotent string getMd5Password () throws AccessException
 Obtain the password for the web access. More...
 
idempotent UserSipParametersgetSipParameters () throws AccessException
 Obtain the proxy for the UserSipParameters attached to this User. More...
 
idempotent string getSpeedDialNumber (string shortNumber) throws AccessException
 Obtain the full number which corresponds to a short speed dial number for the User. More...
 
idempotent SpeedDialNumberMap getSpeedDialNumberMap () throws AccessException
 Obtain the speed dial numbers attached to the User. More...
 
Billing::TransactionSequence getTransactions (string from, string to)
 Obtain the Transaction entities for the User. More...
 
idempotent UserGroupgetUserGroup () throws AccessException
 Obtain the proxy for a UserGroup to which this User belongs. More...
 
void insertAuthorizedNumber (string number) throws AccessException
 Add the new authorized number to the User. More...
 
void insertCallerId (string callerId) throws AccessException
 
void insertExtension (string extension) throws AccessException
 Assign a new extension to the User. More...
 
bool isActivated () throws AccessException
 Check if the User is currently active. More...
 
bool refill (Billing::Service *service, Billing::CurrencyAmount amount) throws AccessException
 Refill the user balance. More...
 
bool refillBy (int serviceId, string secret, RefillSource rs)
 Refill the user using other User account or RefillVoucher. More...
 
idempotent void removeSpeedDialNumber (string shortNumber) throws AccessException
 Remove the given short number. More...
 
void replaceSpeedDialNumber (string shortNumber, string fullNumber) throws AccessException, EmptyArgumentException
 Replace the full number for a given short number. More...
 
void setActivated (bool activated) throws AccessException
 Activate the User. More...
 
void setDescription (string description) throws AccessException
 Set the description for the User (for informational purposes). More...
 
void setEmail (string email) throws AccessException
 Set the email for the User. More...
 
void setEnabled (bool enabled) throws AccessException
 Enable the User. More...
 
idempotent void setLogin (string login) throws AccessException
 Set the login used for the web access. More...
 
idempotent void setPassword (string password) throws AccessException, EmptyArgumentException, InsecureArgumentException
 Set the password used for the web access. More...
 
bool writeOff (Billing::Service *service, Billing::CurrencyAmount amount) throws AccessException
 Write-off from the user balance. More...
 
- Operations inherited from Smartswitch::Peer::GenericPeer
CompanygetCompany () throws AccessException
 Obtain the proxy to a Company which is bound to this GenericPeer. More...
 
idempotent long getId ()
 Obtain the unique constant ID of a GenericPeer. More...
 
idempotent string getName () throws AccessException
 Obtain the name of a GenericPeer. More...
 
VariableSequence getVariables () throws AccessException
 Obtain the custom variables attached to the GenericPeer. More...
 
void insertVariable (Variable variable) throws AccessException
 Add a custom variable to the GenericPeer. More...
 
- Operations inherited from Smartswitch::Destroyable
void destroy ()
 Destroy the proxy entity at the Smartswitch side. More...
 

Detailed Description

This interface allows to manipulate a User.

Operation Documentation

◆ addCallerId()

UserCallerId* addCallerId ( string  callerNumber,
string  calleeIdPattern,
string  realCalleeIdPattern 
) throws AccessException, DuplicateException

Attach the new UserCallerId object to the User.

Returns
The proxy for UserCallerId which is attached to the User.
Parameters
callerNumberThe caller number to bind to the User.
calleeIdPatternUse above caller number of the callee number matches this pattern.
Pass empty to match any callee number.
realCalleeIdPatternUse above caller number of the real callee number (a number with prefix) matches this pattern.
This could be used if you want to allow user to pick up a specific caller number by adding a prefix to a called number.
Pass empty to match any real callee number.
See also
getCallerIdSequence()

◆ deleteAuthorizedNumber()

void deleteAuthorizedNumber ( string  number) throws AccessException

Delete the authorized number from the User.

See also
getAuthorizedNumbers()
Parameters
numberThe authorized number to remove from the User.

◆ deleteCallerId()

["deprecate:deleteCallerId() has been deprecated at 2020-08-03 and will be removed after 2021-08-03, use getCallerIdSequence() and remove() instead"]
void deleteCallerId ( string  callerId) throws AccessException

◆ deleteExtension()

void deleteExtension ( string  extension) throws AccessException

Delete the extension from the User.

See also
getExtensions()
Parameters
extensionThe extension to delete from the User.

◆ getAuthorizedNumbers()

StringSequence getAuthorizedNumbers ( ) throws AccessException

Obtain a sequence of authorized numbers attached to the User.

These numbers are used for PIN-less authentication of a User for the Calling Cards business scheme.
And in any other scheme which involves User dialing Smartswitch as the Access point and then authenticating by a caller number.

Returns
The sequence of authorized numbers for the User.

◆ getBalance()

Obtain the current balance of the User.

Returns
The current balance of the User.

◆ getCallerIds()

["deprecate:getCallerIds() has been deprecated at 2020-08-03 and will be removed after 2021-08-03, use getCallerIdSequence() instead"]
StringSequence getCallerIds ( ) throws AccessException

◆ getCallerIdSequence()

UserCallerIdSequence getCallerIdSequence ( ) throws AccessException

Obtain the UserCallerId objects attached to the User.

These settings are used by the Smartswitch to replace a caller number and caller name for the calls from the User.
This is needed to bind a specific A-number and A-name to the user, so that he won't be able to call using other user's caller information.
The latter is considered a crime in many countries and thus it's needed to use this function in a safe User configuration.

Returns
The sequence of UserCallerId objects attached to the User.
See also
addCallerId()

◆ getCdr()

Telephony::CdrSequence getCdr ( string  from,
string  to,
long  offset 
)

Obtain the Telephony CDR for the User.

Parameters
fromStart date to select.
If empty, select starting from the very first CDR.
toEnd date to select.
If empty, select till the end of CDR.
offsetSkip 'offset' records when retrieving.
Use offset = 0 to get first 100 records.
Returns
100 records starting from offset.

◆ getExtensions()

StringSequence getExtensions ( ) throws AccessException

Obtain a sequence of extensions assigned to the User.

These short numbers are used for internal routing of calls and messages within a user group or Virtual PBX.

Returns
The extensions assigned to the User.

◆ getForwardingRules()

Telephony::Forwarding::RuleSequence getForwardingRules ( )

Obtain Forwarding::Rule sequence for the User.

The rules are used to configure forwarding for the User.

Returns
The Forwaring::Rule sequence for the User.

◆ getLogin()

idempotent string getLogin ( ) throws AccessException

Obtain the login used for the web access.

Returns
The login for the web access.
See also
setLogin()

◆ getMd5Password()

idempotent string getMd5Password ( ) throws AccessException

Obtain the password for the web access.

Returns
The password for the web access, which is encrypted in MD5.
See also
setPassword()

◆ getSipParameters()

idempotent UserSipParameters* getSipParameters ( ) throws AccessException

Obtain the proxy for the UserSipParameters attached to this User.

Returns
The proxy for the UserSipParameters.

◆ getSpeedDialNumber()

idempotent string getSpeedDialNumber ( string  shortNumber) throws AccessException

Obtain the full number which corresponds to a short speed dial number for the User.

Returns
The full numbers which matches a short speed dial number of the User.

◆ getSpeedDialNumberMap()

idempotent SpeedDialNumberMap getSpeedDialNumberMap ( ) throws AccessException

Obtain the speed dial numbers attached to the User.

Returns
The speed dial numbers of the User.

◆ getTransactions()

Billing::TransactionSequence getTransactions ( string  from,
string  to 
)

Obtain the Transaction entities for the User.

Parameters
fromStart date to select.
If empty, select starting from the very first CDR.
toEnd date to select.
If empty, select starting from the very first CDR.
Returns
The sequence of transactions.

◆ getUserGroup()

idempotent UserGroup* getUserGroup ( ) throws AccessException

Obtain the proxy for a UserGroup to which this User belongs.

Returns
The proxy for a UserGroup.

◆ insertAuthorizedNumber()

void insertAuthorizedNumber ( string  number) throws AccessException

Add the new authorized number to the User.

See also
getAuthorizedNumbers()
Parameters
numberThe new authorized number for the User.

◆ insertCallerId()

["deprecate:insertCallerId() has been deprecated at 2020-08-03 and will be removed after 2021-08-03, use addCallerId() instead"]
void insertCallerId ( string  callerId) throws AccessException

◆ insertExtension()

void insertExtension ( string  extension) throws AccessException

Assign a new extension to the User.

See also
getExtensions()
Parameters
extensionThe new extension to assign to the User.

◆ isActivated()

bool isActivated ( ) throws AccessException

Check if the User is currently active.

Returns
true if the User is activated.
See also
setActivated()

◆ refill()

bool refill ( Billing::Service service,
Billing::CurrencyAmount  amount 
) throws AccessException

Refill the user balance.

Parameters
serviceWhich Service to bind to this transaction (for informational purposes).
amountThe amount to refill the User's balance.

◆ refillBy()

bool refillBy ( int  serviceId,
string  secret,
RefillSource  rs 
)

Refill the user using other User account or RefillVoucher.

Parameters
serviceIdWhich Service to bind to this transaction (for informational purposes).
secretThe secret of other user or of the RefillVoucher.

◆ removeSpeedDialNumber()

idempotent void removeSpeedDialNumber ( string  shortNumber) throws AccessException

Remove the given short number.


Parameters
shortNumberThe short number to remove.

◆ replaceSpeedDialNumber()

void replaceSpeedDialNumber ( string  shortNumber,
string  fullNumber 
) throws AccessException, EmptyArgumentException

Replace the full number for a given short number.


If the short number doesn't exist, insert it.

Parameters
shortNumberThe short number to insert.
fullNumberThe full number to insert.

◆ setActivated()

void setActivated ( bool  activated) throws AccessException

Activate the User.

When the User is activated, we may perform periodical write-offs of a subscriber fee (if configured).
When the User is deactivated, we will block the services provision.

See also
isActivated()

◆ setDescription()

void setDescription ( string  description) throws AccessException

Set the description for the User (for informational purposes).

Parameters
descriptionThe contenst of the description (may contain the HTML tags).

◆ setEmail()

void setEmail ( string  email) throws AccessException

Set the email for the User.

Parameters
emailThe new email for the User.

◆ setEnabled()

void setEnabled ( bool  enabled) throws AccessException

Enable the User.

Parameters
enabledtrue if the User is enabled.

◆ setLogin()

idempotent void setLogin ( string  login) throws AccessException

Set the login used for the web access.

Parameters
loginThe login for the web access.
See also
getLogin()

◆ setPassword()

idempotent void setPassword ( string  password) throws AccessException, EmptyArgumentException, InsecureArgumentException

Set the password used for the web access.

Parameters
passwordThe password for the web access.
See also
getMd5Password()

◆ writeOff()

bool writeOff ( Billing::Service service,
Billing::CurrencyAmount  amount 
) throws AccessException

Write-off from the user balance.

Parameters
serviceWhich Service to bind to this transaction (for informational purposes).
amountThe amount to refill the User's balance.

The documentation for this interface was generated from the following file: