Jump to content

The computerised phone book?


Sparda

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...