[asterisk-commits] rmudgett: branch 1.8 r375388 - /branches/1.8/main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 29 14:26:56 CDT 2012


Author: rmudgett
Date: Mon Oct 29 14:26:52 2012
New Revision: 375388

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375388
Log:
Fix the Park 'r' option when a channel parks itself.

When a channel uses the Park appliation to park itself with the 'r'
option, the channel hears music-on-hold instead of the requested ringing.

* Added a missing check for the 'r' option when a channel parks itself.

(closes issue ASTERISK-19382)
Reported by: James Stocks
Patches by: dsessions

Review: https://reviewboard.asterisk.org/r/2148/

Modified:
    branches/1.8/main/features.c

Modified: branches/1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/features.c?view=diff&rev=375388&r1=375387&r2=375388
==============================================================================
--- branches/1.8/main/features.c (original)
+++ branches/1.8/main/features.c Mon Oct 29 14:26:52 2012
@@ -1630,10 +1630,15 @@
 	}
 	if (peer == chan) { /* pu->notquiteyet = 1 */
 		/* Wake up parking thread if we're really done */
-		pu->hold_method = AST_CONTROL_HOLD;
-		ast_indicate_data(chan, AST_CONTROL_HOLD,
-			S_OR(pu->parkinglot->cfg.mohclass, NULL),
-			!ast_strlen_zero(pu->parkinglot->cfg.mohclass) ? strlen(pu->parkinglot->cfg.mohclass) + 1 : 0);
+		if (ast_test_flag(args, AST_PARK_OPT_RINGING)) {
+			pu->hold_method = AST_CONTROL_RINGING;
+			ast_indicate(chan, AST_CONTROL_RINGING);
+		} else {
+			pu->hold_method = AST_CONTROL_HOLD;
+			ast_indicate_data(chan, AST_CONTROL_HOLD,
+				S_OR(pu->parkinglot->cfg.mohclass, NULL),
+				!ast_strlen_zero(pu->parkinglot->cfg.mohclass) ? strlen(pu->parkinglot->cfg.mohclass) + 1 : 0);
+		}
 		pu->notquiteyet = 0;
 		pthread_kill(parking_thread, SIGURG);
 	}




More information about the asterisk-commits mailing list