[asterisk-bugs] [Asterisk 0013507]: Crash in ast_cdr_start() during one-touch parking if parking extension set with PARKINGEXTEN already busy
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Sep 17 13:23:29 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13507
======================================================================
Reported By: mdu113
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13507
Category: CDR/General
Reproducibility: always
Severity: crash
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): 1.4
SVN Revision (number only!): 143270
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-09-17 11:57 CDT
Last Modified: 2008-09-17 13:23 CDT
======================================================================
Summary: Crash in ast_cdr_start() during one-touch parking if
parking extension set with PARKINGEXTEN already busy
Description:
This is related to issues http://bugs.digium.com/view.php?id=13425 and
http://bugs.digium.com/view.php?id=13364.
Each of the fixes for those issues fix their respective problems, but when
they applied together they causes crash if one-touch parking fails due to
PARKINGEXTEN pointing to already taken parking extension.
Scenario: A calls B (PARKINGEXTEN=701 set). B dials feature code to park
A. A is parked at 701 at parkedcalls. Now C calls B (PARKINGEXTEN=701 set). B
dials feature code to park C. Asterisk prints a warning:
[Sep 17 13:00:47] WARNING[4715]: res_features.c:338 park_call_full:
Requested parking extension already exists: 701 at parkedcalls
and crashes at this point.
======================================================================
----------------------------------------------------------------------
(0092629) mdu113 (reporter) - 2008-09-17 13:23
http://bugs.digium.com/view.php?id=13507#c92629
----------------------------------------------------------------------
One more detail. The crash doesn't happen if apply the following patch:
Index: res/res_features.c
===================================================================
--- res/res_features.c (revision 143334)
+++ res/res_features.c (working copy)
@@ -328,7 +328,7 @@
ast_log(LOG_WARNING, "PARKINGEXTEN does not
indicate a valid parking slot: '%s'.\n", parkingexten);
ast_mutex_unlock(&parking_lock);
free(pu);
- return 1; /* Continue execution if possible
*/
+ return -1; /* Continue execution if possible
*/
}
snprintf(pu->parkingexten, sizeof(pu->parkingexten), "%d",
x);
@@ -336,7 +336,7 @@
ast_mutex_unlock(&parking_lock);
free(pu);
ast_log(LOG_WARNING, "Requested parking extension
already exists: %s@%s\n", parkingexten, parking_con);
- return 1; /* Continue execution if possible
*/
+ return -1; /* Continue execution if possible
*/
}
} else {
/* Select parking space within range */
It also doesn't happen if I don't use PARKINGEXTEN and parking failed
because all available parking spaces are busy.
So I guess the problem exists when pbx tries to continue execution after
parking failure.
Issue History
Date Modified Username Field Change
======================================================================
2008-09-17 13:23 mdu113 Note Added: 0092629
======================================================================
More information about the asterisk-bugs
mailing list