mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
Make cidrings configurable (bug #2889)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -277,6 +277,9 @@ static int hanguponpolarityswitch = 0;
|
|||||||
/* How long (ms) to ignore Polarity Switch events after we answer a call */
|
/* How long (ms) to ignore Polarity Switch events after we answer a call */
|
||||||
static int polarityonanswerdelay = 600;
|
static int polarityonanswerdelay = 600;
|
||||||
|
|
||||||
|
/* When to send the CallerID signals (rings) */
|
||||||
|
static int sendcalleridafter = DEFAULT_CIDRINGS;
|
||||||
|
|
||||||
/* Protect the monitoring thread, so only one process can kill or start it, and not
|
/* Protect the monitoring thread, so only one process can kill or start it, and not
|
||||||
when it's doing something critical. */
|
when it's doing something critical. */
|
||||||
AST_MUTEX_DEFINE_STATIC(monlock);
|
AST_MUTEX_DEFINE_STATIC(monlock);
|
||||||
@@ -566,6 +569,7 @@ static struct zt_pvt {
|
|||||||
int hanguponpolarityswitch;
|
int hanguponpolarityswitch;
|
||||||
int polarityonanswerdelay;
|
int polarityonanswerdelay;
|
||||||
struct timeval polaritydelaytv;
|
struct timeval polaritydelaytv;
|
||||||
|
int sendcalleridafter;
|
||||||
#ifdef ZAPATA_PRI
|
#ifdef ZAPATA_PRI
|
||||||
struct zt_pri *pri;
|
struct zt_pri *pri;
|
||||||
struct zt_pvt *bearer;
|
struct zt_pvt *bearer;
|
||||||
@@ -1567,7 +1571,7 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
|
|||||||
} else {
|
} else {
|
||||||
if (ioctl(p->subs[SUB_REAL].zfd, ZT_SETCADENCE, NULL))
|
if (ioctl(p->subs[SUB_REAL].zfd, ZT_SETCADENCE, NULL))
|
||||||
ast_log(LOG_WARNING, "Unable to reset default ring on '%s'\n", ast->name);
|
ast_log(LOG_WARNING, "Unable to reset default ring on '%s'\n", ast->name);
|
||||||
p->cidrings = DEFAULT_CIDRINGS;
|
p->cidrings = p->sendcalleridafter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -6652,6 +6656,7 @@ static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_p
|
|||||||
|
|
||||||
tmp->polarityonanswerdelay = polarityonanswerdelay;
|
tmp->polarityonanswerdelay = polarityonanswerdelay;
|
||||||
tmp->hanguponpolarityswitch = hanguponpolarityswitch;
|
tmp->hanguponpolarityswitch = hanguponpolarityswitch;
|
||||||
|
tmp->sendcalleridafter = sendcalleridafter;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (tmp && !here) {
|
if (tmp && !here) {
|
||||||
@@ -9809,6 +9814,8 @@ static int setup_zap(int reload)
|
|||||||
polarityonanswerdelay = atoi(v->value);
|
polarityonanswerdelay = atoi(v->value);
|
||||||
} else if (!strcasecmp(v->name, "hanguponpolarityswitch")) {
|
} else if (!strcasecmp(v->name, "hanguponpolarityswitch")) {
|
||||||
hanguponpolarityswitch = ast_true(v->value);
|
hanguponpolarityswitch = ast_true(v->value);
|
||||||
|
} else if (!strcasecmp(v->name, "sendcalleridafter")) {
|
||||||
|
sendcalleridafter = atoi(v->value);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
|
ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
|
||||||
|
@@ -186,6 +186,13 @@ callwaiting=yes
|
|||||||
;
|
;
|
||||||
usecallingpres=yes
|
usecallingpres=yes
|
||||||
;
|
;
|
||||||
|
; Some countries (UK) have ring tones with different ring tones (ring-ring),
|
||||||
|
; which means the callerid needs to be set later on, and not just after
|
||||||
|
; the first ring, as per the default.
|
||||||
|
;
|
||||||
|
;sendcalleridafter=1
|
||||||
|
;
|
||||||
|
;
|
||||||
; Support Caller*ID on Call Waiting
|
; Support Caller*ID on Call Waiting
|
||||||
;
|
;
|
||||||
callwaitingcallerid=yes
|
callwaitingcallerid=yes
|
||||||
|
Reference in New Issue
Block a user