Jump to content
  • PBXScript

    PBXScript


    16 pages in this category

    1. PBXScript.CompareNumbers()

      Lua   → VBScript   SwxWare v13.10   This function returns either true or false if a certain number is completely or partly given in another number respective list of numbers.   PBXScript.CompareNumbers(sNumber, sNumberList)     This function returns a boolean value.     Parameters   sNumber   string. The number to search for.     sNumberList   string. The list of numbers to search sNumber in.  It is
      • 211 views
    2. PBXScript.ConvertToCanonical()

      Lua   → VBScript   SwxWare v13.10   This function converts a given extension into a full canonical number.   PBXScript.ConvertToCanonical ( sExtension )     This function returns a string value.     Parameter   sExtension   string. The number/extension to conert into canonical format.     Example   SwyxServer has the following configuration: Countrycode 49 Areacode 231 Subscribernum
      • 170 views
    3. PBXScript.EndScript()

      Lua   → VBScript   SwxWare v13.10   This function ends any scripting for the current call immediately.   PBXScript.EndScript()     This function has no return value.   Script is ended immediately. After this statement no further script statements are executed. The current call will be disconnected if it is not successfully connected to a destination before.    
      • 122 views
    4. PBXScript.GetAudioFileLength()

      Lua   → VBScript   SwxWare v13.10   This function returns the length of a given .wav file in seconds.   local nLength = PBXScript.GetAudioFileLength(sFileName)   This function returns a number value.   If 0 is returned, the file length is 0 or length could not be determined, e.g. because of an unsupported file format. SwyxWare requires .wav files in 16kHz, 16bit, mono format.     local nLength = PBXScript.GetAudioFileLength("Welcome.wav")
      • 192 views
    5. PBXScript.GetPBXConfig()

      Lua   → VBScript   SwxWare v13.10   This function returns a table containing general SwyxWare configuration information.   local tConfig = PBXScript.GetPBXConfig()     This function returns a table value.   Following fields are included in the returned table:   .countrycode : string .areacode : string .longdistancecallprefix : string .internationalcallprefix : string .publicaccessprefix : string .nu
      • 121 views
    6. PBXScript.GetUserByAddress()

      Lua   → VBScript   SwxWare v13.10   This function searches for a user or multiple users and returns its results as list (indexed table).   local oUsers = PBXScript.GetUserByAddress(sNumber)     This function returns an indexed table with PBXConfigUser elements.     Parameter   sNumber   string. An internal number of a user or group, user name, group name, H.323 alias or SIP user ID to search for.     The resu
      • 270 views
    7. PBXScript.InstallLanguageId()

      Lua   → VBScript   SwxWare v13.10   Returns the Locale ID (LCID) of the language the SwyxWare is installed in, meaning it tells you the language of the installed SwyxWare.   -- is this a french SwyxWare ? if (PBXScript.InstallLanguageID() == 1036) then -- do something end     This property returns a number value.   The following is a list of all LCIDs of the current/former language versions of the SwyxWare:   Language hex value decima
      • 218 views
    8. PBXScript.OutputTrace()

      Lua   → VBScript   SwxWare v13.10   This function can be used to write trace out into the SwyxServer's trace file. Tracing can be used for debugging of realtime systems and is highly recommended to be used within own script code.   PBXScript.OutputTrace("Hello World")     This function returns always PBXResult value of PBXSuccess.   This function can be used at any time within a call routing script. The string being passed as parameter will be dire
      • 249 views
    9. PBXScript.OutputTraceEx()

      Lua   → VBScript   SwxWare v13.10   This function can be used to write trace outout into SwyxServer's trace file. Tracing can be used for debugging of realtime systems and is highly recommended to be used within own script code.   PBXScript.OutputTraceEx(PBXScriptTraceLevel, "Hello World")   This function can be used at any time within a call routing script. The string being passed as parameter will be directly written into the SwyxServer trace file.  
      • 184 views
    10. PBXScript.PreviousScripts()

      Lua   → VBScript   SwxWare v13.10   This function returns a list (indexed table) with information about all call routing scripts the call was in before reaching the current one.   local tScripts = PBXScript.PreviousScripts()   This function returns an indexed table with the following content per entry:   userid (obsolete from SwyxWare v13.27, contains valid value for user scripts only) username (obsolete from SwyxWare v13.27, contains valid valu
      • 273 views
    11. PBXScript.SendEMail()

      Lua   → VBScript   SwxWare v13.10   This function sends an email containing the given information.   local nReturn = PBXScript.SendEMail(sSender, sReplyTo, sRecipients, sCC, sBCC, sSubject, sBody, sAttachmentFile, sAttachmentMimeType, bIsVoicemail)     This function returns a PBXResult value of PBXSuccess or PBXFailure.   You can also use the PBXCall.SendEMail() function if you don't need all these additional standard email fields like CC and BCC.
      • 157 views
    12. PBXScript.Sleep()

      Lua   → VBScript   SwxWare v13.10   This function stops the execution of the current script for the given number of milliseconds.   PBXScript.Sleep(1000)     This function returns a PBXResult value of PBXSuccess.   The numeric parameter gives the number of milliseconds to "sleep".   This function is used to wait a certain amount of time without consuming any CPU load. A common usage is e.g. in a call queue to check every second for the av
      • 188 views
    13. PBXScript.SystemLanguageId()

      Lua   → VBScript   SwxWare v13.10   Returns the Locale ID (LCID) of the language the current Windows OS is installed in, meaning it tells you the language of the installed Windows.   -- is this a french Windows ? if (PBXScript.SystemLanguageID() == 1036) then -- do something end     This property returns a number value.   The following is a list of all LCIDs of the current/former language versions of the SwyxWare:   Language hex value
      • 208 views
    14. PBXScript.Version()

      Lua   SwxWare v13.10   This function returns the version of the Server Script API.   local nVersion = PBXScript.Version()     This function returns a number value.    
      • 128 views
    15. PBXScript.Type()

      Lua   → VBScript   SwxWare v13.27   Returns the type of entity a call routing script is running on.   -- check for a user call routing if (PBXScript.Type() == PBXScriptTypeUser) then ... end -- check for a group call routing if (PBXScript.Type() == PBXScriptTypeGroup) then ... end     This property returns a number value.   The following constants are available to check for the different entities:   PBXScriptTypeUser PBXScript
      • 73 views
    16. PBXScript.Now()

      Lua   → VBScript   SwxWare v13.27   This function returns the script entities (user or user group) current date and time.   -- get date/time as string local sDateTime = PBXUser.Now() -- in "%d.%m.%Y %H:%M:%S" format -- get date/time as table local tDateTime = PBXUser.Now("*t") -- .sec : number -- .min : number -- .hour : number -- .day : number
      • 81 views
×
×
  • 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.