session.connection.redirect
Contains information about where the caller was redirected when calling the system. A redirect occurs when a network device (usually hardware, but may be software in cases like SIP) forwards an inbound call to another destination. At that point, the destination device (which may or may not directly interact with the user) is free to perform another redirect, or end the call. At present, only the SIP audio provider supports this feature. Note that the first element that appears in the array is the original called number. The last element that appears in the array is the last redirected number. Each element of the array contains a URI, presentation information (pi), screening information (si), and a reason property.
The presentation information and screening information are currently left blank. The reason property specifies one of the following values:
- unknown
- user busy
- no reply
- deflection during alerting
- deflection immediate response
- mobile subscriber not reachable
For example, the following ECMAScript returns the URI and reason property:
var redirectInfo = session.connection.redirect;
var uri = redirectInfo[0].getUri();
var reason = redirectInfo[0].getReason();