diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-01-15 09:49:56 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-01-15 09:49:56 +0200 |
commit | 7cdcfc5ff0305f0a806fd5c5a483275f329bbfdb (patch) | |
tree | 206e79f70eda8e033286ce29b93d561c26a300c8 /main | |
parent | 583c334e3ee4a9ba5ea44250beee10a936780158 (diff) | |
download | aports-7cdcfc5ff0305f0a806fd5c5a483275f329bbfdb.tar.bz2 aports-7cdcfc5ff0305f0a806fd5c5a483275f329bbfdb.tar.xz |
main/asterisk: upgrade to 11.2.0
Rebase uclibc-daemon patch, and cherry-pick regression fix for
ASTERISK-20938.
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk/100-uclibc-daemon.patch | 8 | ||||
-rw-r--r-- | main/asterisk/APKBUILD | 8 | ||||
-rw-r--r-- | main/asterisk/ASTERISK-20938.patch | 104 |
3 files changed, 113 insertions, 7 deletions
diff --git a/main/asterisk/100-uclibc-daemon.patch b/main/asterisk/100-uclibc-daemon.patch index 4956791d4d..a1e2b0b20e 100644 --- a/main/asterisk/100-uclibc-daemon.patch +++ b/main/asterisk/100-uclibc-daemon.patch @@ -7,7 +7,7 @@ diff -Nru asterisk-1.6.1-beta4.org/main/asterisk.c asterisk-1.6.1-beta4/main/ast #ifndef HAVE_SBIN_LAUNCHD +#ifndef __UCLIBC__ if (daemon(1, 0) < 0) { - ast_log(LOG_ERROR, "daemon() failed: %s\n", strerror(errno)); + fprintf(stderr, "daemon() failed: %s\n", strerror(errno)); } +#else + /* @@ -39,6 +39,6 @@ diff -Nru asterisk-1.6.1-beta4.org/main/asterisk.c asterisk-1.6.1-beta4/main/ast + close(fd); + } +#endif - ast_mainpid = getpid(); - /* Blindly re-write pid file since we are forking */ - unlink(ast_config_AST_PID); + #else + fprintf(stderr, "Mac OS X detected. Use 'launchctl load /Library/LaunchDaemon/org.asterisk.asterisk.plist'.\n"); + #endif diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD index 91b98c2152..3243d0fa75 100644 --- a/main/asterisk/APKBUILD +++ b/main/asterisk/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Timo Teras <timo.teras@iki.fi> # Maintainer: Timo Teras <timo.teras@iki.fi> pkgname=asterisk -pkgver=11.1.2 +pkgver=11.2.0 pkgrel=0 pkgdesc="Asterisk: A Module Open Source PBX System" pkgusers="asterisk" @@ -25,6 +25,7 @@ source="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$ ASTERISK-18995.patch ASTERISK-19109.patch ASTERISK-20527.patch + ASTERISK-20938.patch asterisk.initd asterisk.confd asterisk.logrotate" @@ -181,12 +182,13 @@ sound_en() { chown -R asterisk:asterisk "$subpkgdir"/var/*/asterisk } -md5sums="e9f993a8d039100544bd8b748657922b asterisk-11.1.2.tar.gz -b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch +md5sums="3d3da6016e3b238cd7ea3bf0df51403d asterisk-11.2.0.tar.gz +38c46521ad8a1c06dd79e481cc50c82c 100-uclibc-daemon.patch 6e1129e30c4fd2c25c86c81685a485a9 101-caps-uclibc.patch bc6713f5434e07b79d3afdd155461d72 ASTERISK-18995.patch 146befabe95798a67c58d8ac00d397a6 ASTERISK-19109.patch 676ca42ee1859d8a7bae4345ede5eb89 ASTERISK-20527.patch +5b331be3746bb1ffd4c3f47df3ef6efa ASTERISK-20938.patch 74cd25a5638a94ef51e9f4ede2fd28f2 asterisk.initd ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd 3e65172275684373e1a25c8a11224411 asterisk.logrotate" diff --git a/main/asterisk/ASTERISK-20938.patch b/main/asterisk/ASTERISK-20938.patch new file mode 100644 index 0000000000..0b7b1664df --- /dev/null +++ b/main/asterisk/ASTERISK-20938.patch @@ -0,0 +1,104 @@ +diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c +index 687830b..e848cdc 100644 +--- a/apps/app_confbridge.c ++++ b/apps/app_confbridge.c +@@ -2092,6 +2092,16 @@ static char *handle_cli_confbridge_kick(struct ast_cli_entry *e, int cmd, struct + return CLI_SUCCESS; + } + ++static void handle_cli_confbridge_list_item(struct ast_cli_args *a, struct conference_bridge_user *participant) ++{ ++ ast_cli(a->fd, "%-29s ", ast_channel_name(participant->chan)); ++ ast_cli(a->fd, "%-17s", participant->u_profile.name); ++ ast_cli(a->fd, "%-17s", participant->b_profile.name); ++ ast_cli(a->fd, "%-17s", participant->menu_name); ++ ast_cli(a->fd, "%-17s", S_COR(ast_channel_caller(participant->chan)->id.number.valid, ast_channel_caller(participant->chan)->id.number.str, "<unknown>")); ++ ast_cli(a->fd, "\n"); ++} ++ + static char *handle_cli_confbridge_list(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) + { + struct ao2_iterator i; +@@ -2118,7 +2128,7 @@ static char *handle_cli_confbridge_list(struct ast_cli_entry *e, int cmd, struct + ast_cli(a->fd, "================================ ====== ====== ========\n"); + i = ao2_iterator_init(conference_bridges, 0); + while ((bridge = ao2_iterator_next(&i))) { +- ast_cli(a->fd, "%-32s %6i %6i %s\n", bridge->name, bridge->activeusers, bridge->markedusers, (bridge->locked ? "locked" : "unlocked")); ++ ast_cli(a->fd, "%-32s %6i %6i %s\n", bridge->name, bridge->activeusers + bridge->waitingusers, bridge->markedusers, (bridge->locked ? "locked" : "unlocked")); + ao2_ref(bridge, -1); + } + ao2_iterator_destroy(&i); +@@ -2136,12 +2146,10 @@ static char *handle_cli_confbridge_list(struct ast_cli_entry *e, int cmd, struct + ast_cli(a->fd, "============================= ================ ================ ================ ================\n"); + ao2_lock(bridge); + AST_LIST_TRAVERSE(&bridge->active_list, participant, list) { +- ast_cli(a->fd, "%-29s ", ast_channel_name(participant->chan)); +- ast_cli(a->fd, "%-17s", participant->u_profile.name); +- ast_cli(a->fd, "%-17s", participant->b_profile.name); +- ast_cli(a->fd, "%-17s", participant->menu_name); +- ast_cli(a->fd, "%-17s", S_COR(ast_channel_caller(participant->chan)->id.number.valid, ast_channel_caller(participant->chan)->id.number.str, "<unknown>")); +- ast_cli(a->fd, "\n"); ++ handle_cli_confbridge_list_item(a, participant); ++ } ++ AST_LIST_TRAVERSE(&bridge->waiting_list, participant, list) { ++ handle_cli_confbridge_list_item(a, participant); + } + ao2_unlock(bridge); + ao2_ref(bridge, -1); +@@ -2440,6 +2448,27 @@ static struct ast_custom_function confbridge_info_function = { + .read = func_confbridge_info, + }; + ++static void action_confbridgelist_item(struct mansession *s, const char *id_text, struct conference_bridge *bridge, struct conference_bridge_user *participant) ++{ ++ astman_append(s, ++ "Event: ConfbridgeList\r\n" ++ "%s" ++ "Conference: %s\r\n" ++ "CallerIDNum: %s\r\n" ++ "CallerIDName: %s\r\n" ++ "Channel: %s\r\n" ++ "Admin: %s\r\n" ++ "MarkedUser: %s\r\n" ++ "\r\n", ++ id_text, ++ bridge->name, ++ S_COR(ast_channel_caller(participant->chan)->id.number.valid, ast_channel_caller(participant->chan)->id.number.str, "<unknown>"), ++ S_COR(ast_channel_caller(participant->chan)->id.name.valid, ast_channel_caller(participant->chan)->id.name.str, "<no name>"), ++ ast_channel_name(participant->chan), ++ ast_test_flag(&participant->u_profile, USER_OPT_ADMIN) ? "Yes" : "No", ++ ast_test_flag(&participant->u_profile, USER_OPT_MARKEDUSER) ? "Yes" : "No"); ++} ++ + static int action_confbridgelist(struct mansession *s, const struct message *m) + { + const char *actionid = astman_get_header(m, "ActionID"); +@@ -2473,23 +2502,11 @@ static int action_confbridgelist(struct mansession *s, const struct message *m) + ao2_lock(bridge); + AST_LIST_TRAVERSE(&bridge->active_list, participant, list) { + total++; +- astman_append(s, +- "Event: ConfbridgeList\r\n" +- "%s" +- "Conference: %s\r\n" +- "CallerIDNum: %s\r\n" +- "CallerIDName: %s\r\n" +- "Channel: %s\r\n" +- "Admin: %s\r\n" +- "MarkedUser: %s\r\n" +- "\r\n", +- id_text, +- bridge->name, +- S_COR(ast_channel_caller(participant->chan)->id.number.valid, ast_channel_caller(participant->chan)->id.number.str, "<unknown>"), +- S_COR(ast_channel_caller(participant->chan)->id.name.valid, ast_channel_caller(participant->chan)->id.name.str, "<no name>"), +- ast_channel_name(participant->chan), +- ast_test_flag(&participant->u_profile, USER_OPT_ADMIN) ? "Yes" : "No", +- ast_test_flag(&participant->u_profile, USER_OPT_MARKEDUSER) ? "Yes" : "No"); ++ action_confbridgelist_item(s, id_text, bridge, participant); ++ } ++ AST_LIST_TRAVERSE(&bridge->waiting_list, participant, list) { ++ total++; ++ action_confbridgelist_item(s, id_text, bridge, participant); + } + ao2_unlock(bridge); + ao2_ref(bridge, -1); |