aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/autoservice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index dc5ad81bf..f6887f638 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -90,8 +90,11 @@ static void *autoservice_run(void *ign)
if (chan) {
struct ast_frame *f = ast_read(chan);
- if (!f)
+ if (!f) {
+ /* NULL means we got a hangup*/
+ ast_queue_hangup(chan);
continue;
+ }
/* Do not add a default entry in this switch statement. Each new
* frame type should be addressed directly as to whether it should