Re: Guide to going native. Pure AT.
- From: "Angus" <nospam@xxxxxxxxx>
- Date: Tue, 21 Nov 2006 10:17:13 -0000
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....you
I sent this to Erakis who is also trying direct AT commands, but wanted
to see it as well...on
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
theCan
phone, rather than the greeting....so was wondering if I did it right.
you look at this and see how it differs from your working code? It's inwondering
VB.NET but it should be pretty obvious what i am doing. I'm mostl
if I am sending the WAV file data correctly to the Comport (I'm using anfile,
external voice modem connected to the serial port). I read in the WAV
then write it to the serial port skipping the 33 bytes of header with an8000
byte buffer using 16 bits and 7 khz sampling rate (how the file was("greeting.wav")
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
fine,
' 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
forbut 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
andVOICEANSWER, STARTRECORD, I am not exactly sure what data I am receiving
ATif there is anything that needs to be done with it.
I've gone into the registry to see the Command Categories and associated
direction?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
Thanks,
Nathan
.
- Follow-Ups:
- Re: Guide to going native. Pure AT.
- From: John_Mac
- Re: Guide to going native. Pure AT.
- References:
- RE: Guide to going native. Pure AT.
- From: John_Mac
- RE: Guide to going native. Pure AT.
- Prev by Date: Re: Determine telephone number with TAPI 3.0?
- Next by Date: phoneSetHookSwitch method in tapi ..
- Previous by thread: RE: Guide to going native. Pure AT.
- Next by thread: Re: Guide to going native. Pure AT.
- Index(es):
Relevant Pages
|