Results 1 to 5 of 5

Thread: Making and recieving calls using tapi3.0

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    83

    Making and recieving calls using tapi3.0

    Hi Friends i m a new one in this telephony game

    1. i need to make and recieve a call using tapi.
    2. Also i need to make a call log mean who has call wat number and from wat numbers we have recieved the calls



  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    I've no experience with TAPI, but hopefully this will help


  3. #3
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342

    for making calls using TAPI

    VB Code:
    1. 'Declare the main function in this module
    2.  
    3. Declare Function tapiRequestMakeCall Lib "tapi32" _
    4.     (ByVal lpszDestAddress As String, _
    5.     ByVal lpszAppName As String, _
    6.     ByVal lpszCalledParty As String, _
    7.     ByVal lpszComment As String) As Long
    8.    
    9. 'Global constants
    10.  
    11. Global Const TAPIERR_CONNECTED = 0&
    12. Global Const TAPIERR_DROPPED = -1&
    13. Global Const TAPIERR_NOREQUESTRECIPIENT = -2&
    14. Global Const TAPIERR_REQUESTQUEUEFULL = -3&
    15. Global Const TAPIERR_INVALDESTADDRESS = -4&
    16. Global Const TAPIERR_INVALWINDOWHANDLE = -5&
    17. Global Const TAPIERR_INVALDEVICECLASS = -6&
    18. Global Const TAPIERR_INVALDEVICEID = -7&
    19. Global Const TAPIERR_DEVICECLASSUNAVAIL = -8&
    20. Global Const TAPIERR_DEVICEIDUNAVAIL = -9&
    21. Global Const TAPIERR_DEVICEINUSE = -10&
    22. Global Const TAPIERR_DESTBUSY = -11&
    23. Global Const TAPIERR_DESTNOANSWER = 12&
    24. Global Const TAPIERR_DESTUNAVAIL = -13&
    25. Global Const TAPIERR_UNKNOWNWINHANDLE = -14&
    26. Global Const TAPIERR_UNKNOWNREQUESTID = -15&
    27. Global Const TAPIERR_REQUESTFAILED = -16&
    28. Global Const TAPIERR_REQUESTCANCELLED = -17&
    29. Global Const TAPIERR_INVALPOINTER = -18&
    30.  
    31.  
    32. ''And in form
    33.  
    34. Private Sub TAPIStatus(lonStatCode As Long)
    35.  
    36. 'Based on the TAPI status code (passed to this procedure in lonStatCode),display the appropriate message
    37.  
    38. Select Case lonStatCode
    39.     Case TAPIERR_CONNECTED
    40.         lstStatus.AddItem "OK"
    41.     Case TAPIERR_DROPPED
    42.         lstStatus.AddItem "Dropped"
    43.     Case TAPIERR_NOREQUESTRECIPIENT
    44.         lstStatus.AddItem "Err: No Request Recipient"
    45.     Case TAPIERR_REQUESTQUEUEFULL
    46.         lstStatus.AddItem "Err: Request Queue Full"
    47.     Case TAPIERR_INVALDESTADDRESS
    48.         lstStatus.AddItem "Err: Destination Address Invalid"
    49.     Case TAPIERR_INVALWINDOWHANDLE
    50.         lstStatus.AddItem "Err: Window Handle Invalid"
    51.     Case TAPIERR_INVALDEVICECLASS
    52.         lstStatus.AddItem "Err: Device Class Invalid"
    53.     Case TAPIERR_INVALDEVICEID
    54.         lstStatus.AddItem "Err: Device ID Invalid"
    55.     Case TAPIERR_DEVICECLASSUNAVAIL
    56.         lstStatus.AddItem "Err: Device Class Unavailable"
    57.     Case TAPIERR_DEVICEIDUNAVAIL
    58.         lstStatus.AddItem "Err: Device ID Unavailable"
    59.     Case TAPIERR_DESTBUSY
    60.         lstStatus.AddItem "Err: Destination Busy"
    61.     Case TAPIERR_DESTUNAVAIL
    62.         lstStatus.AddItem "Err: Destination Unavailable"
    63.     Case TAPIERR_UNKNOWNWINHANDLE
    64.         lstStatus.AddItem "Err: Unknown Windows Handle"
    65.     Case TAPIERR_UNKNOWNREQUESTID
    66.         lstStatus.AddItem "Err: Unknown Request ID"
    67.     Case TAPIERR_REQUESTFAILED
    68.         lstStatus.AddItem "Err: Request Failed"
    69.     Case TAPIERR_REQUESTCANCELLED
    70.         lstStatus.AddItem "Err: Request Cancelled"
    71.     Case TAPIERR_INVALPOINTER
    72.         lstStatus.AddItem "Err: Invalid Pointer"
    73.    
    74. End Select
    75.  
    76. End Sub
    77.  
    78. Private Sub command1_Click()
    79. Dim lonTAPIStatus As Long
    80.  
    81. 'Initialize the TAPI session with the tapiRequestMakeCall function
    82. lonTAPIStatus = tapiRequestMakeCall(strphonenum, "TAPI Sample", strphonenum, "")  ''strphoneno is ur required phone no.
    83.  
    84. 'Report the status
    85. Call TAPIStatus(lonTAPIStatus)
    86.  
    87. End Sub

    Hope u got TAPI SDK installed in ur sys...
    ksm

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    83

    know the port of modem

    hi frineds
    how can we know that at port our modem is installed and to reset the modem
    also whether is there any modem in our system


    really need quick help

  5. #5
    Fanatic Member
    Join Date
    Feb 2003
    Posts
    599
    ok ... that works pretty well...

    but i got another question .. How to play a Wave file when the receiver pickup the phone....

    just to play the wave.. and i had search throught the forums but to no avail...

    I wonder can that be done?
    Thank You

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width