mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
added openr2 to menuselect-deps.in, recent commit in menuselect made me realize this was never done but was working anyways
also added support for skip category request feature of openr2 and updated chan_dahdi.conf.sample git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -36,6 +36,7 @@ PGSQL=@PBX_PGSQL@
|
|||||||
POPT=@PBX_POPT@
|
POPT=@PBX_POPT@
|
||||||
PORTAUDIO=@PBX_PORTAUDIO@
|
PORTAUDIO=@PBX_PORTAUDIO@
|
||||||
PRI=@PBX_PRI@
|
PRI=@PBX_PRI@
|
||||||
|
OPENR2=@PBX_OPENR2@
|
||||||
RESAMPLE=@PBX_RESAMPLE@
|
RESAMPLE=@PBX_RESAMPLE@
|
||||||
AIS=@PBX_AIS@
|
AIS=@PBX_AIS@
|
||||||
RADIUS=@PBX_RADIUS@
|
RADIUS=@PBX_RADIUS@
|
||||||
|
@@ -583,6 +583,7 @@ struct dahdi_mfcr2_conf {
|
|||||||
int max_ani;
|
int max_ani;
|
||||||
int max_dnis;
|
int max_dnis;
|
||||||
int get_ani_first:1;
|
int get_ani_first:1;
|
||||||
|
int skip_category_request:1;
|
||||||
int call_files:1;
|
int call_files:1;
|
||||||
int allow_collect_calls:1;
|
int allow_collect_calls:1;
|
||||||
int charge_calls:1;
|
int charge_calls:1;
|
||||||
@@ -1418,6 +1419,7 @@ static struct dahdi_chan_conf dahdi_chan_conf_default(void)
|
|||||||
.max_ani = 10,
|
.max_ani = 10,
|
||||||
.max_dnis = 4,
|
.max_dnis = 4,
|
||||||
.get_ani_first = -1,
|
.get_ani_first = -1,
|
||||||
|
.skip_category_request = -1,
|
||||||
.call_files = 0,
|
.call_files = 0,
|
||||||
.allow_collect_calls = 0,
|
.allow_collect_calls = 0,
|
||||||
.charge_calls = 1,
|
.charge_calls = 1,
|
||||||
@@ -5327,8 +5329,8 @@ static openr2_call_disconnect_cause_t dahdi_ast_cause_to_r2_cause(int cause)
|
|||||||
r2cause = OR2_CAUSE_NORMAL_CLEARING;
|
r2cause = OR2_CAUSE_NORMAL_CLEARING;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ast_log(LOG_DEBUG, "dahdi_ast_cause_to_r2_cause returned %d/%s for ast cause %d\n",
|
ast_log(LOG_DEBUG, "ast cause %d resulted in openr2 cause %d/%s\n",
|
||||||
r2cause, openr2_proto_get_disconnect_string(r2cause), cause);
|
cause, r2cause, openr2_proto_get_disconnect_string(r2cause));
|
||||||
return r2cause;
|
return r2cause;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -11080,6 +11082,7 @@ static int dahdi_r2_set_context(struct dahdi_mfcr2 *r2_link, const struct dahdi_
|
|||||||
}
|
}
|
||||||
openr2_context_set_log_level(r2_link->protocol_context, conf->mfcr2.loglevel);
|
openr2_context_set_log_level(r2_link->protocol_context, conf->mfcr2.loglevel);
|
||||||
openr2_context_set_ani_first(r2_link->protocol_context, conf->mfcr2.get_ani_first);
|
openr2_context_set_ani_first(r2_link->protocol_context, conf->mfcr2.get_ani_first);
|
||||||
|
openr2_context_set_skip_category_request(r2_link->protocol_context, conf->mfcr2.skip_category_request);
|
||||||
openr2_context_set_mf_threshold(r2_link->protocol_context, threshold);
|
openr2_context_set_mf_threshold(r2_link->protocol_context, threshold);
|
||||||
openr2_context_set_mf_back_timeout(r2_link->protocol_context, conf->mfcr2.mfback_timeout);
|
openr2_context_set_mf_back_timeout(r2_link->protocol_context, conf->mfcr2.mfback_timeout);
|
||||||
openr2_context_set_metering_pulse_timeout(r2_link->protocol_context, conf->mfcr2.metering_pulse_timeout);
|
openr2_context_set_metering_pulse_timeout(r2_link->protocol_context, conf->mfcr2.metering_pulse_timeout);
|
||||||
@@ -11301,7 +11304,8 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
|
|||||||
tmp->subs[SUB_REAL].dfd,
|
tmp->subs[SUB_REAL].dfd,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (!tmp->r2chan) {
|
if (!tmp->r2chan) {
|
||||||
ast_log(LOG_ERROR, "Cannot create OpenR2 channel.\n");
|
openr2_liberr_t err = openr2_context_get_last_error(r2_link->protocol_context);
|
||||||
|
ast_log(LOG_ERROR, "Cannot create OpenR2 channel: %s\n", openr2_context_error_string(err));
|
||||||
destroy_dahdi_pvt(&tmp);
|
destroy_dahdi_pvt(&tmp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -16193,6 +16197,7 @@ static char *dahdi_show_channel(struct ast_cli_entry *e, int cmd, struct ast_cli
|
|||||||
ast_cli(a->fd, "MFC/R2 Max ANI: %d\n", openr2_context_get_max_ani(r2context));
|
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 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 Get ANI First: %s\n", openr2_context_get_ani_first(r2context) ? "Yes" : "No");
|
||||||
|
ast_cli(a->fd, "MFC/R2 Skip Category Request: %s\n", openr2_context_get_skip_category_request(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 Immediate Accept: %s\n", openr2_context_get_immediate_accept(r2context) ? "Yes" : "No");
|
||||||
ast_cli(a->fd, "MFC/R2 Accept on Offer: %s\n", tmp->mfcr2_accept_on_offer ? "Yes" : "No");
|
ast_cli(a->fd, "MFC/R2 Accept on Offer: %s\n", tmp->mfcr2_accept_on_offer ? "Yes" : "No");
|
||||||
ast_cli(a->fd, "MFC/R2 Charge Calls: %s\n", tmp->mfcr2_charge_calls ? "Yes" : "No");
|
ast_cli(a->fd, "MFC/R2 Charge Calls: %s\n", tmp->mfcr2_charge_calls ? "Yes" : "No");
|
||||||
|
@@ -1000,8 +1000,19 @@ pickupgroup=1
|
|||||||
|
|
||||||
; ---------------- Options for use with signalling=mfcr2 --------------
|
; ---------------- Options for use with signalling=mfcr2 --------------
|
||||||
|
|
||||||
|
; MFC-R2 signaling has lots of variants from country to country and even sometimes
|
||||||
|
; minor variants inside the same country. The only mandatory parameters here are:
|
||||||
|
; mfcr2_variant, mfcr2_max_ani and mfcr2_max_dnis.
|
||||||
|
; IT IS RECOMMENDED that you leave the default values (leaving it commented) for the
|
||||||
|
; other parameters unless you have problems or you have been instructed to change some
|
||||||
|
; parameter. OpenR2 library uses the mfcr2_variant parameter to try to determine the
|
||||||
|
; best defaults for your country, also refer to the OpenR2 package directory
|
||||||
|
; doc/asterisk/ where you can find sample configurations for some countries. If you
|
||||||
|
; want to contribute your configs for a particular country send them to the e-mail
|
||||||
|
; of the primary OpenR2 developer that you can find in the AUTHORS file of the OpenR2 package
|
||||||
|
|
||||||
; MFC/R2 variant. This depends on the OpenR2 supported variants
|
; MFC/R2 variant. This depends on the OpenR2 supported variants
|
||||||
; A list of values can be found at libopenr2.org
|
; A list of values can be found by executing the openr2 command r2test -l
|
||||||
; some valid values are:
|
; some valid values are:
|
||||||
; ar (Argentina)
|
; ar (Argentina)
|
||||||
; br (Brazil)
|
; br (Brazil)
|
||||||
@@ -1010,17 +1021,17 @@ pickupgroup=1
|
|||||||
; itu (per ITU spec)
|
; itu (per ITU spec)
|
||||||
; mfcr2_variant=mx
|
; mfcr2_variant=mx
|
||||||
|
|
||||||
; whether or not to get the ANI before getting DNIS.
|
|
||||||
; some telcos require ANI first some others do not care
|
|
||||||
; if this go wrong, change this value
|
|
||||||
; mfcr2_get_ani_first=no
|
|
||||||
|
|
||||||
; Max amount of ANI to ask for
|
; Max amount of ANI to ask for
|
||||||
; mfcr2_max_ani=10
|
; mfcr2_max_ani=10
|
||||||
|
|
||||||
; Max amount of DNIS to ask for
|
; Max amount of DNIS to ask for
|
||||||
; mfcr2_max_dnis=4
|
; mfcr2_max_dnis=4
|
||||||
|
|
||||||
|
; whether or not to get the ANI before getting DNIS.
|
||||||
|
; some telcos require ANI first some others do not care
|
||||||
|
; if this go wrong, change this value
|
||||||
|
; mfcr2_get_ani_first=no
|
||||||
|
|
||||||
; Caller Category to send
|
; Caller Category to send
|
||||||
; national_subscriber
|
; national_subscriber
|
||||||
; national_priority_subscriber
|
; national_priority_subscriber
|
||||||
@@ -1120,6 +1131,9 @@ pickupgroup=1
|
|||||||
; or implicitly through the Answer() application.
|
; or implicitly through the Answer() application.
|
||||||
; mfcr2_accept_on_offer=yes
|
; mfcr2_accept_on_offer=yes
|
||||||
|
|
||||||
|
; Skip request of calling party category and ANI
|
||||||
|
; mfcr2_skip_category=no
|
||||||
|
|
||||||
; WARNING: advanced users only! I really mean it
|
; WARNING: advanced users only! I really mean it
|
||||||
; this parameter is commented by default because
|
; this parameter is commented by default because
|
||||||
; YOU DON'T NEED IT UNLESS YOU REALLY GROK MFC/R2
|
; YOU DON'T NEED IT UNLESS YOU REALLY GROK MFC/R2
|
||||||
|
Reference in New Issue
Block a user