aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/features.h
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 05:01:00 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 05:01:00 +0000
commit6d700c596a033bff998725c22c179bf205b0212c (patch)
tree5f254ce954a02acbb73b4e76a4f675e21c6eb80e /include/asterisk/features.h
parent9259a0fd2921ee286b690c48bbd11ea50e3013a9 (diff)
Merged revisions 152535 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r152535 | murf | 2008-10-28 22:36:32 -0600 (Tue, 28 Oct 2008) | 46 lines The magic trick to avoid this crash is not to try to find the channel by name in the list, which is slow and resource consuming, but rather to pay attention to the result codes from the ast_bridge_call, to which I added the AST_PBX_NO_HANGUP_PEER_PARKED value, which now are returned when a channel is parked. Why? because CDR's aren't generated via parking, so nothing is needed, but if a transfer occurred, there are critical things I need. If you get AST_PBX_KEEPALIVE, then don't touch the channel pointer. If you get AST_PBX_NO_HANGUP_PEER, or AST_PBX_NO_HANGUP_PEER_PARKED, then don't touch the peer pointer. Updated the several places where the results from a bridge were not being properly obeyed, and fixed some code I had introduced so that the results of the bridge were not overridden (in trunk). All the places that previously tested for AST_PBX_NO_HANGUP_PEER now have to check for both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED. I tested this against the 4 common parking scenarios: 1. A calls B; B answers; A parks B; B hangs up while A is getting the parking slot announcement, immediately after being put on hold. 2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but before the park times out. 3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold. 4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out. No crash. I also ran the scenarios above against valgrind, and accesses looked good. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152536 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/features.h')
-rw-r--r--include/asterisk/features.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/asterisk/features.h b/include/asterisk/features.h
index 723373f94..20b26c3a8 100644
--- a/include/asterisk/features.h
+++ b/include/asterisk/features.h
@@ -61,14 +61,15 @@ struct ast_call_feature {
};
-#define AST_FEATURE_RETURN_HANGUP -1
-#define AST_FEATURE_RETURN_SUCCESSBREAK 0
-#define AST_FEATURE_RETURN_PBX_KEEPALIVE AST_PBX_KEEPALIVE
-#define AST_FEATURE_RETURN_NO_HANGUP_PEER AST_PBX_NO_HANGUP_PEER
-#define AST_FEATURE_RETURN_PASSDIGITS 21
-#define AST_FEATURE_RETURN_STOREDIGITS 22
-#define AST_FEATURE_RETURN_SUCCESS 23
-#define AST_FEATURE_RETURN_KEEPTRYING 24
+#define AST_FEATURE_RETURN_HANGUP -1
+#define AST_FEATURE_RETURN_SUCCESSBREAK 0
+#define AST_FEATURE_RETURN_PBX_KEEPALIVE AST_PBX_KEEPALIVE
+#define AST_FEATURE_RETURN_NO_HANGUP_PEER AST_PBX_NO_HANGUP_PEER
+#define AST_FEATURE_RETURN_NO_HANGUP_PEER_PARKED AST_PBX_NO_HANGUP_PEER_PARKED
+#define AST_FEATURE_RETURN_PASSDIGITS 21
+#define AST_FEATURE_RETURN_STOREDIGITS 22
+#define AST_FEATURE_RETURN_SUCCESS 23
+#define AST_FEATURE_RETURN_KEEPTRYING 24
/*!