HELP! Need to setup call forwarding but not fully working

Hi all,

What i want to do is to setup a simple call forward that also functions backwards. Ex: if i call from phone A to phone B, phone C will get that call instead. What i did, that is not fully working, is that i created a Custom extension and on the dial technology part i entered " local/[email protected]".

Its working BUT i need to see the txt file in asterisk with that Custom extension and able to edit it because im going to do something with that file and i cant seem to find it, its not in extensions.conf, extensions_additional.conf or any others.

Is there an easier way or something that works for setting up Call Forwarding in FreePBX with seeing the file so it can be modified in asterisk, I’ve read about inbound routes with misc destinations but don’t really know much about the way to set them up. Any help would be deeply appreciated.

Since I am not sure what you are looking for it’s hard to answer your question.

I suspect the macros and databases that build dialplan on the fly is what makes you think the code does not exist.

Why don’t you tell us exactly what you want to to do and I am sure someone will have a suggestion as to how to accomplish it.

Ok, what i want to do is a call forward:

Phone A calls phone B, but phone C gets the call instead. or viceversa, like be able to setup different combinations of it AND get to view the dial plan or the diff extensions files on asterisk so i can edit or change the file from a php script/webservice. i understand this last part can be done in asterisk, right?

Yes, but the FreePBX call Forwarding feature is database/macro driven.

If you want to modify from a script you need to write to the ASTDB.

Take a look at the user panel code, you can modify call forwarding from the user panel, it also has follow me. Those two examples should show you how to programatically access the dial plan.

the CLI command you are looking for is:

DATABASE PUT CF $acc $localno
Where $acc is the extension number, and $localno is the number is the number where you want to forward it to.

for a web command use something like this;

$cmd=‘asterisk -rx ‘.’"’.‘DATABASE PUT CF ‘.$acc.’ ‘.$localno.’"’;

for PHP.

Let me know if I was of any help.

Thank you