Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Serialcomm dialing voice over modem

Serialcomm dialing voice over modem

Scheduled Pinned Locked Moved C#
csharpquestion
11 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Chuck Richards

    Hey all, Anyone have a very simplified/bare-bone cookbook sample to play a wav file over a serial port that was dialled? So far I have successfully made a c# app that opens port, dials phone number and the app sleeps for a few seconds till i pick-up phone, i received the phone but then am now at the point where my code should play a wav file. Anyone have a sample? Tia charles

    L Offline
    L Offline
    Luc Pattyn
    wrote on last edited by
    #2

    you want to send some bytes and listen to them? I did those things before PC's became popular, and without a modem. I suggest you read some articles, maybe google for serialport, waveform, sound, things like that. Here is one CP article that you might learn from: Universal Remote Control with PDA[^]. :)

    Luc Pattyn [My Articles] Nil Volentibus Arduum

    The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
    Please use <PRE> tags for code snippets, they improve readability.
    CP Vanity has been updated to V2.3

    C 1 Reply Last reply
    0
    • L Luc Pattyn

      you want to send some bytes and listen to them? I did those things before PC's became popular, and without a modem. I suggest you read some articles, maybe google for serialport, waveform, sound, things like that. Here is one CP article that you might learn from: Universal Remote Control with PDA[^]. :)

      Luc Pattyn [My Articles] Nil Volentibus Arduum

      The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
      Please use <PRE> tags for code snippets, they improve readability.
      CP Vanity has been updated to V2.3

      C Offline
      C Offline
      Chuck Richards
      wrote on last edited by
      #3

      So I have made some EXCELLENT progress. Practically done. What is left is finessing the audio into place. Right now. I take a wav file, and break it into blocks as per some examples. But when I listen to it over the phone it plays for the first couple seconds, then it starts to sound like it's skipping. PS:I will help anyone who reads this. Email me @ dotnetcoder@hotmail.ca. But if I can get help here is my audio loop. BinaryReader rdr = new BinaryReader(strm); Utils.Write("4"); while (!MSwitch) { byte[] bt = new byte[1024]; bt = rdr.ReadBytes(1024); if (bt.Length == 0) { MSwitch = true; break; } comPort.Write(bt, 0, bt.Length); } Before this, I read the stream after the 44th byte. Starts fine, but I think the program is writing too fast?

      L 1 Reply Last reply
      0
      • C Chuck Richards

        So I have made some EXCELLENT progress. Practically done. What is left is finessing the audio into place. Right now. I take a wav file, and break it into blocks as per some examples. But when I listen to it over the phone it plays for the first couple seconds, then it starts to sound like it's skipping. PS:I will help anyone who reads this. Email me @ dotnetcoder@hotmail.ca. But if I can get help here is my audio loop. BinaryReader rdr = new BinaryReader(strm); Utils.Write("4"); while (!MSwitch) { byte[] bt = new byte[1024]; bt = rdr.ReadBytes(1024); if (bt.Length == 0) { MSwitch = true; break; } comPort.Write(bt, 0, bt.Length); } Before this, I read the stream after the 44th byte. Starts fine, but I think the program is writing too fast?

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #4

        Did you consider handshaking? maybe your target is using hardware (or software) handshaking, and your code is not? and plese use PRE tags when showing code snippets. :)

        Luc Pattyn [My Articles] Nil Volentibus Arduum

        The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
        Please use <PRE> tags for code snippets, they improve readability.
        CP Vanity has been updated to V2.3

        C 1 Reply Last reply
        0
        • L Luc Pattyn

          Did you consider handshaking? maybe your target is using hardware (or software) handshaking, and your code is not? and plese use PRE tags when showing code snippets. :)

          Luc Pattyn [My Articles] Nil Volentibus Arduum

          The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
          Please use <PRE> tags for code snippets, they improve readability.
          CP Vanity has been updated to V2.3

          C Offline
          C Offline
          Chuck Richards
          wrote on last edited by
          #5

          Must be something with the audio..... I chopped up the wav into portions. The first portion was skip free, so i repeated that over and over and no skips, then i played a portion that skipped and it skipped so it must be the wav file. though i believe i had re-encoded it properly. will investigate. But a bigger issue, have you been able to send key tones? I want my system to dial extensions but from some early readings i may have to gimck this. the other issue is i am targeting a USR5637 56K USB Faxmodem. but it appears that the only at command that gives me an ok is 'at' and 'atd'...... hey, can i give you my email? dotnetcoder@hotmail.ca

          L 1 Reply Last reply
          0
          • C Chuck Richards

            Must be something with the audio..... I chopped up the wav into portions. The first portion was skip free, so i repeated that over and over and no skips, then i played a portion that skipped and it skipped so it must be the wav file. though i believe i had re-encoded it properly. will investigate. But a bigger issue, have you been able to send key tones? I want my system to dial extensions but from some early readings i may have to gimck this. the other issue is i am targeting a USR5637 56K USB Faxmodem. but it appears that the only at command that gives me an ok is 'at' and 'atd'...... hey, can i give you my email? dotnetcoder@hotmail.ca

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #6

            Sorry, I never had my PC speak to my phone or my modem, and I don't know the specific faxmodem you're talking about. Dual-tone dialing probably isn't that easy, it is explained here[^]; it needs two sine waves at the same time, and both better be pretty accurate in frequency and pretty close to a sine wave (as to avoid harmonics). So you need to be very careful about the number of bit-times each sample will require on your serial line. I don't do e-mail, I'm here to help people, but I want to participate in threads for all to read, not off-line individual discussions. :)

            Luc Pattyn [My Articles] Nil Volentibus Arduum

            The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
            Please use <PRE> tags for code snippets, they improve readability.
            CP Vanity has been updated to V2.3

            C 2 Replies Last reply
            0
            • C Chuck Richards

              Hey all, Anyone have a very simplified/bare-bone cookbook sample to play a wav file over a serial port that was dialled? So far I have successfully made a c# app that opens port, dials phone number and the app sleeps for a few seconds till i pick-up phone, i received the phone but then am now at the point where my code should play a wav file. Anyone have a sample? Tia charles

              C Offline
              C Offline
              Chuck Richards
              wrote on last edited by
              #7

              Reply to my own message is what I want. I want to find the best voice modem out there (but it is ok to have some short comings as it seems there is no clear winner). What are your thoughts as per voice modems? I'm not concerned over flash-hangups (line switch) but mainly want to be able to send wav's to a modem to play after dialing and navigating through an IVR. So I can conquer the initial menu navigation with delays in the ATD command but after that simply need to leave a message (internal alert type system from server). any recommendations on the optimal voice modem?

              modified on Thursday, June 2, 2011 2:54 PM

              1 Reply Last reply
              0
              • L Luc Pattyn

                Sorry, I never had my PC speak to my phone or my modem, and I don't know the specific faxmodem you're talking about. Dual-tone dialing probably isn't that easy, it is explained here[^]; it needs two sine waves at the same time, and both better be pretty accurate in frequency and pretty close to a sine wave (as to avoid harmonics). So you need to be very careful about the number of bit-times each sample will require on your serial line. I don't do e-mail, I'm here to help people, but I want to participate in threads for all to read, not off-line individual discussions. :)

                Luc Pattyn [My Articles] Nil Volentibus Arduum

                The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
                Please use <PRE> tags for code snippets, they improve readability.
                CP Vanity has been updated to V2.3

                C Offline
                C Offline
                Chuck Richards
                wrote on last edited by
                #8

                Hey Luc If you can clarify one thing, so if I have a modem that is TAPI compatible, it may still not be considered a 'voice' modem. In the sense that it can not play a wav file after dialing a phone number. The modem modem I currently have is the USR 5637 but I am now permitted to get any voice modem avoiable?

                L 1 Reply Last reply
                0
                • L Luc Pattyn

                  Sorry, I never had my PC speak to my phone or my modem, and I don't know the specific faxmodem you're talking about. Dual-tone dialing probably isn't that easy, it is explained here[^]; it needs two sine waves at the same time, and both better be pretty accurate in frequency and pretty close to a sine wave (as to avoid harmonics). So you need to be very careful about the number of bit-times each sample will require on your serial line. I don't do e-mail, I'm here to help people, but I want to participate in threads for all to read, not off-line individual discussions. :)

                  Luc Pattyn [My Articles] Nil Volentibus Arduum

                  The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
                  Please use <PRE> tags for code snippets, they improve readability.
                  CP Vanity has been updated to V2.3

                  C Offline
                  C Offline
                  Chuck Richards
                  wrote on last edited by
                  #9

                  PS, I gave 'good answer' :)

                  1 Reply Last reply
                  0
                  • C Chuck Richards

                    Hey Luc If you can clarify one thing, so if I have a modem that is TAPI compatible, it may still not be considered a 'voice' modem. In the sense that it can not play a wav file after dialing a phone number. The modem modem I currently have is the USR 5637 but I am now permitted to get any voice modem avoiable?

                    L Offline
                    L Offline
                    Luc Pattyn
                    wrote on last edited by
                    #10

                    Frankly I don't know these things, I know quite a bit about serial ports, but not about modems. Setting up a connection is what a modem should be capable of, so I expect it known about dual-tone multi-frequency dialing. I have no idea why you would want more tones once the connection got established, and I don't know whether a modem could generate more tones when connected; I do know my phone can: if I press a button in the middle of a conversation, you can hear the DTMF. :)

                    Luc Pattyn [My Articles] Nil Volentibus Arduum

                    The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
                    Please use <PRE> tags for code snippets, they improve readability.
                    CP Vanity has been updated to V2.3

                    modified on Friday, June 10, 2011 8:44 PM

                    C 1 Reply Last reply
                    0
                    • L Luc Pattyn

                      Frankly I don't know these things, I know quite a bit about serial ports, but not about modems. Setting up a connection is what a modem should be capable of, so I expect it known about dual-tone multi-frequency dialing. I have no idea why you would want more tones once the connection got established, and I don't know whether a modem could generate more tones when connected; I do know my phone can: if I press a button in the middle of a conversation, you can hear the DTMF. :)

                      Luc Pattyn [My Articles] Nil Volentibus Arduum

                      The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
                      Please use <PRE> tags for code snippets, they improve readability.
                      CP Vanity has been updated to V2.3

                      modified on Friday, June 10, 2011 8:44 PM

                      C Offline
                      C Offline
                      Chuck Richards
                      wrote on last edited by
                      #11

                      Ohhhhhhhhhhhhh,... Sorry. I meant to imply that once the application dials a phone number, has a delay (so it can dial extensions) it plays a wav file to the mailbox it dials. So it simply calls an IVR here at the office and leaves someone a voice mail. The wav played is not DTMF but a voice that we choose.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups