]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add BKW's fix so that MOH doesn't get killed on Call Parking
authorMalcolm Davenport <malcolmd@digium.com>
Tue, 3 Aug 2004 14:09:48 +0000 (14:09 +0000)
committerMalcolm Davenport <malcolmd@digium.com>
Tue, 3 Aug 2004 14:09:48 +0000 (14:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3573 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_features.c

index b8639f6146d08b2933163218a5f0232e3fc2af7f..f9a3025df4819ac9b575ec23bccaf358a7cdd735 100755 (executable)
@@ -481,6 +481,7 @@ static void *do_parking_thread(void *ignore)
        char exten[AST_MAX_EXTENSION];
        struct ast_context *con;
        int x;
+       int gc=0;
        fd_set rfds, efds;
        fd_set nrfds, nefds;
        FD_ZERO(&rfds);
@@ -501,6 +502,10 @@ static void *do_parking_thread(void *ignore)
                                pu = pu->next;
                                continue;
                        }
+                       if (gc < 5 && !pu->chan->generator) {
+                               gc++;
+                               ast_moh_start(pu->chan,NULL);
+                       }
                        tms = (tv.tv_sec - pu->start.tv_sec) * 1000 + (tv.tv_usec - pu->start.tv_usec) / 1000;
                        if (tms > pu->parkingtime) {
                                /* They've been waiting too long, send them back to where they came.  Theoretically they