I have been playig with this script for weeks and still can not get it to work.
It is suppose to pull the called id and check the address book the display it.
For some reason I get this error
<TABLE cellSpacing=2 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>10/15/2006 11:39:34 AM </TD><TD class=LOGType0 align=left colSpan=3>Error </TD><TD class=LOGEntry0 align=left colSpan=8>Running script, script run or compile error in file: BetaBrite Caller ID.txt0: in line 0 More info: Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))</TD></TR></TBODY></TABLE>
After I get it working I then want to convert it to .net
Any help would be greatfull.
Thanks
Thom
It is suppose to pull the called id and check the address book the display it.
For some reason I get this error
<TABLE cellSpacing=2 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>10/15/2006 11:39:34 AM </TD><TD class=LOGType0 align=left colSpan=3>Error </TD><TD class=LOGEntry0 align=left colSpan=8>Running script, script run or compile error in file: BetaBrite Caller ID.txt0: in line 0 More info: Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))</TD></TR></TBODY></TABLE>
After I get it working I then want to convert it to .net
Any help would be greatfull.
Thanks
Thom
PHP Code:
Function CheckAddressBook(callnmbr, callname, callfrom)
Dim i
Dim adr_count
Dim contact
Dim bFound
adr_count = hsp.ADRCount
bFound = False
For i = 1 To adr_count
Set contact = hsp.ADRGet(i)
Select Case callnmbr
Case contact.home_phone
callname = contact.first & " " & contact.last
callfrom = "Home Phone"
bFound = True
Exit For
Case contact.cell_phone
callname = contact.first & " " & contact.last
callfrom = "Cell Phone"
bFound = True
Exit For
Case contact.business_phone
callname = contact.first & " " & contact.last
callfrom = "Business Phone"
bFound = True
Exit For
End Select
Next
CheckAddressBook = bFound
End Function
Sub SendCID(Line)
Dim objMsg
Dim strMsg
Dim callname
Dim callnmbr
Dim callfrom
callnmbr = hsp.CIDNumber(Line)
Select Case Len(callnmbr)
Case 10
callnmbr = Left(callnmbr,3) & "-" & Mid(callnmbr,4,3) & "-" & Right(callnmbr, 4)
Case 7
callnmbr = Left(callnmbr,3) & "-" & Right(callnmbr,4)
End Select
callname = hsp.CIDName(Line)
callfrom = ""
If callname = "O" Or callnmbr = "O" Then
strMsg = "Incoming call from an out of area caller."
ElseIf callname = "P" Or callnmbr = "P" Then
strMsg = "Incoming call from a private caller. Call is being dumped."
hsp.LINEhangup Line
Else
If Not CheckAddressBook(callnmbr, callname, callfrom) Then
If callname <> "" Then
strMsg = "Incoming call from " & callname & " at " & callnmbr
Else
strMsg = "Incoming call from " & callnmbr
End If
Else
strMsg = "You have a call from " & callname
End If
End If
strMsg = Replace(strMsg, " & ", " and ")
hs.plugin("LEDAM").SendMessage "phone", "{brown}" & strMsg, "start", 30, 3, 5, 3
End Sub
Comment