aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/i4b/isdnphone
diff options
context:
space:
mode:
authorHellmuth Michaelis <hm@FreeBSD.org>2002-03-26 15:13:54 +0000
committerHellmuth Michaelis <hm@FreeBSD.org>2002-03-26 15:13:54 +0000
commit3c1d185c2a8855cff6dcb092f4ecd8b66b64947a (patch)
tree5abe05bd14e0b0acac3cdcf57a344efa514c2941 /usr.sbin/i4b/isdnphone
parent43c1371d7a1e3c3748d304943ab1e43c604de38e (diff)
Add support for Q.931 subaddresses.
Submitted by: Steven Looman <fsteevie@wish.net>
Notes
Notes: svn path=/head/; revision=93226
Diffstat (limited to 'usr.sbin/i4b/isdnphone')
-rw-r--r--usr.sbin/i4b/isdnphone/main.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/usr.sbin/i4b/isdnphone/main.c b/usr.sbin/i4b/isdnphone/main.c
index c79e7795136e..7be5118fa942 100644
--- a/usr.sbin/i4b/isdnphone/main.c
+++ b/usr.sbin/i4b/isdnphone/main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2001 Hellmuth Michaelis. All rights reserved.
+ * Copyright (c) 1999, 2002 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Wed Oct 17 14:08:44 2001]
+ * last edit-date: [Tue Mar 26 14:39:27 2002]
*
*---------------------------------------------------------------------------*/
@@ -67,13 +67,15 @@ main(int argc, char **argv)
int bschar;
int ret;
int opt_n = 0;
+ int opt_s = 0;
int opt_h = 0;
int opt_k = 0;
char *number = "";
+ char *subaddr = "";
numberbuffer[0] = '\0';
- while ((c = getopt(argc, argv, "dhk:n:u:")) != -1)
+ while ((c = getopt(argc, argv, "dhk:n:s:u:")) != -1)
{
switch(c)
{
@@ -94,6 +96,11 @@ main(int argc, char **argv)
number = optarg;
opt_n = 1;
break;
+
+ case 's':
+ subaddr = optarg;
+ opt_s = 1;
+ break;
case 'u':
opt_unit = atoi(optarg);
@@ -121,7 +128,10 @@ main(int argc, char **argv)
if(opt_n)
{
- sprintf(commandbuffer, "D%s", number);
+ if (opt_s)
+ sprintf(commandbuffer, "D%s*%s", number, subaddr);
+ else
+ sprintf(commandbuffer, "D%s", number);
}
else if(opt_k)