[asterisk-commits] nadi: branch nadi/trunk-cm r45019 -
/team/nadi/trunk-cm/channels/chan_misdn.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Oct 13 05:19:45 MST 2006
Author: nadi
Date: Fri Oct 13 07:19:44 2006
New Revision: 45019
URL: http://svn.digium.com/view/asterisk?rev=45019&view=rev
Log:
removed some config directives
Modified:
team/nadi/trunk-cm/channels/chan_misdn.c
Modified: team/nadi/trunk-cm/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/nadi/trunk-cm/channels/chan_misdn.c?rev=45019&r1=45018&r2=45019&view=diff
==============================================================================
--- team/nadi/trunk-cm/channels/chan_misdn.c (original)
+++ team/nadi/trunk-cm/channels/chan_misdn.c Fri Oct 13 07:19:44 2006
@@ -106,8 +106,8 @@
MISDN_RELEASED, /*!< when connected */
MISDN_BRIDGED, /*!< when bridged */
MISDN_CLEANING, /*!< when hangup from * but we were connected before */
- MISDN_HUNGUP_FROM_MISDN, /*!< when DISCONNECT/RELEASE/REL_COMP cam from misdn */
- MISDN_HUNGUP_FROM_AST, /*!< when DISCONNECT/RELEASE/REL_COMP came out of */
+ MISDN_HUNGUP_FROM_MISDN, /*!< when DISCONNECT/RELEASE/REL_COMP came from misdn */
+ MISDN_HUNGUP_FROM_AST, /*!< when DISCONNECT/RELEASE/REL_COMP came from Asterisk */
MISDN_HOLDED, /*!< if this chan is holded */
MISDN_HOLD_DISCONNECT, /*!< if this chan is holded */
MISDN_FIXUP /*!< if this chan is holded */
@@ -155,7 +155,6 @@
int addr;
char context[BUFFERSIZE];
int dropped_frame_cnt;
- int far_alerting;
int other_pid;
struct chan_list *other_ch;
const struct tone_zone_sound *ts;
@@ -229,10 +228,6 @@
"Set the path to the massively growing trace file, if you want that." },
{ "bridging", "yes",
"Set this to yes if you want mISDN_dsp to bridge the calls in HW." },
- { "stop_tone_after_first_digit", "yes",
- "Stops dialtone after getting first digit on NT Port." },
- { "append_digits2exten", "yes",
- "Wether to append overlapdialed Digits to Extension or not." },
{ "dynamic_crypt", "no",
"Wether to look out for dynamic crypting attempts." },
{ "crypt_prefix", 0,
@@ -252,8 +247,6 @@
MCFG_MISDN_INIT,
MCFG_TRACEFILE,
MCFG_BRIDGING,
- MCFG_STOP_TONE_AFTER_FIRST_DIGIT,
- MCFG_APPEND_DIGITS2EXTEN,
MCFG_DYNAMIC_CRYPT,
MCFG_CRYPT_PREFIX,
MCFG_CRYPT_KEYS,
@@ -276,16 +269,14 @@
{ "te_choose_channel", "no",
"Some telcos espacially in NL seem to need this set to yes,\n"
"\talso in switzerland this seems to be important." },
- { "far_alerting", "no",
- "If we should generate ringing for chan_sip and others." },
- { "pmp_l1_check", "yes",
+ { "pmp_l1_check", "no",
"This option defines, if chan_misdn should check the L1 on a PMP\n"
"\tbefore makeing a group call on it. The L1 may go down for PMP Ports\n"
"\tso we might need this.\n"
"\tBut be aware! a broken or plugged off cable might be used for a group call\n"
"\tas well, since chan_misdn has no chance to distinguish if the L1 is down\n"
"\tbecause of a lost Link or because the Provider shut it down..." },
- { "block_on_alarm", "yes",
+ { "block_on_alarm", "no",
"Block this port if we have an alarm on it.\n"
"default: yes" },
{ "hdlc", "no",
@@ -374,14 +365,9 @@
"\n"
"\tscreen=0, presentation=0 -> callerid presented not screened\n"
"\tscreen=1, presentation=1 -> callerid presented but screened (the remote end doesn't see it!)" },
- { "always_immediate", "no",
- "Enable this to get into the s dialplan-extension.\n"
- "\tThere you can use DigitTimeout if you can't or don't want to use\n"
- "\tisdn overlap dial.\n"
- "\tNOTE: This will jump into the s extension for every exten!" },
{ "nodialtone", "no",
"Enable this to prevent chan_misdn to generate the dialtone\n"
- "\tThis makes only sense together with the always_immediate=yes option\n"
+ "\tThis makes only sense together with the immediate=yes option\n"
"\tto generate your own dialtone with Playtones or so."},
{ "immediate", "no",
"Enable this if you want callers which called exactly the base\n"
@@ -405,9 +391,6 @@
"\tA value of zero turns echocancellation off.\n"
"\n"
"\tPossible values are: 0, 32, 64, 128, 256, yes(=128), no(=0)" },
- { "echocancelwhenbridged", "no",
- "This disables echocancellation when the call is bridged between\n"
- "\tmISDN channels." },
{ "need_more_infos", "0",
"Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING),\n"
"\tthis requests additional Infos, so we can waitfordigits without much\n"
@@ -469,7 +452,6 @@
MCFG_RXGAIN,
MCFG_TXGAIN,
MCFG_TE_CHOOSE_CHANNEL,
- MCFG_FAR_ALERTING,
MCFG_PMP_L1_CHECK,
MCFG_BLOCK_ON_ALARM,
MCFG_HDLC,
@@ -486,7 +468,6 @@
MCFG_INTERNATIONALPREFIX,
MCFG_PRESENTATION,
MCFG_SCREEN,
- MCFG_ALWAYS_IMMEDIATE,
MCFG_NODIALTONE,
MCFG_IMMEDIATE,
MCFG_SENDDTMF,
@@ -494,7 +475,6 @@
MCFG_EARLY_BCONNECT,
MCFG_INCOMING_EARLY_AUDIO,
MCFG_ECHOCANCEL,
- MCFG_ECHOCANCELWHENBRIDGED,
MCFG_NEED_MORE_INFOS,
MCFG_JITTERBUFFER,
MCFG_JITTERBUFFER_UPPER_THRES,
@@ -2279,12 +2259,11 @@
config_bc_echocancel(bc);
cm_get_int(misdn_cm, ch->incoming_early_audio, PORT, MCFG_INCOMING_EARLY_AUDIO, bc->port);
- cm_get_int(misdn_cm, ch->far_alerting, PORT, MCFG_FAR_ALERTING, bc->port);
cm_get_int(misdn_cm, ch->jb_len, PORT, MCFG_JITTERBUFFER, bc->port);
cm_get_int(misdn_cm, ch->jb_upper_threshold, PORT, MCFG_JITTERBUFFER_UPPER_THRES, bc->port);
cm_get(misdn_cm, ch->allowed_bearers, sizeof(ch->allowed_bearers), PORT, MCFG_ALLOWED_BEARERS, bc->port);
cm_get(misdn_cm, ch->context, sizeof(ch->context), PORT, MCFG_CONTEXT, bc->port);
- ast_copy_string (ast->context, ch->context, sizeof(ast->context));
+ ast_copy_string(ast->context, ch->context, sizeof(ast->context));
ch->overlap_dial_task = -1;
config_ch_hdlc(ch);
config_ch_jitterbuffer(ch);
@@ -2640,7 +2619,7 @@
/** we should have l3id after sending setup **/
ch->l3id = newbc->l3_id;
-
+
if (r == -ENOCHAN) {
chan_misdn_log(0, port, " --> * Theres no Channel at the moment .. !\n");
chan_misdn_log(1, port, " --> * SEND: State Down pid:%d\n", newbc ? newbc->pid : -1);
@@ -2670,7 +2649,6 @@
struct ast_frame *f;
int to = -1,
bridging = 0,
- ecwb = 0,
ec = 0;
ch1 = get_chan_by_ast(c0);
@@ -2684,16 +2662,14 @@
cm_get_int(misdn_cm, bridging, GENERAL, MCFG_BRIDGING);
if (bridging) {
- cm_get_int(misdn_cm, ecwb, PORT, MCFG_ECHOCANCELWHENBRIDGED, ch1->bc->port);
cm_get_int(misdn_cm, ec, PORT, MCFG_ECHOCANCEL, ch1->bc->port);
- if (!ecwb && ec) {
+ if (ec) {
chan_misdn_log(2, ch1->bc->port, "Disabling Echo Cancellor when Bridged\n");
ch1->bc->ec_enable = 0;
manager_ec_disable(ch1->bc);
}
- cm_get_int(misdn_cm, ecwb, PORT, MCFG_ECHOCANCELWHENBRIDGED, ch2->bc->port);
cm_get_int(misdn_cm, ec, PORT, MCFG_ECHOCANCEL, ch2->bc->port);
- if (!ecwb && ec) {
+ if (ec) {
chan_misdn_log(2, ch2->bc->port, "Disabling Echo Cancellor when Bridged\n");
ch2->bc->ec_enable = 0;
manager_ec_disable(ch2->bc);
@@ -2755,11 +2731,11 @@
const char *varcause;
int tmpcause;
+ if (!ast || !(p = MISDN_ASTERISK_TECH_PVT(ast)))
+ return -1;
+
if (option_debug)
ast_log(LOG_DEBUG, "misdn_hangup(%s)\n", ast->name);
-
- if (!ast || !(p = MISDN_ASTERISK_TECH_PVT(ast)))
- return -1;
bc = p->bc;
MISDN_ASTERISK_TECH_PVT(ast) = NULL;
@@ -3332,10 +3308,7 @@
break;
case EVENT_INFORMATION:
{
- int stop_tone = 0;
- cm_get_int(misdn_cm, stop_tone, GENERAL, MCFG_STOP_TONE_AFTER_FIRST_DIGIT);
- if (stop_tone)
- stop_indicate(ch);
+ stop_indicate(ch);
if (ch->state == MISDN_WAITING4DIGS) {
/* Ok, incomplete Setup, waiting till extension exists */
if (ast_strlen_zero(bc->info_dad) && !ast_strlen_zero(bc->keypad)) {
@@ -3391,15 +3364,11 @@
} else if (ch->state != MISDN_CONNECTED) {
/* sending INFOS as DTMF-Frames */
struct ast_frame fr;
- int digits = 0;
- cm_get_int(misdn_cm, digits, GENERAL, MCFG_APPEND_DIGITS2EXTEN);
- if (digits) {
- strncat(bc->dad, bc->info_dad, sizeof(bc->dad));
- bc->dad[sizeof(bc->dad) - 1] = 0;
- strncpy(ch->ast->exten, bc->dad, sizeof(ch->ast->exten));
- ch->ast->exten[sizeof(ch->ast->exten) - 1] = 0;
- ast_cdr_update(ch->ast);
- }
+ strncat(bc->dad, bc->info_dad, sizeof(bc->dad));
+ bc->dad[sizeof(bc->dad) - 1] = 0;
+ strncpy(ch->ast->exten, bc->dad, sizeof(ch->ast->exten));
+ ch->ast->exten[sizeof(ch->ast->exten) - 1] = 0;
+ ast_cdr_update(ch->ast);
memset(&fr, 0, sizeof(fr));
fr.frametype = AST_FRAME_DTMF;
fr.subclass = bc->info_dad[0] ;
@@ -3418,16 +3387,14 @@
pres,
screen,
i,
- ai,
im,
- stop_tone,
dad_len;
if (ch) {
if (ch->state == MISDN_NOTHING)
ch = NULL;
else {
- chan_misdn_log(1, bc->port, " --> Ignoring Call we have already one\n");
+ chan_misdn_log(1, bc->port, " --> Ignoring Call we already have one\n");
return RESPONSE_IGNORE_SETUP_WITHOUT_CLOSE;
}
}
@@ -3502,7 +3469,6 @@
pbx_builtin_setvar_helper(chan, "CALLTYPE", bc->capability == INFO_CAPABILITY_DIGITAL_UNRESTRICTED ? "DIGITAL" : "SPEECH");
cl_queue_chan(&cl_te, ch) ;
-
if (!strstr(ch->allowed_bearers, "all"))
for (i = 0; i < sizeof(allowed_bearers) / sizeof(struct allowed_bearer); ++i)
if (allowed_bearers[i].cap == bc->capability && !strstr(ch->allowed_bearers, allowed_bearers[i].name)) {
@@ -3524,15 +3490,6 @@
hangup_chan(ch);
ch->ast = NULL;
}
- break;
- }
-
- /* added support for s extension hope it will help those poor cretains
- * which haven't overlap dial. */
- ai = 0;
- cm_get_int(misdn_cm, ai, PORT, MCFG_ALWAYS_IMMEDIATE, bc->port);
- if (ai) {
- do_immediate_setup(bc, ch, chan);
break;
}
@@ -3578,10 +3535,8 @@
ast_log(LOG_WARNING, "Channel was catched before we could acknowledge!\n");
misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE);
}
- stop_tone = 0,
- cm_get_int(misdn_cm, stop_tone, GENERAL, MCFG_STOP_TONE_AFTER_FIRST_DIGIT);
dad_len = ast_strlen_zero(bc->dad);
- if (!dad_len && stop_tone)
+ if (!dad_len)
stop_indicate(ch);
else
dialtone_indicate(ch);
@@ -3634,13 +3589,8 @@
if (misdn_cap_is_speech(bc->capability) && misdn_inband_avail(bc)) {
cb_log(1, bc->port, "Starting tones, we have inband data.\n");
start_bc_tones(ch);
- } else {
+ } else
cb_log(1, bc->port, "We have no inband Data, the other end must create ringing.\n");
- if (ch->far_alerting) {
- cb_log(1, bc->port, "The other end can not do ringing, eh? We do it ourself, as usual!");
- start_bc_tones(ch);
- }
- }
break;
case EVENT_CONNECT:
{
More information about the asterisk-commits
mailing list