Check if call forwarding *21*<number># is active

Post your questions and help other users.

Moderator: Martin

Post Reply
softmonaut
Posts: 4
Joined: 06 Feb 2017 18:43

Check if call forwarding *21*<number># is active

Post by softmonaut » 06 Mar 2017 07:16

Dear community,

how to check if call forwarding *21*<anynumber># is active?
How do I confirm the dialog displayed when enabling/disabling call forwarding (UI action, click("OK") ??) ?.

Thx
Jörg

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Check if call forwarding *21*<number># is active

Post by Martin » 07 Mar 2017 20:58

Hi,

Confirming the dialog with click("OK") could work. Maybe back() also works.
To my knowledge there's no good way to get the current status. You could try to dial *#21# or *#67# (check here: https://en.wikipedia.org/wiki/Call_forwarding) and then use action Control UI with function getTextInActiveWindow() to read the response in the opened dialog.
Alternatively you could try to open the call forwarding settings page of the phone app and read the current status using Control UI from there.

If you enable/disable the call forwarding always from Automagic, you could store the current state in a global variable and then check this variable when required.

Regards,
Martin

Post Reply