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

  • Introduction

    Introduction

    Lua   → VBScript

     

    This is a collection of usefull Lua functions that can be used with GSE call routing rules. 

     

    Most functions are wrappers around Server Script API functions of GSE build-in functions to make their usage more easy or provide some additional functionality.

     

    The functions are taken from the forum section of Swyx Forum, where they had been provided by users over the years. As they were posted in VBScript they have been converted into Lua for this function collection.

     

     

    Usage

     

    To use any of these functions just follow these steps:

     

    1. Copy the function code into the Windows clipboard (select the code and press Ctrl-C)
       
    2. Open you GSE call routing rule.
       
    3. Double click the Start block
       
    4. Switch to the Parameters page
       
    5. Click into the huge text field and paste the function code by pressing Ctrl-V.

      image.png
       
    6. Click OK.

     

    The function is now available within you call routing rule and can now be used directly within GSE blocks.

     

     

    Handle boolean return values

     

    The above example function IsUserFree() returns a booelan value. It can most conveniently be called with the Evaluate block:

     

    image.png

     

    image.png

     

     

    Handle numeric return values (up to 10 different ones)

     

    If your function returns more than 2 different values you can use an Insert Script Code block to evaluate up to 10 different values graphically. This is an example of how to use the GetUserStatus() function:

     

    image.png

     

    image.png

     

    image.png

     

     

     

     

    Handle any return values

     

    You can call your own functions nearly everywhere within your GSE script. Where ever you find a

     

    • image.png

     

    button behind a parameter text field, you can call your function if it returns a needed value. For example a function GetDestination() returns the extension a call should be connected to with a Connect To block:

     

    image.png

     

     

     

     


    Tom Wellige
     Share


     Share




    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.