Announcement

Collapse
No announcement yet.

HSP Works Now, so need to use it!!!

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

    HSP Works Now, so need to use it!!!

    Want to dial a number within a script and then hang up, cant see any examples of this?

    How do I achieve?
    Lance

    #2
    Here's an example:

    dim r
    r=hsp.LINEDial(1,"555-1212",false,true)
    hsp.waitms 2000
    hsp.LINEHangup 1


    hsp.LINEDial(line As Integer, Number As String, hangup As Boolean, optional nowait as boolean) As Integer
    Description
    Dials the phone number given. If the line is currently in use, the error LINE_INUSE is returned.
    Note that voice modems cannot detect when the calling party has actually answered the phone. This function will return the LINE_CONNECTED status when the modem actually starts ringing the line. If the line is busy, the LINE_BUSY error is returned. Note that the LINE_BUSY status can only be returned if the "nowait" parameter is set to FALSE. If "nowait" is set to try, the function returns immediately with the LINE_CONNECTED status. This is useful for quick dialing when you don't want to check for the line being busy.
    The hangup parameter is used with the HomeSeer Phone Switch. If this parameter is TRUE, the line is hung up immediately after dialing is complete. This will cause the switch box to re-connect the local phone.
    Parameters
    line
    The phone line to access
    Number
    The phone number to dial. Note that the Windows dialing properties are used to alter the phone number. If the number given includes the area code, and the area code matches the one listed in the dialing properties, it is removed.
    hangup
    If TRUE, causes the modem to hangup immediately after dialing the number.
    nowait
    If TRUE, the call returns immediately regardless if the remote party has answered. This is useful if you are connected to a PBX system and you know the PBX answers immediately. This parameter is optional, and if omitted, the system assumes a FALSE value.
    If FALSE, the system will wait up to 8 seconds for the remote party to connect. Since voice modems do not notify the system when a connection is made, the delay gives time for a connection. You may have to add more of a delay in your script.
    Returns
    3 = Line connected, or is ringing the destination, normal return
    6 = Line in use and unavailable
    5 = Line busy
    10 = Reorder tone detected (fast busy)
    Mike

    Comment


      #3
      Mike - Thank you, what a fantastic descripition, just what I was after
      Lance

      Comment


        #4
        Mike - Have just tried this evening, works great, cheers. WAF now up 100%
        Lance

        Comment


          #5
          Good deal Lance!

          When you installed HSPhone, it should have placed a help file in \homeseer\help folder called hsphone.chm. There you will find all the docs!
          Mike

          Comment

          Working...
          X