Jump to content
Gold Sponsor: Data-Way IT-Consulting, Austria

  • PBXScript.PreviousScripts


    VBScript   → Lua


    This collection holds informations about all scripts that has been started for this call before the current script has been started. If a call is forwarded from a script with option "Proceed with destination's call routing", i.e. when PBXCall.ConnectToEx is called with bProceedWithDestinationScript set to true. Note that the standard redirection (immediate, delayed, busy) always set this flag.


    The collection contains PreviousScript objects containing the following information for each previous script:


    • UserName
    • UserId
    • StartTime
    • EndTime



    The following example code lists all previous script information into the server trace file:


    Dim Scripts
    Set Scripts = PBXScript.PreviousScripts
    PBXScript.OutputTrace "Number of previous scripts: " & Scripts.Count
    Dim Script
    For Each Script In Scripts
      PBXScript.OutputTrace "UserName:  " & Script.UserName
      PBXScript.OutputTrace "UserID:    " & Script.UserID
      PBXScript.OutputTrace "StartTime: " & Script.StartTime
      PBXScript.OutputTrace "EndTime:   " & Script.EndTime



    Please note that a previous script object does contain the username only, not any of his internal extensions.


    A common usage for this collection is to check if the current call was originally meant for some other certain user.


    There is a ready made function available that searches this collection for a given user:


    Based on that function there is another function available which takes an extension or a list of extensions to resolve these numbers via PBXConfig.GetUserByAddress into a name and then check against this collection:



    Tom Wellige


  • Create New...

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.