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

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


Author: russell
Date: Thu Apr 24 14:25:03 2008
New Revision: 114618

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114618
Log:
Add the ability to specify a custom return context/extension/priority to park_call_full

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=114618&r1=114617&r2=114618
==============================================================================
--- team/russell/parking_updates/main/features.c (original)
+++ team/russell/parking_updates/main/features.c Thu Apr 24 14:25:03 2008
@@ -428,6 +428,9 @@
 	int *extout;
 	const char *orig_chan_name;
 	struct ast_parkinglot *parkinglot;
+	const char *return_con;
+	const char *return_ext;
+	int return_pri;
 };
 
 /* Park a call */
@@ -522,9 +525,15 @@
 
 	/* Remember what had been dialed, so that if the parking
 	   expires, we try to come back to the same place */
-	ast_copy_string(pu->context, S_OR(chan->macrocontext, chan->context), sizeof(pu->context));
-	ast_copy_string(pu->exten, S_OR(chan->macroexten, chan->exten), sizeof(pu->exten));
-	pu->priority = chan->macropriority ? chan->macropriority : chan->priority;
+	ast_copy_string(pu->context, 
+		S_OR(args->return_con, S_OR(chan->macrocontext, chan->context)), 
+		sizeof(pu->context));
+	ast_copy_string(pu->exten, 
+		S_OR(args->return_ext, S_OR(chan->macroexten, chan->exten)), 
+		sizeof(pu->exten));
+	pu->priority = pu->priority ? pu->priority : 
+		(chan->macropriority ? chan->macropriority : chan->priority);
+
 	AST_LIST_INSERT_TAIL(&args->parkinglot->parkings, pu, list);
 
 	/* If parking a channel directly, don't quiet yet get parking running on it */




More information about the asterisk-commits mailing list