diff options
author | Hellmuth Michaelis <hm@FreeBSD.org> | 2001-10-18 11:58:49 +0000 |
---|---|---|
committer | Hellmuth Michaelis <hm@FreeBSD.org> | 2001-10-18 11:58:49 +0000 |
commit | 8f3a90354e8d2c69aecb2e98ecf71b8538745d89 (patch) | |
tree | dcfe434253eaa1290451be56d7a4ca351036de67 /usr.sbin/i4b/isdnphone | |
parent | 4f63c70a2b69a18f1a0fa253f5e930600ea1e18e (diff) |
Add experimental support for sending keypad facility messages.
MFC after: 2 months
Notes
Notes:
svn path=/head/; revision=85103
Diffstat (limited to 'usr.sbin/i4b/isdnphone')
-rw-r--r-- | usr.sbin/i4b/isdnphone/isdnphone.8 | 16 | ||||
-rw-r--r-- | usr.sbin/i4b/isdnphone/main.c | 24 |
2 files changed, 27 insertions, 13 deletions
diff --git a/usr.sbin/i4b/isdnphone/isdnphone.8 b/usr.sbin/i4b/isdnphone/isdnphone.8 index 72addf98e9fd..997010f2209f 100644 --- a/usr.sbin/i4b/isdnphone/isdnphone.8 +++ b/usr.sbin/i4b/isdnphone/isdnphone.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1999 Hellmuth Michaelis. All rights reserved. +.\" Copyright (c) 1999, 2001 Hellmuth Michaelis. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,14 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: isdnphone.8,v 1.4 1999/12/13 22:11:55 hm Exp $ -.\" .\" $FreeBSD$ .\" -.\" last edit-date: [Mon Dec 13 23:05:19 1999] +.\" last edit-date: [Thu Oct 18 13:36:52 2001] .\" .\" -.Dd March 24, 1999 +.Dd October 18, 2001 .Dt ISDNPHONE 8 .Os .Sh NAME @@ -37,7 +35,9 @@ .Nd telephone dialing and more for isdn4bsd .Sh SYNOPSIS .Nm +.Op Fl d .Op Fl h +.Op Fl k Ar string .Op Fl n Ar number .Op Fl u Ar unit .Sh DESCRIPTION @@ -51,8 +51,12 @@ a curses-based fullscreen interface. .Pp The following options are available: .Bl -tag -width Ds +.It Fl d +enable debugging message display. .It Fl h hang up a possibly open telefone connection on the selected interface. +.It Fl k +send the specified string using the keypad facility information element. .It Fl n dial the specified number on the selected interface. .It Fl u @@ -71,4 +75,4 @@ dials calls the number 1234 to establish a call on /dev/i4btel0 The .Nm utility and this manpage were written by -.An Hellmuth Michaelis Aq hm@kts.org . +.An Hellmuth Michaelis Aq hm@freebsd.org . diff --git a/usr.sbin/i4b/isdnphone/main.c b/usr.sbin/i4b/isdnphone/main.c index af463570c909..c79e7795136e 100644 --- a/usr.sbin/i4b/isdnphone/main.c +++ b/usr.sbin/i4b/isdnphone/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1999, 2001 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,9 @@ * isdnphone - main module * ======================= * - * $Id: main.c,v 1.12 1999/12/13 21:25:26 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 21:53:25 1999] + * last edit-date: [Wed Oct 17 14:08:44 2001] * *---------------------------------------------------------------------------*/ @@ -48,9 +46,10 @@ usage(void) { fprintf(stderr, "\n"); fprintf(stderr, "isdnphone - i4b phone program, version %d.%d.%d, compiled %s %s\n",VERSION, REL, STEP, __DATE__, __TIME__); - fprintf(stderr, "usage: isdnphone -d -h -n <number> -u <unit>\n"); + fprintf(stderr, "usage: isdnphone -d -h -k <string> -n <number> -u <unit>\n"); fprintf(stderr, " -d debug\n"); fprintf(stderr, " -h hangup\n"); + fprintf(stderr, " -k string keypad string\n"); fprintf(stderr, " -n number dial number\n"); fprintf(stderr, " -u unit set unit number\n"); fprintf(stderr, "\n"); @@ -69,11 +68,12 @@ main(int argc, char **argv) int ret; int opt_n = 0; int opt_h = 0; + int opt_k = 0; char *number = ""; numberbuffer[0] = '\0'; - while ((c = getopt(argc, argv, "dhn:u:")) != -1) + while ((c = getopt(argc, argv, "dhk:n:u:")) != -1) { switch(c) { @@ -85,6 +85,11 @@ main(int argc, char **argv) opt_h = 1; break; + case 'k': + number = optarg; + opt_k = 1; + break; + case 'n': number = optarg; opt_n = 1; @@ -108,7 +113,7 @@ main(int argc, char **argv) if((dialerfd = init_dial(namebuffer)) == -1) exit(1); - if(opt_n || opt_h) + if(opt_n || opt_h || opt_k) { char commandbuffer[80]; @@ -119,6 +124,11 @@ main(int argc, char **argv) sprintf(commandbuffer, "D%s", number); } + else if(opt_k) + { + sprintf(commandbuffer, "K%s", number); + + } else if(opt_h) { sprintf(commandbuffer, "H"); |