Noob question: call divert

510 views
Skip to first unread message

Chris Cowles

unread,
Oct 6, 2011, 3:25:47 PM10/6/11
to tas...@googlegroups.com
I'm trying to replace Magicall from my Windows Mobile phone. It seems like Tasker should do it, but I'm struggling.
 
My goal is to automatically redirect all calls to extensions at work through the main switchboard number. Magicall allowed pattern matching 5 digits. I don't seem to be able to that with Tasker, but I'm okay with putting a #prefix on all extensions in my phone book. Android prevents me from using x or other alpha characters.
 
I created a profile for phone off hook with a task call divert. I used "#*" for a pattern match, with the "to" number being 3522650111,,,%CONUM. I assume %CONUM is the number dialed.
 
It traps the call but fails. I'm guessing the switch doesn't like the # prefix. Is there any way to dial a substring of the called number? That would help me even more, because a lot of folks at work record their number as 352-265-0111 x12345. If I can match the pattern of *x* for the dialed number, and strip off the last 5, it prevents me from having to edit the phone book.
 
Thanks in advance
 
Chris Cowles

BossMan

unread,
Oct 6, 2011, 6:01:40 PM10/6/11
to tas...@googlegroups.com, rchris...@gmail.com

Is there any way to dial a substring of the called number? That would help me even more, because a lot of folks at work record their number as 352-265-0111 x12345. If I can match the pattern of *x* for the dialed number, and strip off the last 5, it prevents me from having to edit the phone book.

Sure - you should be able to solve this using Variable Split and Variable Section actions: http://tasker.dinglisch.net/userguide/en/help/ah_index.html

BR,
A.

ChrisGNV

unread,
Oct 6, 2011, 6:26:12 PM10/6/11
to Tasker
OK, so just on a glance, it looks like I have to define a custom
variable, set the value of the variable using a section of %CONUM,
then call 1234567890,,,%MYVAR, where 1234567890 is the main number and
commas are pauses after connect?

Chris

BossMan

unread,
Oct 6, 2011, 6:31:01 PM10/6/11
to tas...@googlegroups.com
Looks ok at first glance with a huge BUT though: you can't use pauses when dialing on Android... See issues that need support: https://groups.google.com/d/topic/tasker/o3aDx9_uduc/discussion

BR,
A.

baudi

unread,
Oct 6, 2011, 8:03:50 PM10/6/11
to tas...@googlegroups.com
Actually, commas do work for me on my DroidX. Each one causes a 2 second pause. 

ChrisGNV

unread,
Oct 8, 2011, 5:39:27 PM10/8/11
to Tasker
Now I have a problem. While testing, I built a profile using call
divert where %CONUM contained a #. That lead to the questions above. I
deleted that profile. It's nowhere to be found in Tasker. I also
restarted the phone.

I built a new profile to test the variable split functionality, using
minimalist text and MTRefresh. Despite deleting my previous profile
and restarting the phone (Motorola Photon, v2.3) Tasker still diverts
calls where conum includes a #. I ran a log and none of those actions
are nowhere to be found. All I see is the actions related to var split
and mtrefresh. There are no actions logged related to call divert, but
the messages during the call are unmistakeably tasker.

How do I get this to stop?

After I do get it to stop, is there any way to determine the length of
content of a variable? Some stored phone numbers are 5 digits. If I
could trigger call divert based on 5 digit length, that would be much
easier.

Thanks

Pent

unread,
Oct 9, 2011, 4:43:27 AM10/9/11
to Tasker
> Now I have a problem. While testing, I built a profile using call
> divert where %CONUM contained a #. That lead to the questions above. I
> deleted that profile. It's nowhere to be found in Tasker. I also
> restarted the phone.

See Call Revert.

Pent

ChrisGNV

unread,
Oct 10, 2011, 11:30:05 PM10/10/11
to Tasker
On Oct 9, 4:43 am, Pent <supp...@apps.dinglisch.net> wrote:
>
> See Call Revert.

OK, that worked to clear it. Now I'm working on getting the task to
work using variable split. I'm operating on the assumption I'll have
to put a # before the extensions. I can get it to work intermittently.
I can't tell if it's the comma pause bug, or if the phone simply dials
faster than Tasker can process the task actions. I set the task to
highest priority and clear the variables at the top of the loop.

For debugging I created a flash action that displays the values of the
split variables. My test is dialing #45444 without any leading
numbers. Sometimes I get conum1 = blank and conum2 = 45444, other
times it displays conum2 as %conum2. I infer the variable is not set,
in that case, and tasker is displaying the name as a string. If
someone can recommend a change, I'd appreciate it.

I'd really like to trigger the event for where phone offhood and the
length of %conum = 5. All other numbers don't get diverted. Other than
me writing a loop to count the characters using variable set, etc. (if
even possible), is there a means of knowing how long a string is?

Thanks.

XML and logs below.

<class cl="TaskerData" sr="">
<class cl="Profile" sr="prof10">
<nme>Divert Work Extension</nme>
<id>9999</id>
<pri>10</pri>
<mid0>11</mid0>
<cdate>1318295737956</cdate>
<class cl="EventContext" sr="con0">
<code>2</code>
</class>
</class>
<class cl="Task" sr="task11">
<id>11</id>
<class cl="Action" sr="act1">
<class cl="IntArg" sr="arg1">
</class>
<op>9</op>
<class cl="StringArg" sr="arg0" ve="3">
<val>%CONUM2</val>
</class>
<rhs></rhs>
<code>549</code>
<lhs>%CONUM2</lhs>
</class>
<pri>10</pri>
<class cl="Action" sr="act0">
<class cl="IntArg" sr="arg1">
</class>
<op>9</op>
<class cl="StringArg" sr="arg0" ve="3">
<val>%CONUM1</val>
</class>
<rhs></rhs>
<code>549</code>
<lhs>%CONUM1</lhs>
</class>
<class cl="Action" sr="act4">
<class cl="IntArg" sr="arg2">
<val>1</val>
</class>
<code>97</code>
<class cl="StringArg" sr="arg1" ve="3">
<val>3522650111,,,,,%CONUM2</val>
</class>
<class cl="StringArg" sr="arg0" ve="3">
<val>*#*</val>
</class>
</class>
<class cl="Action" sr="act2">
<class cl="IntArg" sr="arg2">
</class>
<code>590</code>
<class cl="StringArg" sr="arg1" ve="3">
<val>#</val>
</class>
<class cl="StringArg" sr="arg0" ve="3">
<val>%CONUM</val>
</class>
</class>
<class cl="Action" sr="act3">
<code>548</code>
<class cl="IntArg" sr="arg1">
<val>1</val>
</class>
<class cl="StringArg" sr="arg0" ve="3">
<val>CONUM %CONUM
CONUM1 %CONUM1
CONUM2 %CONUM2</val>
</class>
</class>
</class>
<tv>1.1.1u1m</tv>
</class>



<class cl="TaskerData" sr="">
<class cl="Task" sr="task8">
<id>8</id>
<class cl="Action" sr="act0">
<code>99</code>
<class cl="IntArg" sr="arg1">
<val>1</val>
</class>
<class cl="StringArg" sr="arg0" ve="3">
<val></val>
</class>
</class>
</class>
<class cl="Profile" sr="prof7">
<nme>Revert All Numbers</nme>
<id>9999</id>
<cdate>1318300335171</cdate>
<class cl="EventContext" sr="con0">
<code>4</code>
</class>
<mid0>8</mid0>
</class>
<tv>1.1.1u1m</tv>


20111010 22.40.53 P INSTANT ID10 Divert Work Extension
20111010 22.40.53 T RUNNING ID11/1
A1: Variable Clear [Name:%CONUM1 Pattern Matching:] Variable Clear
[ %CONUM1 Is Set ]
A2: Variable Clear [Name:%CONUM2 Pattern Matching:] Variable Clear
[ %CONUM2 Is Set ]
A3: Variable Split [Name:%CONUM Splitter:# Delete Base:]
A4: Flash [Text:CONUM %CONUM
CONUM1 %CONUM1
CONUM2 %CONUM2 Long:]
A5: Call Divert [From Match:*#* To:3522650111,,,,,%CONUM2 Info:]

20111010 22.40.54 T EXIT_OK ID11/1
A1: Variable Clear [Name:%CONUM1 Pattern Matching:] Variable Clear
[ %CONUM1 Is Set ]
A2: Variable Clear [Name:%CONUM2 Pattern Matching:] Variable Clear
[ %CONUM2 Is Set ]
A3: Variable Split [Name:%CONUM Splitter:# Delete Base:]
A4: Flash [Text:CONUM %CONUM
CONUM1 %CONUM1
CONUM2 %CONUM2 Long:]
A5: Call Divert [From Match:*#* To:3522650111,,,,,%CONUM2 Info:]

20111010 22.41.02 P INSTANT ID7 Revert All Numbers
20111010 22.41.02 T RUNNING ID8/1
A1: Call Revert [Number: Info:]

20111010 22.41.03 T EXIT_OK ID8/1
A1: Call Revert [Number: Info:]

ChrisGNV

unread,
Oct 16, 2011, 11:45:38 AM10/16/11
to Tasker
On Oct 10, 11:30 pm, ChrisGNV <spammagnet6...@gmail.com> wrote:
> On Oct 9, 4:43 am, Pent <supp...@apps.dinglisch.net> wrote:
>
> > See Call Revert.
>
> OK, that worked to clear it. Now I'm working on getting the task to
> work using variable split. I'm operating on the assumption I'll have
> to put a # before the extensions. I can get it to work intermittently.
> I can't tell if it's the comma pause bug, or if the phone simply dials
> faster than Tasker can process the task actions. I set the task to
> highest priority and clear the variables at the top of the loop.
>
> For debugging I created a flash action that displays the values of the
> split variables. My test is dialing #45444 without any leading
> numbers. Sometimes I get conum1 = blank and conum2 = 45444, other
> times it displays conum2 as %conum2. I infer the variable is not set,
> in that case, and tasker is displaying the name as a string. If
> someone can recommend a change, I'd appreciate it.
>
> I'd really like to trigger the event for where phone offhood and the
> length of %conum = 5. All other numbers don't get diverted. Other than
> me writing a loop to count the characters using variable set, etc. (if
> even possible), is there a means of knowing how long a string is?

Can someone suggest how to get this working? It works only
intermittently, and it doesn't seem to be truncating at the comma,
which is how I infer it would behave if the android/tasker bug were
the problem.

Thanks in advance

Roberto Taormina

unread,
Apr 5, 2015, 10:31:16 AM4/5/15
to tas...@googlegroups.com, spammag...@gmail.com
you know how to divert an incoming unknown call ?

i tried without success
Reply all
Reply to author
Forward
0 new messages