Index: channels/chan_zap.c =================================================================== --- channels/chan_zap.c (revisiĆ³n: 130851) +++ channels/chan_zap.c (copia de trabajo) @@ -423,6 +423,7 @@ static int mfcr2_cur_call_files = 0; static int mfcr2_cur_allow_collect_calls = 0; static int mfcr2_cur_double_answer = 0; +static int mfcr2_cur_immediate_accept = 0; static char mfcr2_cur_logdir[OR2_MAX_LOGDIR]; static openr2_log_level_t mfcr2_cur_loglevel = OR2_LOG_ERROR | OR2_LOG_WARNING; static openr2_calling_party_category_t mfcr2_cur_category = OR2_CALLING_PARTY_CATEGORY_NATIONAL_SUBSCRIBER; @@ -8856,6 +8857,7 @@ openr2_context_set_mf_back_timeout(zap_r2->protocol_context, mfcr2_cur_mfback_timeout); openr2_context_set_metering_pulse_timeout(zap_r2->protocol_context, mfcr2_cur_metering_pulse_timeout); openr2_context_set_double_answer(zap_r2->protocol_context, mfcr2_cur_double_answer); + openr2_context_set_immediate_accept(zap_r2->protocol_context, mfcr2_cur_immediate_accept); if (ast_strlen_zero(mfcr2_cur_logdir)) { if (openr2_context_set_log_directory(zap_r2->protocol_context, tmplogdir)) { ast_log(LOG_ERROR, "Failed setting default MFC/R2 log directory %s\n", tmplogdir); @@ -12540,10 +12542,10 @@ static char *handle_mfcr2_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { -#define FORMAT "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s\n" -#define FORMAT2 "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s\n" +#define FORMAT "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-20.20s %-10.10s %-10.10s\n" +#define FORMAT2 "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-20.20s %-10.10s %-10.10s\n" int filtertype = 0; - int targetnum; + int targetnum = 0; char channo[5]; char anino[5]; char dnisno[5]; @@ -12576,7 +12578,7 @@ return CLI_SHOWUSAGE; } } - ast_cli(a->fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Tx State", "Rx State"); + ast_cli(a->fd, FORMAT, "Chan", "Variant", "Max ANI", "Max DNIS", "ANI First", "Immediate Accept", "Tx State", "Rx State"); ast_mutex_lock(&iflock); p = iflist; while (p) { @@ -12609,6 +12611,7 @@ snprintf(dnisno, sizeof(dnisno), "%d", openr2_context_get_max_dnis(r2context)); ast_cli(a->fd, FORMAT, channo, openr2_proto_get_variant_string(r2variant), anino, dnisno, openr2_context_get_ani_first(r2context) ? "Yes" : "No", + openr2_context_get_immediate_accept(r2context) ? "Yes" : "No", openr2_proto_get_tx_state_string(p->r2chan), openr2_proto_get_rx_state_string(p->r2chan)); p = p->next; } @@ -13195,6 +13198,7 @@ ast_cli(a->fd, "MFC/R2 Max ANI: %d\n", openr2_context_get_max_ani(r2context)); ast_cli(a->fd, "MFC/R2 Max DNIS: %d\n", openr2_context_get_max_dnis(r2context)); ast_cli(a->fd, "MFC/R2 Get ANI First: %s\n", openr2_context_get_ani_first(r2context) ? "Yes" : "No"); + ast_cli(a->fd, "MFC/R2 Immediate Accept: %s\n", openr2_context_get_immediate_accept(r2context) ? "Yes" : "No"); ast_cli(a->fd, "MFC/R2 MF Back Timeout: %dms\n", openr2_context_get_mf_back_timeout(r2context)); ast_cli(a->fd, "MFC/R2 R2 Metering Pulse Timeout: %dms\n", openr2_context_get_metering_pulse_timeout(r2context)); ast_cli(a->fd, "MFC/R2 Rx State: %s\n", openr2_proto_get_rx_state_string(tmp->r2chan)); @@ -15149,6 +15153,8 @@ mfcr2_cur_double_answer = ast_true(v->value); } else if (!strcasecmp(v->name, "mfcr2_allow_collect_calls")) { mfcr2_cur_allow_collect_calls = ast_true(v->value); + } else if (!strcasecmp(v->name, "mfcr2_immediate_accept")) { + mfcr2_cur_immediate_accept = ast_true(v->value); } else if (!strcasecmp(v->name, "mfcr2_call_files")) { mfcr2_cur_call_files = ast_true(v->value); } else if (!strcasecmp(v->name, "mfcr2_max_ani")) {