Jump to content
  • Predefined Constants

    Predefined Constants

    Lua   → VBScript   SwxWare v13.10

     

    Many of the Server Script API functions make use of predefined constants for parameters and/or return values.

     

     

    PBXResult
     

    -- Script result values
    PBXSuccess                           =  0
    PBXFailure                           =  1
    PBXTimeout                           =  2
    PBXCallTermNormalCallClearing        =  3
    PBXCallTermDestinationBusy           =  4
    PBXCallTermReject                    =  5
    PBXCallTermCancelled                 =  6
    PBXCallTermTransferred               =  7
    PBXCallTermJoinedConference          =  8
    PBXCallTermNoAnswer                  =  9
    PBXCallTermToLate                    = 10
    PBXCallTermDirectCallImpossible      = 11
    PBXCallTermWrongNumber               = 12
    PBXCallTermConnectToCallerImpossible = 13
    PBXCallTermDestinationUnreachable    = 14
    PBXInvalidDTMFDigitReceived          = 15
    PBXCallTermRedirectionNotPossible    = 16
    PBXCallTermIgnoreCall                = 17
    PBXCallTermNoChannelAvailable        = 18
    PBXCallTermNetworkCongestion         = 19
    PBXCallTermIncompatibleDestination   = 20
    PBXCallTermNumberChanged             = 21
    PBXCallTermOriginatorDisconnected    = 22
    PBXDestinationScriptStarted          = 23
    PBXCallTermDeflected                 = 24
    PBXCallTermPermissionDenied          = 25
    PBXCallTermSubstituteNumberDenied    = 26
    PBXCallTermSecurityNegotiationFailed = 27

     

     

    PBXScriptTraceLevel

     

    -- Trace level values
    PBXScript.TraceError = 2
    PBXScript.TraceWarn  = 3
    PBXScript.TraceInfo  = 4
    PBXScript.TraceInfo2 = 5
    PBXScript.TraceInfo3 = 6

     

     

    PBXBusyResult

     

    -- Script busy result values
    PBXBusyResultFree        = 0
    PBXBusyResultBusy        = 1
    PBXBusyResultNotLoggedIn = 2

     

     

    PBXCheckPinResult

     

    -- Possible remote inquiry PIN check result values
    PBXCheckPinResultOk                 = 0
    PBXCheckPinResultFailure            = 1
    PBXCheckPinResultMaxAttemptsReached = 2

     

     

    PBXUserStateValue

     

    -- User object states
    PBXUserStateUnavailable      = 0
    PBXUserStateLoggedOff        = 1
    PBXUserStateLoggedOn         = 2
    PBXUserStateSpeakingExternal = 3
    PBXUserStateAlerting         = 4
    PBXUserStateSpeakingInternal = 5
    PBXUserStateAway             = 6
    PBXUserStateDoNotDisturb     = 7
    PBXUserStateActive3rdParty   = 8

     

     

    PBXPhoneCallStateValue

     

    -- Phone call list state values
    PBXPhoneCallStateCallAccepted               = 0
    PBXPhoneCallStateCallNotAccepted            = 1
    PBXPhoneCallStateCallDiverted               = 2
    PBXPhoneCallStateCallDivertedToVoiceMessage = 5

     

     

    PBXEntityTypeValue

     

    -- Entity type values
    PBXEntityTypeClient  = 0
    PBXEntityTypeTrunk   = 1
    PBXEntityTypeUnknown = 2

     

     

    PBXDeviceType

     

    -- Device type constants (denoted as bitfield!)
    PBXDeviceTypeSoftClient =   1
    PBXDeviceTypeSIPPhone   =   2
    PBXDeviceTypeSIPClient  =   4
    PBXDeviceTypeMobile     =   8
    PBXDeviceTypeConference =  64
    PBXDeviceTypeSIPGateway = 256
    PBXDeviceTypeSIPLink    = 512
    PBXDeviceTypeAll        = 0xffffffff

     

     

    PBXFileCategory

     

    -- File category constants (subset of CDS file categories!)
    PBXFileFileCategoryRingTones          =  0
    PBXFileFileCategoryCallRoutingScripts =  1
    PBXFileFileCategoryBitmaps            =  2
    PBXFileFileCategoryAnnouncements      =  3
    PBXFileFileCategoryHoldMusic          =  4
    PBXFileFileCategorySkins              =  8
    PBXFileFileCategoryFaxAttachments     = 10
    PBXFileFileCategoryVoiceAttachments   = 15

     

     

    PBXHttpReqVerb

     

    -- PBX HTTP request verbs
    PBXHttpVerbPost   = 0
    PBXHttpVerbGet    = 1
    PBXHttpVerbPut    = 2
    PBXHttpVerbDelete = 3
    PBXHttpVerbPatch  = 4
    PBXHttpVerbHead   = 5

     

     

    PBXHttpReqAuth

     

    -- PBX HTTP authentication methods
    PBXHttpAuthNone   = 0
    PBXHttpAuthBasic  = 1
    PBXHttpAuthDigest = 2
    PBXHttpAuthBearer = 3
    PBXHttpAuthAny    = 4

     

     

    PBXScriptKeyValueResult

     

    -- Script key value result
    PBXScriptKeyValueOk                   = 0
    PBXScriptKeyValueUpdateOk             = 1
    PBXScriptKeyValueUserNotFound         = 2
    PBXScriptKeyValueKeyNotFound          = 3
    PBXScriptKeyValueKeyInvalid           = 4
    PBXScriptKeyValueValueInvalid         = 5
    PBXScriptKeyValueDictKeyAlreadyExists = 6
    PBXScriptKeyValueMaxDictSizeExceeded  = 7
    PBXScriptKeyValueDictKeyInvalid       = 8
    PBXScriptKeyValueDictKeyNotFound      = 9

     

     

    PBXScriptKeyScope

     

    -- Script key scopes
    PBXScriptKeyUserScope   = 0
    PBXScriptKeyGlobalScope = 1

     

     

    IsHolidayInGermany

     

    -- Federal States of Germany (BundesLänder)
    GSE_BL_BW = 0x00001    -- Baden-Württemberg
    GSE_BL_BY = 0x00002    -- Bayern
    GSE_BL_BE = 0x00004    -- Berlin
    GSE_BL_BB = 0x00008    -- Brandenburg
    GSE_BL_HB = 0x00010    -- Bremen
    GSE_BL_HH = 0x00020    -- Hamburg
    GSE_BL_HE = 0x00040    -- Hessen
    GSE_BL_MV = 0x00080    -- Mecklenburg-Vorpommern
    GSE_BL_NI = 0x00100    -- Niedersachsen
    GSE_BL_NW = 0x00200    -- Nordrhein-Westfalen
    GSE_BL_RP = 0x00400    -- Rheinland-Pfalz
    GSE_BL_SL = 0x00800    -- Saarland
    GSE_BL_SN = 0x01000    -- Sachsen
    GSE_BL_ST = 0x02000    -- Sachsen-Anhalt
    GSE_BL_SH = 0x04000    -- Schleswig-Holstein
    GSE_BL_TH = 0x08000    -- Thüringen
    GSE_BL_KD = 0x10200    -- Köln/Düsseldorf (Rosenmontag, GSE_BL_NW is included)

     

     




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