Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

A Cute Trick

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

  • A Cute Trick

    Here is a dorkly little item I thought I would pass along. By adding the following to your WAF-NetCaller-ID-Processing script, you can create an automatic link that will perform a reverse phone lookup from the Homeseer Status page.

    Code:
    hs.SetDeviceString "q1", "{a href=http://www.whitepages.com/5050/search/Reverse_Phone?phone=" & s_ncid_number& ">" & s_ncid_number & " - " & s_ncid_name& "{/a>"
    Replace "q1" with whatever virtual device ID you are using for your WAF NetCaller device. Also, replace the brackets "{" with "<". I had to do this to keep the board from parsing the URL (isn't there a way to override this?)

    Only tested with HS 1.7. May not work with 2.0.
    Last edited by Gprev; August 24th, 2005, 08:35 PM. Reason: put code in code format

  • #2
    Does it matter where in the script you put this code?
    Thanx
    Tim
    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

    No, Im from Iowa. I only work in outer space. Captain Kirk

    Comment


    • #3
      Location

      It needs to be in the portion of the script that is configured to run when a call is received.

      I put the above line of code in the WAF-NetCallerID-Sample-CID-Processing.vbs file, under "Function process_ncid_data(what_parameters)."

      -George

      Comment


      • #4
        George,

        That's a handy trick. Thanks a lot!

        Matt

        Comment


        • #5
          Thanx, George
          FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

          HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

          No, Im from Iowa. I only work in outer space. Captain Kirk

          Comment


          • #6
            Cool idea!!

            --David

            Comment


            • #7
              What would be cool is if the number was NOT in your listing to then do this, otherwise I want my custom entry displayed.

              Any thoughts?
              --------------------------------------------------
              **** Do You "Cocoon"? ****

              Comment


              • #8
                BSR,

                Just slip the line of code in at this location:


                Code:
                '--------------------------------------------
                   ' Example 3: Search phone list text file for
                   '			number match. Return associated
                   '			custom name and code. Based upon
                   '			return code, caller is announced
                   '			or not, depending upon time of
                   '			day. 
                   '--------------------------------------------
                   ' Attempt to return custom name for caller from phone
                   ' list file
                   i_ret = find_match(s_ncid_number, s_phone_list_name, s_phone_list_code)   
                   
                   If i_ret = -1 Then
                 
                  hs.SetDeviceString "q1", "{a href=http://www.whitepages.com/5050/search/Reverse_Phone?phone=" & s_ncid_number& ">" & s_ncid_number & " - " & s_ncid_name& "{/a>"
                  
                  
                  	' No match was found in the phone list text file.
                 	' Assign NCID name to phone list variable and 
                 	' assign a code of 2000 (Others) to caller.
                 	s_phone_list_name = s_ncid_name
                 	s_phone_list_code = 2000
                 	
                 	' Add new caller to text file with a default
                 	' code of 2000.
                 	i_ret = add_caller_to_file(s_ncid_number, s_ncid_name, 2000)	 
                   End If

                Comment

                Working...
                X