diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-06 06:00:17 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-06 06:00:17 +0000 |
commit | 005002c26620c61597ef18c19707c150b72ffccb (patch) | |
tree | a465cf508d2edd9491659377160fbecff07c950a /channels | |
parent | bd3b51afcb0f8c24bd6ae75e54ed9d8256c54cc3 (diff) |
Thu Mar 6 07:00:01 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@633 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 1 | ||||
-rwxr-xr-x | channels/chan_zap.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c4e0d2046..726218f0a 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -937,6 +937,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, char *title) ast_setstate(tmp, state); if (state == AST_STATE_RING) tmp->rings = 1; + tmp->adsicpe = AST_ADSI_UNAVAILABLE; tmp->writeformat = fmt; tmp->pvt->rawwriteformat = fmt; tmp->readformat = fmt; diff --git a/channels/chan_zap.c b/channels/chan_zap.c index cffaf3ea0..86548238a 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -161,6 +161,8 @@ static int echocanbridged = 0; static int busydetect = 0; +static int busycount = 3; + static int callprogress = 0; static char accountcode[20] = ""; @@ -398,6 +400,7 @@ static struct zt_pvt { int outgoing; int dnd; int busydetect; + int busycount; int callprogress; struct ast_dsp *dsp; int cref; /* Call reference number */ @@ -3326,6 +3329,9 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int if (i->dsp) { ast_dsp_set_features(i->dsp, features); ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax); + if (i->busydetect && CANBUSYDETECT(i)) { + ast_dsp_set_busy_count(i->dsp, i->busycount); + } } } } @@ -3806,6 +3812,15 @@ static void *ss_thread(void *data) if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Parking call to '%s'\n", chan->name); break; + } else if (strlen(p->lastcallerid) && !strcmp(exten, "*80")) { + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Blacklisting number %s\n", p->lastcallerid); + res = ast_db_put("blacklist", p->lastcallerid, "1"); + if (!res) { + res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL); + memset(exten, 0, sizeof(exten)); + len = 0; + } } else if (p->hidecallerid && !strcmp(exten, "*82")) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Enabling Caller*ID on %s\n", chan->name); @@ -4685,6 +4700,7 @@ static struct zt_pvt *mkintf(int channel, int signalling, int radio) tmp->echocancel = echocancel; tmp->echocanbridged = echocanbridged; tmp->busydetect = busydetect; + tmp->busycount = busycount; tmp->callprogress = callprogress; tmp->cancallforward = cancallforward; tmp->dtmfrelax = relaxdtmf; @@ -6086,6 +6102,8 @@ int load_module() echocanbridged = ast_true(v->value); } else if (!strcasecmp(v->name, "busydetect")) { busydetect = ast_true(v->value); + } else if (!strcasecmp(v->name, "busycount")) { + busycount = atoi(v->value); } else if (!strcasecmp(v->name, "callprogress")) { callprogress = ast_true(v->value); } else if (!strcasecmp(v->name, "echocancel")) { @@ -6404,6 +6422,7 @@ static int reload_zt(void) stripmsd = 0; callwaiting = 0; busydetect = 0; + busycount = 3; callprogress = 0; callwaitingcallerid = 0; hidecallerid = 0; @@ -6516,6 +6535,8 @@ static int reload_zt(void) transfer = ast_true(v->value); } else if (!strcasecmp(v->name, "busydetect")) { busydetect = ast_true(v->value); + } else if (!strcasecmp(v->name, "busycount")) { + busycount = atoi(v->value); } else if (!strcasecmp(v->name, "callprogress")) { callprogress = ast_true(v->value); } else if (!strcasecmp(v->name, "hidecallerid")) { |