incoming/outgoing call redirection?

Post your questions and help other users.

Moderator: Martin

Friend1
Posts: 52
Joined: 03 May 2017 06:00

incoming/outgoing call redirection?

Post by Friend1 » 26 Sep 2017 10:55

Hi all,

Is there any method to redirect incoming/outgoing call to another number? Help me please! Thanks.

User avatar
yogi108
Posts: 100
Joined: 09 Nov 2016 08:00
Contact:

Re: incoming/outgoing call redirection?

Post by yogi108 » 26 Sep 2017 11:59

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
"You cannot know the meaning of your life until you are connected to the power that created you.”
Shri Mataji Nirmala Devi, founder of Sahaja Yoga

Friend1
Posts: 52
Joined: 03 May 2017 06:00

Re: incoming/outgoing call redirection?

Post by Friend1 » 26 Sep 2017 12:39

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.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: incoming/outgoing call redirection?

Post by Desmanto » 26 Sep 2017 14:54

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Friend1
Posts: 52
Joined: 03 May 2017 06:00

Re: incoming/outgoing call redirection?

Post by Friend1 » 27 Sep 2017 05:06

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.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: incoming/outgoing call redirection?

Post by Desmanto » 27 Sep 2017 12:36

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Friend1
Posts: 52
Joined: 03 May 2017 06:00

Re: incoming/outgoing call redirection?

Post by Friend1 » 27 Sep 2017 13:32

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 :)

User avatar
yogi108
Posts: 100
Joined: 09 Nov 2016 08:00
Contact:

Re: incoming/outgoing call redirection?

Post by yogi108 » 27 Sep 2017 14:12

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
"You cannot know the meaning of your life until you are connected to the power that created you.”
Shri Mataji Nirmala Devi, founder of Sahaja Yoga

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: incoming/outgoing call redirection?

Post by Desmanto » 27 Sep 2017 15:21

@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.

Code: Select all

operation=='ok' and value=='yes'
This will work, since the ending value will be true or false.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
yogi108
Posts: 100
Joined: 09 Nov 2016 08:00
Contact:

Re: incoming/outgoing call redirection?

Post by yogi108 » 27 Sep 2017 15:38

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.

Code: Select all

operation=='ok' and value=='yes'
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...
"You cannot know the meaning of your life until you are connected to the power that created you.”
Shri Mataji Nirmala Devi, founder of Sahaja Yoga

Post Reply