bridging code cleanups:

code style, formatting
	use enum/symbolic constants for return codes
	efficiency improvements
	(zaptel) only disable DTMF detection once per bridge, not every frame
	(zaptel) ensure VPM DTMF detector is turned off during native bridge


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-08-09 01:59:59 +00:00
parent d9cb23cc90
commit ce7a1e4768
6 changed files with 355 additions and 322 deletions

View File

@@ -53,6 +53,13 @@ extern "C" {
#define AST_MAX_FDS 8
enum ast_bridge_result {
AST_BRIDGE_COMPLETE = 0,
AST_BRIDGE_FAILED = -1,
AST_BRIDGE_FAILED_NOWARN = -2,
AST_BRIDGE_RETRY = -3,
};
typedef unsigned long long ast_group_t;
struct ast_generator {
@@ -130,8 +137,8 @@ struct ast_channel_tech {
struct ast_frame * (* const exception)(struct ast_channel *chan);
/*! Bridge two channels of the same type together */
int (* const bridge)(struct ast_channel *c0, struct ast_channel *c1, int flags,
struct ast_frame **fo, struct ast_channel **rc);
enum ast_bridge_result (* const bridge)(struct ast_channel *c0, struct ast_channel *c1, int flags,
struct ast_frame **fo, struct ast_channel **rc);
/*! Indicate a particular condition (e.g. AST_CONTROL_BUSY or AST_CONTROL_RINGING or AST_CONTROL_CONGESTION */
int (* const indicate)(struct ast_channel *c, int condition);