Perform action when call ends... Little annoyance

Questions, problems, and other issues for Ascendis Caller ID that aren't covered by the other forums.
Post Reply
Simon
Posts: 11
Joined: Wed Apr 14, 2004 7:19 pm
Location: Quebec, Canada

Perform action when call ends... Little annoyance

Post by Simon »

I have discovered a little annoyance using the perform action after call ends, you can't block calls from people who wants to sell you a new heat pump...

I requested this feature so I could see on my pager if somebody left a message on the home answering machine, the Email shows if there is at least five rings and who calls, when, etc...

With this setup, CallerId hangup on these call only after the answering machine pick-up the phone.

My setup discriminate the calls in two categories, default and blocked calls. With default, the Email is sent with call info between 7 am and 6 pm and log it to a file callers.txt. With blocked category, CallerId perform a hangup and log it.

My setup would be perfect only if I could specify CallerId to perform immediate action with the blocked category and wait until call end with default category...

Is it possible? (should it be a new feature?)

Simon :?
Bill Root
Site Admin
Posts: 1025
Joined: Mon Jan 19, 2004 1:29 pm
Location: Perrysburg, OH
Contact:

Post by Bill Root »

Hi Simon,

With the current program architecture, we can't reasonably perform different actions at different times. As an alternative, what if actions could be performed both as soon as the caller information is known and when a call is done, and the action could determine whether the call is done? Then you could write something like this:
<pre>
if callInfo.CallDone then
begin
// send mail to pager
// do whatever
end
else
begin
hangup;
end;
</pre>
Would that suffice?
Simon
Posts: 11
Joined: Wed Apr 14, 2004 7:19 pm
Location: Quebec, Canada

Post by Simon »

Bill Root wrote:Hi Simon,

Then you could write something like this:
<pre>
if callInfo.CallDone then
begin
// send mail to pager
// do whatever
end
else
begin
hangup;
end;
</pre>
Would that suffice?


I'll try it as soon as I can and let you know the result, it looks like it should work.
I didn't know the "callinfo.CallDone" thing...

Thanks!

Simon
Simon
Posts: 11
Joined: Wed Apr 14, 2004 7:19 pm
Location: Quebec, Canada

Post by Simon »

I tried to edit the script with CallInfo.CallDone, But when I check the syntax,I get this error message:

Could not compile script because:

Syntax Error: There's no member with name "CallDone"! [line: 2, column: 13

I also tried with : CallInfo.EndCall with the same result...

Simon
Simon
Posts: 11
Joined: Wed Apr 14, 2004 7:19 pm
Location: Quebec, Canada

Post by Simon »

Ok, I think I missed something...

the CallInfo.CallDone is a member that is not yet created by CallerId, you have to "code" it in order to be use in the future? If that can be done, it would for sure resolve my problem, and also implement new and great possibilities in the script language...

Sorry for the slow thinking, Right now i'm doing my tax report... anything distracting me is fun!

Simon
Bill Root
Site Admin
Posts: 1025
Joined: Mon Jan 19, 2004 1:29 pm
Location: Perrysburg, OH
Contact:

Post by Bill Root »

Sorry I didn't make that clear, Simon, but it looks like you figured it out.

I now have the new features working. They will be included in the next beta.
Bill Root
Site Admin
Posts: 1025
Joined: Mon Jan 19, 2004 1:29 pm
Location: Perrysburg, OH
Contact:

New beta version available

Post by Bill Root »

Ok, I just posted the new beta with these changes. You can download it here:
http://ascendis.com/callerid/CallerID_Beta_Setup.EXE

The beta page is available here:
http://ascendis.com/callerid/beta.php

I think the code you were already trying will now work. Remember to check the "Perform Actions" settings in the Options window (General page), as these are no longer exclusive.

Finest regards,
Bill Root
Ascendis Software
Simon
Posts: 11
Joined: Wed Apr 14, 2004 7:19 pm
Location: Quebec, Canada

Post by Simon »

I tried the CallInfo.CallDone in my script and it does not work, here is my script (that work ok with no CallInfo.CallDone):
// LANGUAGE=DWS
if CallInfo.CallDone then
begin
if (Time > StrToTime('7:00:00')) and (Time < StrToTime('18:30:00')) then
begin
SendMail('CID', 'My@email.adress','', CallInfo.Name + ' ' + CallInfo.Number + ' ' + CallInfo.DateTimeStr + ' Rings : ' + IntToStr(CallInfo.Rings), '');
end;
end;
// Log available info to callers.txt
Log('callers.txt', + CallInfo.DateTimeStr + ' - ' + CallInfo.Number + ' - ' + CallInfo.Name + ' - ' + ' - Rings : ' + IntToStr(CallInfo.Rings));
I set immediate action in general option, but even if the phone rings 3 times, my callers.txt shows 1 ring and I receive no email...

If there is no CallInfo.CallDone and the option general is set to action after call, I would receive the email and my log shows 3 rings...

Did i missed something?

Simon
Bill Root
Site Admin
Posts: 1025
Joined: Mon Jan 19, 2004 1:29 pm
Location: Perrysburg, OH
Contact:

Post by Bill Root »

Simon wrote:I tried the CallInfo.CallDone in my script and it does not work, here is my script (that work ok with no CallInfo.CallDone):
// LANGUAGE=DWS
if CallInfo.CallDone then
begin
if (Time > StrToTime('7:00:00')) and (Time < StrToTime('18:30:00')) then
begin
SendMail('CID', 'My@email.adress','', CallInfo.Name + ' ' + CallInfo.Number + ' ' + CallInfo.DateTimeStr + ' Rings : ' + IntToStr(CallInfo.Rings), '');
end;
end;
// Log available info to callers.txt
Log('callers.txt', + CallInfo.DateTimeStr + ' - ' + CallInfo.Number + ' - ' + CallInfo.Name + ' - ' + ' - Rings : ' + IntToStr(CallInfo.Rings));
I set immediate action in general option, but even if the phone rings 3 times, my callers.txt shows 1 ring and I receive no email...

If there is no CallInfo.CallDone and the option general is set to action after call, I would receive the email and my log shows 3 rings...

Did i missed something?

Simon
I think the problem is in your "Perform Action" settings. You should enable "When caller info is received" AND "When call ends". Then your script will be run twice. The part in "if CallInfo.CallDone then" will get executed the second time only. The rest will get executed twice.

Does that make sense? Does that work?

Bill
Simon
Posts: 11
Joined: Wed Apr 14, 2004 7:19 pm
Location: Quebec, Canada

Post by Simon »

You're a genius!

We have here a perfect example of the difference between an end-user and a programmer:

I'm the end-user who thinks in a straight line way and you're the programmer who is imaginative to solve problems!

It works perfectly!!! The default calls are execute perfectly and CallerId hangup on blocked calls right on first ring (second ring, but only CallerId rings in the house, so we hear one ring...). I modified the script so it log to callers.txt only after call is done, so everything is great!

I love this program! You could even write a script to order pizza when you phone home from the cell phone back from work...!

Thanks a lot,

Simon
Bill Root
Site Admin
Posts: 1025
Joined: Mon Jan 19, 2004 1:29 pm
Location: Perrysburg, OH
Contact:

Post by Bill Root »

Great! :D I'm glad it works. Thanks for letting me know!
Post Reply