]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix scenario where if a phone that simply called Echo() put itself on hold it could...
authorJoshua Colp <jcolp@digium.com>
Mon, 14 May 2007 17:23:51 +0000 (17:23 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 14 May 2007 17:23:51 +0000 (17:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@64240 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index f7e0df9b04a8438317a91260b16e9bea8ba35d22..093296b31e90734aa4e5a874481f59d1265372a6 100644 (file)
@@ -2726,8 +2726,11 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
                                res = ast_senddigit_end(chan, fr->subclass, fr->len);
                                ast_channel_lock(chan);
                                CHECK_BLOCKING(chan);
+                       } else if (fr->frametype == AST_FRAME_CONTROL && fr->subclass == AST_CONTROL_UNHOLD) {
+                               /* This is a side case where Echo is basically being called and the person put themselves on hold and took themselves off hold */
+                               res = (chan->tech->indicate == NULL) ? 0 :
+                                       chan->tech->indicate(chan, fr->subclass, fr->data, fr->datalen);
                        }
-
                        res = 0;        /* XXX explain, why 0 ? */
                        goto done;
                }