Lua → VBScript SwxWare v13.10
The function returns the return value from the latest connect to attempt.
local nLastCause = LastCause()
This function returns a number value.
After having used a Connect To block (or Follow Me or Loop) 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.
Possible return values are:
PBXSuccess (0)
PBXFailure (1)
PBXTimeout (2)
PBXCallTermNormalCallClearing (3)
PBXCallTermDestinationBusy (4)
PBXCallTermReject (5)
PBXCallTermWrongNumber (12)
PBXCallTermConnectToCallerImpossible (13)
PBXCallTermDestinationUnreachable (14)
PBXNoChannelAvailable (18)
PBXNetworkCongestion (19)
PBXIncompatibleDestination (20)
PBXOriginatorDisconnected (22)
By Tom Wellige