aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-13 11:58:16 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-13 11:58:16 +0000
commitf5e97674852e06b02f82995555854492bc4fc733 (patch)
tree543bf302da33498928f7a842df4c205f47832872 /channels/chan_misdn.c
parent4feece2ecc77beceaa5b6e48cee7d20814a7be2c (diff)
added method standard_dec for dialing out on groups, to avoid conflicts, which caused issues with some ISDN providers
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@58849 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 5714079fc..7910be6fc 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -2526,6 +2526,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat
char *tokb=NULL, *p=NULL;
int channel=0, port=0;
struct misdn_bchannel *newbc = NULL;
+ int dec=0;
struct chan_list *cl=init_chan_list(ORG_AST);
@@ -2554,23 +2555,27 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat
else {
port = atoi(port_str);
}
-
-
} else {
ast_log(LOG_WARNING, " --> ! IND : CALL dad:%s WITHOUT PORT/Group, check extension.conf\n",ext);
return NULL;
}
+ if (misdn_cfg_is_group_method(group, METHOD_STANDARD_DEC)) {
+ chan_misdn_log(0, port, " --> STARTING STANDARDDEC...\n");
+ dec=1;
+ }
+
if (!ast_strlen_zero(group)) {
char cfg_group[BUFFERSIZE+1];
struct robin_list *rr = NULL;
if (misdn_cfg_is_group_method(group, METHOD_ROUND_ROBIN)) {
- chan_misdn_log(4, port, " --> STARTING ROUND ROBIN...");
+ chan_misdn_log(4, port, " --> STARTING ROUND ROBIN...\n");
rr = get_robin_position(group);
}
+
if (rr) {
int robin_channel = rr->channel;
int port_start;
@@ -2612,7 +2617,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat
if ( port_up>0 ) {
- newbc = misdn_lib_get_free_bc(port, robin_channel,0);
+ newbc = misdn_lib_get_free_bc(port, robin_channel,0, 0);
if (newbc) {
chan_misdn_log(4, port, " Success! Found port:%d channel:%d\n", newbc->port, newbc->channel);
if (port_up)
@@ -2628,9 +2633,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat
if (!newbc)
chan_misdn_log(-1, port, " Failed! No free channel in group %d!", group);
- }
-
- else {
+ } else {
for (port=misdn_cfg_get_next_port(0); port > 0;
port=misdn_cfg_get_next_port(port)) {
@@ -2646,18 +2649,17 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat
chan_misdn_log(4, port, "portup:%d\n", port_up);
if ( port_up>0 ) {
- newbc = misdn_lib_get_free_bc(port, 0, 0);
+ newbc = misdn_lib_get_free_bc(port, 0, 0, dec);
if (newbc)
break;
}
}
}
}
-
} else {
if (channel)
chan_misdn_log(1, port," --> preselected_channel: %d\n",channel);
- newbc = misdn_lib_get_free_bc(port, channel, 0);
+ newbc = misdn_lib_get_free_bc(port, channel, 0, dec);
}
if (!newbc) {