This code will call a phone number and try to play a wav file. It sounds like a man on a CB that you cant understand. It should be a woman voice. I dont know if its the flo control or something else. Does anyone have any ideas?
Playing wav over modem
System.IO.Ports.SerialPort comPort;
comPort = new System.IO.Ports.SerialPort("Com2", 115200, System.IO.Ports.Parity.None, 8, StopBits.One);
comPort.DtrEnable = true;
//Switch to Voice Mode
comPort.Write("AT+FCLASS=8" + System.Convert.ToChar(13).ToString());
//Call Number
comPort.Write("ATDT1231234" + System.Convert.ToChar(13).ToString());
//Enter Voice-Transmission Mode
comPort.Write("AT+VTX" + System.Convert.ToChar(13).ToString());
bool MSwitch = false;
byte[] buffer = new byte[20000];
FileStream strm = new FileStream(@"C:\Users\Master\Desktop\Prmpt445.wav", System.IO.FileMode.Open);
MemoryStream ms = new MemoryStream();
int count = ms.Read(buffer, 44, buffer.Length-44);
BinaryReader rdr = new BinaryReader(strm);
while (!MSwitch)
{
byte[] bt = new byte[1024];
bt = rdr.ReadBytes(1024);
if (bt.Length == 0)
{
MSwitch = true;
break;
}
comPort.Write(bt, 0, bt.Length);
}
strm.Close();
strm.Dispose();
little.daffodil 0 Newbie Poster
slavedogg 0 Newbie Poster
little.daffodil 0 Newbie Poster
slavedogg 0 Newbie Poster
little.daffodil 0 Newbie Poster
slavedogg 0 Newbie Poster
little.daffodil 0 Newbie Poster
slavedogg 0 Newbie Poster
little.daffodil 0 Newbie Poster
little.daffodil 0 Newbie Poster
slavedogg 0 Newbie Poster
bguyb 0 Newbie Poster
dwarvenassassin 0 Light Poster
nmwendi_1 0 Newbie Poster
dushi 0 Newbie Poster
mary r 0 Newbie Poster
eljainc 0 Newbie Poster
Umairg404 0 Newbie Poster
Reverend Jim 4,968 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.