Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Interactive Voice Response interviews > Writing an IVR hand-off function > Transferring the respondent to IVR
 
Transferring the respondent to IVR
If the call to IVR results in a connection you can transfer the interview by typing:
_Extension.Call.TransferToExtension(IVRCall.Extension.SlaveExtension)
Although the transfer is very quick, your script should wait until it receives confirmation of the transfer just in case this fails. For example, to wait until the call on the interviewer’s extension terminates (which will happen when the transfer of the call to the IVR system is completes), type:
While (_Extension.Call.State <> 3)
  Sleep(20)
End While
When the transfer is complete, set a return value for your function:
FunctionName = True
Once an interview has been transferred to the IVR system it cannot return to UNICOM Intelligence Interviewer - Server, so the UNICOM Intelligence Interviewer - Server script should not contain any more questions for the respondent. It can, however, contain postprocessing statements that you want to execute after the interview has been handed off, for example, to write accounting or other details to the data file.
See also
Writing an IVR hand-off function