[asterisk-commits] oej: branch oej/oolong-path-support-trunk r378016 - in /team/oej/oolong-path-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 14 04:23:23 CST 2012
Author: oej
Date: Fri Dec 14 04:23:05 2012
New Revision: 378016
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378016
Log:
Reset automerge without any merge failure - only in e-mail.
Added:
team/oej/oolong-path-support-trunk/include/asterisk/uuid.h
- copied unchanged from r378011, trunk/include/asterisk/uuid.h
team/oej/oolong-path-support-trunk/main/uuid.c
- copied unchanged from r378011, trunk/main/uuid.c
team/oej/oolong-path-support-trunk/tests/test_uuid.c
- copied unchanged from r378011, trunk/tests/test_uuid.c
Modified:
team/oej/oolong-path-support-trunk/ (props changed)
team/oej/oolong-path-support-trunk/apps/app_confbridge.c
team/oej/oolong-path-support-trunk/apps/confbridge/conf_state.c
team/oej/oolong-path-support-trunk/apps/confbridge/conf_state_multi_marked.c
team/oej/oolong-path-support-trunk/apps/confbridge/include/confbridge.h
team/oej/oolong-path-support-trunk/channels/chan_sip.c
team/oej/oolong-path-support-trunk/channels/chan_skinny.c
team/oej/oolong-path-support-trunk/channels/sip/include/sip.h
team/oej/oolong-path-support-trunk/configs/sip.conf.sample
team/oej/oolong-path-support-trunk/configure
team/oej/oolong-path-support-trunk/configure.ac
team/oej/oolong-path-support-trunk/include/asterisk/autoconfig.h.in
team/oej/oolong-path-support-trunk/include/asterisk/bridging.h
team/oej/oolong-path-support-trunk/main/Makefile
team/oej/oolong-path-support-trunk/main/aoc.c
team/oej/oolong-path-support-trunk/main/asterisk.c
team/oej/oolong-path-support-trunk/main/cel.c
team/oej/oolong-path-support-trunk/main/channel.c
team/oej/oolong-path-support-trunk/main/data.c
team/oej/oolong-path-support-trunk/main/features.c
team/oej/oolong-path-support-trunk/main/file.c
team/oej/oolong-path-support-trunk/main/http.c
team/oej/oolong-path-support-trunk/main/image.c
team/oej/oolong-path-support-trunk/main/stun.c
team/oej/oolong-path-support-trunk/main/taskprocessor.c
team/oej/oolong-path-support-trunk/main/timing.c
team/oej/oolong-path-support-trunk/main/udptl.c
team/oej/oolong-path-support-trunk/main/utils.c
team/oej/oolong-path-support-trunk/res/res_calendar_exchange.c
team/oej/oolong-path-support-trunk/res/res_clialiases.c
team/oej/oolong-path-support-trunk/sounds/Makefile
Propchange: team/oej/oolong-path-support-trunk/
------------------------------------------------------------------------------
automerge = Is-there-life-off-net?
Propchange: team/oej/oolong-path-support-trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Propchange: team/oej/oolong-path-support-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Dec 14 04:23:05 2012
@@ -1,1 +1,1 @@
-/trunk:1-377826
+/trunk:1-378014
Modified: team/oej/oolong-path-support-trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/apps/app_confbridge.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/apps/app_confbridge.c (original)
+++ team/oej/oolong-path-support-trunk/apps/app_confbridge.c Fri Dec 14 04:23:05 2012
@@ -909,6 +909,94 @@
return 0;
}
+void conf_moh_stop(struct conference_bridge_user *user)
+{
+ user->playing_moh = 0;
+ if (!user->suspended_moh) {
+ int in_bridge;
+
+ /*
+ * Locking the ast_bridge here is the only way to hold off the
+ * call to ast_bridge_join() in confbridge_exec() from
+ * interfering with the bridge and MOH operations here.
+ */
+ ast_bridge_lock(user->conference_bridge->bridge);
+
+ /*
+ * Temporarily suspend the user from the bridge so we have
+ * control to stop MOH if needed.
+ */
+ in_bridge = !ast_bridge_suspend(user->conference_bridge->bridge, user->chan);
+ ast_moh_stop(user->chan);
+ if (in_bridge) {
+ ast_bridge_unsuspend(user->conference_bridge->bridge, user->chan);
+ }
+
+ ast_bridge_unlock(user->conference_bridge->bridge);
+ }
+}
+
+void conf_moh_start(struct conference_bridge_user *user)
+{
+ user->playing_moh = 1;
+ if (!user->suspended_moh) {
+ int in_bridge;
+
+ /*
+ * Locking the ast_bridge here is the only way to hold off the
+ * call to ast_bridge_join() in confbridge_exec() from
+ * interfering with the bridge and MOH operations here.
+ */
+ ast_bridge_lock(user->conference_bridge->bridge);
+
+ /*
+ * Temporarily suspend the user from the bridge so we have
+ * control to start MOH if needed.
+ */
+ in_bridge = !ast_bridge_suspend(user->conference_bridge->bridge, user->chan);
+ ast_moh_start(user->chan, user->u_profile.moh_class, NULL);
+ if (in_bridge) {
+ ast_bridge_unsuspend(user->conference_bridge->bridge, user->chan);
+ }
+
+ ast_bridge_unlock(user->conference_bridge->bridge);
+ }
+}
+
+/*!
+ * \internal
+ * \brief Unsuspend MOH for the conference user.
+ *
+ * \param user Conference user to unsuspend MOH on.
+ *
+ * \return Nothing
+ */
+static void conf_moh_unsuspend(struct conference_bridge_user *user)
+{
+ ao2_lock(user->conference_bridge);
+ if (--user->suspended_moh == 0 && user->playing_moh) {
+ ast_moh_start(user->chan, user->u_profile.moh_class, NULL);
+ }
+ ao2_unlock(user->conference_bridge);
+}
+
+/*!
+ * \internal
+ * \brief Suspend MOH for the conference user.
+ *
+ * \param user Conference user to suspend MOH on.
+ *
+ * \return Nothing
+ */
+static void conf_moh_suspend(struct conference_bridge_user *user)
+{
+ ao2_lock(user->conference_bridge);
+ if (user->suspended_moh++ == 0 && user->playing_moh) {
+ ast_moh_stop(user->chan);
+ }
+ ao2_unlock(user->conference_bridge);
+}
+
int conf_handle_first_marked_common(struct conference_bridge_user *cbu)
{
if (!ast_test_flag(&cbu->u_profile, USER_OPT_QUIET) && play_prompt_to_user(cbu, conf_get_sound(CONF_SOUND_PLACE_IN_CONF, cbu->b_profile.sounds))) {
@@ -919,18 +1007,11 @@
int conf_handle_inactive_waitmarked(struct conference_bridge_user *cbu)
{
- /* Be sure we are muted so we can't talk to anybody else waiting */
- cbu->features.mute = 1;
/* If we have not been quieted play back that they are waiting for the leader */
if (!ast_test_flag(&cbu->u_profile, USER_OPT_QUIET) && play_prompt_to_user(cbu,
conf_get_sound(CONF_SOUND_WAIT_FOR_LEADER, cbu->b_profile.sounds))) {
/* user hungup while the sound was playing */
return -1;
- }
- /* Start music on hold if needed */
- if (ast_test_flag(&cbu->u_profile, USER_OPT_MUSICONHOLD)) {
- ast_moh_start(cbu->chan, cbu->u_profile.moh_class, NULL);
- cbu->playing_moh = 1;
}
return 0;
}
@@ -970,11 +1051,8 @@
/* If we are the second participant we may need to stop music on hold on the first */
struct conference_bridge_user *first_participant = AST_LIST_FIRST(&conference_bridge->active_list);
- /* Temporarily suspend the above participant from the bridge so we have control to stop MOH if needed */
- if (ast_test_flag(&first_participant->u_profile, USER_OPT_MUSICONHOLD) && !ast_bridge_suspend(conference_bridge->bridge, first_participant->chan)) {
- first_participant->playing_moh = 0;
- ast_moh_stop(first_participant->chan);
- ast_bridge_unsuspend(conference_bridge->bridge, first_participant->chan);
+ if (ast_test_flag(&first_participant->u_profile, USER_OPT_MUSICONHOLD)) {
+ conf_moh_stop(first_participant);
}
if (!ast_test_flag(&first_participant->u_profile, USER_OPT_STARTMUTED)) {
first_participant->features.mute = 0;
@@ -1098,6 +1176,13 @@
conference_bridge_user->conference_bridge = conference_bridge;
ao2_lock(conference_bridge);
+
+ /*
+ * Suspend any MOH until the user actually joins the bridge of
+ * the conference. This way any pre-join file playback does not
+ * need to worry about MOH.
+ */
+ conference_bridge_user->suspended_moh = 1;
if (handle_conf_user_join(conference_bridge_user)) {
/* Invalid event, nothing was done, so we don't want to process a leave. */
@@ -1530,20 +1615,17 @@
/* Play the Join sound to both the conference and the user entering. */
if (!quiet) {
const char *join_sound = conf_get_sound(CONF_SOUND_JOIN, conference_bridge_user.b_profile.sounds);
- if (conference_bridge_user.playing_moh) {
- ast_moh_stop(chan);
- }
+
ast_stream_and_wait(chan, join_sound, "");
ast_autoservice_start(chan);
play_sound_file(conference_bridge, join_sound);
ast_autoservice_stop(chan);
- if (conference_bridge_user.playing_moh) {
- ast_moh_start(chan, conference_bridge_user.u_profile.moh_class, NULL);
- }
}
/* See if we need to automatically set this user as a video source or not */
handle_video_on_join(conference_bridge, conference_bridge_user.chan, ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_MARKEDUSER));
+
+ conf_moh_unsuspend(&conference_bridge_user);
/* Join our conference bridge for real */
send_join_event(conference_bridge_user.chan, conference_bridge->name);
@@ -1925,25 +2007,14 @@
struct conf_menu_entry *menu_entry,
struct conf_menu *menu)
{
- struct conference_bridge *conference_bridge = conference_bridge_user->conference_bridge;
-
/* See if music on hold is playing */
- ao2_lock(conference_bridge);
- if (conference_bridge_user->playing_moh) {
- /* MOH is going, let's stop it */
- ast_moh_stop(bridge_channel->chan);
- }
- ao2_unlock(conference_bridge);
+ conf_moh_suspend(conference_bridge_user);
/* execute the list of actions associated with this menu entry */
- execute_menu_entry(conference_bridge, conference_bridge_user, bridge_channel, menu_entry, menu);
+ execute_menu_entry(conference_bridge_user->conference_bridge, conference_bridge_user, bridge_channel, menu_entry, menu);
/* See if music on hold needs to be started back up again */
- ao2_lock(conference_bridge);
- if (conference_bridge_user->playing_moh) {
- ast_moh_start(bridge_channel->chan, conference_bridge_user->u_profile.moh_class, NULL);
- }
- ao2_unlock(conference_bridge);
+ conf_moh_unsuspend(conference_bridge_user);
return 0;
}
@@ -2835,13 +2906,7 @@
/* Turn on MOH/mute if the single participant is set up for it */
if (ast_test_flag(&only_participant->u_profile, USER_OPT_MUSICONHOLD)) {
only_participant->features.mute = 1;
- if (!ast_channel_internal_bridge(only_participant->chan) || !ast_bridge_suspend(conference_bridge->bridge, only_participant->chan)) {
- ast_moh_start(only_participant->chan, only_participant->u_profile.moh_class, NULL);
- only_participant->playing_moh = 1;
- if (ast_channel_internal_bridge(only_participant->chan)) {
- ast_bridge_unsuspend(conference_bridge->bridge, only_participant->chan);
- }
- }
+ conf_moh_start(only_participant);
}
}
Modified: team/oej/oolong-path-support-trunk/apps/confbridge/conf_state.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/apps/confbridge/conf_state.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/apps/confbridge/conf_state.c (original)
+++ team/oej/oolong-path-support-trunk/apps/confbridge/conf_state.c Fri Dec 14 04:23:05 2012
@@ -47,9 +47,28 @@
ast_log(LOG_ERROR, "Invalid event for confbridge user '%s'\n", cbu->u_profile.name);
}
+/*!
+ * \internal
+ * \brief Mute the user and play MOH if the user requires it.
+ *
+ * \param user Conference user to mute and optionally start MOH on.
+ *
+ * \return Nothing
+ */
+static void conf_mute_moh_inactive_waitmarked(struct conference_bridge_user *user)
+{
+ /* Be sure we are muted so we can't talk to anybody else waiting */
+ user->features.mute = 1;
+ /* Start music on hold if needed */
+ if (ast_test_flag(&user->u_profile, USER_OPT_MUSICONHOLD)) {
+ conf_moh_start(user);
+ }
+}
+
void conf_default_join_waitmarked(struct conference_bridge_user *cbu)
{
conf_add_user_waiting(cbu->conference_bridge, cbu);
+ conf_mute_moh_inactive_waitmarked(cbu);
conf_add_post_join_action(cbu, conf_handle_inactive_waitmarked);
}
Modified: team/oej/oolong-path-support-trunk/apps/confbridge/conf_state_multi_marked.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/apps/confbridge/conf_state_multi_marked.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/apps/confbridge/conf_state_multi_marked.c (original)
+++ team/oej/oolong-path-support-trunk/apps/confbridge/conf_state_multi_marked.c Fri Dec 14 04:23:05 2012
@@ -107,12 +107,8 @@
cbu_iter->conference_bridge->waitingusers++;
/* Handle muting/moh of cbu_iter if necessary */
if (ast_test_flag(&cbu_iter->u_profile, USER_OPT_MUSICONHOLD)) {
- cbu_iter->features.mute = 1;
- if (!ast_bridge_suspend(cbu_iter->conference_bridge->bridge, cbu_iter->chan)) {
- ast_moh_start(cbu_iter->chan, cbu_iter->u_profile.moh_class, NULL);
- cbu_iter->playing_moh = 1;
- ast_bridge_unsuspend(cbu_iter->conference_bridge->bridge, cbu_iter->chan);
- }
+ cbu_iter->features.mute = 1;
+ conf_moh_start(cbu_iter);
}
}
}
@@ -173,10 +169,8 @@
cbu->conference_bridge->waitingusers--;
AST_LIST_INSERT_TAIL(&cbu->conference_bridge->active_list, cbu_iter, list);
cbu->conference_bridge->activeusers++;
- if (cbu_iter->playing_moh && !ast_bridge_suspend(cbu->conference_bridge->bridge, cbu_iter->chan)) {
- cbu_iter->playing_moh = 0;
- ast_moh_stop(cbu_iter->chan);
- ast_bridge_unsuspend(cbu->conference_bridge->bridge, cbu_iter->chan);
+ if (cbu_iter->playing_moh) {
+ conf_moh_stop(cbu_iter);
}
/* only unmute them if they are not supposed to start muted */
if (!ast_test_flag(&cbu_iter->u_profile, USER_OPT_STARTMUTED)) {
Modified: team/oej/oolong-path-support-trunk/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/apps/confbridge/include/confbridge.h?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/apps/confbridge/include/confbridge.h (original)
+++ team/oej/oolong-path-support-trunk/apps/confbridge/include/confbridge.h Fri Dec 14 04:23:05 2012
@@ -236,6 +236,7 @@
struct ast_channel *chan; /*!< Asterisk channel participating */
struct ast_bridge_features features; /*!< Bridge features structure */
struct ast_bridge_tech_optimizations tech_args; /*!< Bridge technology optimizations for talk detection */
+ unsigned int suspended_moh; /*!< Count of active suspended MOH actions. */
unsigned int kicked:1; /*!< User has been kicked from the conference */
unsigned int playing_moh:1; /*!< MOH is currently being played to the user */
AST_LIST_HEAD_NOLOCK(, post_join_action) post_join_list; /*!< List of sounds to play after joining */;
@@ -358,6 +359,24 @@
*/
void conf_ended(struct conference_bridge *conference_bridge);
+/*!
+ * \brief Stop MOH for the conference user.
+ *
+ * \param user Conference user to stop MOH on.
+ *
+ * \return Nothing
+ */
+void conf_moh_stop(struct conference_bridge_user *user);
+
+/*!
+ * \brief Start MOH for the conference user.
+ *
+ * \param user Conference user to start MOH on.
+ *
+ * \return Nothing
+ */
+void conf_moh_start(struct conference_bridge_user *user);
+
/*! \brief Attempt to mute/play MOH to the only user in the conference if they require it
* \param conference_bridge A conference bridge containing a single user
*/
Modified: team/oej/oolong-path-support-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/channels/chan_sip.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/channels/chan_sip.c (original)
+++ team/oej/oolong-path-support-trunk/channels/chan_sip.c Fri Dec 14 04:23:05 2012
@@ -13213,10 +13213,11 @@
- Then other codecs in capabilities, including video
*/
- /* Prefer the audio codec we were requested to use, first, no matter what
- Note that p->prefcodec can include video codecs, so mask them out
- */
- if (ast_format_cap_has_joint(tmpcap, p->prefcaps)) {
+
+ /* Unless otherwise configured, the prefcaps is added before the peer's
+ * configured codecs.
+ */
+ if (!ast_test_flag(&p->flags[2], SIP_PAGE3_IGNORE_PREFCAPS) && ast_format_cap_has_joint(tmpcap, p->prefcaps)) {
ast_format_cap_iter_start(p->prefcaps);
while (!(ast_format_cap_iter_next(p->prefcaps, &tmp_fmt))) {
if (AST_FORMAT_GET_TYPE(tmp_fmt.id) != AST_FORMAT_TYPE_AUDIO) {
@@ -14098,7 +14099,9 @@
}
/* Add Session-Timers related headers */
- if (st_get_mode(p, 0) == SESSION_TIMER_MODE_ORIGINATE) {
+ if (st_get_mode(p, 0) == SESSION_TIMER_MODE_ORIGINATE
+ || (st_get_mode(p, 0) == SESSION_TIMER_MODE_ACCEPT
+ && st_get_se(p, FALSE) != DEFAULT_MIN_SE)) {
char i2astr[10];
if (!p->stimer->st_interval) {
@@ -14106,9 +14109,11 @@
}
p->stimer->st_active = TRUE;
-
- snprintf(i2astr, sizeof(i2astr), "%d", p->stimer->st_interval);
- add_header(&req, "Session-Expires", i2astr);
+ if (st_get_mode(p, 0) == SESSION_TIMER_MODE_ORIGINATE) {
+ snprintf(i2astr, sizeof(i2astr), "%d", p->stimer->st_interval);
+ add_header(&req, "Session-Expires", i2astr);
+ }
+
snprintf(i2astr, sizeof(i2astr), "%d", st_get_se(p, FALSE));
add_header(&req, "Min-SE", i2astr);
}
@@ -26507,6 +26512,24 @@
if (!ast_strlen_zero(referred_by)) {
pbx_builtin_setvar_helper(current.chan2, "_SIPTRANSFER_REFERER", referred_by);
}
+
+ /* When a call is transferred to voicemail from a Digium phone, there may be
+ * a Diversion header present in the REFER with an appropriate reason parameter
+ * set. We need to update the redirecting information appropriately.
+ */
+ ast_channel_lock(p->owner);
+ sip_pvt_lock(p);
+ ast_party_redirecting_init(&redirecting);
+ memset(&update_redirecting, 0, sizeof(update_redirecting));
+ change_redirecting_information(p, req, &redirecting, &update_redirecting, FALSE);
+
+ /* Do not hold the pvt lock during a call that causes an indicate or an async_goto.
+ * Those functions lock channels which will invalidate locking order if the pvt lock
+ * is held.*/
+ sip_pvt_unlock(p);
+ ast_channel_unlock(p->owner);
+ ast_channel_update_redirecting(current.chan2, &redirecting, &update_redirecting);
+ ast_party_redirecting_free(&redirecting);
}
sip_pvt_lock(p);
@@ -26554,20 +26577,7 @@
}
ast_set_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER); /* Delay hangup */
- /* When a call is transferred to voicemail from a Digium phone, there may be
- * a Diversion header present in the REFER with an appropriate reason parameter
- * set. We need to update the redirecting information appropriately.
- */
- ast_party_redirecting_init(&redirecting);
- memset(&update_redirecting, 0, sizeof(update_redirecting));
- change_redirecting_information(p, req, &redirecting, &update_redirecting, FALSE);
-
- /* Do not hold the pvt lock during a call that causes an indicate or an async_goto.
- * Those functions lock channels which will invalidate locking order if the pvt lock
- * is held.*/
sip_pvt_unlock(p);
- ast_channel_update_redirecting(current.chan2, &redirecting, &update_redirecting);
- ast_party_redirecting_free(&redirecting);
/* For blind transfers, move the call to the new extensions. For attended transfers on multiple
* servers - generate an INVITE with Replaces. Either way, let the dial plan decided
@@ -29318,7 +29328,10 @@
ast_log(LOG_WARNING, "Parsing of Min-SE header failed %s\n", p_hdrval);
return;
}
- p->stimer->st_interval = minse;
+ p->stimer->st_cached_min_se = minse;
+ if (p->stimer->st_interval < minse) {
+ p->stimer->st_interval = minse;
+ }
transmit_invite(p, SIP_INVITE, 1, 2, NULL);
}
@@ -30905,8 +30918,8 @@
ast_log(LOG_WARNING, "Invalid session-minse '%s' at line %d of %s\n", v->value, v->lineno, config);
peer->stimer.st_min_se = global_min_se;
}
- if (peer->stimer.st_min_se < 90) {
- ast_log(LOG_WARNING, "session-minse '%s' at line %d of %s is not allowed to be < 90 secs\n", v->value, v->lineno, config);
+ if (peer->stimer.st_min_se < DEFAULT_MIN_SE) {
+ ast_log(LOG_WARNING, "session-minse '%s' at line %d of %s is not allowed to be < %d secs\n", v->value, v->lineno, config, DEFAULT_MIN_SE);
peer->stimer.st_min_se = global_min_se;
}
} else if (!strcasecmp(v->name, "session-refresher")) {
@@ -30934,6 +30947,8 @@
ast_set2_flag(&peer->flags[2], ast_true(v->value), SIP_PAGE3_USE_AVPF);
} else if (!strcasecmp(v->name, "icesupport")) {
ast_set2_flag(&peer->flags[2], ast_true(v->value), SIP_PAGE3_ICE_SUPPORT);
+ } else if (!strcasecmp(v->name, "ignore_requested_pref")) {
+ ast_set2_flag(&peer->flags[2], ast_true(v->value), SIP_PAGE3_IGNORE_PREFCAPS);
} else {
ast_rtp_dtls_cfg_parse(&peer->dtls_cfg, v->name, v->value);
}
@@ -32003,8 +32018,8 @@
ast_log(LOG_WARNING, "Invalid session-minse '%s' at line %d of %s\n", v->value, v->lineno, config);
global_min_se = DEFAULT_MIN_SE;
}
- if (global_min_se < 90) {
- ast_log(LOG_WARNING, "session-minse '%s' at line %d of %s is not allowed to be < 90 secs\n", v->value, v->lineno, config);
+ if (global_min_se < DEFAULT_MIN_SE) {
+ ast_log(LOG_WARNING, "session-minse '%s' at line %d of %s is not allowed to be < %d secs\n", v->value, v->lineno, config, DEFAULT_MIN_SE);
global_min_se = DEFAULT_MIN_SE;
}
} else if (!strcasecmp(v->name, "session-refresher")) {
Modified: team/oej/oolong-path-support-trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/channels/chan_skinny.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/channels/chan_skinny.c (original)
+++ team/oej/oolong-path-support-trunk/channels/chan_skinny.c Fri Dec 14 04:23:05 2012
@@ -175,6 +175,7 @@
enum skinny_codecs {
SKINNY_CODEC_ALAW = 2,
SKINNY_CODEC_ULAW = 4,
+ SKINNY_CODEC_G722 = 6,
SKINNY_CODEC_G723_1 = 9,
SKINNY_CODEC_G729A = 12,
SKINNY_CODEC_G726_32 = 82, /* XXX Which packing order does this translate to? */
@@ -201,7 +202,7 @@
static int auth_timeout = DEFAULT_AUTH_TIMEOUT;
static int auth_limit = DEFAULT_AUTH_LIMIT;
static int unauth_sessions = 0;
-static char global_vmexten[AST_MAX_EXTENSION]; /* Voicemail pilot number */
+static char vmexten[AST_MAX_EXTENSION]; /* Voicemail pilot number */
static char used_context[AST_MAX_EXTENSION]; /* placeholder to check if context are already used in regcontext */
static char regcontext[AST_MAX_CONTEXT]; /* Context for auto-extension */
static char date_format[6] = "D-M-Y";
@@ -671,7 +672,6 @@
};
#define SOFT_KEY_TEMPLATE_RES_MESSAGE 0x0108
-
struct soft_key_template_definition {
char softKeyLabel[16];
uint32_t softKeyEvent;
@@ -1940,6 +1940,8 @@
return ast_format_set(result, AST_FORMAT_ALAW, 0);
case SKINNY_CODEC_ULAW:
return ast_format_set(result, AST_FORMAT_ULAW, 0);
+ case SKINNY_CODEC_G722:
+ return ast_format_set(result, AST_FORMAT_G722, 0);
case SKINNY_CODEC_G723_1:
return ast_format_set(result, AST_FORMAT_G723_1, 0);
case SKINNY_CODEC_G729A:
@@ -1963,6 +1965,8 @@
return SKINNY_CODEC_ALAW;
case AST_FORMAT_ULAW:
return SKINNY_CODEC_ULAW;
+ case AST_FORMAT_G722:
+ return SKINNY_CODEC_G722;
case AST_FORMAT_G723_1:
return SKINNY_CODEC_G723_1;
case AST_FORMAT_G729A:
@@ -2190,7 +2194,7 @@
char *tmp;
switch (ind) {
- case SUBSTATE_OFFHOOK:
+ case SKINNY_OFFHOOK:
return "SKINNY_OFFHOOK";
case SKINNY_ONHOOK:
return "SKINNY_ONHOOK";
@@ -3318,9 +3322,9 @@
switch (cmd) {
case CLI_INIT:
- e->command = "skinny debug [show|{off|all|packet|sub|audio|template|lock}]";
+ e->command = "skinny debug {audio|hint|lock|off|packet|show|sub|template|thread}";
e->usage =
- "Usage: skinny debug [show|{off|on|packet|sub|audio|template|lock}]\n"
+ "Usage: skinny debug {audio|hint|lock|off|packet|show|sub|template|thread}\n"
" Enables/Disables various Skinny debugging messages\n";
return NULL;
case CLI_GENERATE:
@@ -3362,13 +3366,13 @@
bitmask = DEBUG_PACKET;
} else if (!strncasecmp(arg, "audio", 5)) {
bitmask = DEBUG_AUDIO;
- } else if (!strncasecmp(arg, "lock", 6)) {
+ } else if (!strncasecmp(arg, "lock", 4)) {
bitmask = DEBUG_LOCK;
} else if (!strncasecmp(arg, "template", 8)) {
bitmask = DEBUG_TEMPLATE;
} else if (!strncasecmp(arg, "thread", 6)) {
bitmask = DEBUG_THREAD;
- } else if (!strncasecmp(arg, "hint", 6)) {
+ } else if (!strncasecmp(arg, "hint", 4)) {
bitmask = DEBUG_HINT;
} else {
ast_cli(a->fd, "Skinny Debugging - option '%s' unknown\n", a->argv[i]);
@@ -4166,7 +4170,7 @@
ast_cli(a->fd, " Bindaddress: %s\n", ast_inet_ntoa(bindaddr.sin_addr));
ast_cli(a->fd, " KeepAlive: %d\n", keep_alive);
ast_cli(a->fd, " Date Format: %s\n", date_format);
- ast_cli(a->fd, " Voice Mail Extension: %s\n", S_OR(global_vmexten, "(not set)"));
+ ast_cli(a->fd, " Voice Mail Extension: %s\n", S_OR(vmexten, "(not set)"));
ast_cli(a->fd, " Reg. context: %s\n", S_OR(regcontext, "(not set)"));
ast_cli(a->fd, " Jitterbuffer enabled: %s\n", AST_CLI_YESNO(ast_test_flag(&global_jbconf, AST_JB_ENABLED)));
if (ast_test_flag(&global_jbconf, AST_JB_ENABLED)) {
@@ -7207,6 +7211,9 @@
ast_context_find_or_create(NULL, NULL, context, "Skinny");
}
ast_copy_string(regcontext, v->value, sizeof(regcontext));
+ continue;
+ } else if (!strcasecmp(v->name, "vmexten")) {
+ ast_copy_string(vmexten, v->value, sizeof(vmexten));
continue;
} else if (!strcasecmp(v->name, "dateformat")) {
memcpy(date_format, v->value, sizeof(date_format));
@@ -7649,6 +7656,10 @@
AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_EXISTS,
AST_EVENT_IE_END);
}
+
+ if (!ast_strlen_zero(vmexten) && ast_strlen_zero(l->vmexten)) {
+ ast_copy_string(l->vmexten, vmexten, sizeof(l->vmexten));
+ }
ast_mutex_unlock(&l->lock);
Modified: team/oej/oolong-path-support-trunk/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/channels/sip/include/sip.h?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/channels/sip/include/sip.h (original)
+++ team/oej/oolong-path-support-trunk/channels/sip/include/sip.h Fri Dec 14 04:23:05 2012
@@ -374,10 +374,11 @@
#define SIP_PAGE3_DIRECT_MEDIA_OUTGOING (1 << 4) /*!< DP: Only send direct media reinvites on outgoing calls */
#define SIP_PAGE3_USE_AVPF (1 << 5) /*!< DGP: Support a minimal AVPF-compatible profile */
#define SIP_PAGE3_ICE_SUPPORT (1 << 6) /*!< DGP: Enable ICE support */
+#define SIP_PAGE3_IGNORE_PREFCAPS (1 << 7) /*!< DP: Ignore prefcaps when setting up an outgoing call leg */
#define SIP_PAGE3_FLAGS_TO_COPY \
(SIP_PAGE3_SNOM_AOC | SIP_PAGE3_SRTP_TAG_32 | SIP_PAGE3_NAT_AUTO_RPORT | SIP_PAGE3_NAT_AUTO_COMEDIA | \
- SIP_PAGE3_DIRECT_MEDIA_OUTGOING | SIP_PAGE3_USE_AVPF | SIP_PAGE3_ICE_SUPPORT)
+ SIP_PAGE3_DIRECT_MEDIA_OUTGOING | SIP_PAGE3_USE_AVPF | SIP_PAGE3_ICE_SUPPORT | SIP_PAGE3_IGNORE_PREFCAPS )
#define CHECK_AUTH_BUF_INITLEN 256
Modified: team/oej/oolong-path-support-trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/configs/sip.conf.sample?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/configs/sip.conf.sample (original)
+++ team/oej/oolong-path-support-trunk/configs/sip.conf.sample Fri Dec 14 04:23:05 2012
@@ -1267,6 +1267,8 @@
; dtlscafile
; dtlscapath
; dtlssetup
+; ignore_requested_pref ; Ignore the requested codec and determine the preferred codec
+; ; from the peer's configuration.
;
;------------------------------------------------------------------------------
Modified: team/oej/oolong-path-support-trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/configure.ac?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/configure.ac (original)
+++ team/oej/oolong-path-support-trunk/configure.ac Fri Dec 14 04:23:05 2012
@@ -489,11 +489,12 @@
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
-# Any one of these 4 packages support a mandatory requirement, so we want to check on them as early as possible.
+# Any one of these 5 packages support a mandatory requirement, so we want to check on them as early as possible.
AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
+AST_EXT_LIB_CHECK([UUID], [uuid], [uuid_generate_random], [uuid/uuid.h], [-luuid])
EDITLINE_LIB=""
if test "x$TERMCAP_LIB" != "x" ; then
@@ -508,6 +509,10 @@
AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)])
fi
AC_SUBST(EDITLINE_LIB)
+
+if test "x$UUID_LIB" == "x"; then
+ AC_MSG_ERROR([*** uuid support not found (this typically means the uuid development package is missing)])
+fi
# Another mandatory item (unless it's explicitly disabled)
AC_ARG_ENABLE([xmldoc],
@@ -717,11 +722,6 @@
AC_DEFINE([HAVE_SYS_ENDIAN_BSWAP16], 1, [Define to 1 if your sys/endian.h header file provides the bswap16 macro.]),
AC_MSG_RESULT(no)
)
-
-if test "${cross_compiling}" = "no";
-then
- AC_CHECK_FILE(/dev/urandom, AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define to 1 if your system has /dev/urandom.]))
-fi
AC_MSG_CHECKING(for locale_t in locale.h)
AC_LINK_IFELSE(
Modified: team/oej/oolong-path-support-trunk/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/include/asterisk/autoconfig.h.in?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/include/asterisk/autoconfig.h.in (original)
+++ team/oej/oolong-path-support-trunk/include/asterisk/autoconfig.h.in Fri Dec 14 04:23:05 2012
@@ -173,9 +173,6 @@
/* Define DAHDI headers version */
#undef HAVE_DAHDI_VERSION
-/* Define to 1 if your system has /dev/urandom. */
-#undef HAVE_DEV_URANDOM
-
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
@@ -848,19 +845,19 @@
/* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
#undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
-/* Define to 1 if `uid' is member of `struct sockpeercred'. */
+/* Define to 1 if `uid' is a member of `struct sockpeercred'. */
#undef HAVE_STRUCT_SOCKPEERCRED_UID
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
-/* Define to 1 if `cr_uid' is member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_CR_UID
-/* Define to 1 if `uid' is member of `struct ucred'. */
+/* Define to 1 if `uid' is a member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_UID
/* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1137,6 +1134,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@@ -1220,6 +1220,11 @@
/* Define to 1 if running on Darwin. */
#undef _DARWIN_UNLIMITED_SELECT
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
Modified: team/oej/oolong-path-support-trunk/include/asterisk/bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/include/asterisk/bridging.h?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/include/asterisk/bridging.h (original)
+++ team/oej/oolong-path-support-trunk/include/asterisk/bridging.h Fri Dec 14 04:23:05 2012
@@ -271,6 +271,32 @@
*/
struct ast_bridge *ast_bridge_new(uint32_t capabilities, int flags);
+/*!
+ * \brief Lock the bridge.
+ *
+ * \param bridge Bridge to lock
+ *
+ * \return Nothing
+ */
+#define ast_bridge_lock(bridge) _ast_bridge_lock(bridge, __FILE__, __PRETTY_FUNCTION__, __LINE__, #bridge)
+static inline void _ast_bridge_lock(struct ast_bridge *bridge, const char *file, const char *function, int line, const char *var)
+{
+ __ao2_lock(bridge, AO2_LOCK_REQ_MUTEX, file, function, line, var);
+}
+
+/*!
+ * \brief Unlock the bridge.
+ *
+ * \param bridge Bridge to unlock
+ *
+ * \return Nothing
+ */
+#define ast_bridge_unlock(bridge) _ast_bridge_unlock(bridge, __FILE__, __PRETTY_FUNCTION__, __LINE__, #bridge)
+static inline void _ast_bridge_unlock(struct ast_bridge *bridge, const char *file, const char *function, int line, const char *var)
+{
+ __ao2_unlock(bridge, file, function, line, var);
+}
+
/*! \brief See if it is possible to create a bridge
*
* \param capabilities The capabilities that the bridge will use
Modified: team/oej/oolong-path-support-trunk/main/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/main/Makefile?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/main/Makefile (original)
+++ team/oej/oolong-path-support-trunk/main/Makefile Fri Dec 14 04:23:05 2012
@@ -43,7 +43,7 @@
ifneq (x$(CAP_LIB),x)
AST_LIBS+=$(CAP_LIB)
endif
- AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv
+ AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv -luuid
else
AST_LIBS+=$(EDITLINE_LIB) -lm
endif
Modified: team/oej/oolong-path-support-trunk/main/aoc.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/main/aoc.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/main/aoc.c (original)
+++ team/oej/oolong-path-support-trunk/main/aoc.c Fri Dec 14 04:23:05 2012
@@ -1605,7 +1605,12 @@
AST_CLI_DEFINE(aoc_cli_debug_enable, "enable cli debugging of AOC messages"),
};
+static void aoc_shutdown(void)
+{
+ ast_cli_unregister_multiple(aoc_cli, ARRAY_LEN(aoc_cli));
+}
int ast_aoc_cli_init(void)
{
+ ast_register_atexit(aoc_shutdown);
return ast_cli_register_multiple(aoc_cli, ARRAY_LEN(aoc_cli));
}
Modified: team/oej/oolong-path-support-trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/main/asterisk.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/main/asterisk.c (original)
+++ team/oej/oolong-path-support-trunk/main/asterisk.c Fri Dec 14 04:23:05 2012
@@ -238,6 +238,7 @@
#include "asterisk/rtp_engine.h"
#include "asterisk/format.h"
#include "asterisk/aoc.h"
+#include "asterisk/uuid.h"
#include "../defaults.h"
@@ -4112,6 +4113,7 @@
}
ast_aoc_cli_init();
+ ast_uuid_init();
ast_makesocket();
sigemptyset(&sigs);
Modified: team/oej/oolong-path-support-trunk/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/main/cel.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/main/cel.c (original)
+++ team/oej/oolong-path-support-trunk/main/cel.c Fri Dec 14 04:23:05 2012
@@ -729,6 +729,7 @@
ao2_ref(linkedids, -1);
linkedids = NULL;
}
+ ast_cli_unregister(&cli_status);
}
int ast_cel_engine_init(void)
Modified: team/oej/oolong-path-support-trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/main/channel.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/main/channel.c (original)
+++ team/oej/oolong-path-support-trunk/main/channel.c Fri Dec 14 04:23:05 2012
@@ -8620,9 +8620,11 @@
static void channels_shutdown(void)
{
ast_data_unregister(NULL);
+ ast_cli_unregister_multiple(cli_channel, ARRAY_LEN(cli_channel));
if (channels) {
ao2_container_unregister("channels");
ao2_ref(channels, -1);
+ channels = NULL;
}
}
Modified: team/oej/oolong-path-support-trunk/main/data.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/main/data.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/main/data.c (original)
+++ team/oej/oolong-path-support-trunk/main/data.c Fri Dec 14 04:23:05 2012
@@ -3318,7 +3318,9 @@
static void data_shutdown(void)
{
ast_manager_unregister("DataGet");
+ ast_cli_unregister_multiple(cli_data, ARRAY_LEN(cli_data));
ao2_t_ref(root_data.container, -1, "Unref root_data.container in data_shutdown");
+ root_data.container = NULL;
ast_rwlock_destroy(&root_data.lock);
}
Modified: team/oej/oolong-path-support-trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/main/features.c?view=diff&rev=378016&r1=378015&r2=378016
==============================================================================
--- team/oej/oolong-path-support-trunk/main/features.c (original)
+++ team/oej/oolong-path-support-trunk/main/features.c Fri Dec 14 04:23:05 2012
@@ -3581,7 +3581,7 @@
* \retval -1 on failure.
*/
static int feature_interpret_helper(struct ast_channel *chan, struct ast_channel *peer,
- struct ast_bridge_config *config, const char *code, int sense, char *dynamic_features_buf,
+ struct ast_bridge_config *config, const char *code, int sense, const struct ast_str *dynamic_features_buf,
struct ast_flags *features, feature_interpret_op operation, struct ast_call_feature *feature)
{
int x;
@@ -3616,6 +3616,10 @@
res = AST_FEATURE_RETURN_SUCCESS; /* We found something */
} else if (operation == FEATURE_INTERPRET_DO) {
res = builtin_features[x].operation(chan, peer, config, code, sense, NULL);
+ ast_test_suite_event_notify("FEATURE_DETECTION",
+ "Result: success\r\n"
+ "Feature: %s",
+ builtin_features[x].sname);
}
if (feature) {
memcpy(feature, &builtin_features[x], sizeof(*feature));
[... 418 lines stripped ...]
More information about the asterisk-commits
mailing list