Jump to content

- PBXWebRequest

- # PBXConfigUser

  Followers 0

  Lua SwxWare v13.10

  PBXConfigUser is a class returned by PBXScript.GetUserByAddress().

  The member functions are always called in combination with a variable (be aware of the colon ':').

  Example:

      aUsers = PBXScript.GetUserByAddress(UserAddr)

      for _, oUser in ipairs(aUsers) do
          PBXScript.OutputTrace("User        : " .. oUser:UserID())
          PBXScript.OutputTrace("Name        : " .. oUser:Name())
          PBXScript.OutputTrace("EMailAddress: " .. oUser:EMailAddress())
          PBXScript.OutputTrace("Folder      : " .. oUser:DataFolder())
          PBXScript.OutputTrace("State       : " .. oUser:State())
      end

  Reference

  PBXConfigUser:DataFolder()

      local sFolder = PBXConfigUser:DataFolder()

  This function returns the user's data folder as string value. It is obsolete.

  PBXConfigUser:EMailAddress()

      local sEMail = PBXConfigUser:EMailAddress()

  This function returns the user's email address as string value.

  PBXConfigUser:FreeStatusText()

      -- get the frew status text
      local sText = PBXConfigUser:FreeStatusText()

      -- set a new free status text
      PBXConfigUser:FreeStatusText("I am out for lunch")

  This function sets or returns the user's free status text as string value.

  PBXConfigUser:Name()

      local sName = PBXConfigUser:Name()

  This function returns the user's name as string value.

  PBXConfigUser:NumberOfNewVoicemails()

      -- get the number of new voicemails
      local nNumber = PBXConfigUser:NumberOfNewVoicemails()

      -- set a new number of new voicemails
      local nNewNumber = 5
      PBXConfigUser:NumberOfNewVoicemails(nNewNumber)

  This function sets or returns the user's numer of new voicemail counter as number value.

  PBXConfigUser:Numbers()

      local tNumbers = PBXConfigUser:Numbers()

  This function returns all internal numbers of the user as table of string values.

  PBXConfigUser:State()

      local nState = PBXConfigUser:State()

  This function returns the current state of the user as PBXUserStateValue value.

  This can be any of the following predefined constants:

      -- User object states
      PBXUserStateUnavailable      = 0   -- no mutual status signalling configured
      PBXUserStateLoggedOff        = 1   -- logged off
      PBXUserStateLoggedOn         = 2   -- logged on and free
      PBXUserStateSpeakingExternal = 3   -- busy externally
      PBXUserStateAlerting         = 4   -- currently altering/rinbing
      PBXUserStateSpeakingInternal = 5   -- busy internally
      PBXUserStateAway             = 6   -- away status active
      PBXUserStateDoNotDisturb     = 7   -- do not disturb (DND) status active
      PBXUserStateActive3rdParty   = 8   -- busy indication from external presence source (e.g. MS Teams)

  PBXConfigUser:UserID()

      local nID = PBXConfigUser:UserID()

  This function returns the SwyxWare internal id of the user as a number value.

  By Tom Wellige

  - June 3, 2022
  Share
  Share
  Followers 0

## Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.