[unix-pc.general] switching back from dial pulsing to touch tone

kathy@wrcola.UUCP (Kathy Vincent) (01/07/88)

[I'm posting this for a co-worker.  Please reply either in email
to me or here on the net.]

This person's UNIX pc (3.51) had been happily dialing out touch tone
and receiving calls - until one day when it stopped accepting calls
and started dialing dial pulse ...  The owner says he's not aware
of having done anything to effect either change.  The computer
is now accepting calls again, fortunately, but it continues to
dial pulse.  How can this guy reset his computer so that it will
dial touch tones instead of pulses?

Kathy Vincent -----> Home: {ihnp4|mtune|ptsfa|codas}!bakerst!kathy
              -----> AT&T: {ihnp4|mtune|burl}!wrcola!kathy
                           {favourite AT&T gateway}!wruxe!unix

lenny@icus.UUCP (Lenny Tropiano) (01/08/88)

In article <1061@wrcola.UUCP> kathy@wrcola.UUCP (Kathy Vincent) writes:
|>
|>[I'm posting this for a co-worker.  Please reply either in email
|>to me or here on the net.]
|>
|>This person's UNIX pc (3.51) had been happily dialing out touch tone
|>and receiving calls - until one day when it stopped accepting calls
|>and started dialing dial pulse ...  The owner says he's not aware
|>of having done anything to effect either change.  The computer
|>is now accepting calls again, fortunately, but it continues to
|>dial pulse.  How can this guy reset his computer so that it will
|>dial touch tones instead of pulses?
|>

I would check the following file(s):

(For a two line system your files should look like this)

/etc/.lineone 
MD1=VOICE
TT1=YES
KS1=NO
MS1=NO

/etc/.linetwo 
MD2=DATA
TT2=YES
KS2=NO

The TT1 (for line one) and TT2 (for line two) tell the system to use
Touch tone dialing.  After you change anything here you must send a
SIGPHONE signal (21) to the phone manager process.   

ie:  (assuming your root)

# kill -21 <pid_of_ph>

This will have the phone manager to update its internal parameters.
If this doesn't work, I'm not sure where else to look.

						-Lenny
-- 
============================ US MAIL:   Lenny Tropiano, ICUS Computer Group
 IIIII   CCC   U   U   SSSS             PO Box 1
   I    C   C  U   U  S                 Islip Terrace, New York  11752
   I    C      U   U   SSS   PHONE:     (516) 968-8576 [H] (516) 582-5525 [W] 
   I    C   C  U   U      S  AT&T MAIL: ...attmail!icus!lenny  TELEX: 154232428
 IIIII   CCC    UUU   SSSS   UUCP:
============================    ...{uunet!godfre, harvard!talcott}!\
                   ...{ihnp4, boulder, mtune, bc-cis, ptsfa, sbcs}! >icus!lenny 
"Usenet the final frontier"        ...{cmcl2!phri, hoptoad}!dasys1!/

bamford@ihlpg.ATT.COM (Harold E. Bamford) (01/09/88)

In article <1061@wrcola.UUCP> kathy@wrcola.UUCP (Kathy Vincent) writes:
>...  How can this guy reset his computer so that it will
>dial touch tones instead of pulses?

I ran into this problem and put "phone2tone" into /etc/rc.  Here is the
source.  Please don't offer a lot of criticism on style or flexibility;
this is offered as is with no warranty of any sort.  But it worked for
me...

/**********************************************************************
 * EMACS_MODES: c !fill tabstop=4
 *
 * This program sets the modem to tone dialing rather than the power-up
 * default of pulse dialing.
 **********************************************************************/
#include <stdio.h>
#include <fcntl.h>
#include <sys/phone.h>
#include <errno.h>

main(argc,argv)
int argc;
char *argv[];	/* needed for program name in error messages */
{
	int fd;		/* file descriptor from open() */
	struct updata data;	/* defined in sys/phone.h */

	/* Open up the modem, so that ioctl() can be called */
	if((fd = open("/dev/ph1",O_RDWR|O_NDELAY)) <= 0) {
		fprintf(stderr,"%s: open failed, fd=%d errno=%d\n",
			argv[0],fd,errno);
		exit(errno);
	}
	
	/* Get the current parameters */
	if(ioctl(fd,PIOCGETP,&data) < 0) {
		fprintf(stderr,"%s: ioctl(PIOCGETP) failed, errno=%d\n",
			argv[0],errno);
		exit(errno);
	}
	
	data.c_lineparam &= ~(PULSE);	/* turn off pulse dialing */
	data.c_lineparam |= DTMF;	/* turn on tone dialing */

	if(ioctl(fd,PIOCSETP,&data) < 0) {
		fprintf(stderr,"%s: ioctl(PIOCSETP) failed, errno=%d\n",
			argv[0],errno);
		exit(errno);
	}

	close(fd);
	exit(0);
}
-- 
				Harold Bamford, AT&T Bell Labs
				IHP 2F-524 (312) 416-7397
				ihnp4!ihlpg!bamford

kathy@wrcola.UUCP (Kathy Vincent) (01/09/88)

In article <206@icus.UUCP> lenny@icus.UUCP (Lenny Tropiano) writes:
>In article <1061@wrcola.UUCP> kathy@wrcola.UUCP (Kathy Vincent) writes:
>|>
>|>This person's UNIX pc (3.51) had been happily dialing out touch tone
>|>and receiving calls - until one day when it stopped accepting calls
>|>and started dialing dial pulse ... 
>|>
>[suggestions]


Thanks for the suggestions I've been getting so far.
A comment, tho.  I guess I should have made it clear that
this guy *did* go to install and redo the hardware setup - everything
is, according to that, set up his phone lines for touchtone dialing.  

Kathy