[asterisk-commits] russell: branch russell/parking_updates r114620 - /team/russell/parking_updat...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 24 14:39:09 CDT 2008


Author: russell
Date: Thu Apr 24 14:39:07 2008
New Revision: 114620

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114620
Log:
Add an option to use ringing instead of MOH for parked callers

Modified:
    team/russell/parking_updates/main/features.c

Modified: team/russell/parking_updates/main/features.c
URL: http://svn.digium.com/view/asterisk/team/russell/parking_updates/main/features.c?view=diff&rev=114620&r1=114619&r2=114620
==============================================================================
--- team/russell/parking_updates/main/features.c (original)
+++ team/russell/parking_updates/main/features.c Thu Apr 24 14:39:07 2008
@@ -423,6 +423,10 @@
 	return AST_DEVICE_INUSE;
 }
 
+enum park_call_options {
+	PARK_OPT_RINGING = (1 << 0),
+};
+
 struct park_call_args {
 	int timeout;
 	int *extout;
@@ -431,6 +435,7 @@
 	const char *return_con;
 	const char *return_ext;
 	int return_pri;
+	uint32_t flags;
 };
 
 /* Park a call */
@@ -508,9 +513,13 @@
 	
 	/* Put the parked channel on hold if we have two different channels */
 	if (chan != peer) {
-		ast_indicate_data(pu->chan, AST_CONTROL_HOLD, 
-			S_OR(args->parkinglot->mohclass, NULL),
-			!ast_strlen_zero(args->parkinglot->mohclass) ? strlen(args->parkinglot->mohclass) + 1 : 0);
+		if (ast_test_flag(args, PARK_OPT_RINGING)) {
+			ast_indicate(pu->chan, AST_CONTROL_RINGING);
+		} else {
+			ast_indicate_data(pu->chan, AST_CONTROL_HOLD, 
+				S_OR(args->parkinglot->mohclass, NULL),
+				!ast_strlen_zero(args->parkinglot->mohclass) ? strlen(args->parkinglot->mohclass) + 1 : 0);
+		}
 	}
 	
 	pu->start = ast_tvnow();




More information about the asterisk-commits mailing list