[asterisk-commits] qwell: trunk r96574 - in /trunk: ./ res/res_features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 4 16:57:56 CST 2008
Author: qwell
Date: Fri Jan 4 16:57:56 2008
New Revision: 96574
URL: http://svn.digium.com/view/asterisk?view=rev&rev=96574
Log:
Merged revisions 96573 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
(Closes issue #11237)
........
r96573 | qwell | 2008-01-04 16:55:56 -0600 (Fri, 04 Jan 2008) | 4 lines
Properly continue in the dialplan if using PARKINGEXTEN and the slot is full.
Issue 11237, patch by me.
........
Modified:
trunk/ (props changed)
trunk/res/res_features.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?view=diff&rev=96574&r1=96573&r2=96574
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Fri Jan 4 16:57:56 2008
@@ -401,7 +401,7 @@
AST_LIST_UNLOCK(&parkinglot);
ast_free(pu);
ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parking_con);
- return 0; /* Continue execution if possible */
+ return 1; /* Continue execution if possible */
}
ast_copy_string(pu->parkingexten, parkingexten, sizeof(pu->parkingexten));
x = atoi(parkingexten);
@@ -2352,9 +2352,14 @@
* of a park--it is still theoretically possible for a transfer to happen before
* we get here, but it is _really_ unlikely */
char *orig_chan_name = ast_strdupa(chan->name);
+ char orig_exten[AST_MAX_EXTENSION];
+ int orig_priority = chan->priority;
+
/* Data is unused at the moment but could contain a parking
lot context eventually */
int res = 0;
+
+ ast_copy_string(orig_exten, chan->exten, sizeof(orig_exten));
/* Setup the exten/priority to be s/1 since we don't know
where this call should return */
@@ -2367,10 +2372,18 @@
if (!res)
res = ast_safe_sleep(chan, 1000);
/* Park the call */
- if (!res)
+ if (!res) {
res = park_call_full(chan, NULL, 0, NULL, orig_chan_name);
-
- return !res ? AST_PBX_KEEPALIVE : res;
+ /* Continue on in the dialplan */
+ if (res == 1) {
+ ast_copy_string(chan->exten, orig_exten, sizeof(chan->exten));
+ chan->priority = orig_priority;
+ res = 0;
+ } else if (!res)
+ res = AST_PBX_KEEPALIVE;
+ }
+
+ return res;
}
/*! \brief Pickup parked call */
More information about the asterisk-commits
mailing list