From 7465309faa645f39be1f0ba0b1cfc7a3706e83c2 Mon Sep 17 00:00:00 2001 From: hm Date: Sun, 11 Aug 2002 15:47:26 +0000 Subject: add experimental support for Data over Voice (DoV) outgoing calls. based on patches received from Guy Ellis (guy@traverse.com.au), Chris Collins (xfire@xware.cx) and Phillip Musumeci (phillip@cs.jcu.edu.au). --- usr.sbin/i4b/isdnd/isdnd.h | 4 +++- usr.sbin/i4b/isdnd/isdnd.rc.5 | 21 ++++++++++++++++++++- usr.sbin/i4b/isdnd/msghdl.c | 4 +++- usr.sbin/i4b/isdnd/rc_config.c | 9 ++++++++- usr.sbin/i4b/isdnd/rc_parse.y | 4 +++- usr.sbin/i4b/isdnd/rc_scan.l | 3 ++- 6 files changed, 39 insertions(+), 6 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/i4b/isdnd/isdnd.h b/usr.sbin/i4b/isdnd/isdnd.h index 91285f3..f95e841 100644 --- a/usr.sbin/i4b/isdnd/isdnd.h +++ b/usr.sbin/i4b/isdnd/isdnd.h @@ -29,7 +29,7 @@ * * $FreeBSD$ * - * last edit-date: [Tue Mar 26 14:36:20 2002] + * last edit-date: [Sun Aug 11 12:31:44 2002] * *---------------------------------------------------------------------------*/ @@ -288,6 +288,8 @@ typedef struct cfg_entry { int b1protocol; /* hdlc / raw */ + int bcap; /* special bearer capability (DoV) */ + int idle_time_in; /* max idle time incoming calls */ int idle_time_out; /* max idle time outgoing calls */ diff --git a/usr.sbin/i4b/isdnd/isdnd.rc.5 b/usr.sbin/i4b/isdnd/isdnd.rc.5 index 1533b93..ee2e35a 100644 --- a/usr.sbin/i4b/isdnd/isdnd.rc.5 +++ b/usr.sbin/i4b/isdnd/isdnd.rc.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.\" last edit-date: [Tue Mar 26 14:35:02 2002] +.\" last edit-date: [Sun Aug 11 13:03:49 2002] .\" .Dd March 26, 2002 .Dt ISDND.RC 5 @@ -348,6 +348,25 @@ HDLC framing. .It Ar raw No framing at all (used for telephony). .El +.It Li bcap +Use a special bearer capability for this connection. +The keyword is optional. +.Pp +Any other value than +.Em dov +sets the bearer capability as configured by the +.Em b1protocol +keyword (see above). +The currently configurable values are: +.Pp +.Bl -tag -width Ds -compact +.It Ar dov +This connection is a +.Em Dov (Data over Voice) +connection. The b1protocol keyword must be set to +.Em hdlc . +This feature is experimental and does work on outgoing calls only. +.El .It Li budget-calloutperiod is used to specify a time period in seconds. Within this period, the number of calls diff --git a/usr.sbin/i4b/isdnd/msghdl.c b/usr.sbin/i4b/isdnd/msghdl.c index 0d5364a..2b12226 100644 --- a/usr.sbin/i4b/isdnd/msghdl.c +++ b/usr.sbin/i4b/isdnd/msghdl.c @@ -29,7 +29,7 @@ * * $FreeBSD$ * - * last edit-date: [Tue Mar 26 14:37:25 2002] + * last edit-date: [Sun Aug 11 12:37:16 2002] * *---------------------------------------------------------------------------*/ @@ -1201,6 +1201,7 @@ sendm_connect_req(cfg_entry_t *cep) mcr.txdelay = cep->isdntxdelout; mcr.bprot = cep->b1protocol; + mcr.bcap = cep->bcap; mcr.driver = cep->usrdevicename; mcr.driver_unit = cep->usrdeviceunit; @@ -1271,6 +1272,7 @@ sendm_connect_resp(cfg_entry_t *cep, int cdid, int response, cause_t cause) mcr.txdelay = cep->isdntxdelin; mcr.bprot = cep->b1protocol; + mcr.bcap = cep->bcap; mcr.driver = cep->usrdevicename; mcr.driver_unit = cep->usrdeviceunit; diff --git a/usr.sbin/i4b/isdnd/rc_config.c b/usr.sbin/i4b/isdnd/rc_config.c index 09a2c2e..b06685c 100644 --- a/usr.sbin/i4b/isdnd/rc_config.c +++ b/usr.sbin/i4b/isdnd/rc_config.c @@ -29,7 +29,7 @@ * * $FreeBSD$ * - * last edit-date: [Tue Mar 26 14:37:38 2002] + * last edit-date: [Sun Aug 11 12:30:49 2002] * *---------------------------------------------------------------------------*/ @@ -411,6 +411,13 @@ cfg_setval(int keyword) } break; + case BCAP: + DBGL(DL_RCCF, (log(LL_DBG, "entry %d: bcap = %s", entrycount, yylval.str))); + cfg_entry_tab[entrycount].bcap = BCAP_NONE; + if(!(strcmp(yylval.str, "dov"))) + cfg_entry_tab[entrycount].bcap = BCAP_DOV; + break; + case BEEPCONNECT: do_bell = yylval.booln; DBGL(DL_RCCF, (log(LL_DBG, "system: beepconnect = %d", yylval.booln))); diff --git a/usr.sbin/i4b/isdnd/rc_parse.y b/usr.sbin/i4b/isdnd/rc_parse.y index 6630de9..0395bfb 100644 --- a/usr.sbin/i4b/isdnd/rc_parse.y +++ b/usr.sbin/i4b/isdnd/rc_parse.y @@ -32,7 +32,7 @@ * * $FreeBSD$ * - * last edit-date: [Tue Mar 26 14:37:50 2002] + * last edit-date: [Sun Aug 11 12:27:28 2002] * *---------------------------------------------------------------------------*/ @@ -79,6 +79,7 @@ int controllercount = -1; %token ANSWERPROG %token B1PROTOCOL %token BEEPCONNECT +%token BCAP %token BUDGETCALLOUTPERIOD %token BUDGETCALLOUTNCALLS %token BUDGETCALLOUTSFILE @@ -426,6 +427,7 @@ filekeyword: BUDGETCALLBACKSFILE { $$ = BUDGETCALLBACKSFILE; } strkeyword: ANSWERPROG { $$ = ANSWERPROG; } | B1PROTOCOL { $$ = B1PROTOCOL; } + | BCAP { $$ = BCAP; } | CONNECTPROG { $$ = CONNECTPROG; } | DIALOUTTYPE { $$ = DIALOUTTYPE; } | DIRECTION { $$ = DIRECTION; } diff --git a/usr.sbin/i4b/isdnd/rc_scan.l b/usr.sbin/i4b/isdnd/rc_scan.l index d8cdfb6..ac5c018 100644 --- a/usr.sbin/i4b/isdnd/rc_scan.l +++ b/usr.sbin/i4b/isdnd/rc_scan.l @@ -32,7 +32,7 @@ * * $FreeBSD$ * - * last edit-date: [Tue Mar 26 14:37:59 2002] + * last edit-date: [Sun Aug 11 12:27:50 2002] * *---------------------------------------------------------------------------*/ @@ -92,6 +92,7 @@ aliasing { return ALIASING; } aliasfile { return ALIASFNAME; } answerprog { return ANSWERPROG; } b1protocol { return B1PROTOCOL; } +bcap { return BCAP; } beepconnect { return BEEPCONNECT; } budget-callbackperiod { return BUDGETCALLBACKPERIOD; } budget-callbackncalls { return BUDGETCALLBACKNCALLS; } -- cgit v1.1