Added AMA flags
This commit is contained in:
parent
ca207a4ded
commit
06135eb7dc
1
CHANGES
1
CHANGES
|
@ -1,6 +1,7 @@
|
|||
CHANGES
|
||||
=======
|
||||
|
||||
- added amaflags
|
||||
- added pickupgroup (internal pickup with pickupexten)
|
||||
- added capicommand(sendfax)
|
||||
- dropped compatiblity to versions before Asterisk-1.2.0
|
||||
|
|
|
@ -34,6 +34,7 @@ relaxdtmf=on ;in addition to softdtmf, you can use relaxed dtmf detection
|
|||
faxdetect=off ;enable faxdetection and redirection to EXTEN 'fax' for incoming and/or
|
||||
;outgoing calls. (default='off', possible values: 'incoming','outgoing','both')
|
||||
accountcode= ;PBX accountcode to use in CDRs
|
||||
;amaflags=default;AMA flags for CDR ('default', 'omit', 'billing', or 'documentation')
|
||||
context=capi-in ;context for incoming calls
|
||||
;holdtype=hold ;when the PBX puts the call on hold, ISDN HOLD will be used. If
|
||||
;set to 'local' (default value), no hold is done and the PBX may
|
||||
|
|
14
chan_capi.c
14
chan_capi.c
|
@ -2049,6 +2049,8 @@ static struct ast_channel *capi_new(struct capi_pvt *i, int state)
|
|||
tmp->cid.cid_dnid = strdup(i->dnid);
|
||||
}
|
||||
tmp->cid.cid_ton = i->cid_ton;
|
||||
if (i->amaflags)
|
||||
tmp->amaflags = i->amaflags;
|
||||
|
||||
cc_copy_string(tmp->exten, i->dnid, sizeof(tmp->exten));
|
||||
#ifdef CC_AST_HAS_STRINGFIELD_IN_CHANNEL
|
||||
|
@ -4784,6 +4786,7 @@ int mkif(struct cc_capi_conf *conf)
|
|||
tmp->callgroup = conf->callgroup;
|
||||
tmp->pickupgroup = conf->pickupgroup;
|
||||
tmp->group = conf->group;
|
||||
tmp->amaflags = conf->amaflags;
|
||||
tmp->immediate = conf->immediate;
|
||||
tmp->holdtype = conf->holdtype;
|
||||
tmp->ecSelector = conf->ecSelector;
|
||||
|
@ -5324,6 +5327,8 @@ static int cc_post_init_capi(void)
|
|||
*/
|
||||
static int conf_interface(struct cc_capi_conf *conf, struct ast_variable *v)
|
||||
{
|
||||
int y;
|
||||
|
||||
#define CONF_STRING(var, token) \
|
||||
if (!strcasecmp(v->name, token)) { \
|
||||
cc_copy_string(var, v->value, sizeof(var)); \
|
||||
|
@ -5384,6 +5389,15 @@ static int conf_interface(struct cc_capi_conf *conf, struct ast_variable *v)
|
|||
conf->group = ast_get_group(v->value);
|
||||
continue;
|
||||
} else
|
||||
if (!strcasecmp(v->name, "amaflags")) {
|
||||
y = ast_cdr_amaflags2int(v->value);
|
||||
if (y < 0) {
|
||||
ast_log(LOG_WARNING, "Invalid AMA flags: %s at line %d\n",
|
||||
v->value, v->lineno);
|
||||
} else {
|
||||
conf->amaflags = y;
|
||||
}
|
||||
} else
|
||||
if (!strcasecmp(v->name, "rxgain")) {
|
||||
if (sscanf(v->value, "%f", &conf->rxgain) != 1) {
|
||||
cc_log(LOG_ERROR,"invalid rxgain\n");
|
||||
|
|
|
@ -286,6 +286,7 @@ struct capi_pvt {
|
|||
int cid_ton;
|
||||
|
||||
char accountcode[20];
|
||||
int amaflags;
|
||||
|
||||
ast_group_t callgroup;
|
||||
ast_group_t pickupgroup;
|
||||
|
@ -403,6 +404,7 @@ struct cc_capi_conf {
|
|||
int holdtype;
|
||||
int es;
|
||||
int bridge;
|
||||
int amaflags;
|
||||
unsigned int faxsetting;
|
||||
ast_group_t callgroup;
|
||||
ast_group_t pickupgroup;
|
||||
|
|
Loading…
Reference in New Issue