Page 1 of 2
incoming/outgoing call redirection?
Posted: 26 Sep 2017 10:55
by Friend1
Hi all,
Is there any method to redirect incoming/outgoing call to another number? Help me please! Thanks.
Re: incoming/outgoing call redirection?
Posted: 26 Sep 2017 11:59
by yogi108
Hi,
I guess you want a call forwarding that you see on your phone immediately to another number?
If yes, I would also be interested how to do that.
Otherwise there is only standard forwarding so that EVERY call will be forwarded if activated.
That can be done through the menu options for
Always
If busy
No answer
No signal
and the costs for that depends on the pricing of your provider.
With the help of gsm codes you can without menu activate a forwarding for all of the possibilities above:
On:**21*number#
Off:##21#
Check state:*#21#
Regards
Re: incoming/outgoing call redirection?
Posted: 26 Sep 2017 12:39
by Friend1
Hi,
I want to change incoming_number or outgoing_number on call request without forwarding. I.E. : init call variables, then incoming_number := 05x xxx xx xx if it's possible. Thank you for replies.
Re: incoming/outgoing call redirection?
Posted: 26 Sep 2017 14:54
by Desmanto
What kind of example usage you wanna have? It is not clear enough. Different usage different implementation.
From my guess, you wanna show the number in certain format. Or maybe you wanna "replace the number shown" with another number.
If replacing the shown number is what you want, you need to use Custom Widget, design a very similiar UI with the call interface and replace the UI (show it on top of the real one) when there is incoming/outgoing call. The trigger already supplied the variable needed. You only need to design the widget. Taking screenshot and edit it is one of the way. Since it is device specific, you have to do it by yourself.
Re: incoming/outgoing call redirection?
Posted: 27 Sep 2017 05:06
by Friend1
Hi Desmanto,
I want to "replace the number shown" with another number. But not need to show to phone user. It's possible to change directly from the variable supplied by trigger? This is enough for me if possible. Thanks for a lot replies.
Re: incoming/outgoing call redirection?
Posted: 27 Sep 2017 12:36
by Desmanto
Friend1 wrote:
I want to "replace the number shown" with another number. But not need to show to phone user.
What do you mean by the bolded one above? When you replace the number, the number is shown to the on who is holding the phone. You can also hide the caller ID as well, just replace the UI also.
When you change the variable in automagic, that changes only happen in automagic, it will never change the original data that the dialer has. So there is no way to change the number directly on dialer. That will require to hack the dialer app's memory address, which require root and probably very difficult to do.
You can only retrieve the number from the dialer (supplied by the trigger), modify it and put it into widget. Then detect when the dialer windows show up, show widget on top of the number and caller name element. I have tested the concept and it can be done. This essentially "replace" the name and number. It can be detected using Control UI, wait for the element to appear and show the widget. See my index, at the Control UI part, "detect current opened windows"
Anything related to Control UI / UI event is phone specific, thus you must do it all by yourself. Since the dialer and interface is different in each phone.
Re: incoming/outgoing call redirection?
Posted: 27 Sep 2017 13:32
by Friend1
Hi Desmanto,
First of all thank you for the quick response. You are saying:
"When you change the variable in automagic, that changes only happen in automagic, it will never change the original data that the dialer has. So there is no way to change the number directly on dialer. That will require to hack the dialer app's memory address, which require root and probably very difficult to do."
It is difficult to perform this operation as I understand it, but this can be done in the user interface before the call arrives / is sent.Can we do the trick:
can we end the called phone and send the number to the number we want (eg me) with the message? The reason for doing this is to understand that the person concerned is talking to the person whom I do not want to interview. Thanks for your help

Re: incoming/outgoing call redirection?
Posted: 27 Sep 2017 14:12
by yogi108
Can we do the trick:
can we end the called phone and send the number to the number we want (eg me) with the message? The reason for doing this is to understand that the person concerned is talking to the person whom I do not want to interview. Thanks for your help

Hi,
That could be done, you have to decide which trigger to use, say incoming call, and the number(s) who are affected - or asking input dialog for each number.
If you decide to end the call it is to be done with action 'end call'.
With action 'send SMS' you can send the number {call_number} to your desired person.
Regards
Like this
http://automagic4android.com/flow.php?i ... fe61f87758
Re: incoming/outgoing call redirection?
Posted: 27 Sep 2017 15:21
by Desmanto
@Friend1 : It is much clearer now, of what you wanna do (If I get it properly). You can setup to automatically reject/end call (at mine it doesn't work) and immediately send the incoming to other phone. There will be a flash of calling UI probably, so you maybe have to use widget to hide it. Or to be less intrusive, you can just log the incoming number (without ending the call) and save it in GloVar, and process it later after certain amount of time. You can also make a list of time called, how long it last and later output as csv.
@yogi108 : If there is only just yes no choice to continue, just use Condition - Confirmation Dialog. It will give two choices directly. And for the expression, it is always expecting true false, so no need to return the value anymore.
This will work, since the ending value will be true or false.
Re: incoming/outgoing call redirection?
Posted: 27 Sep 2017 15:38
by yogi108
Desmanto wrote:@Friend1 ....
@yogi108 : If there is only just yes no choice to continue, just use Condition - Confirmation Dialog. It will give two choices directly. And for the expression, it is always expecting true false, so no need to return the value anymore.
This will work, since the ending value will be true or false.
Thanks for the hint, always used action dialog and was wondering that it is not simple getting yes/no...