sending phone key tones after connecting using mscomm32.ocx
hi all
I have created a phone connection using mscomm32.ocx and AT hayes commands.
so the phone dials, the recepient picks up, that's where it starts... How do I send further subsequent dial tones through the line while the line is connected?
i have tried
MSComm1.Output = "ATDT" & tone & ";" & VbCr
but to no avail...
this same command generates tones before dialing and as the phone is being dialed, but not after the connection has been established.
Am I barking up the wrong tree here? How am I able to send tones down the line?
Re: sending phone key tones after connecting using mscomm32.ocx
thanks for that!
so it looks like I cant use AT commands to send further tones down the line? I have to hardwire a speaker into the handset speaker? the handset IS connected to the modem...
Re: sending phone key tones after connecting using mscomm32.ocx
yes thanks for those links, they'll come in handy when I need to test the incoming tones for quality..
Yes I did try changin the sound output device to the modem, but What I get is an error message saying that the sound card is in use when I try to play a sound... does the sound through the modem need to played at a certain frequency? 8khz? or is the sound data converted to a different format to be able to be sent through the modem?
Re: sending phone key tones after connecting using mscomm32.ocx
Not sure about that. I can play two sounds at once out of my sound card, one just overlays the other. Maybe you have to reboot your computer for the effect to work? Hmm. I just tried it and didn't get any error.
I clicked apply and it worked fine. When are you getting an error?
Re: sending phone key tones after connecting using mscomm32.ocx
well I get the error when I try to play the sound from the audio properties dialouge in the control panel.. so i go to the tab where I'm able to change the output device to the modem, then I click Apply, go to the tab that contains default sounds for windows alerts.. I click on one of them and the play button and the error comes up.. I guess the sound is not being directed to the soundcard anymore yet it says that it cannot be played because the soundcard is in use.. I've even uninstaled the soundcard alltogether.. same thing...
maybe it has to do with the modem that I'm using... it's only able to accept certain types of sounds? from a certain type of player? (not windows media player)? I'm using NetComm Roadster v.90 external modem... I've looked around the netcomm website for any help.. none there...
*sigh*
Re: sending phone key tones after connecting using mscomm32.ocx
Hmm. I get the same error. I wonder if you have to restart Windows so that the sound card isn't in use? Just grasping at straws, here. I wonder if the modem can only play touchtones?
Re: sending phone key tones after connecting using mscomm32.ocx
yeh it's weird huh?
I've restarted the windows to no avail...
It's also weird because the modem has microphone and speaker jacks and there are audio device drivers installed into windows with the modem drivers and you're able to choose from those... but they just plain dont work... I get a feeling it's got to do with the sound format... if the format is not correct it automatically tries to divert the sound to the sound card, which is not selected, causing the error...
I wander if there is a different sound format that modems can play back...
Re: sending phone key tones after connecting using mscomm32.ocx
Send a PM to CVMichael. He might be able to shed some light on this one.
Include a link to this thread. He did some touch tone stuff a few weeks ago, it's in the CodeBank.
Re: sending phone key tones after connecting using mscomm32.ocx
We do. We select the modem, and then try to play a sound, which generates an error. How/when can you output sound to the modem? The message displayed is "Soundcard in use".
Re: sending phone key tones after connecting using mscomm32.ocx
so it looks like I cant use AT commands to send further tones down the line?
is the modem actually communicating with another modem? or is some voicesystem or person on the other end.
If the later then you can send tones after dialing a number.
It's been a long time since I've done this stuff, but I think you need to set a register on the modem to tell it that it is dialing only and not connecting to another modem.
If a connection is estsblished and you want to interrupt it then send the escape sequence which is usually "+++"
Re: sending phone key tones after connecting using mscomm32.ocx
That commad is for voice, so you have to enable voice first...
But I don't know the commands yet... i'll look through my bookmarks in a few minutes... hopefully I'll find the link i'm looking for
To bad I don't have a voice modem at home to test all this... but i plan to buy a voice modem this week-end, I want to make my own ansering machine with it
First give this command: AT+FCLASS=8 to enable voice
then give this command to list the sound capabilities: AT+VSM=?
Then from that list choose (usually the best) sound mode.
Re: sending phone key tones after connecting using mscomm32.ocx
Tried setting modem to fclass=8 (ok) then with soundcard set to modem, dialed my cellphone (from hyperterminal). Answered it, and while it was off-hook, went to sounds, and tried to play the first sound there (asterisk).
Same error "Sound Card in Use"
then i did an ATH to hang-up.
Something is clearly missing. If I dial a number with the Windows Dialer, you can click the buttons to emit sounds. You don't have to set the output to the modem.
Re: sending phone key tones after connecting using mscomm32.ocx
No problem. I know that it can be done, but thought setting the sound card was all that was required. Never had any reason to test it. Report back when you find something out, and it will be memorialized on the forums!
Re: sending phone key tones after connecting using mscomm32.ocx
cool thansk for that AT command set. it's weird though because i can set the at+FCLASS=8 (ok) then the AT+VSM returns the active profile and stored profile tables... same for AT+VTS
I know that this is a voice modem, so hmmm
as for the soundcard issue -"sound card in use" - i'm still getting that too..
Re: sending phone key tones after connecting using mscomm32.ocx
very odd. I just tried to play a song in media player, and hear nothing!.
I hear sounds in trillian, and playing asterisk, but nothing in media player.
I think i'm going to reboot.
Still happened. Found the MUTE button. I don't know how that happened, though.
All is good again.
Last edited by dglienna; Oct 13th, 2005 at 10:57 PM.
Re: sending phone key tones after connecting using mscomm32.ocx
wow - bizarro
as for me, mild victory!
i am able to send tones down the line using:
atdt9058723458 to dial the number , wait for it to pick up
OK
at+fclass=8
OK
at+vts=4 -----------I HEAR A BLEEP!!!! arty:
OK
now trying to do the same in VB seems to yeld no result... any ideas why?
this of course after atdt connecton established and the phone picks up
VB Code:
If Comm.PortOpen = True Then Comm.PortOpen = False
DoEvents
Comm.InputLen = 0
Comm.PortOpen = True
Comm.Output = "AT+FCLASS=8" & vbCr
Do
' Read the latest data from the serial port.
DoEvents
results = results & Comm.Input
num_tries = num_tries + 1
If num_tries > MAX_TRIES Then
MsgBox "Did not get OK response in " & MAX_TRIES & " tries"
Exit Do
End If
Loop Until InStr(results, "OK" & vbCrLf) > 0
'Comm.Output = "AT+VSM=?" & vbCr
'Comm.Output = "AT+VTS=" & args & "" & vbCr
Comm.Output = "AT+VTS=5" & vbCr
it seems that i'm mimicking the hyper terminal here... why is this not working?
Re: sending phone key tones after connecting using mscomm32.ocx
just beeps so far as per my original post request
I'd like to add the ability to play a phone line quality sound via the output of the COM port as a part of windows ability to use a voice modem as a sound device.
so reduce the sound's quality to like 8khz and shove it down that gob!!
I still haven't resolved the issue with the windows error stated above.. sound card busy thing.. that might have something to do with the fact that I can't play a 'sound' throught the phone line..
Re: sending phone key tones after connecting using mscomm32.ocx
Theoretically it should be possible; it would not make sence if it's not possible.
I went today to a computer store to buy a voice modem, and the guy selling it did not even know if the modem they had it was voice modem. He wanted to sell it to me assuming it was a voice modem. And nothing about voice was written on the box. Stupid people....
Anyways....
I think when you initialyze the sound for playing or recording, I think it has to be the same (samples / sec & bits / sample) as the choice you make when you issue the command "AT+VTS=?".
As soon as I get a voice modem, I'll try to make a program that uses DirectXSound to initialize the sound with the modem (hopefully my theory is correct).
Re: sending phone key tones after connecting using mscomm32.ocx
I think when you initialyze the sound for playing or recording, I think it has to be the same (samples / sec & bits / sample) as the choice you make when you issue the command "AT+VTS=?".
i think that's right also... If only i could play ANY sound to my modem without that stupid error!
Re: sending phone key tones after connecting using mscomm32.ocx
I figured it out !!
After the commands I previously listed, you have to give this command to start receiving sound: AT+VRX or this command to start transmitting: AT+VTX
So, for example for the modem I have (I just bought one), I have to give this commands:
AT+FCLASS=8
AT+VSM=0
AT+VRX ' this is to receive... I did not test for transmit yet...
The data comes/goes thgough the comm control, so you don't even need DirectXSound to play or record...
After the AT+VRX command I receive the "CONNECT" response, then i receive the sound data.