- allow one controller number per specified interface only.

V0_7
MelwareDE 2006-06-18 20:57:56 +00:00
parent 881ff2c02b
commit c6d777d26a
3 changed files with 9 additions and 19 deletions

2
README
View File

@ -49,7 +49,7 @@ This chan_capi version includes:
- (Inter)national dialing prefix (for callerid) configurable in capi.conf
- CLI command "capi info" shows B channel status of chan_capi
- Catch all MSN (incomingmsn=*)
- Some configuration enhancements (msn=123,124,125 and controller=1,2,3,4)
- Some configuration enhancements (msn=123,124,125)
- Added accountcode=
- Echo squelching (echosquelch=1)
- Callgroup support

View File

@ -26,7 +26,7 @@ incomingmsn=* ;allow incoming calls to this list of MSNs/DIDs, * = any
;this caller id will be used when dial option 'd' is set.
;controller=0 ;ISDN4BSD default
;controller=7 ;ISDN4BSD USB default
controller=1 ;capi controller number to use
controller=1 ;capi controller number of this interface/port
group=1 ;dialout group
;prefix=0 ;set a prefix to calling number on incoming calls
softdtmf=on ;enable/disable software dtmf detection, recommended for AVM cards
@ -55,7 +55,7 @@ echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for ol
;language=de ;set language for this device (overwrites default language)
;disallow=all ;RTP codec selection (valid with Eicon DIVA Server only)
;allow=all ;RTP codec selection (valid with Eicon DIVA Server only)
devices=2 ;number of concurrent calls on this controller
devices=2 ;number of concurrent calls (b-channels) on this controller
;(2 makes sense for single BRI, 30/23 for PRI/T1)

View File

@ -4629,11 +4629,8 @@ int mkif(struct cc_capi_conf *conf)
{
struct capi_pvt *tmp;
int i = 0;
char buffer[CAPI_MAX_STRING];
char buffer_r[CAPI_MAX_STRING];
char *buffer_rp = buffer_r;
char *contr;
unsigned long contrmap = 0;
u_int16_t unit;
for (i = 0; i <= conf->devices; i++) {
tmp = malloc(sizeof(struct capi_pvt));
@ -4663,11 +4660,7 @@ int mkif(struct cc_capi_conf *conf)
cc_copy_string(tmp->accountcode, conf->accountcode, sizeof(tmp->accountcode));
cc_copy_string(tmp->language, conf->language, sizeof(tmp->language));
cc_copy_string(buffer, conf->controllerstr, sizeof(buffer));
contr = strtok_r(buffer, ",", &buffer_rp);
while (contr != NULL) {
u_int16_t unit = atoi(contr);
unit = atoi(conf->controllerstr);
/* There is no reason not to
* allow controller 0 !
*
@ -4682,14 +4675,11 @@ int mkif(struct cc_capi_conf *conf)
unit = capi_num_controllers;
}
/* always range check user input */
if (unit >= CAPI_MAX_CONTROLLERS)
unit = CAPI_MAX_CONTROLLERS - 1;
/* always range check user input */
if (unit > CAPI_MAX_CONTROLLERS)
unit = CAPI_MAX_CONTROLLERS;
contrmap |= (1 << unit);
contr = strtok_r(NULL, ",", &buffer_rp);
}
contrmap |= (1 << unit);
tmp->controllers = contrmap;
capi_used_controllers |= contrmap;