Hello,
I have a problem with Ascendis announcing incoming Skype callers who are not known in my Skype contacts or Ascendis. Example
+12246996000 1 (224) 699-6000 6/29/2012 5:06:48 PM
This call will be processed by the default script which will speak the name 12,246,996,000. I would like to only announce character names and not announce numeric names. How do I do that?
Thanks!
Skype only announce if known caller
Re: Skype only announce if known caller
Hi Steve,
That's an interesting problem. The solution is to check whether the "name" is numeric before speaking it. Assuming you're using the Default action in version 3.0, the solution is to replace the advanced script with something like this:
If you have a different action, you'll need to to modify it to include the "IsNumeric" function above and the "IsNumeric" call:
If you need help modifying a different action, please post (or email to support) the action script.
Finest regards,
Bill Root
Ascendis Software LLC
That's an interesting problem. The solution is to check whether the "name" is numeric before speaking it. Assuming you're using the Default action in version 3.0, the solution is to replace the advanced script with something like this:
Code: Select all
//LANGUAGE=DWS
function IsNumeric(const s: String): Boolean;
var
i: Integer;
begin
const
NUMBER_CHARS = '0123456789+-.';
Result := False;
for i := 1 to Length(s) do
begin
if not Contains(NUMBER_CHARS, s[i]) then
Exit;
end;
Result := True;
end;
if IsNumeric(CallInfo.SpeakName) then
Speak('Call from ' + CallInfo.Number)
else if CallInfo.FoundCaller or
AnsiSameText(Trim(CallInfo.SpeakName), Trim(CallInfo.Number)) then
Speak('Call from ' + CallInfo.SpeakName)
else
Speak('Call from ' + CallInfo.SpeakName + ' at ' + CallInfo.Number);
Code: Select all
if IsNumeric(CallInfo.SpeakName) then
Speak('Call from ' + CallInfo.Number)
Finest regards,
Bill Root
Ascendis Software LLC
-
- Posts: 3
- Joined: Sat Feb 11, 2012 4:22 pm
Solved!
The script works like a charm. Thanks!