Jump to content

- Introduction

- # User or Group context

  Followers 0

  Lua → VBScript SwxWare v13.27

  A call routing script can run on a user or a group context.

  Differ context

  If the script is running in a user context the PBXUser interface is available while the PBXGroup interface is not. If it is running on a group context the PBXGroup interface is available while the PBXUser interface is not.

  If your script is used in both contexts (user and group) and needs to make use of PBXUser/PBXGroup functionality, you need to check in which context (type) it is running in to only use PBXUser or PBXGroup functionality accordingly.

  You can either use the PBXScript.Type() property:

      -- check for a user call routing
      if (PBXScript.Type() == PBXScriptTypeUser) then
         ...
      end

      -- check for a group call routing
      if (PBXScript.Type() == PBXScriptTypeGroup) then
         ...
      end

  or one of two global variables:

      -- check for a user call routing
      if (g_bIsUserContext) then
         ...
      end

      -- check for a group call routing
      if (g_bIsGroupContext) then
         ...
      end

  Conditions

  Not all offered coditions on the first pages in the Rule Assistant or the within the GSE condition blocks make sense in a group context as a group doesn't have that feature. Here are the differences:

  Category / Block | Condition | User Context | Group Context
  Situations / Situation | … if my status is set to "Away" | + | - (returns false)
  Situations / Situation | … if my status is set to "Do not disturb" | + | - (returns false)
  Situations / Situation | … if the Calender say "I am out of the office" | + | - (returns false)
  Situations / Situation | … if the Calender say "I am busy" | + | - (returns false)

  GSE build-in functions

  Not all GSE build-in functions make sense in a group context as a group doesn't have that feature. Here are the differences:

  GSE guild-in function | User Context | Group Context
  IpPbx.Away() | + | - (returns false)
  IpPbx.DoNotDisturb() | + | - (returns false)
  IpPbx.UserFreeStatusText() | + | - (returns empty string)
  IsAway() | + | - (returns false)
  IsDoNotDisturb() | + | - (returns false)
  IsOutlookBusy() | + | - (returns false)
  IsOutOfOffice() | + | - (returns false)
  RIPIN() | + | - (returns empty string)

  By Tom Wellige

  - May 19, 2023
  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.