Re: Guide to going native. Pure AT.

Tech-Archive recommends: Fix windows errors by optimizing your registry



What are you asking? Why don't you try out your code and see what happens?

Then if you get a problem people on here have something to focus on.


"John_Mac" <JohnMac@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:425CA4E4-8E3D-4290-98EE-103E789EAAAA@xxxxxxxxxxxxxxxx
Nathan....

I sent this to Erakis who is also trying direct AT commands, but wanted
you
to see it as well...

I see several people (including myself) are trying to go directly to the
modem to call and play a WAV file.

I followed Erakis' outline and wrote the following code. I get clicking
on
the
phone, rather than the greeting....so was wondering if I did it right.
Can
you look at this and see how it differs from your working code? It's in
VB.NET but it should be pretty obvious what i am doing. I'm mostl
wondering
if I am sending the WAV file data correctly to the Comport (I'm using an
external voice modem connected to the serial port). I read in the WAV
file,
then write it to the serial port skipping the 33 bytes of header with an
8000
byte buffer using 16 bits and 7 khz sampling rate (how the file was
written)...according to the modem documentation it supports 16 bit 8 khz.

Dim Port As IO.Ports.SerialPort

' voice modem is on serial port....internal modem is on COM3

Dim Comport As String = "COM1"
Dim modemPort As New SerialPort(Comport, 9600)

' set buffer size
modemPort.WriteBufferSize = 8000

Dim fileByte as Byte = My.Computer.FileSystem.ReadAllBytes
("greeting.wav")

' initialize modem
modemPort.Write("ATZ" & vbCrLf)

' enable DTR
modemPort.DtrEnable = True

' Voice mode
modemPort.Write("AT+FCLASS=8" & vbCrLf)

' txtPhone.text has the phone number to call
modemPort.Write("ATDT" & txtPhone.Text & vbCrLf)

' 16 bit 8 khz PCM
modemPort.Write("AT+VSM=129,8000" & vbCrLf)

' disable silence detection
modemPort.Write("AT+VSD=128,0" & vbCrLf)

' hardware flo control
modemPort.Write("AT+FLO=2" & vbCrLf)

' enter voice transmit data state
modemPort.Write("AT+VTX" & vbCrLf)

'now send the data
'need to strip off first 44 byte header from wave file that
was read in
'set buffer size to 8000

modemPort.Write(fileByte, 44, fileByte.Length - 44)

' hang up
modemPort.Write("ATH" & vbCrLf)




Thanx in advance.

John


"Nathan" wrote:

I'm a dotnet character and was working on TAPI 3.1 and everything is
fine,
but I would like to break it all down to the AT commands.

I don't expect it would be all that difficult for the main stuff, but
for
VOICEANSWER, STARTRECORD, I am not exactly sure what data I am receiving
and
if there is anything that needs to be done with it.

I've gone into the registry to see the Command Categories and associated
AT
commands. I've also found the inf that contains this same info.

What has me intrigued is the WaveDriver category in the registry and am
thinking that I might not be able to run the StartRecord at commands and
capture all the data, plop it into a file and call it a .wav file.

Is there any guidance out there that can point me in the right
direction?

Thanks,
Nathan


.



Relevant Pages

  • Re: Guide to going native. Pure AT.
    ... This sort of thing is usually a format problem. ... You also open the modem at 9600 - which is maybe a little slow and doesn't ... the wav file greeting that is recorded. ... Dim Port As IO.Ports.SerialPort ...
    (microsoft.public.win32.programmer.tapi)
  • Re: CXT AC Link Modem with TAPI?
    ... like to know if it is a voice modem or installed as one. ... googling brought no useful information about this "CXT AC Link Modem ... Dim obTAPI As TAPI ... Dim obAddress As ITAddress ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Guide to going native. Pure AT.
    ... the wav file greeting that is recorded. ... external voice modem connected to the serial port). ... Dim Port As IO.Ports.SerialPort ...
    (microsoft.public.win32.programmer.tapi)
  • RE: Guide to going native. Pure AT.
    ... I sent this to Erakis who is also trying direct AT commands, ... modem to call and play a WAV file. ... external voice modem connected to the serial port). ... Dim Port As IO.Ports.SerialPort ...
    (microsoft.public.win32.programmer.tapi)
  • Re: CXT AC Link Modem with TAPI?
    ... Matthias Moetje ... the modem driver will automatically do the audio ... Dim obTAPI As TAPI ... Dim obAddress As ITAddress ...
    (microsoft.public.win32.programmer.tapi)