From: Matthew Fredrickson Date: Thu, 17 Mar 2005 23:48:42 +0000 (+0000) Subject: Fixed parking bug w/ chan_sip and loss of MOH X-Git-Tag: 1.0.11.1~194 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b30e9ee37fec3eac1d9ff20d51f268c2b4ad03a;p=thirdparty%2Fasterisk.git Fixed parking bug w/ chan_sip and loss of MOH git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5200 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_features.c b/res/res_features.c index 8bcc97dfb5..2271ebc8f3 100755 --- a/res/res_features.c +++ b/res/res_features.c @@ -103,6 +103,7 @@ struct parkeduser { int priority; int parkingtime; int notquiteyet; + unsigned char moh_trys; struct parkeduser *next; }; @@ -635,6 +636,11 @@ static void *do_parking_thread(void *ignore) } else { /* XXX Maybe we could do something with packets, like dial "0" for operator or something XXX */ ast_frfree(f); + if (pu->moh_trys < 3 && !pu->chan->generatordata) { + ast_log(LOG_DEBUG, "MOH on parked call stopped by outside source. Restarting\n"); + ast_moh_start(pu->chan, NULL); + pu->moh_trys++; + } goto std; /* XXX Ick: jumping into an else statement??? XXX */ } }