Call Forward

Menu: (Apps-Call Forward)

Use Call Forward to redirect calls from a particular extension to an alternate destination. The alternate destination can be another extension, external phone number such as a cell phone, or various other possibilities.

Using Call Forward with feature codes
There is a lua script that should be in your freeswitch/scripts/call_forward.lua To get the latest version, run SVN up on your fusionpbx install and find it in includes/install/scripts/call_forward.lua

To use this with a feature code...
 * add a dialplan entry with the dialplan manager,
 * add a condition with destination_number and something like ^393$, fwd
 * then application: lua and call_forward.lua
 * Add an action before that that sets a variable application: set data: pin_number=9449 (put in your own number)
 * With this you have call forwarding by feature code.

Enable Diversion Header for forwarded calls
Edit the call_forward.lua

add the line dial_string = dial_string .. “,sip_h_Diversion=<"..extension.."@"..domain_name..">;reason=unconditional";

after dial_string = dial_string .. ",toll_allow='"..toll_allow.."'";

and edit the app/calls/resources/classes/call_forward.php

add the line $dial_string .=",sip_h_Diversion=<".$this->extension."@".$_SESSION['domain_name'].">;reason=unconditional";

after the line $dial_string .= ",toll_allow='".$this->toll_allow."'";

[RFC 5806 - Diversion Indication in SIP - IETF Tools]