Many voice applications give the caller the option of speaking to a real person. Your application can either transfer blind (without checking that an agent is available) or it can check before transferring the call.
To transfer the caller to an agent without first checking that an agent is available, use the Call.blindTransfer() method. This method calls a specified number and transfers the caller to the ringing call. The first call becomes inactive. If an agent is not available, the caller is left to hang up. If an agent is available, the call is dealt with by them and if necessary the caller can be transferred to another instance of the original application (or to another application) by the agent.
. . . // Tell the caller they are being transferred to an agent by playing a // voice segment call.play(VS_Being_Transferred); // Transfer caller to agent call.blindTransfer("7001"); // No further action required. The call object is now invalid, and any // methods called on it will throw an exception . . .
To set up a blind conference call, the process is similar to that shown in Figure 1.
In this scenario, the voice application puts the caller on hold while it consults an agent. The application uses the Call.consult() method to check that the agent is there, as shown in Figure 2. The application places the current call on hold, then uses the same line to call the specified number. If the agent is there, the voice application uses Call.transfer() to transfer the caller to the agent. If the agent is not there, the application uses Call.retrieve() to return to the original caller.
. . . try { // Make another call to the agent on telephone number "7001". // The caller is now on hold Call transferCall = originalCall.consult("7001"); // Tell the agent they have a caller by playing a voice segment transferCall.play(VS_Caller_For_You); // Transfer the caller to the agent originalCall.transfer(); // No further action required on the original call } catch (WVRException e) { // In the event of an exception, get the original caller back originalCall.retrieve(); // Tell the caller that an agent was not available originalCall.play(VS_Agent_Not_Avail); // Continue with call . . . }//try . . .