Announcement

Collapse
No announcement yet.

BetaBrite Caller Id

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BetaBrite Caller Id

    Was anyone ever able to get this script to work in HS2.0

    Thanks

    Thom

    PHP Code:
    Function CheckAddressBook(callnmbrcallnamecallfrom)
    Dim i
    Dim adr_count
    Dim contact
    Dim bFound
    adr_count 
    hsp.ADRCount
    bFound 
    False
    For 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(callnmbr4)
        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(callnmbrcallnamecallfromThen
         
    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"30353
     
    End Sub 

    #2
    I'm using a different CID-Search script(from the script library here), which I added a line or two into for displaying the info on my BetaBrite and storing the last caller into a virtual device.

    Ed

    Comment

    Working...
    X