-
16 pages in this category
-
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 - 252 views
-
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 - 218 views
-
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. - 166 views
-
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") - 237 views
-
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 - 175 views
-
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 - 329 views
-
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 - 258 views
-
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 - 303 views
-
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. - 230 views
-
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 - 309 views
-
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. - 205 views
-
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 - 228 views
-
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 - 253 views
-
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. - 169 views
-
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 - 114 views
-
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 - 129 views
-