diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2009-02-06 01:09:13 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2009-02-06 01:09:13 +0000 |
commit | fe6b673032ea49583740cf167f2d003e8af8c2f7 (patch) | |
tree | 2f9b26f967047f5b5428cc4903a98f58485183c6 /net/asterisk/files/feature_disconnect.diff | |
parent | - Update FileZilla to version 3.2.0. (diff) |
Update to 1.4.23.1.
Diffstat (limited to 'net/asterisk/files/feature_disconnect.diff')
-rw-r--r-- | net/asterisk/files/feature_disconnect.diff | 123 |
1 files changed, 60 insertions, 63 deletions
diff --git a/net/asterisk/files/feature_disconnect.diff b/net/asterisk/files/feature_disconnect.diff index 051ccddf5a31..550aa33a7d04 100644 --- a/net/asterisk/files/feature_disconnect.diff +++ b/net/asterisk/files/feature_disconnect.diff @@ -1,6 +1,6 @@ ---- apps/app_dial.c.orig 2008-08-06 02:13:20.000000000 +0300 -+++ apps/app_dial.c 2009-01-06 16:54:27.000000000 +0200 -@@ -303,6 +303,8 @@ +--- apps/app_dial.c.orig 2008-12-20 00:30:32.000000000 +0200 ++++ apps/app_dial.c 2009-01-27 13:44:30.000000000 +0200 +@@ -311,6 +311,8 @@ OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | OPT_CALLER_PARK) && \ !chan->audiohooks && !peer->audiohooks) @@ -9,7 +9,7 @@ /* We define a custom "local user" structure because we use it not only for keeping track of what is in use but also for keeping track of who we're dialing. */ -@@ -732,9 +734,9 @@ +@@ -740,9 +742,9 @@ } if (ast_test_flag(peerflags, OPT_CALLER_HANGUP) && @@ -21,7 +21,7 @@ *to=0; ast_cdr_noanswer(in->cdr); strcpy(status, "CANCEL"); -@@ -775,6 +777,56 @@ +@@ -783,6 +785,56 @@ return peer; } @@ -78,11 +78,11 @@ static void replace_macro_delimiter(char *s) { for (; *s; s++) ---- include/asterisk/features.h.orig 2007-08-23 23:16:41.000000000 +0300 -+++ include/asterisk/features.h 2009-01-06 16:54:27.000000000 +0200 -@@ -31,6 +31,20 @@ - #define FEATURE_EXTEN_LEN 32 - #define FEATURE_MOH_LEN 80 /* same as MAX_MUSICCLASS from channel.h */ +--- include/asterisk/features.h.orig 2008-11-02 21:51:17.000000000 +0200 ++++ include/asterisk/features.h 2009-01-27 13:44:30.000000000 +0200 +@@ -35,6 +35,20 @@ + + #define PARK_APP_NAME "Park" +#define FEATURE_RETURN_HANGUP -1 +#define FEATURE_RETURN_SUCCESSBREAK 0 @@ -101,7 +101,7 @@ /*! \brief main call feature structure */ struct ast_call_feature { int feature_mask; -@@ -38,7 +52,7 @@ +@@ -42,7 +56,7 @@ char sname[FEATURE_SNAME_LEN]; char exten[FEATURE_MAX_LEN]; char default_exten[FEATURE_MAX_LEN]; @@ -110,7 +110,7 @@ unsigned int flags; char app[FEATURE_APP_LEN]; char app_args[FEATURE_APP_ARGS_LEN]; -@@ -47,6 +61,12 @@ +@@ -51,6 +65,12 @@ }; @@ -123,7 +123,7 @@ /*! \brief Park a call and read back parked location * \param chan the channel to actually be parked -@@ -94,4 +114,10 @@ +@@ -98,4 +118,10 @@ \param feature the ast_call_feature object which was registered before*/ void ast_unregister_feature(struct ast_call_feature *feature); @@ -134,28 +134,25 @@ + + #endif /* _AST_FEATURES_H */ ---- res/res_features.c.orig 2008-09-09 18:40:24.000000000 +0300 -+++ res/res_features.c 2009-01-06 16:58:57.000000000 +0200 -@@ -517,18 +517,6 @@ +--- res/res_features.c.orig 2009-01-27 13:45:07.000000000 +0200 ++++ res/res_features.c 2009-01-27 13:51:36.000000000 +0200 +@@ -536,15 +536,6 @@ + { + return masq_park_call(rchan, peer, timeout, extout, 1, orig_chan_name); } - - --#define FEATURE_RETURN_HANGUP -1 --#define FEATURE_RETURN_SUCCESSBREAK 0 --#define FEATURE_RETURN_PBX_KEEPALIVE AST_PBX_KEEPALIVE --#define FEATURE_RETURN_NO_HANGUP_PEER AST_PBX_NO_HANGUP_PEER --#define FEATURE_RETURN_PASSDIGITS 21 --#define FEATURE_RETURN_STOREDIGITS 22 --#define FEATURE_RETURN_SUCCESS 23 --#define FEATURE_RETURN_KEEPTRYING 24 +-#define FEATURE_RETURN_HANGUP -1 +-#define FEATURE_RETURN_SUCCESSBREAK 0 +-#define FEATURE_RETURN_PASSDIGITS 21 +-#define FEATURE_RETURN_STOREDIGITS 22 +-#define FEATURE_RETURN_SUCCESS 23 +-#define FEATURE_RETURN_KEEPTRYING 24 - -#define FEATURE_SENSE_CHAN (1 << 0) -#define FEATURE_SENSE_PEER (1 << 1) -- + /*! \brief * set caller and callee according to the direction - */ -@@ -1126,33 +1114,36 @@ +@@ -1143,33 +1134,36 @@ return res; } @@ -178,7 +175,7 @@ - struct ast_flags features; struct ast_call_feature *feature; - const char *dynamic_features; -+ const char *dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"); ++ const char *dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"); char *tmp, *tok; int res = FEATURE_RETURN_PASSDIGITS; int feature_detected = 0; @@ -203,36 +200,36 @@ /* Feature is up for consideration */ if (!strcmp(builtin_features[x].exten, code)) { - res = builtin_features[x].operation(chan, peer, config, code, sense, NULL); -+ result->builtin_feature = &builtin_features[x]; ++ result->builtin_feature = &builtin_features[x]; feature_detected = 1; break; } else if (!strncmp(builtin_features[x].exten, code, strlen(code))) { -@@ -1169,9 +1160,7 @@ +@@ -1186,9 +1180,7 @@ tmp = ast_strdupa(dynamic_features); while ((tok = strsep(&tmp, "#"))) { -- AST_LIST_LOCK(&feature_list); +- AST_RWLIST_RDLOCK(&feature_list); if (!(feature = find_dynamic_feature(tok))) { -- AST_LIST_UNLOCK(&feature_list); +- AST_RWLIST_UNLOCK(&feature_list); continue; } -@@ -1179,21 +1168,52 @@ +@@ -1196,21 +1188,52 @@ if (!strcmp(feature->exten, code)) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 " Feature Found: %s exten: %s\n",feature->sname, tok); - res = feature->operation(chan, peer, config, code, sense, feature); - if (res != FEATURE_RETURN_KEEPTRYING) { -- AST_LIST_UNLOCK(&feature_list); -+ result->dynamic_features[result->num_dyn_features++] = feature; -+ if (result->num_dyn_features >= (sizeof(result->dynamic_features) / sizeof(result->dynamic_features[0]))) { +- AST_RWLIST_UNLOCK(&feature_list); ++ result->dynamic_features[result->num_dyn_features++] = feature; ++ if (result->num_dyn_features >= (sizeof(result->dynamic_features) / sizeof(result->dynamic_features[0]))) { break; } res = FEATURE_RETURN_PASSDIGITS; } else if (!strncmp(feature->exten, code, strlen(code))) res = FEATURE_RETURN_STOREDIGITS; -- AST_LIST_UNLOCK(&feature_list); +- AST_RWLIST_UNLOCK(&feature_list); } return res; @@ -240,35 +237,35 @@ +static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense) +{ -+ struct feature_interpret_result result; -+ int x; -+ struct ast_flags features; -+ int res = FEATURE_RETURN_PASSDIGITS; -+ struct ast_call_feature *feature; ++ struct feature_interpret_result result; ++ int x; ++ struct ast_flags features; ++ int res = FEATURE_RETURN_PASSDIGITS; ++ struct ast_call_feature *feature; + -+ if (sense == FEATURE_SENSE_CHAN) -+ ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL); -+ else -+ ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL); -+ if (option_debug > 2) -+ ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%d\n", chan->name, peer->name, sense, features.flags); ++ if (sense == FEATURE_SENSE_CHAN) ++ ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL); ++ else ++ ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL); ++ if (option_debug > 2) ++ ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%d\n", chan->name, peer->name, sense, features.flags); + -+ ast_features_lock(); -+ res = ast_feature_detect(chan, &features, code, &result); ++ ast_features_lock(); ++ res = ast_feature_detect(chan, &features, code, &result); + -+ if (result.builtin_feature) -+ res = result.builtin_feature->operation(chan, peer, config, code, sense, NULL); ++ if (result.builtin_feature) ++ res = result.builtin_feature->operation(chan, peer, config, code, sense, NULL); + -+ for (x = 0; x < result.num_dyn_features; ++x) { -+ feature = result.dynamic_features[x]; -+ res = feature->operation(chan, peer, config, code, sense, feature); -+ if (res != FEATURE_RETURN_KEEPTRYING) -+ break; -+ res = FEATURE_RETURN_PASSDIGITS; -+ } ++ for (x = 0; x < result.num_dyn_features; ++x) { ++ feature = result.dynamic_features[x]; ++ res = feature->operation(chan, peer, config, code, sense, feature); ++ if (res != FEATURE_RETURN_KEEPTRYING) ++ break; ++ res = FEATURE_RETURN_PASSDIGITS; ++ } + -+ ast_features_unlock(); -+ return res; ++ ast_features_unlock(); ++ return res; +} + static void set_config_flags(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config) |