Automatic client transfer

Hi guys,

I trying to establish a dial plane rule that let me transfer a client automatically to his/her desired destination. so for example if extension one (1001) tried to call extension four(1004) then the call should be first directed to extension zero (1000) and then automatically transfer to the destination which is (1004). I have included a diagram for what I have described . so the rule should be generic in a since that all outbound calls from clients should be transfer first to the central (1000).

your help is very appreciated
Thanks

This is forward, not transfer.

Simply add the Dial for the alternative destination after the Dial for the initial one. You could check hangupcause to eliminate failures that are unlikely to benefit.

Hi David,
Firstly thank you for your advise on the “hangupcause”, however I have tried earlier the approach that you have described but the problem with that is that the call will not fall through to the alternative destination unless the initial (desired) destination did not answer the call. I have also tried to place the dial to the alternative destination before calling the initial (desired) destination. It did fall through to the initial destination after dialing to the alternative destination time out.
So what i am after is establishing a call to the alternative destination (auto answering) and then call the initial (desired) destination from the alternative destination as it has been called from the source.

If the dialplan isn’t falling through, it means that the call is being answered. You will need to fix that on the downstream device;

If the call is being answered, hangupcause will reflect that, so will not help;

(Many people configure Asterisk itself to prematurely answer the incoming side. You are probably talking to something like that.)

I do understand that if the falling through is not happening because it is being answered at first dial application. my aim was to use the alternative destination(client) to log all outbound and inbound call in since that i embed some code in the the client software to store the call logs.
e.g. :
"1001 called 1004 - Answered
1003 called 1002 - Missed
……"
So my intention was to be able to place a call from the alternative destination as it being placed from the source to the intended destination. I do reallies that this way is not the optimal way to achieve what I am after.
Any way, thank you so much David for your help

The g option on Dial will force it to fall through even for answered calls.

The h extension allows you to run dialplan after a channel has hungup, as long as no media is generated.

Thank you David