Deflect sends a SIP REFER to the originator of an answered call.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 sends 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:")
Refer can only be used on established calls. That means if the channel has been answered (using the 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 useful to know you can retrieve variables with Variable_export_vars in the a-leg from your initial INVITE when the REFER method hits the dialplan.