diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-11-05 08:29:18 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-11-05 08:31:06 +0200 |
commit | defd141cdf47626784ffb405fc9531ad56d257e9 (patch) | |
tree | 5276e71329340e2a9a230b9c9e455d3b10fd2462 /main/asterisk | |
parent | 24734f342b0ca02518a18f4c6e57cc777b45238e (diff) | |
download | aports-defd141cdf47626784ffb405fc9531ad56d257e9.tar.bz2 aports-defd141cdf47626784ffb405fc9531ad56d257e9.tar.xz |
main/asterisk: upgrade to 11.0.0 from testing/asterisk
- re-enable libasteriskssl as the uclibc bug should be fixed now
Diffstat (limited to 'main/asterisk')
-rw-r--r-- | main/asterisk/900-tryinclude.patch | 71 | ||||
-rw-r--r-- | main/asterisk/APKBUILD | 14 | ||||
-rw-r--r-- | main/asterisk/ASTERISK-13456.patch | 363 | ||||
-rw-r--r-- | main/asterisk/ASTERISK-18977.patch | 63 | ||||
-rw-r--r-- | main/asterisk/ASTERISK-19109.patch | 143 | ||||
-rw-r--r--[l---------] | main/asterisk/asterisk.pre-upgrade | 7 |
6 files changed, 102 insertions, 559 deletions
diff --git a/main/asterisk/900-tryinclude.patch b/main/asterisk/900-tryinclude.patch deleted file mode 100644 index 8bcfc24f2..000000000 --- a/main/asterisk/900-tryinclude.patch +++ /dev/null @@ -1,71 +0,0 @@ ------------------------------------------------------------------------- -r345735 | pabelanger | 2011-11-21 18:40:17 +0200 (Mon, 21 Nov 2011) | 7 lines - -Add #tryinclude statement - -This provides the same functionality as #include however an asterisk module will -still load if the filename does not exist. - -Review: https://reviewboard.asterisk.org/r/1476/ - - -diff --git a/CHANGES b/CHANGES -index 4d106f6..bfc7301 100644 ---- a/CHANGES -+++ b/CHANGES -@@ -389,6 +389,12 @@ SIP Changes - * Addition of the 'auth_options_requests' option for turning on and off - authentication for OPTIONS requests in chan_sip. - -+Configuration files -+------------------- -+ * Add #tryinclude statement for config files. This provides the same -+ functionality as the #include statement however an asterisk module will -+ still load if the filename does not exist. Using the #include statement -+ Asterisk will not allow the module to load. - - IAX2 Changes - ----------- -diff --git a/main/config.c b/main/config.c -index 498ae99..e76a43f 100644 ---- a/main/config.c -+++ b/main/config.c -@@ -1202,6 +1202,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, - char *cur2; - char real_inclusion_name[256]; - int do_include = 0; /* otherwise, it is exec */ -+ int try_include = 0; - - cur++; - c = cur; -@@ -1221,6 +1222,9 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, - } - if (!strcasecmp(cur, "include")) { - do_include = 1; -+ } else if (!strcasecmp(cur, "tryinclude")) { -+ do_include = 1; -+ try_include = 1; - } else if (!strcasecmp(cur, "exec")) { - if (!ast_opt_exec_includes) { - ast_log(LOG_WARNING, "Cannot perform #exec unless execincludes option is enabled in asterisk.conf (options section)!\n"); -@@ -1232,8 +1236,8 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, - } - - if (c == NULL) { -- ast_log(LOG_WARNING, "Directive '#%s' needs an argument (%s) at line %d of %s\n", -- do_include ? "include" : "exec", -+ ast_log(LOG_WARNING, "Directive '#%s' needs an argument (%s) at line %d of %s\n", -+ do_include ? "include / tryinclude" : "exec", - do_include ? "filename" : "/path/to/executable", - lineno, - configfile); -@@ -1278,7 +1282,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, - do_include = ast_config_internal_load(cur, cfg, flags, real_inclusion_name, who_asked) ? 1 : 0; - if (!ast_strlen_zero(exec_file)) - unlink(exec_file); -- if (!do_include) { -+ if (!do_include && !try_include) { - ast_log(LOG_ERROR, "The file '%s' was listed as a #include but it does not exist.\n", cur); - return -1; - } ------------------------------------------------------------------------- diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD index d3cca3f2c..d61173574 100644 --- a/main/asterisk/APKBUILD +++ b/main/asterisk/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Timo Teras <timo.teras@iki.fi> # Maintainer: Timo Teras <timo.teras@iki.fi> pkgname=asterisk -pkgver=10.9.0 -pkgrel=0 +pkgver=11.0.0 +pkgrel=2 pkgdesc="Asterisk: A Module Open Source PBX System" pkgusers="asterisk" pkggroups="asterisk" @@ -22,9 +22,6 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc source="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${pkgver/_/-}.tar.gz 100-uclibc-daemon.patch 101-caps-uclibc.patch - 900-tryinclude.patch - ASTERISK-13456.patch - ASTERISK-18977.patch ASTERISK-18995.patch ASTERISK-19109.patch ASTERISK-20527.patch @@ -184,14 +181,11 @@ sound_en() { chown -R asterisk:asterisk "$subpkgdir"/var/*/asterisk } -md5sums="2fb85dc753584ac13692c27f9749c6cb asterisk-10.9.0.tar.gz +md5sums="e23c8535a425253764bdddeee49d1778 asterisk-11.0.0.tar.gz b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch 6e1129e30c4fd2c25c86c81685a485a9 101-caps-uclibc.patch -b794636266cc573f0dda730fba634567 900-tryinclude.patch -8dea1081693fb5bf63b380ad6d56e316 ASTERISK-13456.patch -1ddadef41aa7120e168738b6f3ed8917 ASTERISK-18977.patch bc6713f5434e07b79d3afdd155461d72 ASTERISK-18995.patch -a22bb1d513d026564cb40ec213b1ae7f ASTERISK-19109.patch +146befabe95798a67c58d8ac00d397a6 ASTERISK-19109.patch 676ca42ee1859d8a7bae4345ede5eb89 ASTERISK-20527.patch 74cd25a5638a94ef51e9f4ede2fd28f2 asterisk.initd ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd diff --git a/main/asterisk/ASTERISK-13456.patch b/main/asterisk/ASTERISK-13456.patch deleted file mode 100644 index b796c58f0..000000000 --- a/main/asterisk/ASTERISK-13456.patch +++ /dev/null @@ -1,363 +0,0 @@ -Add callbackextension matching & realtime callbackextensions - -This patch is based on the one by David Vossel, developer extrodinaire, at -https://reviewboard.asterisk.org/r/344/. If multiple peers are defined with the -same host/port, but differing callbackextensions, it chooses the peer with the -matching callbackextension. Since callbackextension creates an outbound -registration with the callbackextension as the Contact address, matching an -incoming request by that (in addition to the host/port) makes a lot of sense. - -This patch also adds support for callbackextension to realtime by querying all -peers with callbackextensions on reload and adding registrations for them. - -(closes issue ASTERISK-13456) -Review: https://reviewboard.asterisk.org/r/344/ -Review: https://reviewboard.asterisk.org/r/1717/ - -diff --git a/CHANGES b/CHANGES -index de18858..6a22ae2 100644 ---- a/CHANGES -+++ b/CHANGES -@@ -24,6 +24,12 @@ SIP Changes - The LastMsgsSent value has been re-added with the same functionality as in - previous versions of Asterisk. - -+ * Add support to realtime for the 'callbackextension' option -+ * When multiple peers exist with the same address, but differing -+ callbackextension options, incoming requests that are matched by address -+ will be matched to the peer with the matching callbackextension if it is -+ available. -+ - ------------------------------------------------------------------------------ - --- Functionality changes since Asterisk 10.3.0 ------------------------------ - ------------------------------------------------------------------------------ -diff --git a/channels/chan_sip.c b/channels/chan_sip.c -index 41fb935..ad8da22 100644 ---- a/channels/chan_sip.c -+++ b/channels/chan_sip.c -@@ -1456,13 +1456,14 @@ static void destroy_association(struct sip_peer *peer); - static void set_insecure_flags(struct ast_flags *flags, const char *value, int lineno); - static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask, struct ast_variable *v); - static void set_socket_transport(struct sip_socket *socket, int transport); -+static int peer_ipcmp_cb_full(void *obj, void *arg, void *data, int flags); - - /* Realtime device support */ - static void realtime_update_peer(const char *peername, struct ast_sockaddr *addr, const char *username, const char *fullcontact, const char *useragent, int expirey, unsigned short deprecated_username, int lastms); - static void update_peer(struct sip_peer *p, int expire); - static struct ast_variable *get_insecure_variable_from_config(struct ast_config *config); - static const char *get_name_from_variable(const struct ast_variable *var); --static struct sip_peer *realtime_peer(const char *peername, struct ast_sockaddr *sin, int devstate_only, int which_objects); -+static struct sip_peer *realtime_peer(const char *peername, struct ast_sockaddr *sin, char *callbackexten, int devstate_only, int which_objects); - static char *sip_prune_realtime(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); - - /*--- Internal UA client handling (outbound registrations) */ -@@ -4891,7 +4892,7 @@ static struct ast_variable *realtime_peer_get_sippeer_helper(const char **name, - /* If varregs is NULL, we don't use sipregs. If we return true, then *name is - * set. Using empty if-bodies instead of goto's while avoiding unnecessary - * indents. */ --static int realtime_peer_by_addr(const char **name, struct ast_sockaddr *addr, const char *ipaddr, struct ast_variable **var, struct ast_variable **varregs) -+static int realtime_peer_by_addr(const char **name, struct ast_sockaddr *addr, const char *ipaddr, const char *callbackexten, struct ast_variable **var, struct ast_variable **varregs) - { - char portstring[6]; /* up to 5 digits plus null terminator */ - ast_copy_string(portstring, ast_sockaddr_stringify_port(addr), sizeof(portstring)); -@@ -4899,8 +4900,11 @@ static int realtime_peer_by_addr(const char **name, struct ast_sockaddr *addr, c - /* We're not finding this peer by this name anymore. Reset it. */ - *name = NULL; - -- /* First check for fixed IP hosts */ -- if ((*var = ast_load_realtime("sippeers", "host", ipaddr, "port", portstring, SENTINEL))) { -+ /* First check for fixed IP hosts with matching callbackextensions, if specified */ -+ if (!ast_strlen_zero(callbackexten) && (*var = ast_load_realtime("sippeers", "host", ipaddr, "port", portstring, "callbackextension", callbackexten, SENTINEL))) { -+ ; -+ /* Check for fixed IP hosts */ -+ } else if ((*var = ast_load_realtime("sippeers", "host", ipaddr, "port", portstring, SENTINEL))) { - ; - /* Check for registered hosts (in sipregs) */ - } else if (varregs && (*varregs = ast_load_realtime("sipregs", "ipaddr", ipaddr, "port", portstring, SENTINEL)) && -@@ -4951,6 +4955,38 @@ static int realtime_peer_by_addr(const char **name, struct ast_sockaddr *addr, c - return 1; - } - -+static int register_realtime_peers_with_callbackextens(void) -+{ -+ struct ast_config *cfg; -+ char *cat = NULL; -+ -+ if (!(ast_check_realtime("sippeers"))) { -+ return 0; -+ } -+ -+ /* This is hacky. We want name to be the cat, so it is the first property */ -+ if (!(cfg = ast_load_realtime_multientry("sippeers", "name LIKE", "%", "callbackextension LIKE", "%", SENTINEL))) { -+ return -1; -+ } -+ -+ while ((cat = ast_category_browse(cfg, cat))) { -+ struct sip_peer *peer; -+ struct ast_variable *var = ast_category_root(cfg, cat); -+ -+ if (!(peer = build_peer(cat, var, NULL, TRUE, FALSE))) { -+ continue; -+ } -+ ast_log(LOG_NOTICE, "Created realtime peer '%s' for registration\n", peer->name); -+ -+ peer->is_realtime = 1; -+ sip_unref_peer(peer, "register_realtime_peers: Done registering releasing"); -+ } -+ -+ ast_config_destroy(cfg); -+ -+ return 0; -+} -+ - /*! \brief realtime_peer: Get peer from realtime storage - * Checks the "sippeers" realtime family from extconfig.conf - * Checks the "sipregs" realtime family from extconfig.conf if it's configured. -@@ -4960,7 +4996,7 @@ static int realtime_peer_by_addr(const char **name, struct ast_sockaddr *addr, c - * \note This is never called with both newpeername and addr at the same time. - * If you do, be prepared to get a peer with a different name than newpeername. - */ --static struct sip_peer *realtime_peer(const char *newpeername, struct ast_sockaddr *addr, int devstate_only, int which_objects) -+static struct sip_peer *realtime_peer(const char *newpeername, struct ast_sockaddr *addr, char *callbackexten, int devstate_only, int which_objects) - { - struct sip_peer *peer = NULL; - struct ast_variable *var = NULL; -@@ -4976,7 +5012,7 @@ static struct sip_peer *realtime_peer(const char *newpeername, struct ast_sockad - - if (newpeername && realtime_peer_by_name(&newpeername, addr, ipaddr, &var, realtimeregs ? &varregs : NULL)) { - ; -- } else if (addr && realtime_peer_by_addr(&newpeername, addr, ipaddr, &var, realtimeregs ? &varregs : NULL)) { -+ } else if (addr && realtime_peer_by_addr(&newpeername, addr, ipaddr, callbackexten, &var, realtimeregs ? &varregs : NULL)) { - ; - } else { - return NULL; -@@ -5052,20 +5088,7 @@ static int find_by_name(void *obj, void *arg, void *data, int flags) - return CMP_MATCH | CMP_STOP; - } - --/*! -- * \brief Locate device by name or ip address -- * \param peer, sin, realtime, devstate_only, transport -- * \param which_objects Define which objects should be matched when doing a lookup -- * by name. Valid options are FINDUSERS, FINDPEERS, or FINDALLDEVICES. -- * Note that this option is not used at all when doing a lookup by IP. -- * -- * This is used on find matching device on name or ip/port. -- * If the device was declared as type=peer, we don't match on peer name on incoming INVITEs. -- * -- * \note Avoid using this function in new functions if there is a way to avoid it, -- * since it might cause a database lookup. -- */ --struct sip_peer *sip_find_peer(const char *peer, struct ast_sockaddr *addr, int realtime, int which_objects, int devstate_only, int transport) -+static struct sip_peer *sip_find_peer_full(const char *peer, struct ast_sockaddr *addr, char *callbackexten, int realtime, int which_objects, int devstate_only, int transport) - { - struct sip_peer *p = NULL; - struct sip_peer tmp_peer; -@@ -5077,10 +5100,10 @@ struct sip_peer *sip_find_peer(const char *peer, struct ast_sockaddr *addr, int - ast_sockaddr_copy(&tmp_peer.addr, addr); - tmp_peer.flags[0].flags = 0; - tmp_peer.transports = transport; -- p = ao2_t_find(peers_by_ip, &tmp_peer, OBJ_POINTER, "ao2_find in peers_by_ip table"); /* WAS: p = ASTOBJ_CONTAINER_FIND_FULL(&peerl, sin, name, sip_addr_hashfunc, 1, sip_addrcmp); */ -+ p = ao2_t_callback_data(peers_by_ip, OBJ_POINTER, peer_ipcmp_cb_full, &tmp_peer, callbackexten, "ao2_find in peers_by_ip table"); - if (!p) { - ast_set_flag(&tmp_peer.flags[0], SIP_INSECURE_PORT); -- p = ao2_t_find(peers_by_ip, &tmp_peer, OBJ_POINTER, "ao2_find in peers_by_ip table 2"); /* WAS: p = ASTOBJ_CONTAINER_FIND_FULL(&peerl, sin, name, sip_addr_hashfunc, 1, sip_addrcmp); */ -+ p = ao2_t_callback_data(peers_by_ip, OBJ_POINTER, peer_ipcmp_cb_full, &tmp_peer, callbackexten, "ao2_find in peers_by_ip table 2"); - if (p) { - return p; - } -@@ -5088,7 +5111,9 @@ struct sip_peer *sip_find_peer(const char *peer, struct ast_sockaddr *addr, int - } - - if (!p && (realtime || devstate_only)) { -- p = realtime_peer(peer, addr, devstate_only, which_objects); -+ /* realtime_peer will return a peer with matching callbackexten if possible, otherwise one matching -+ * without the callbackexten */ -+ p = realtime_peer(peer, addr, callbackexten, devstate_only, which_objects); - if (p) { - switch (which_objects) { - case FINDUSERS: -@@ -5112,6 +5137,29 @@ struct sip_peer *sip_find_peer(const char *peer, struct ast_sockaddr *addr, int - return p; - } - -+/*! -+ * \brief Locate device by name or ip address -+ * \param peer, sin, realtime, devstate_only, transport -+ * \param which_objects Define which objects should be matched when doing a lookup -+ * by name. Valid options are FINDUSERS, FINDPEERS, or FINDALLDEVICES. -+ * Note that this option is not used at all when doing a lookup by IP. -+ * -+ * This is used on find matching device on name or ip/port. -+ * If the device was declared as type=peer, we don't match on peer name on incoming INVITEs. -+ * -+ * \note Avoid using this function in new functions if there is a way to avoid it, -+ * since it might cause a database lookup. -+ */ -+struct sip_peer *sip_find_peer(const char *peer, struct ast_sockaddr *addr, int realtime, int which_objects, int devstate_only, int transport) -+{ -+ return sip_find_peer_full(peer, addr, NULL, realtime, which_objects, devstate_only, transport); -+} -+ -+static struct sip_peer *sip_find_peer_by_ip_and_exten(struct ast_sockaddr *addr, char *callbackexten, int transport) -+{ -+ return sip_find_peer_full(NULL, addr, callbackexten, TRUE, FINDPEERS, FALSE, transport); -+} -+ - /*! \brief Set nat mode on the various data sockets */ - static void do_setnat(struct sip_pvt *p) - { -@@ -8418,16 +8466,16 @@ static struct sip_pvt *find_call(struct sip_request *req, struct ast_sockaddr *a - /*! \brief create sip_registry object from register=> line in sip.conf and link into reg container */ - static int sip_register(const char *value, int lineno) - { -- struct sip_registry *reg; -+ struct sip_registry *reg, *tmp; - - if (!(reg = ast_calloc_with_stringfields(1, struct sip_registry, 256))) { - ast_log(LOG_ERROR, "Out of memory. Can't allocate SIP registry entry\n"); - return -1; - } - -- ast_atomic_fetchadd_int(®objs, 1); - ASTOBJ_INIT(reg); - -+ ast_copy_string(reg->name, value, sizeof(reg->name)); - if (sip_parse_register_line(reg, default_expiry, value, lineno)) { - registry_unref(reg, "failure to parse, unref the reg pointer"); - return -1; -@@ -8438,8 +8486,13 @@ static int sip_register(const char *value, int lineno) - reg->refresh = reg->expiry = reg->configured_expiry = default_expiry; - } - -- /* Add the new registry entry to the list */ -- ASTOBJ_CONTAINER_LINK(®l, reg); -+ /* Add the new registry entry to the list, but only if it isn't already there */ -+ if ((tmp = ASTOBJ_CONTAINER_FIND(®l, reg->name))) { -+ registry_unref(tmp, "throw away found registry"); -+ } else { -+ ast_atomic_fetchadd_int(®objs, 1); -+ ASTOBJ_CONTAINER_LINK(®l, reg); -+ } - - /* release the reference given by ASTOBJ_INIT. The container has another reference */ - registry_unref(reg, "unref the reg pointer"); -@@ -16433,7 +16486,14 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of, - - /* Then find devices based on IP */ - if (!peer) { -- peer = sip_find_peer(NULL, &p->recv, TRUE, FINDPEERS, FALSE, p->socket.type); -+ char *uri_tmp, *callback = NULL, *dummy; -+ uri_tmp = ast_strdupa(uri2); -+ parse_uri(uri_tmp, "sip:,sips:", &callback, &dummy, &dummy, &dummy); -+ if (!ast_strlen_zero(callback) && (peer = sip_find_peer_by_ip_and_exten(&p->recv, callback, p->socket.type))) { -+ ; /* found, fall through */ -+ } else { -+ peer = sip_find_peer(NULL, &p->recv, TRUE, FINDPEERS, FALSE, p->socket.type); -+ } - } - } - -@@ -28283,7 +28343,6 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str - time_t regseconds = 0; - struct ast_flags peerflags[3] = {{(0)}}; - struct ast_flags mask[3] = {{(0)}}; -- char callback[256] = ""; - struct sip_peer tmp_peer; - const char *srvlookup = NULL; - static int deprecation_warning = 1; -@@ -28588,7 +28647,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str - } else if (!strcasecmp(v->name, "regexten")) { - ast_string_field_set(peer, regexten, v->value); - } else if (!strcasecmp(v->name, "callbackextension")) { -- ast_copy_string(callback, v->value, sizeof(callback)); -+ ast_string_field_set(peer, callback, v->value); - } else if (!strcasecmp(v->name, "amaflags")) { - format = ast_cdr_amaflags2int(v->value); - if (format < 0) { -@@ -28960,9 +29019,9 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str - - ast_free_ha(oldha); - ast_free_ha(olddirectmediaha); -- if (!ast_strlen_zero(callback)) { /* build string from peer info */ -+ if (!ast_strlen_zero(peer->callback)) { /* build string from peer info */ - char *reg_string; -- if (ast_asprintf(®_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, callback) >= 0) { -+ if (ast_asprintf(®_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, peer->callback) >= 0) { - sip_register(reg_string, 0); /* XXX TODO: count in registry_count */ - ast_free(reg_string); - } -@@ -30116,6 +30175,8 @@ static int reload_config(enum channelreloadreason reason) - /* Release configuration from memory */ - ast_config_destroy(cfg); - -+ register_realtime_peers_with_callbackextens(); -+ - /* Load the list of manual NOTIFY types to support */ - if (notify_types) { - ast_config_destroy(notify_types); -@@ -31013,9 +31074,17 @@ static int peer_iphash_cb(const void *obj, const int flags) - * - * \note the peer's addr struct provides to fields combined to make a key: the sin_addr.s_addr and sin_port fields. - */ --static int peer_ipcmp_cb(void *obj, void *arg, int flags) -+static int peer_ipcmp_cb_full(void *obj, void *arg, void *data, int flags) - { - struct sip_peer *peer = obj, *peer2 = arg; -+ char *callback = data; -+ -+ if (!ast_strlen_zero(callback) && strcasecmp(peer->callback, callback)) { -+ /* We require a callback extension match, but don't have one */ -+ return 0; -+ } -+ -+ /* At this point, we match the callback extension if we need to. Carry on. */ - - if (ast_sockaddr_cmp_addr(&peer->addr, &peer2->addr)) { - /* IP doesn't match */ -@@ -31038,6 +31107,10 @@ static int peer_ipcmp_cb(void *obj, void *arg, int flags) - (CMP_MATCH | CMP_STOP) : 0; - } - -+static int peer_ipcmp_cb(void *obj, void *arg, int flags) -+{ -+ return peer_ipcmp_cb_full(obj, arg, NULL, flags); -+} - - static int threadt_hash_cb(const void *obj, const int flags) - { -diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h -index ab2ed1b..48626aa 100644 ---- a/channels/sip/include/sip.h -+++ b/channels/sip/include/sip.h -@@ -1246,6 +1246,7 @@ struct sip_peer { - AST_STRING_FIELD(mwi_from); /*!< Name to place in From header for outgoing NOTIFY requests */ - AST_STRING_FIELD(engine); /*!< RTP Engine to use */ - AST_STRING_FIELD(unsolicited_mailbox); /*!< Mailbox to store received unsolicited MWI NOTIFY messages information in */ -+ AST_STRING_FIELD(callback); /*!< Callback extension */ - ); - struct sip_socket socket; /*!< Socket used for this peer */ - enum sip_transport default_outbound_transport; /*!< Peer Registration may change the default outbound transport. -@@ -1331,7 +1332,7 @@ struct sip_peer { - * \todo Convert this to astobj2 - */ - struct sip_registry { -- ASTOBJ_COMPONENTS_FULL(struct sip_registry,1,1); -+ ASTOBJ_COMPONENTS_FULL(struct sip_registry, 80, 1); - AST_DECLARE_STRING_FIELDS( - AST_STRING_FIELD(callid); /*!< Global Call-ID */ - AST_STRING_FIELD(realm); /*!< Authorization realm */ -diff --git a/contrib/realtime/postgresql/realtime.sql b/contrib/realtime/postgresql/realtime.sql -index f14cd79..7b8dcec 100644 ---- a/contrib/realtime/postgresql/realtime.sql -+++ b/contrib/realtime/postgresql/realtime.sql -@@ -72,7 +72,8 @@ lastms integer DEFAULT 0 NOT NULL, - defaultuser character varying(80), - fullcontact character varying(80), - regserver character varying(30), --useragent character varying(40) -+useragent character varying(40), -+callbackextension character varying(40) - ); - - drop table voicemail_users; diff --git a/main/asterisk/ASTERISK-18977.patch b/main/asterisk/ASTERISK-18977.patch deleted file mode 100644 index fffce032c..000000000 --- a/main/asterisk/ASTERISK-18977.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- a/res/res_musiconhold.c.orig -+++ b/res/res_musiconhold.c -@@ -158,6 +158,7 @@ - char name[MAX_MUSICCLASS]; - struct ast_format origwfmt; - struct ast_format mohwfmt; -+ int announcement; - int samples; - int sample_queue; - int pos; -@@ -173,6 +174,7 @@ - #define MOH_SORTALPHA (1 << 4) - - #define MOH_CACHERTCLASSES (1 << 5) /*!< Should we use a separate instance of MOH for each user or not */ -+#define MOH_ANNOUNCEMENT (1 << 6) - - /* Custom astobj2 flag */ - #define MOH_NOTDELETED (1 << 30) /*!< Find only records that aren't deleted? */ -@@ -183,6 +185,7 @@ - char name[MAX_MUSICCLASS]; - char dir[256]; - char args[256]; -+ char announcement[80]; - char mode[80]; - char digit; - /*! A dynamically sized array to hold the list of filenames in "files" mode */ -@@ -278,6 +281,7 @@ - } - - state->save_pos = state->pos; -+ state->announcement = 0; - - state->class = mohclass_unref(state->class, "Unreffing channel's music class upon deactivation of generator"); - } -@@ -293,6 +297,16 @@ - chan->stream = NULL; - } - -+ if (ast_test_flag(state->class, MOH_ANNOUNCEMENT) && state->announcement == 0) { -+ state->announcement = 1; -+ if (ast_openstream_full(chan, state->class->announcement, chan->language, 1)) { -+ ast_debug(1, "%s Opened announcement '%s'\n", chan->name, state->class->announcement); -+ return 0; -+ } -+ } else { -+ state->announcement = 0; -+ } -+ - if (!state->class->total_files) { - ast_log(LOG_WARNING, "No files available for class '%s'\n", state->class->name); - return -1; -@@ -1731,7 +1745,10 @@ - ast_copy_string(class->dir, var->value, sizeof(class->dir)); - else if (!strcasecmp(var->name, "application")) - ast_copy_string(class->args, var->value, sizeof(class->args)); -- else if (!strcasecmp(var->name, "digit") && (isdigit(*var->value) || strchr("*#", *var->value))) -+ else if (!strcasecmp(var->name, "announcement")) { -+ ast_copy_string(class->announcement, var->value, sizeof(class->announcement)); -+ ast_set_flag(class, MOH_ANNOUNCEMENT); -+ } else if (!strcasecmp(var->name, "digit") && (isdigit(*var->value) || strchr("*#", *var->value))) - class->digit = *var->value; - else if (!strcasecmp(var->name, "random")) - ast_set2_flag(class, ast_true(var->value), MOH_RANDOMIZE); diff --git a/main/asterisk/ASTERISK-19109.patch b/main/asterisk/ASTERISK-19109.patch index 73c8accff..cd45b4273 100644 --- a/main/asterisk/ASTERISK-19109.patch +++ b/main/asterisk/ASTERISK-19109.patch @@ -1,11 +1,39 @@ -commit 0fad0f8a679cbb0609056528ac157476dd4e5877 -Author: Timo Teräs <timo.teras@iki.fi> -Date: Wed Dec 28 08:30:54 2011 +0200 +From 806946c35cf0560248e63fea53c4d82426a2034a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Wed, 5 Sep 2012 10:07:05 +0300 +Subject: [PATCH] ASTERISK-19109: Implement deaf participant support for + ConfBridge - Support 'deaf' participants in ConfBridge +--- + CHANGES | 3 + + apps/app_confbridge.c | 218 ++++++++++++++++++++++++++++++--- + apps/confbridge/conf_config_parser.c | 14 +++ + apps/confbridge/include/confbridge.h | 6 + + bridges/bridge_multiplexed.c | 2 +- + bridges/bridge_simple.c | 2 +- + bridges/bridge_softmix.c | 38 +++--- + configs/confbridge.conf.sample | 5 + + include/asterisk/bridging_features.h | 2 + + include/asterisk/bridging_technology.h | 15 +++ + main/bridging.c | 22 ++++ + 11 files changed, 294 insertions(+), 33 deletions(-) +diff --git a/CHANGES b/CHANGES +index c3c9891..2efa17b 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -66,6 +66,9 @@ ConfBridge + file will be played to the user, and only the user, upon joining the + conference bridge. + ++ * Added support for deaf participants with CLI commands, manager actions ++ and ConfBridge DTMF actions to toggle the deaf state. ++ + + Dial + ------------------- diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c -index d5609b7..8569f5c 100644 +index 90954b8..0455be4 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -185,6 +185,30 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") @@ -64,7 +92,7 @@ index d5609b7..8569f5c 100644 case CONF_SOUND_ONLY_ONE: return S_OR(custom_sounds->onlyone, "conf-onlyone"); case CONF_SOUND_THERE_ARE: -@@ -1423,10 +1458,13 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) +@@ -1504,10 +1539,13 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) volume_adjustments[0] = ast_audiohook_volume_get(chan, AST_AUDIOHOOK_DIRECTION_READ); volume_adjustments[1] = ast_audiohook_volume_get(chan, AST_AUDIOHOOK_DIRECTION_WRITE); @@ -79,7 +107,7 @@ index d5609b7..8569f5c 100644 if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_DROP_SILENCE)) { conference_bridge_user.tech_args.drop_silence = 1; -@@ -1587,6 +1625,20 @@ static int action_toggle_mute_participants(struct conference_bridge *conference_ +@@ -1668,6 +1706,20 @@ static int action_toggle_mute_participants(struct conference_bridge *conference_ return 0; } @@ -100,7 +128,7 @@ index d5609b7..8569f5c 100644 static int action_playback(struct ast_bridge_channel *bridge_channel, const char *playback_file) { char *file_copy = ast_strdupa(playback_file); -@@ -1775,6 +1827,11 @@ static int execute_menu_entry(struct conference_bridge *conference_bridge, +@@ -1856,6 +1908,11 @@ static int execute_menu_entry(struct conference_bridge *conference_bridge, case MENU_ACTION_PARTICIPANT_COUNT: announce_user_count(conference_bridge, conference_bridge_user); break; @@ -112,7 +140,7 @@ index d5609b7..8569f5c 100644 case MENU_ACTION_PLAYBACK: if (!stop_prompts) { res |= action_playback(bridge_channel, menu_action->data.playback_file); -@@ -2038,13 +2095,13 @@ static int generic_lock_unlock_helper(int lock, const char *conference) +@@ -2119,13 +2176,13 @@ static int generic_lock_unlock_helper(int lock, const char *conference) } /* \internal @@ -128,12 +156,12 @@ index d5609b7..8569f5c 100644 { struct conference_bridge *bridge = NULL; struct conference_bridge tmp; -@@ -2062,10 +2119,44 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch +@@ -2143,10 +2200,44 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch } } if (participant) { - participant->features.mute = mute; -- ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", participant->chan->name, participant->features.mute ? "muted" : "unmuted", bridge->b_profile.name, participant->chan->name); +- ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", ast_channel_name(participant->chan), participant->features.mute ? "muted" : "unmuted", bridge->b_profile.name, ast_channel_name(participant->chan)); + const char *state, *verb; + + switch (action) { @@ -165,10 +193,10 @@ index d5609b7..8569f5c 100644 + "Message: participant %s %s\r\n" + "Conference: %s\r\n" + "Channel: %s", -+ participant->chan->name, ++ ast_channel_name(participant->chan), + verb, + bridge->b_profile.name, -+ participant->chan->name); ++ ast_channel_name(participant->chan)); + } } else { - res = -2;; @@ -176,7 +204,7 @@ index d5609b7..8569f5c 100644 } ao2_unlock(bridge); ao2_ref(bridge, -1); -@@ -2073,9 +2164,10 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch +@@ -2154,9 +2245,10 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch return res; } @@ -189,7 +217,7 @@ index d5609b7..8569f5c 100644 if (res == -1) { ast_cli(a->fd, "No conference bridge named '%s' found!\n", a->argv[2]); -@@ -2084,7 +2176,24 @@ static int cli_mute_unmute_helper(int mute, struct ast_cli_args *a) +@@ -2165,7 +2257,24 @@ static int cli_mute_unmute_helper(int mute, struct ast_cli_args *a) ast_cli(a->fd, "No channel named '%s' found in conference %s\n", a->argv[3], a->argv[2]); return -1; } @@ -215,7 +243,7 @@ index d5609b7..8569f5c 100644 return 0; } -@@ -2106,7 +2215,7 @@ static char *handle_cli_confbridge_mute(struct ast_cli_entry *e, int cmd, struct +@@ -2187,7 +2296,7 @@ static char *handle_cli_confbridge_mute(struct ast_cli_entry *e, int cmd, struct return CLI_SHOWUSAGE; } @@ -224,7 +252,7 @@ index d5609b7..8569f5c 100644 return CLI_SUCCESS; } -@@ -2129,7 +2238,53 @@ static char *handle_cli_confbridge_unmute(struct ast_cli_entry *e, int cmd, stru +@@ -2210,7 +2319,53 @@ static char *handle_cli_confbridge_unmute(struct ast_cli_entry *e, int cmd, stru return CLI_SHOWUSAGE; } @@ -279,7 +307,7 @@ index d5609b7..8569f5c 100644 return CLI_SUCCESS; } -@@ -2277,6 +2432,8 @@ static struct ast_cli_entry cli_confbridge[] = { +@@ -2358,6 +2513,8 @@ static struct ast_cli_entry cli_confbridge[] = { AST_CLI_DEFINE(handle_cli_confbridge_kick, "Kick participants out of conference bridges."), AST_CLI_DEFINE(handle_cli_confbridge_mute, "Mute a participant."), AST_CLI_DEFINE(handle_cli_confbridge_unmute, "Unmute a participant."), @@ -288,7 +316,7 @@ index d5609b7..8569f5c 100644 AST_CLI_DEFINE(handle_cli_confbridge_lock, "Lock a conference."), AST_CLI_DEFINE(handle_cli_confbridge_unlock, "Unlock a conference."), AST_CLI_DEFINE(handle_cli_confbridge_start_record, "Start recording a conference"), -@@ -2411,10 +2568,11 @@ static int action_confbridgelistrooms(struct mansession *s, const struct message +@@ -2492,10 +2649,11 @@ static int action_confbridgelistrooms(struct mansession *s, const struct message return 0; } @@ -301,7 +329,7 @@ index d5609b7..8569f5c 100644 int res = 0; if (ast_strlen_zero(conference)) { -@@ -2430,7 +2588,7 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message +@@ -2511,7 +2669,7 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message return 0; } @@ -310,7 +338,7 @@ index d5609b7..8569f5c 100644 if (res == -1) { astman_send_error(s, m, "No Conference by that name found."); -@@ -2440,17 +2598,41 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message +@@ -2521,17 +2679,41 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message return 0; } @@ -355,7 +383,7 @@ index d5609b7..8569f5c 100644 } static int action_lock_unlock_helper(struct mansession *s, const struct message *m, int lock) -@@ -2737,6 +2919,8 @@ static int unload_module(void) +@@ -2818,6 +3000,8 @@ static int unload_module(void) res |= ast_manager_unregister("ConfbridgeListRooms"); res |= ast_manager_unregister("ConfbridgeMute"); res |= ast_manager_unregister("ConfbridgeUnmute"); @@ -364,7 +392,7 @@ index d5609b7..8569f5c 100644 res |= ast_manager_unregister("ConfbridgeKick"); res |= ast_manager_unregister("ConfbridgeUnlock"); res |= ast_manager_unregister("ConfbridgeLock"); -@@ -2778,6 +2962,8 @@ static int load_module(void) +@@ -2860,6 +3044,8 @@ static int load_module(void) res |= ast_manager_register_xml("ConfbridgeListRooms", EVENT_FLAG_REPORTING, action_confbridgelistrooms); res |= ast_manager_register_xml("ConfbridgeMute", EVENT_FLAG_CALL, action_confbridgemute); res |= ast_manager_register_xml("ConfbridgeUnmute", EVENT_FLAG_CALL, action_confbridgeunmute); @@ -374,19 +402,10 @@ index d5609b7..8569f5c 100644 res |= ast_manager_register_xml("ConfbridgeUnlock", EVENT_FLAG_CALL, action_confbridgeunlock); res |= ast_manager_register_xml("ConfbridgeLock", EVENT_FLAG_CALL, action_confbridgelock); diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c -index 9bb8b2a..3cf7a32 100644 +index f4a9604..8a02de7 100644 --- a/apps/confbridge/conf_config_parser.c +++ b/apps/confbridge/conf_config_parser.c -@@ -153,6 +153,8 @@ static int set_user_option(const char *name, const char *value, struct user_prof - ast_set2_flag(u_profile, ast_true(value), USER_OPT_MARKEDUSER); - } else if (!strcasecmp(name, "startmuted")) { - ast_set2_flag(u_profile, ast_true(value), USER_OPT_STARTMUTED); -+ } else if (!strcasecmp(name, "startdeaf")) { -+ ast_set2_flag(u_profile, ast_true(value), USER_OPT_STARTDEAF); - } else if (!strcasecmp(name, "music_on_hold_when_empty")) { - ast_set2_flag(u_profile, ast_true(value), USER_OPT_MUSICONHOLD); - } else if (!strcasecmp(name, "quiet")) { -@@ -231,6 +233,10 @@ static int set_sound(const char *sound_name, const char *sound_file, struct brid +@@ -279,6 +279,10 @@ static int set_sound(const char *sound_name, const char *sound_file, struct brid ast_string_field_set(sounds, muted, sound_file); } else if (!strcasecmp(sound_name, "sound_unmuted")) { ast_string_field_set(sounds, unmuted, sound_file); @@ -397,7 +416,7 @@ index 9bb8b2a..3cf7a32 100644 } else if (!strcasecmp(sound_name, "sound_there_are")) { ast_string_field_set(sounds, thereare, sound_file); } else if (!strcasecmp(sound_name, "sound_other_in_party")) { -@@ -541,6 +547,7 @@ static int add_action_to_menu_entry(struct conf_menu_entry *menu_entry, enum con +@@ -418,6 +422,7 @@ static int add_action_to_menu_entry(struct conf_menu_entry *menu_entry, enum con switch (id) { case MENU_ACTION_NOOP: case MENU_ACTION_TOGGLE_MUTE: @@ -405,7 +424,17 @@ index 9bb8b2a..3cf7a32 100644 case MENU_ACTION_INCREASE_LISTENING: case MENU_ACTION_DECREASE_LISTENING: case MENU_ACTION_INCREASE_TALKING: -@@ -1029,6 +1036,8 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e, +@@ -708,6 +713,9 @@ static char *handle_cli_confbridge_show_user_profile(struct ast_cli_entry *e, in + ast_cli(a->fd,"Start Muted: %s\n", + u_profile.flags & USER_OPT_STARTMUTED? + "true" : "false"); ++ ast_cli(a->fd,"Start Deaf: %s\n", ++ u_profile.flags & USER_OPT_STARTDEAF? ++ "true" : "false"); + ast_cli(a->fd,"MOH When Empty: %s\n", + u_profile.flags & USER_OPT_MUSICONHOLD ? + "enabled" : "disabled"); +@@ -896,6 +904,8 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e, ast_cli(a->fd,"sound_kicked: %s\n", conf_get_sound(CONF_SOUND_KICKED, b_profile.sounds)); ast_cli(a->fd,"sound_muted: %s\n", conf_get_sound(CONF_SOUND_MUTED, b_profile.sounds)); ast_cli(a->fd,"sound_unmuted: %s\n", conf_get_sound(CONF_SOUND_UNMUTED, b_profile.sounds)); @@ -414,7 +443,7 @@ index 9bb8b2a..3cf7a32 100644 ast_cli(a->fd,"sound_there_are: %s\n", conf_get_sound(CONF_SOUND_THERE_ARE, b_profile.sounds)); ast_cli(a->fd,"sound_other_in_party: %s\n", conf_get_sound(CONF_SOUND_OTHER_IN_PARTY, b_profile.sounds)); ast_cli(a->fd,"sound_place_into_conference: %s\n", conf_get_sound(CONF_SOUND_PLACE_IN_CONF, b_profile.sounds)); -@@ -1140,6 +1149,9 @@ static char *handle_cli_confbridge_show_menu(struct ast_cli_entry *e, int cmd, s +@@ -1021,6 +1031,9 @@ static char *handle_cli_confbridge_show_menu(struct ast_cli_entry *e, int cmd, s case MENU_ACTION_TOGGLE_MUTE: ast_cli(a->fd, "toggle_mute"); break; @@ -424,8 +453,16 @@ index 9bb8b2a..3cf7a32 100644 case MENU_ACTION_NOOP: ast_cli(a->fd, "no_op"); break; +@@ -1268,6 +1281,7 @@ int conf_load_config(int reload) + aco_option_register(&cfg_info, "admin", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ADMIN); + aco_option_register(&cfg_info, "marked", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_MARKEDUSER); + aco_option_register(&cfg_info, "startmuted", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_STARTMUTED); ++ aco_option_register(&cfg_info, "startdeaf", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_STARTDEAF); + aco_option_register(&cfg_info, "music_on_hold_when_empty", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_MUSICONHOLD); + aco_option_register(&cfg_info, "quiet", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_QUIET); + aco_option_register_custom(&cfg_info, "announce_user_count_all", ACO_EXACT, user_types, "no", announce_user_count_all_handler, 0); diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h -index 5337e22..c601fa8 100644 +index d3ead35..3d773c5 100644 --- a/apps/confbridge/include/confbridge.h +++ b/apps/confbridge/include/confbridge.h @@ -57,6 +57,7 @@ enum user_profile_flags { @@ -444,7 +481,7 @@ index 5337e22..c601fa8 100644 MENU_ACTION_PLAYBACK, MENU_ACTION_PLAYBACK_AND_CONTINUE, MENU_ACTION_INCREASE_LISTENING, -@@ -143,6 +145,8 @@ enum conf_sounds { +@@ -142,6 +144,8 @@ enum conf_sounds { CONF_SOUND_KICKED, CONF_SOUND_MUTED, CONF_SOUND_UNMUTED, @@ -453,7 +490,7 @@ index 5337e22..c601fa8 100644 CONF_SOUND_ONLY_ONE, CONF_SOUND_THERE_ARE, CONF_SOUND_OTHER_IN_PARTY, -@@ -169,6 +173,8 @@ struct bridge_profile_sounds { +@@ -168,6 +172,8 @@ struct bridge_profile_sounds { AST_STRING_FIELD(kicked); AST_STRING_FIELD(muted); AST_STRING_FIELD(unmuted); @@ -463,7 +500,7 @@ index 5337e22..c601fa8 100644 AST_STRING_FIELD(thereare); AST_STRING_FIELD(otherinparty); diff --git a/bridges/bridge_multiplexed.c b/bridges/bridge_multiplexed.c -index e004dfd..7add614 100644 +index cd30266..190f790 100644 --- a/bridges/bridge_multiplexed.c +++ b/bridges/bridge_multiplexed.c @@ -386,7 +386,7 @@ static enum ast_bridge_write_result multiplexed_bridge_write(struct ast_bridge * @@ -476,7 +513,7 @@ index e004dfd..7add614 100644 return AST_BRIDGE_WRITE_SUCCESS; diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c -index 14864df..d4270ff 100644 +index 69e4114..1623ce0 100644 --- a/bridges/bridge_simple.c +++ b/bridges/bridge_simple.c @@ -81,7 +81,7 @@ static enum ast_bridge_write_result simple_bridge_write(struct ast_bridge *bridg @@ -489,7 +526,7 @@ index 14864df..d4270ff 100644 return AST_BRIDGE_WRITE_SUCCESS; diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c -index 7632f36..7946c79 100644 +index 52e5551..5754e41 100644 --- a/bridges/bridge_softmix.c +++ b/bridges/bridge_softmix.c @@ -435,7 +435,7 @@ static void softmix_pass_dtmf(struct ast_bridge *bridge, struct ast_bridge_chann @@ -546,7 +583,7 @@ index 7632f36..7946c79 100644 sc->have_frame = 0; } -@@ -850,16 +850,23 @@ static int softmix_bridge_thread(struct ast_bridge *bridge) +@@ -850,16 +850,24 @@ static int softmix_bridge_thread(struct ast_bridge *bridge) ast_mutex_lock(&sc->lock); @@ -568,19 +605,20 @@ index 7632f36..7946c79 100644 + memcpy(sc->final_buf, buf, softmix_datalen); + + /* process the softmix channel's new write audio */ -+ softmix_process_write_audio(&trans_helper, &bridge_channel->chan->rawwriteformat, sc); ++ softmix_process_write_audio(&trans_helper, ++ ast_channel_rawwriteformat(bridge_channel->chan), sc); } - sc->write_frame.datalen = softmix_datalen; - sc->write_frame.samples = softmix_samples; - memcpy(sc->final_buf, buf, softmix_datalen); - - /* process the softmix channel's new write audio */ -- softmix_process_write_audio(&trans_helper, &bridge_channel->chan->rawwriteformat, sc); +- softmix_process_write_audio(&trans_helper, ast_channel_rawwriteformat(bridge_channel->chan), sc); /* The frame is now ready for use... */ sc->have_frame = 1; diff --git a/configs/confbridge.conf.sample b/configs/confbridge.conf.sample -index d113825..737f92c 100644 +index 7484b28..3b0ce85 100644 --- a/configs/confbridge.conf.sample +++ b/configs/confbridge.conf.sample @@ -16,6 +16,7 @@ type=user @@ -591,7 +629,7 @@ index d113825..737f92c 100644 ;music_on_hold_when_empty=yes ; Sets whether MOH should be played when only ; one person is in the conference or when the ; the user is waiting on a marked user to enter -@@ -209,6 +210,8 @@ type=bridge +@@ -210,6 +211,8 @@ type=bridge ;sound_kicked ; The sound played to a user who has been kicked from the conference. ;sound_muted ; The sound played when the mute option it toggled on. ;sound_unmuted ; The sound played when the mute option it toggled off. @@ -600,7 +638,7 @@ index d113825..737f92c 100644 ;sound_only_person ; The sound played when the user is the only person in the conference. ;sound_only_one ; The sound played to a user when there is only one other ; person is in the conference. -@@ -263,6 +266,8 @@ type=bridge +@@ -264,6 +267,8 @@ type=bridge ; toggle_mute ; Toggle turning on and off mute. Mute will make the user silent ; to everyone else, but the user will still be able to listen in. ; continue to collect the dtmf sequence. @@ -649,10 +687,10 @@ index 3d2e870..1ecb4c1 100644 * * \note All DSP functionality on the bridge has been pushed down to the lowest possible diff --git a/main/bridging.c b/main/bridging.c -index 9bc0edc..3295dc2 100644 +index 465d033..4f67e90 100644 --- a/main/bridging.c +++ b/main/bridging.c -@@ -336,6 +336,28 @@ void ast_bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel +@@ -337,6 +337,28 @@ void ast_bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel return; } @@ -681,3 +719,6 @@ index 9bc0edc..3295dc2 100644 /*! \brief Generic thread loop, TODO: Rethink this/improve it */ static int generic_thread_loop(struct ast_bridge *bridge) { +-- +1.7.12 + diff --git a/main/asterisk/asterisk.pre-upgrade b/main/asterisk/asterisk.pre-upgrade index 1765e9ca5..6c2984ae4 120000..100644 --- a/main/asterisk/asterisk.pre-upgrade +++ b/main/asterisk/asterisk.pre-upgrade @@ -1 +1,6 @@ -asterisk.pre-install
\ No newline at end of file +#!/bin/sh + +adduser -S -h /var/lib/asterisk -s /bin/false -D asterisk 2>/dev/null +addgroup -S dialout 2>/dev/null +addgroup asterisk dialout 2>/dev/null +exit 0 |