aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-28 16:09:27 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-28 16:09:27 +0000
commit6c5eb73ec4337362c5cbf7486576eeb025442ef7 (patch)
tree16dc12afb9f1c97bb9fbbc1f61ed8f06b56188a9 /channels/chan_misdn.c
parente2de71f9c50852b5dddfbb705df823721bd8a70f (diff)
fixed bugs.digium.com bugs: #9157 and bugs.beronet.com bugs: #302, #303, #304
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@57034 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 1a3a5a29e..40231309b 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -1986,12 +1986,8 @@ static int misdn_indication(struct ast_channel *ast, int cond)
chan_misdn_log(1, p->bc->port, " --> * IND :\tcongestion pid:%d\n",p->bc?p->bc->pid:-1);
p->bc->out_cause=42;
- if (p->state != MISDN_CONNECTED) {
- start_bc_tones(p);
- misdn_lib_send_event( p->bc, EVENT_RELEASE);
- } else {
- misdn_lib_send_event( p->bc, EVENT_DISCONNECT);
- }
+ start_bc_tones(p);
+ misdn_lib_send_event( p->bc, EVENT_DISCONNECT);
if (p->bc->nt) {
hanguptone_indicate(p);
@@ -3385,7 +3381,9 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
if ( stop_tone ) {
stop_indicate(ch);
}
-
+
+ if (!ch->ast) break;
+
if (ch->state == MISDN_WAITING4DIGS ) {
/* Ok, incomplete Setup, waiting till extension exists */
@@ -4340,6 +4338,7 @@ int unload_module(void)
ast_cli_unregister(&cli_show_stacks);
ast_cli_unregister(&cli_port_block);
ast_cli_unregister(&cli_port_unblock);
+ ast_cli_unregister(&cli_restart_port);
ast_cli_unregister(&cli_restart_pid);
ast_cli_unregister(&cli_port_up);
ast_cli_unregister(&cli_port_down);