Misc. Dialplan Tools deflect
Deflect sends a Refer to the client. The deflect application allows FreeSWITCH to be removed from the list of connection hops and tell the originator to reroute the call. When using the deflect application, FreeSWITCH first hangs up the channel and then send a REFER message and a new INVITE message to the originator. The originator, which could be a gateway or sip proxy, should read the INVITE and reroute the call accordingly.
The only parameter should be the SIP URI to contact (with or without "sip:")
<action application="deflect" data="sip:email@example.com" />
Refer can only be used on established calls. That means if the channel has been Answered (using Answer app), you can use deflect to send a REFER message back to the originating URI. If If the channel has not been Answered, then you should use the redirect application to route the call.
REFER is a SIP method as defined by RFC 3515 . The REFER method indicates that the recipient (identified by the Request-URI) should contact a third party using the contact information provided in the request.
Although this is not "deflect" related, but REFER related, it can be usefull to know you can retrieve variable from your initial INVITE when the REFER method hit the dialplan with Variable_export_vars usage in the a-leg.