Jump to content

Tom Wellige

Root Moderator
  • Posts

    4,310
  • Joined

  • Last visited

  • Days Won

    117

 Content Type 

Profiles

SwyxPEDIA Wiki

Zendesk Integration

Persistent Variables

Longest Waiting

VBScript build in functions

GSE build in functions (VBScript)

Server Script API (VBScript)

GSE build in functions (Lua)

Server Script API (Lua)

Function Collection (VBScript)

Function Collection (Lua)

IPS Integration

Jira Service Integration

Forums

Blogs

Downloads

Everything posted by Tom Wellige

  1. VBScript → Lua This property takes or returns the name of the current caller. PBXCall.CallingPartyName = "Erika Mustermann" This property takes or returns a string value. This property can be used to modify the name being displayed on a client (SwyxIt!, SwyxPhone). It does not modify the caller list entry. This can be achieved using the PBXCall.PhoneCallListEntry object. Additionally you can also modify the number being displayed using the PBXCall.CallingPartyNumber property. Please note that you have to modify this value before actually connecting the call to a user using the Connect To block. This forum topic explains how to modify the displayed name and number using GSE build-in function IpPbx.CallingName.
  2. VBScript → Lua This function returns the name of the calling device type. PBXCall.CallingDeviceType This function returns a string value. This is a list of possible return strings: String Type ---------- ---------------------------------------- COMClient SwyxIt! (<v6.1x) SIP Client SwyxIt! (>= v6.1x) and other SIP devices H323Client H.323 device Gateway SwyxGate or third party gateway Phone SwyxPhone (Lxxx) Link SwyxLink unkonwn something else If you need to know the name of the calling device, i.g. the name of the trunk as shown in SwyxWare Administration, you can use the PBXCall.CallingDeviceName property. So with the combination of PBXCall.CallingDeviceType and PBXCall.CallingDeviceName you can easily identify a specifc trunk a call came into your SwyxWare, be it an external trunk or a trunk to another linked SwyxWare.
  3. VBScript → Lua This property returns the name of the calling device. PBXCall.CallingDeviceName This property returns a string value. If the call is "external", i.e. it comes via a gateway trunk, link trunk or sip trunk, this property contains the name of that trunk as configured in the SwyxWare Administration. If you need to figure the calling device type as well you can use the property PBXCall.CallingDeviceType. With the combination of PBXCall.CallingDeviceName and PBXCall.CallingDeviceType you can easily identify a specifc trunk a call came into your SwyxWare, be it an external trunk or a trunk to another linked SwyxWare.
  4. VBScript → Lua This function returns the unique call id the server has reserved for the current call. PBXCall.CallId This function returns a long value. SwyxServer reserves a unique id for each call within the system. This id will also be stored in the Call Detail Records. Do mot mistake this id with the caller number. Do also not mistake this CallID by the unique call id you find within the SwyxWare traces files per call. The call id column in the traces files takes a number that will be reset by every restart of the service, while the CallID of course is persistent. Hints on reading SwyxWare traces files (especially in terms of call routing) can be found here: How to filter the Server Trace for Call Routing output of a certain call
  5. VBScript → Lua SwxWare v7.00 This property returns called number that has leaded the call to reach the current script. A script is connected to a user who has internal and external numbers. This functions returns the external number. PBXCall.CalledPartyNumberCanonical This property returns a string value. This function returns the external number of the script user that was called. If you are interested in the internal number that was dialed you can use the PBXCall.CalledPartyNumber. Example: Script user has internal number 200 and external number +4923147770 Internal caller dialed 200123 PBXCall.CalledPartyNumber returns 200 PBXCall.DialedNumber returns 200123 PBXCall.PostDialingDigits returns 123 External caller dialed +492314447 PBXCall.CalledPartyNumberCanonical returns +4923147770
  6. VBScript → Lua This function returns the dialed number that has leaded the call to reach the current script. It returns just the first digits to correctly identify the script user but *not* also the so called post dialing digits. PBXCall.CalledPartyNumber This function returns a string value. This function is identical to the GSE build in function CalledNumber(). This function returns the internal number of the script user that was called. If you are interested in the external number that was dialed you can use the PBXCall.CalledPartyNumberCanonical. There is another function available PBXCall.DialedNumber which returns all dialed digits, including the so post dialing digits.. If you are interested in the post dialing digits you can use the property PBXCall.PostDialingDigits or the GSE build in function PostDialingDigits(). Example: Script user has internal number 200 and external number +4923147770 Internal caller dialed 200123 PBXCall.CalledPartyNumber returns 200 PBXCall.DialedNumber returns 200123 PBXCall.PostDialingDigits returns 123 External caller dialed +492314447 PBXCall.CalledPartyNumberCanonical returns +4923147770
  7. VBScript → Lua This function sends an alerting message to the originator of the current call. PBXCall.Alerting This function returns an integer value of PBXSuccess (0) on success. See list of defined return values. If the current call is already in state Alerting or Connected the function call will be ignored. Common usage of this function is to signal s standard ringing tone will be played in the direction of the caller. The call is not connected and therefore consumes not costs. Please note the timeouts of the pstn / provider when handling with this message directly. Beside sending alerting you can also sent a call proceeding message using the PBXCall.CallProceeding function. You can also skip the alerting phase for the current call by using the PBXCall.SkipAlerting function.
  8. VBScript → Lua This functions activates a call previously being put on hold. Activating in fact means stop playing the music on hold. PBXCall.Activate This function returns an integer value of PBXSuccess (0) on success. See list of defined return values. To put a call on hold you can use the PBXCall.Hold function. All GSE Play Sound blocks as also all "Connect" blocks like Connect To, Follow Me and Loop will automatically activate a call currently being on hold. You can use the PBXCall.IsOnHold function to check if the current call is currently on hold.
  9. VBScript → Lua This function returns True if the current call is an internal call. If InternalCall() Then ' do something Else ' do something else End If or if being used directly within a GSE property dialog, e.g. in an Evaluate block to directly evaluate the Internal Call status and place it the block exits: This function returns a boolean value. This function can be called at any time within the call routing script. To figure if the current call is an external call you can either check the InternalCall() function for False, or use the ExternalCall() function. The function makes use of the Server Script API function PBXCall.IsInternal.
  10. VBScript → Lua This function returns True if the current call is an external call. If ExternalCall() Then ' do something Else ' do something else End If or if being used directly within a GSE property dialog, e.g. in an Evaluate block to directly evaluate the External Call status and place it the block exits: This function returns a boolean value. This function can be called at any time within the call routing script. To figure if the current call is an internal call you can either check the ExternalCall() function for False, or use the InternalCall() function. The function makes use of the Server Script API function PBXCall.IsInternal.
  11. VBScript → Lua The following interfaces are private COM interfaces, i.e. they are only available witihn an call routing script. They dont' need to get instantiated. PBXCall This interface covers properties and methods being related to the current call. PBXUser This interface covers properties and methods being related to the user the current script is running for. If the current script runs in a group context (i.e. this is a call routing of a group) this interface does not exist! (from SwyxWare 13.27) Please read here to figure the context the current script is running in (user or group) and to learn about differences of the two call routing contexts. PBXGroup (from SwyxWare 13.27) This interface covers properties and methods being realted to the group the current script is running for. If the current script runs in a user context (i.e. this is a call routing for a user) this interface does not exist! Please read here to figure the context the current script is running in (user or group) and to learn about differences of the two call routing contexts. PBXScript This interface covers common properties and methods connected to scripting purposes. The following interface is a public COM/DCOM interface, i.e. it is available within a call routing script and also for any other Windows application. It needs to get instantiated via CreateObject. However, this is already done within the call routing framework and can be accessed as g_PBXConfig. PBXConfig This interface covers properties and methods connected to the SwyxWare configuration.
  12. Gern geschehen Ich beutze für solche Sachen grundsätzlich immer eine eigene "Clone" Gruppe, in die ich alle Benutzer hineinziehe, die ich auf diese Art & Weise versorgen möchte.
  13. Hm, sowas habe ich an der Stelle noch nicht gesehen. Sind in Deiner "EDV" Gruppe Benutzer drin? Die Funktion wird auf dem Server ausgführt, also musst Du ins Server Trace (C:\Program Data\Swyx\Traces\IpPbxSrv-[timestamp].log) schauen.
  14. Wenn alle Benutzer ein identisches Call Routing haben sollen, dann kann Du das sehr wohl auf mehrere Benutzer gleichzeitig ausrollen. Wie in dem ersten Link beschrieben.
  15. Hallo, mit dem kopieren einzelner Dateien auf Datenbank Ebene ist es leider nicht getant, zumal wie in Deinem Beispiel auch ohnehin zwei Dateien zu einer GSE Regel gehören: eine .rse Datei und eine .vbs Datei. Hier bekommst Du erklärt, welche Möglichkeiten es bei der Verteilung von Call Routing Regeln gibt: Eine Ausnahme macht hier allerdings das PreProcessing. Wenn Du Zugang zum Enreach Partner Net hast, findest Du hier ein Webinar, in welchem alles wissenswerte zum PreProcessing erklärt wird: Globale Regeln via PreProcessing EDIT: ich habe Deinen Post dann auch mal in den passenden Bereich im Foum verschoben.
  16. VBScript → Lua This function returns the email address being configured within the SwyxWare Administration as to be used as "From" address for all voicemails to be sent by the server. Dim sFrom sFrom = VoicemailOriginatorEMailAddress() This function returns a string value. This function is identical to the Server Script API function PBXConfig.VoicemailFromAddress. If you make use of the Send E-mail block within the GSE to sent your own emails from the script and want these emails to have the globally configured voicemail "From" address the function VoicemailOriginatorEMailAddress() comes into use:
  17. VBScript → Lua This functions returns the length in seconds of the last recorded message using the Record Message block of the GSE. Dim nLength nLength = RecordLen() or if being used directly within a GSE property dialog, e.g. in a Say Number block to directly announce the length of the last recorded message to the caller: This function returns a long value. This function is identical to the Server Script API function PBXCall.LastRecordedMessageLength. When using the Record Message block of the GSE you can afterwards call this function at any time to receive the length of the recorded message (i.e. the WAV file) in seconds. If no message was recorded the function returns 0 (zero). The SendEmail action deletes the last recording. So retrieve it beforehand. If you got a file size it remains valid until the script is finished. After that the file will be deleted by the server.
  18. VBScript → Lua This function returns the digits that where dialed by the caller after the current script was already reached. Dim sPostDialingDigits sPostDialingDigits = PostDialingDigits() This function returns a string value. This function must be called before connecting the call to a device by using the Connect To block. Post dialing digits are the digits the caller has dialed after the user was already unambiguously identified, i.e. his extension was dialed. These numbers might already be completely dialed when the call reaches the script, but even digits being dialed later on can be requested by this function (see example below). The current post dialing digits will be requested making use of the Server Script API function PBXCall.PostDialingDigits. To figure the number that has been dialed to reach the current script (i.e. the user extension, excluding the post dialing digits) one can use CalledNumber(), which is identical to the Server Script API function PBXCall.CalledPartyNumber. To figure all dialed digits, the user extension plus the post dialing digits, one can use the Server Script API function PBXCall.DialedNumber. Example: Script user has internal number 200 and external number +4923147770 Internal caller dialed 200123 PBXCall.CalledPartyNumber returns 200 PBXCall.DialedNumber returns 200123 PostDialingDigits() returns 123 External caller dialed +492314447 PBXCall.CalledPartyNumberCanonical returns +4923147770 It is not unlikely that the caller hasn't dialed already all post dialing digits at the moment when the call reaches the script. It is therefore necessary for the script to wait for all needed post dialing digits (if they are of interest). The following is an example code that waits 3 seconds at most for 3 post dialing digits: Const MAXWAITFORPDD = 3 ' seconds Const NUMOFEXPECTEDPDDS = 3 ' digits Dim nWait nWait = 0 While (Len(PostDialingDigits()) < NUMOFEXPECTEDPDDS) and (nWait < MAXWAITFORPDD) PBXScript.Sleep 1000 nWait = nWait + 1 Wend Dim bDigitsComplete bDigitsComplete = (Len(PostDialingDigits()) = NUMOFEXPECTEDPDDS) Please note that you should not wait too long for such post dialing digits as the caller experience would suffer from a too long waiting time within a script if he doesn't want to dial any additional numbers.
  19. Tom Wellige

    PIN()

    VBScript This function returns the pin which is configured for the current script user to login to his SwyxPhone. Dim sPhonePIN sPhonePIN = PIN() This function returns a string value. If being used in a group context (from SwyxWare v13.27) this function returns an empty string. Read more about user and group context differences here. This pin is configured within the SwyxWare Administration User Configuration panel. Attention! When implementing own pin verifications in call routing script, one can easily come to the conclusion that using an own variable with the name pin. This will now interfere with the build-in function PIN() (VBScript is case insensitive) and instead of somehow throwing an error because a name is re-used, it favors the function above the variable. So if you use a comparision like this to check if an entered pin ok it will not check if the caller entered "12345" which has been stored into the own variable pin, but instead if the users' phone login PIN() is "12345". No error is thrown, but this is definitely not the intended behaviour. The solution for this problem is easy: don't name your own variable pin, but for exmple sPin.
  20. VBScript → Lua This function returns the suffix to dial when connecting the call to a conference to switch the "one way" conference mode on for this call. Dim sSuffix sSuffix = OneWayConferenceSuffix() or if being used directly within a GSE property dialog, e.g. in a Connect To block to connect the call to a conference room in "one way" mode: This function returns a string value. The suffix is fixed to the value #owc#, refer to Feature Codes. A "one way" conference is a conference where the caller is able to listen only. His own voice will automatically be muted. Instead of using this suffix when connecting the call into a conference, you can also enable the one way mode by using the IpPbx.OneWayConference property before using the Connect To block to connect the call into the conference room.
  21. VBScript → Lua The function returns the return value from the latest connect to attempt. Dim nLastCause nLastCause = LastCause() This function returns an integer value. After having used a Connect To block within the call routing script where the result of the connect to attempt was evaluated by the extis of the block it is possible to use this LastCause() function to request that result again. To evaluate the return values refer to Server Script API Return Values.
  22. VBScript → Lua This function returns the current script users' Outlook Out Of Office status. If IsOutOfOffice() Then ' do something Else ' do something else End If or if being used directly within a GSE property dialog, e.g. in an Evaluate block to directly evaluate the Outlook Out Of Office status and place it the block exits: This function returns a boolean value. If being used in a group context (from SwyxWare v13.27) this function returns false. Read more about user and group context differences here. This function can be called at any time within the call routing script. The current outlook busy state will be requested making use of the Server Script API function PBXUser.IsOutOfOffice. The function returns true if the script user has urrently an appointment in his Outlook calendar which is marked as Out Of Office. Please refer to the SwyxWare Administrator manual (chapter 5.3.3, Installation for Calendar-Based Call Management) for information on how to setup calendar based call routing correctly.
  23. VBScript → Lua This function returns the current script users' Outlook Busy status. If IsOutlookBusy() Then ' do something Else ' do something else End If or if being used directly within a GSE property dialog, e.g. in an Evaluate block to directly evaluate the Outlook Busy status and place it the block exits: This function returns a boolean value. If being used in a group context (from SwyxWare v13.27) this function returns false. Read more about user and group context differences here. This function can be called at any time within the call routing script. The current outlook busy state will be requested making use of the Server Script API function PBXUser.IsOutlookBusy. The function returns true if the script user has urrently an appointment in his Outlook calendar which is marked as Busy. Please refer to the SwyxWare Administrator manual (chapter 5.3.3, Installation for Calendar-Based Call Management) for information on how to setup calendar based call routing correctly.
  24. VBScript → Lua This function returns the current script users' logged in status. If IsLoggedIn() Then ' do something Else ' do something else End If or if being used directly within a GSE property dialog, e.g. in an Evaluate block to directly evaluate the logged in status and place it the block exits: This function returns a boolean value. This function can be called at any time within the call routing script. The current login state will be requested making use of the Server Script API function PBXUser.IsLoggedIn.
  25. VBScript → Lua SwxWare 2011 This function returns the current script users' DoNotDisturb (DND) status. If IsDoNotDisturb() Then ' do something Else ' do something else End If or if being used directly within a GSE property dialog, e.g. in an Evaluate block to directly evaluate the DoNotDisturb status and place it the block exits: This function returns a boolean value. If being used in a group context (from SwyxWare v13.27) this function returns false. Read more about user and group context differences here. This function can be called at any time within the call routing script. The current do not disturb state will be requested making use of the Server Script API function PBXUser.DoNotDisturb.
×
×
  • 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.