www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/02/08:09:57

Message-ID: <3702AF97.1535E40C@lycosmail.com>
Date: Wed, 31 Mar 1999 18:28:23 -0500
From: Adam Schrotenboer <ajschrotenboer AT lycosmail DOT com>
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: modem dialing
References: <7d8mtc$c0c$1 AT lola DOT ctv DOT es>
X-MIME-Autoconverted: from 8bit to quoted-printable by oak.oakland.edu id GAA23318
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id GAA30655
Reply-To: djgpp AT delorie DOT com

"Rafael García" wrote:

> Is it possible to simply dial a phone number with the modem and hang up?
> The intent is to someone that make many calls to use the modem and don't
> have to manually press the numbers.
>
> It would be wonderful something like this:
>
> dial(char *number) {
>     FILE *f=fopen("com2:","w");

what's the "w" ???????

>
>     if (!f) return 1;
>     fprintf(f,"atdt82%s\n",number);            // 82 for the office phone
> system to get out line

try changing this to

fprintf(f,"atdt82,,%s\n",number); //Commas are to tell the modem to wait,
then dial the number
You usually need to wait for a 2nd dial tone when dialing outside of a PBX.

>     waitUserKey();
>     fprintf(f,"ath\n");

fprintf(f,"+++ ath0\n"); //+++ is to to tell the modem to switch to command
mode, then execute the command.
Which if I remember correctly is ath0. It's been a while since I've done any
stuff w/ modems. Used to use BBSes, but it's been about 4-5 years. Also, \n,
which is the new line, might work better as ^M, literal caret and then M.
Modems interpret this as control-m, which is a linefeed.

>
>     fclose(f);
>     return 0;
>     }
>
> Thanks.

Also, all of this info is given to you w/o the benefit of an actual modem in
my computer. It is all from my memory of the days when I used to use BBS
systems.



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019