VBScript → Lua
This property returns the name of the user a call was connected to right after a Connect To GSE block.
This function returns a string value.
It returns an empty string once the call is disconnected.
If you connect a call to a group and need to know which user of this group has taken the call, this property can be requested right after leaving the Connected exit of the Connect To block.
There is another function PBXCall.ConnectedNumber which returns the internal extension of the user who took the call.
The return value of this function is also updated if the call is getting transferred later on in the call. This of course requires the call routing script not to be left immediately after the Connect To block. This can be achieved by using the Timeout parameter of the Wait for Disconnect block to check the PBXCall.ConnectedName value regularly for changes.
This example gathers all relevant information of a call and stores them into a Zendesk support ticket. Once a call is connect, a Wait For Disconnect block with a 1 second Timout is used, to check regularly if, the call is getting transferred any further, and if so, updates the information which is getting written into the ticket.
if sConnectedName <> PBXCall.ConnectedName then sConnectedName = PBXCall.ConnectedName sCallStatus = sCallStatus & _ FormatDateTime(Now) & " : Call connected to " & sConnectedName & "." & vbCrLF end if