Add BKW's fix so that MOH doesn't get killed on Call Parking
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3573 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
612f18f550
commit
eb2a6747d1
1 changed files with 5 additions and 0 deletions
|
@ -481,6 +481,7 @@ static void *do_parking_thread(void *ignore)
|
||||||
char exten[AST_MAX_EXTENSION];
|
char exten[AST_MAX_EXTENSION];
|
||||||
struct ast_context *con;
|
struct ast_context *con;
|
||||||
int x;
|
int x;
|
||||||
|
int gc=0;
|
||||||
fd_set rfds, efds;
|
fd_set rfds, efds;
|
||||||
fd_set nrfds, nefds;
|
fd_set nrfds, nefds;
|
||||||
FD_ZERO(&rfds);
|
FD_ZERO(&rfds);
|
||||||
|
@ -501,6 +502,10 @@ static void *do_parking_thread(void *ignore)
|
||||||
pu = pu->next;
|
pu = pu->next;
|
||||||
continue;
|
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;
|
tms = (tv.tv_sec - pu->start.tv_sec) * 1000 + (tv.tv_usec - pu->start.tv_usec) / 1000;
|
||||||
if (tms > pu->parkingtime) {
|
if (tms > pu->parkingtime) {
|
||||||
/* They've been waiting too long, send them back to where they came. Theoretically they
|
/* They've been waiting too long, send them back to where they came. Theoretically they
|
||||||
|
|
Reference in a new issue