0

I'm trying to record audio input from a modem which I have managed to get to make calls via the TAPI api.

I can record using MciSendString but don't know how to select the modem as the audio input device (at the moment it defaults to selecting the sound card).

I could alternatively use the TAPI commands to record but I can't seem to get it to work:

http://julmar.com/blog/programming/you-can-be-just-like-the-government-and-record-telephone-conversations-with-tapi-3-1/

Any help would be appreciated.

1 Answer 1

0

you have to detect all devices first, then you can chose it from there. The Code is VB.Net but you should be able to translate it very easily. The Event-Handler is not necessary in your case, I think.

Locate all TAPI-Devices:

Private Sub New()
fTapi = New TAPI3Lib.TAPI()
fTapi.Initialize()

fTapi.EventFilter = TAPI_EVENT.TE_CALLNOTIFICATION Or TAPI_EVENT.TE_CALLINFOCHANGE Or TAPI_EVENT.TE_CALLHUB

    AddHandler fTapi.Event, AddressOf internalTapiHandler

    devices = New List(Of Device)()
    For Each addr As ITAddress In CType(fTapi.Addresses, ITCollection)
      devices.Add(New Device(fTapi, addr))
    Next
End Sub

You can also check wheter the device is an audio device:

Public ReadOnly Property isAudioDevice() As Boolean
      Get
        Return (addr.State = ADDRESS_STATE.AS_INSERVICE) And (CType(addr, ITMediaSupport).MediaTypes And TapiConstants.TAPIMEDIATYPE_AUDIO) = TapiConstants.TAPIMEDIATYPE_AUDIO
      End Get
   End Property

From there you can go on with the other example code.

Note that I did not test it because of time issue. Hope this helps anyway.

Regards

2
  • I've tried that and it doesn't pick up the "USRobotics 56k* USB Modem 5637) as an audio in. Is what I'm trying to do even possible? Like I said, I can dial out, hang up calls, do basic bits but can't seem to get anything else to work. I've read that for recording ActiveX can handle it or alternatively I need a PCI voice card that takes the phone line in and will give me direct access to functions for recording via the card?
    – silverzx
    Dec 22, 2015 at 10:27
  • Maybe you need a firmware update? The Product Homepage says that voice support is included since FW version 1.2.23 (usr-emea.com/support/s-prod-template.asp?loc=grmy&prod=5637) -> Link to DataSheet: support.usr.com/download/datasheets/modem/5637/5637-ds.pdf
    – ELIZA
    Dec 22, 2015 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.