aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 6b2a67aa4..98c982ba1 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -2468,8 +2468,14 @@ static int misdn_hangup(struct ast_channel *ast)
chan_misdn_log(2, bc->port, " --> state:%s\n", misdn_get_ch_state(p));
switch (p->state) {
- case MISDN_INCOMING_SETUP:
case MISDN_CALLING:
+ case MISDN_INCOMING_SETUP:
+ /* This is the only place in misdn_hangup, where we
+ * can call release_chan, else it might create lot's of trouble
+ * */
+ ast_log(LOG_NOTICE, "release channel, in CALLING/INCOMING_SETUP state.. no other events happened\n");
+ release_chan(bc);
+
p->state=MISDN_CLEANING;
misdn_lib_send_event( bc, EVENT_RELEASE_COMPLETE);
break;