mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 00:41:02 +00:00
Merged revisions 59064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r59064 | crichter | 2007-03-20 14:16:06 +0100 (Di, 20 Mär 2007) | 21 lines Merged revisions 58849-58850,59062-59063 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r58849 | crichter | 2007-03-13 12:58:16 +0100 (Di, 13 Mär 2007) | 1 line added method standard_dec for dialing out on groups, to avoid conflicts, which caused issues with some ISDN providers ........ r58850 | crichter | 2007-03-13 13:58:32 +0100 (Di, 13 Mär 2007) | 1 line fixed the crypt_keys stuff ........ r59062 | crichter | 2007-03-20 10:18:06 +0100 (Di, 20 Mär 2007) | 1 line avoid sending a disconnect when we already received one. ........ r59063 | crichter | 2007-03-20 10:23:22 +0100 (Di, 20 Mär 2007) | 1 line modified a loglevel ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2972,6 +2972,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);
|
||||
|
||||
@@ -3000,23 +3001,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(4, 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;
|
||||
@@ -3058,7 +3063,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)
|
||||
@@ -3074,9 +3079,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)) {
|
||||
|
||||
@@ -3092,18 +3095,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) {
|
||||
@@ -4397,6 +4399,8 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
|
||||
cb_log(1,bc->port," --> found holded ch\n");
|
||||
misdn_transfer_bc(ch, holded_ch) ;
|
||||
}
|
||||
|
||||
bc->need_disconnect=0;
|
||||
|
||||
stop_bc_tones(ch);
|
||||
hangup_chan(ch);
|
||||
@@ -4413,6 +4417,9 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
|
||||
|
||||
case EVENT_RELEASE:
|
||||
{
|
||||
bc->need_disconnect=0;
|
||||
bc->need_release=0;
|
||||
|
||||
hangup_chan(ch);
|
||||
release_chan(bc);
|
||||
|
||||
@@ -4422,6 +4429,10 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
|
||||
break;
|
||||
case EVENT_RELEASE_COMPLETE:
|
||||
{
|
||||
bc->need_disconnect=0;
|
||||
bc->need_release=0;
|
||||
bc->need_release_complete=0;
|
||||
|
||||
stop_bc_tones(ch);
|
||||
hangup_chan(ch);
|
||||
release_chan(bc);
|
||||
|
Reference in New Issue
Block a user