VoiceXML Call Transfer and Bridging

The section shows examples of how to perform blind and consult transfers using the VoiceXML transfer element when the VoiceXML dialog has been started directly by an incoming call and not through a CCXML dialogstart element. These operations use the SIP Refer mechanism. How blind and consult transfers are implemented when the VoiceXML dialog has been started by CCXML are describd in VoiceXML with CCXML for Call Transfer and Bridging.

Note: VoiceXML call bridging can only be performed when the VoiceXML dialog has been started by a CCXML dialogstart element. How to do this is described in VoiceXML with CCXML for Call Transfer and Bridging. If type="bridge" is used in a VoiceXML application not started by CCXML then an error will be flagged and the VoiceXML transfer element will fail to execute and the VoiceXML document will terminate execution.

Code snippet showing a blind transfer

<form id="transfer2">
    <transfer name="mycall" dest="sip:1234@siphost.blueworx.com" type="blind">
    <filled>
         <log>
              Transfer filled. mycall (form variable) = <value expr="mycall"/>
         </log>
    </filled>
   </transfer>
    <block>
      <log>  Blind Xfer </log>
      <goto next="#exit_app"/>
    </block>
  </form>

Code snippet showing a consultation transfer

  <form id="transfer2">
      <transfer name="mycall" dest="sip:1234@siphost.blueworx.com" type="consultation">
     <prompt>
        Please wait...
     </prompt>

     <filled>
        <log> Transfer filled. mycall (form variable) = <value expr="mycall"/> </log>
        <if cond="mycall == 'busy'">
           <prompt>
             Line is busy. Please call again later.
           </prompt>
         <elseif cond="mycall == 'noanswer'"/>
           <prompt>
            Can't answer the phone now. Please call
             again later.
           </prompt>
         </if>
      </filled>


   </transfer>
    <block>
      <log>  Consult Xfer </log>
      <goto next="#exit_app"/>
    </block>
  </form>

Code snippet showing a blind transfer with sip header setting

 <form id="transfer2">
   <script>
         setOutboundHeader('FROM_HDR',"1234@blueworxx.com");
         setOutboundHeader('Test-Tag',"1234@blueworxx.com");
      </script>
   <transfer name="mycall" dest="sip:1234@siphost.blueworx.com?xdsahdfasgh=1234" type="blind">
     <filled>
         <log>
              Transfer filled. mycall (form variable) = <value expr="mycall"/>
         </log>
     </filled>
   </transfer>
    <block>
      <log>  Blind Xfer </log>
      <goto next="#exit_app"/>
    </block>
  </form>

  <form id="exit_app">
     <block>
        <log> Exit Blind Transfer Application </log>
        <exit expr="'hangup'"/>
     </block>
  </form>