SetUserDuty
SetUserDuty(UserId As Integer/String, ReplaceUserId As Integer/String [, CallGroupId As Integer/String]) As Integer
This function is used to put the user designated by <UserId> on or off duty or to replace him with another user. <UserId> can be the numeric OId of the user or his name depending on the parameter type (Integer or String).
The action performed is defined by the value of the <ReplaceUserId> parameter:
- ReplaceUserId = 0: the user is put on duty.
- ReplaceUserId = -1: the user is put off duty.
- ReplaceUserId > 0 (or non-empty character string): The user is replaced by the user designated by
<ReplaceUserId>.
If the <CallGroupId> parameter contains the name or the numerical identifier of a call group, then the replacement or the on/off duty only applies to this call group.
Returns 0 if no error, 8 if the replaced user or replacing user is invalid.