Sparda Posted May 18, 2006 Posted May 18, 2006 Just a crazy surrgestion which i have alredy started some work on but have got stuck on alredy. The idea is to use a computer with a modem to dial phone numbers, while it dials the phone number you pick up the phone, once it's finished dialing it hangs up leaving you on the line. I have alredy started looking into this, i'm thinking that command line control over a dialup connection would be nice, then using FreeSSHd I send the computer a command to change the phone number of the dialup connection, dial it then disconnect it. Does any one have any idea of how to control a windows dialup connection with out using the windows GUI? Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 I worked out how to dial a connection ^^ Now i need to work out how to change the phone number of the connection. rasdial "<connection name>" Is how to dial an exsisting connection. Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 w00t! Now i'v worked out how to get it to dial diffrent phone numbers! rasdial "<connection name>" /phone:<phone number> Now i need to work out how to automatadly script this over SSH, probably would be easy in Perl, but I don't know Perl into any depth. Any one got any ideas on this one? Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 Better idea! Telnet, use FreeSSHd's Telnet server insted of SSH, it's over my local network, so a secure connection isn't paticulaly esential, would be nice though. Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 PRoblem Encountered! (Don't mind me, i'm just using this as a place to speak my mind): Over telnet the connection is not easy to droped, the connection only drops after the time out period (way too long), looking into solution. Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 So insted of having to dial the phone number while looking at it on the screen, I can run a script (though two clicks) and have it dial my most commonly used phone numbers. Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 I think the way to get it to stop dialing is to send it the rasdial "<connection name>" /disconnect command in another telnet session, obviusly after the phone number has been dialed. Quote
melodic Posted May 18, 2006 Posted May 18, 2006 nice little thread dedicated to sparda :P haha its TomB :P Quote
Shaun Posted May 18, 2006 Posted May 18, 2006 You need to send ATDT then the number to the com port the modem is on to dial. You can hangup by sending ATH. It's pretty simple to write a program to send something to a com port Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 I think the way to get it to stop dialing is to send it the rasdial "<connection name>" /disconnect command in another telnet session, obviusly after the phone number has been dialed. Didn't work. Quote
Shaun Posted May 18, 2006 Posted May 18, 2006 I wrote this which seems to work: #include <fstream> #include <windows.h> using namespace std; int main ( int argc, char* argv[] ) { Â Â Â Â ofstream modem; Â Â Â Â modem.open ( "COM3" ); Â Â Â Â modem << "ATDT" << argv[1] << endl; Â Â Â Â modem.flush (); Â Â Â Â Sleep ( 5000 ); Â Â Â Â modem << "ATHn"; Â Â Â Â modem.flush (); Â Â Â Â modem.close (); Â Â Â Â return 0; } It takes the telephone number as it's first argument. You mgiht wanna stick some validation and stuff it there. It dials, waits 5 seconds then hangs up, my modem takes about 1.5 seconds to start dialing so I put quite a long wait to allow for long numbers. Quote
Darren Kitchen Posted May 18, 2006 Posted May 18, 2006 I dont follow what it is your trying to do. Are you trying to write a wardial program? Quote
Sparda Posted May 18, 2006 Author Posted May 18, 2006 There is no reaon it couldn't be used for that, but basicly i'm trying to ilimiate the need to dial a phone number manualy. Quote
jce108 Posted May 20, 2006 Posted May 20, 2006 Sounds like a cool project and helps me become even lasier than i already am Quote
Darren Kitchen Posted May 21, 2006 Posted May 21, 2006 wasnt this feature built into windows back in 95? i remember a program that interfaced with address book called dial or something that would use your modem to dial the number, then you would just pick up the handset. Quote
VilleValoV Posted May 26, 2006 Posted May 26, 2006 There are a ton of programs that allready do this.. http://www.freedownloadscenter.com/Best/icon-dial-phone.html Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.