[asterisk-commits] rmudgett: branch 11 r372523 - in /branches/11: ./ channels/sig_pri.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 6 17:12:47 CDT 2012


Author: rmudgett
Date: Thu Sep  6 17:12:46 2012
New Revision: 372523

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372523
Log:
Fix loss of MOH on an ISDN channel when parking a call for the second time.

Using the AMI redirect action to take an ISDN call out of a parking lot
causes the MOH state to get confused.  The redirect action does not take
the call off of hold.  When the call is subsequently parked again, the
call no longer hears MOH.

* Make chan_dahdi/sig_pri restart MOH on repeated AST_CONTROL_HOLD frames
if it is already in a state where it is supposed to be sending MOH.  The
MOH may have been stopped by other means.  (Such as killing the generator.)

This simple fix is done rather than making the AMI redirect action post an
AST_CONTROL_UNHOLD unconditionally when it redirects a channel and thus
potentially breaking something with an unexpected AST_CONTROL_UNHOLD.

(closes issue ABE-2873)
Patches:
      jira_abe_2873_c.3_bier.patch (license #5621) patch uploaded by rmudgett
........

Merged revisions 372521 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

Merged revisions 372522 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    branches/11/   (props changed)
    branches/11/channels/sig_pri.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: branches/11/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/sig_pri.c?view=diff&rev=372523&r1=372522&r2=372523
==============================================================================
--- branches/11/channels/sig_pri.c (original)
+++ branches/11/channels/sig_pri.c Thu Sep  6 17:12:46 2012
@@ -4752,6 +4752,12 @@
 
 	next_state = pvt->moh_state;
 	switch (event) {
+	case SIG_PRI_MOH_EVENT_HOLD:
+		if (strcasecmp(pvt->mohinterpret, "passthrough")) {
+			/* Restart MOH in case it was stopped by other means. */
+			ast_moh_start(chan, pvt->moh_suggested, pvt->mohinterpret);
+		}
+		break;
 	case SIG_PRI_MOH_EVENT_UNHOLD:
 		pri_notify(pvt->pri->pri, pvt->call, pvt->prioffset, PRI_NOTIFY_REMOTE_RETRIEVAL);
 		/* Fall through */
@@ -4786,6 +4792,10 @@
 
 	next_state = pvt->moh_state;
 	switch (event) {
+	case SIG_PRI_MOH_EVENT_HOLD:
+		/* Restart MOH in case it was stopped by other means. */
+		ast_moh_start(chan, pvt->moh_suggested, pvt->mohinterpret);
+		break;
 	case SIG_PRI_MOH_EVENT_RESET:
 	case SIG_PRI_MOH_EVENT_UNHOLD:
 		ast_moh_stop(chan);




More information about the asterisk-commits mailing list