• 2 The Graphical Script Editor • The Use of a Visual Basic Script • The Integration of Third Party Applications (Com-Interface)
2.5.4 The Integration of Third Party Applications (Com-Interface)
Third party applications can also be called using a Visual Basic Script.
The script is entered in the “User Script” field located on the “Parameters” tab of the Start rule block. This Visual Basic Script is started if this script is called during call handling.
In this example, an entry is made in the Eventlog for every call. An object is created (in this example: ShellObject), on which you can then execute the appropriate operations:
Sample Script “LogEvent”:
Sub LogEvent(ByVal szMessage)
Dim ShellObject : Set ShellObject = Nothing
Set ShellObject = PBXScript.CreateObject(„WScript.Shell“)
ShellObject.LogEvent 4, szMessage
Set ShellObject = Nothing
End Sub
* 
The applications started from a script are run under the user name, which was used to start the ‘SwyxServer’ service. When accessing databases, make sure that this user is also granted the appropriate rights.
 
The call for this third party application is started, for example, from the block “Set Variable”.
In this example, the system functions, which contain parameters for the current call (e.g. CallerNumber() and CalledNumber()), are transferred to this sub-program.