[asterisk-commits] schmidts: branch schmidts/unleash-the-beast r351706 - in /team/schmidts/unlea...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 20 03:57:34 CST 2012
Author: schmidts
Date: Fri Jan 20 03:57:21 2012
New Revision: 351706
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=351706
Log:
resolve conflict, enable automerge
Added:
team/schmidts/unleash-the-beast/codecs/ilbc/FrameClassify.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/FrameClassify.c
team/schmidts/unleash-the-beast/codecs/ilbc/FrameClassify.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/FrameClassify.h
team/schmidts/unleash-the-beast/codecs/ilbc/LICENSE
- copied unchanged from r351618, branches/1.8/codecs/ilbc/LICENSE
team/schmidts/unleash-the-beast/codecs/ilbc/LICENSE_ADDENDUM
- copied unchanged from r351618, branches/1.8/codecs/ilbc/LICENSE_ADDENDUM
team/schmidts/unleash-the-beast/codecs/ilbc/LPCdecode.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/LPCdecode.c
team/schmidts/unleash-the-beast/codecs/ilbc/LPCdecode.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/LPCdecode.h
team/schmidts/unleash-the-beast/codecs/ilbc/LPCencode.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/LPCencode.c
team/schmidts/unleash-the-beast/codecs/ilbc/LPCencode.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/LPCencode.h
team/schmidts/unleash-the-beast/codecs/ilbc/PATENTS
- copied unchanged from r351618, branches/1.8/codecs/ilbc/PATENTS
team/schmidts/unleash-the-beast/codecs/ilbc/StateConstructW.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/StateConstructW.c
team/schmidts/unleash-the-beast/codecs/ilbc/StateConstructW.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/StateConstructW.h
team/schmidts/unleash-the-beast/codecs/ilbc/StateSearchW.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/StateSearchW.c
team/schmidts/unleash-the-beast/codecs/ilbc/StateSearchW.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/StateSearchW.h
team/schmidts/unleash-the-beast/codecs/ilbc/anaFilter.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/anaFilter.c
team/schmidts/unleash-the-beast/codecs/ilbc/anaFilter.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/anaFilter.h
team/schmidts/unleash-the-beast/codecs/ilbc/constants.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/constants.c
team/schmidts/unleash-the-beast/codecs/ilbc/constants.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/constants.h
team/schmidts/unleash-the-beast/codecs/ilbc/createCB.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/createCB.c
team/schmidts/unleash-the-beast/codecs/ilbc/createCB.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/createCB.h
team/schmidts/unleash-the-beast/codecs/ilbc/doCPLC.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/doCPLC.c
team/schmidts/unleash-the-beast/codecs/ilbc/doCPLC.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/doCPLC.h
team/schmidts/unleash-the-beast/codecs/ilbc/enhancer.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/enhancer.c
team/schmidts/unleash-the-beast/codecs/ilbc/enhancer.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/enhancer.h
team/schmidts/unleash-the-beast/codecs/ilbc/extract-cfile.awk
- copied unchanged from r351618, branches/1.8/codecs/ilbc/extract-cfile.awk
team/schmidts/unleash-the-beast/codecs/ilbc/filter.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/filter.c
team/schmidts/unleash-the-beast/codecs/ilbc/filter.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/filter.h
team/schmidts/unleash-the-beast/codecs/ilbc/gainquant.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/gainquant.c
team/schmidts/unleash-the-beast/codecs/ilbc/gainquant.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/gainquant.h
team/schmidts/unleash-the-beast/codecs/ilbc/getCBvec.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/getCBvec.c
team/schmidts/unleash-the-beast/codecs/ilbc/getCBvec.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/getCBvec.h
team/schmidts/unleash-the-beast/codecs/ilbc/helpfun.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/helpfun.c
team/schmidts/unleash-the-beast/codecs/ilbc/helpfun.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/helpfun.h
team/schmidts/unleash-the-beast/codecs/ilbc/hpInput.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/hpInput.c
team/schmidts/unleash-the-beast/codecs/ilbc/hpInput.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/hpInput.h
team/schmidts/unleash-the-beast/codecs/ilbc/hpOutput.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/hpOutput.c
team/schmidts/unleash-the-beast/codecs/ilbc/hpOutput.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/hpOutput.h
team/schmidts/unleash-the-beast/codecs/ilbc/iCBConstruct.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iCBConstruct.c
team/schmidts/unleash-the-beast/codecs/ilbc/iCBConstruct.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iCBConstruct.h
team/schmidts/unleash-the-beast/codecs/ilbc/iCBSearch.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iCBSearch.c
team/schmidts/unleash-the-beast/codecs/ilbc/iCBSearch.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iCBSearch.h
team/schmidts/unleash-the-beast/codecs/ilbc/iLBC_decode.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iLBC_decode.c
team/schmidts/unleash-the-beast/codecs/ilbc/iLBC_decode.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iLBC_decode.h
team/schmidts/unleash-the-beast/codecs/ilbc/iLBC_define.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iLBC_define.h
team/schmidts/unleash-the-beast/codecs/ilbc/iLBC_encode.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iLBC_encode.c
team/schmidts/unleash-the-beast/codecs/ilbc/iLBC_encode.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iLBC_encode.h
team/schmidts/unleash-the-beast/codecs/ilbc/iLBC_test.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/iLBC_test.c
team/schmidts/unleash-the-beast/codecs/ilbc/lsf.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/lsf.c
team/schmidts/unleash-the-beast/codecs/ilbc/lsf.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/lsf.h
team/schmidts/unleash-the-beast/codecs/ilbc/packing.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/packing.c
team/schmidts/unleash-the-beast/codecs/ilbc/packing.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/packing.h
team/schmidts/unleash-the-beast/codecs/ilbc/rfc3951.txt
- copied unchanged from r351618, branches/1.8/codecs/ilbc/rfc3951.txt
team/schmidts/unleash-the-beast/codecs/ilbc/syntFilter.c
- copied unchanged from r351618, branches/1.8/codecs/ilbc/syntFilter.c
team/schmidts/unleash-the-beast/codecs/ilbc/syntFilter.h
- copied unchanged from r351618, branches/1.8/codecs/ilbc/syntFilter.h
team/schmidts/unleash-the-beast/contrib/scripts/valgrind_compare
- copied unchanged from r351618, branches/1.8/contrib/scripts/valgrind_compare
Modified:
team/schmidts/unleash-the-beast/ (props changed)
team/schmidts/unleash-the-beast/CHANGES
team/schmidts/unleash-the-beast/addons/chan_mobile.c
team/schmidts/unleash-the-beast/apps/app_chanspy.c
team/schmidts/unleash-the-beast/apps/app_dial.c
team/schmidts/unleash-the-beast/apps/app_followme.c
team/schmidts/unleash-the-beast/apps/app_meetme.c
team/schmidts/unleash-the-beast/apps/app_queue.c
team/schmidts/unleash-the-beast/autoconf/ast_gcc_attribute.m4
team/schmidts/unleash-the-beast/autoconf/libcurl.m4
team/schmidts/unleash-the-beast/bootstrap.sh
team/schmidts/unleash-the-beast/cel/cel_manager.c
team/schmidts/unleash-the-beast/cel/cel_odbc.c
team/schmidts/unleash-the-beast/cel/cel_pgsql.c
team/schmidts/unleash-the-beast/cel/cel_sqlite3_custom.c
team/schmidts/unleash-the-beast/channels/chan_dahdi.c
team/schmidts/unleash-the-beast/channels/chan_h323.c
team/schmidts/unleash-the-beast/channels/chan_iax2.c
team/schmidts/unleash-the-beast/channels/chan_sip.c
team/schmidts/unleash-the-beast/channels/sip/config_parser.c
team/schmidts/unleash-the-beast/channels/sip/reqresp_parser.c
team/schmidts/unleash-the-beast/codecs/codec_ilbc.c
team/schmidts/unleash-the-beast/codecs/ilbc/Makefile
team/schmidts/unleash-the-beast/configs/cel.conf.sample
team/schmidts/unleash-the-beast/configs/cel_custom.conf.sample
team/schmidts/unleash-the-beast/configs/cel_odbc.conf.sample
team/schmidts/unleash-the-beast/configs/cel_pgsql.conf.sample
team/schmidts/unleash-the-beast/configs/cel_sqlite3_custom.conf.sample
team/schmidts/unleash-the-beast/configs/rtp.conf.sample
team/schmidts/unleash-the-beast/configure
team/schmidts/unleash-the-beast/configure.ac
team/schmidts/unleash-the-beast/contrib/init.d/rc.debian.asterisk
team/schmidts/unleash-the-beast/contrib/scripts/autosupport
team/schmidts/unleash-the-beast/contrib/scripts/autosupport.8
team/schmidts/unleash-the-beast/contrib/scripts/get_ilbc_source.sh
team/schmidts/unleash-the-beast/contrib/scripts/install_prereq
team/schmidts/unleash-the-beast/contrib/scripts/live_ast
team/schmidts/unleash-the-beast/funcs/func_lock.c
team/schmidts/unleash-the-beast/include/asterisk/autoconfig.h.in
team/schmidts/unleash-the-beast/include/asterisk/frame.h
team/schmidts/unleash-the-beast/include/asterisk/module.h
team/schmidts/unleash-the-beast/include/asterisk/netsock2.h
team/schmidts/unleash-the-beast/include/asterisk/pbx.h
team/schmidts/unleash-the-beast/main/asterisk.c
team/schmidts/unleash-the-beast/main/audiohook.c
team/schmidts/unleash-the-beast/main/cel.c
team/schmidts/unleash-the-beast/main/dsp.c
team/schmidts/unleash-the-beast/main/features.c
team/schmidts/unleash-the-beast/main/file.c
team/schmidts/unleash-the-beast/main/pbx.c
team/schmidts/unleash-the-beast/main/rtp_engine.c
team/schmidts/unleash-the-beast/res/res_musiconhold.c
team/schmidts/unleash-the-beast/res/res_rtp_asterisk.c
team/schmidts/unleash-the-beast/res/res_timing_dahdi.c
team/schmidts/unleash-the-beast/res/res_timing_pthread.c
team/schmidts/unleash-the-beast/res/res_timing_timerfd.c
team/schmidts/unleash-the-beast/utils/extconf.c
Propchange: team/schmidts/unleash-the-beast/
------------------------------------------------------------------------------
automerge = *
Propchange: team/schmidts/unleash-the-beast/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 20 03:57:21 2012
@@ -1,1 +1,1 @@
-/branches/1.8:1-348785
+/branches/1.8:1-351705
Modified: team/schmidts/unleash-the-beast/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/CHANGES?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/CHANGES (original)
+++ team/schmidts/unleash-the-beast/CHANGES Fri Jan 20 03:57:21 2012
@@ -7,6 +7,28 @@
=== and the other UPGRADE files for older releases.
===
======================================================================
+
+------------------------------------------------------------------------------
+--- Functionality changes since Asterisk 1.8.9.0 -----------------------------
+------------------------------------------------------------------------------
+
+Followme changes
+-------------
+ * A new option, 'I' has been added to app_followme.
+ By setting this option, Asterisk will not update the caller with
+ connected line changes when they occur. This is similar to app_dial
+ and app_queue.
+
+RTP changes
+-------------
+ * A new option, 'probation' has been added to rtp.conf
+ RTP in strictrtp mode can now require more than 1 packet to exit learning
+ mode with a new source (and by default requires 4). The probation option
+ allows the user to change the required number of packets in sequence to any
+ desired value. Use a value of 1 to essentially restore the old behavior.
+ Also, with strictrtp on, Asterisk will now drop all packets until learning
+ mode has successfully exited. These changes are based on how pjmedia handles
+ media sources and source changes.
------------------------------------------------------------------------------
--- Functionality changes since Asterisk 1.8.7.1 -----------------------------
Modified: team/schmidts/unleash-the-beast/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/addons/chan_mobile.c?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/addons/chan_mobile.c (original)
+++ team/schmidts/unleash-the-beast/addons/chan_mobile.c Fri Jan 20 03:57:21 2012
@@ -2276,14 +2276,13 @@
*/
static char *hfp_parse_cusd(struct hfp_pvt *hfp, char *buf)
{
- int i, state, message_start, message_end;
+ int i, message_start, message_end;
char *cusd;
size_t s;
/* parse cusd message in the following format:
* +CUSD: 0,"100,00 EURO, valid till 01.01.2010, you are using tariff "Mega Tariff". More informations *111#."
*/
- state = 0;
message_start = 0;
message_end = 0;
s = strlen(buf);
@@ -2681,7 +2680,7 @@
{
int i, state, group;
size_t s;
- char *indicator = NULL, *values;
+ char *indicator = NULL;
hfp->nocallsetup = 1;
@@ -2720,7 +2719,6 @@
}
break;
case 5: /* mark the start of the value range */
- values = &buf[i];
state++;
break;
case 6: /* find the end of the value range */
@@ -2992,7 +2990,6 @@
sdp_list_t *l2cap_list = 0, *rfcomm_list = 0, *root_list = 0, *proto_list = 0, *access_proto_list = 0, *svc_uuid_list = 0;
sdp_data_t *channel = 0;
- int err = 0;
sdp_session_t *session = 0;
sdp_record_t *record = sdp_record_alloc();
@@ -3029,7 +3026,7 @@
if (!(session = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY)))
ast_log(LOG_WARNING, "Failed to connect sdp and create session.\n");
else
- err = sdp_record_register(session, record, 0);
+ sdp_record_register(session, record, 0);
sdp_data_free(channel);
sdp_list_free(rfcomm_list, 0);
Modified: team/schmidts/unleash-the-beast/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/apps/app_chanspy.c?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/apps/app_chanspy.c (original)
+++ team/schmidts/unleash-the-beast/apps/app_chanspy.c Fri Jan 20 03:57:21 2012
@@ -543,6 +543,9 @@
memset(&csth, 0, sizeof(csth));
ast_copy_flags(&csth.flags, flags, AST_FLAGS_ALL);
+ /* This is the audiohook which gives us the audio off the channel we are
+ spying on.
+ */
ast_audiohook_init(&csth.spy_audiohook, AST_AUDIOHOOK_TYPE_SPY, "ChanSpy");
if (start_spying(spyee_autochan, spyer_name, &csth.spy_audiohook)) {
@@ -550,17 +553,30 @@
return 0;
}
- ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
- ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy");
- if (start_spying(spyee_autochan, spyer_name, &csth.whisper_audiohook)) {
- ast_log(LOG_WARNING, "Unable to attach whisper audiohook to spyee %s. Whisper mode disabled!\n", name);
- }
- if ((spyee_bridge_autochan = ast_autochan_setup(ast_bridged_channel(spyee_autochan->chan)))) {
- ast_channel_lock(spyee_bridge_autochan->chan);
- if (start_spying(spyee_bridge_autochan, spyer_name, &csth.bridge_whisper_audiohook)) {
- ast_log(LOG_WARNING, "Unable to attach barge audiohook on spyee %s. Barge mode disabled!\n", name);
- }
- ast_channel_unlock(spyee_bridge_autochan->chan);
+ if (ast_test_flag(flags, OPTION_WHISPER | OPTION_BARGE | OPTION_DTMF_SWITCH_MODES)) {
+ /* This audiohook will let us inject audio from our channel into the
+ channel we are currently spying on.
+ */
+ ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
+
+ if (start_spying(spyee_autochan, spyer_name, &csth.whisper_audiohook)) {
+ ast_log(LOG_WARNING, "Unable to attach whisper audiohook to spyee %s. Whisper mode disabled!\n", name);
+ }
+ }
+
+ if (ast_test_flag(flags, OPTION_BARGE | OPTION_DTMF_SWITCH_MODES)) {
+ /* And this hook lets us inject audio into the channel that the spied on
+ channel is currently bridged with.
+ */
+ ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy");
+
+ if ((spyee_bridge_autochan = ast_autochan_setup(ast_bridged_channel(spyee_autochan->chan)))) {
+ ast_channel_lock(spyee_bridge_autochan->chan);
+ if (start_spying(spyee_bridge_autochan, spyer_name, &csth.bridge_whisper_audiohook)) {
+ ast_log(LOG_WARNING, "Unable to attach barge audiohook on spyee %s. Barge mode disabled!\n", name);
+ }
+ ast_channel_unlock(spyee_bridge_autochan->chan);
+ }
}
ast_channel_lock(chan);
@@ -683,15 +699,19 @@
ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
ast_channel_unlock(chan);
- ast_audiohook_lock(&csth.whisper_audiohook);
- ast_audiohook_detach(&csth.whisper_audiohook);
- ast_audiohook_unlock(&csth.whisper_audiohook);
- ast_audiohook_destroy(&csth.whisper_audiohook);
-
- ast_audiohook_lock(&csth.bridge_whisper_audiohook);
- ast_audiohook_detach(&csth.bridge_whisper_audiohook);
- ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
- ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
+ if (ast_test_flag(flags, OPTION_WHISPER | OPTION_BARGE | OPTION_DTMF_SWITCH_MODES)) {
+ ast_audiohook_lock(&csth.whisper_audiohook);
+ ast_audiohook_detach(&csth.whisper_audiohook);
+ ast_audiohook_unlock(&csth.whisper_audiohook);
+ ast_audiohook_destroy(&csth.whisper_audiohook);
+ }
+
+ if (ast_test_flag(flags, OPTION_BARGE | OPTION_DTMF_SWITCH_MODES)) {
+ ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+ ast_audiohook_detach(&csth.bridge_whisper_audiohook);
+ ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+ ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
+ }
ast_audiohook_lock(&csth.spy_audiohook);
ast_audiohook_detach(&csth.spy_audiohook);
Modified: team/schmidts/unleash-the-beast/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/apps/app_dial.c?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/apps/app_dial.c (original)
+++ team/schmidts/unleash-the-beast/apps/app_dial.c Fri Jan 20 03:57:21 2012
@@ -203,8 +203,8 @@
<para>Asterisk will ignore any forwarding requests it may receive on this dial attempt.</para>
</option>
<option name="I">
- <para>Asterisk will ignore any connected line update requests or redirecting party update
- requests it may receiveon this dial attempt.</para>
+ <para>Asterisk will ignore any connected line update requests or any redirecting party
+ update requests it may receive on this dial attempt.</para>
</option>
<option name="k">
<para>Allow the called party to enable parking of the call by sending
@@ -476,7 +476,7 @@
<para>If the <variable>OUTBOUND_GROUP</variable> variable is set, all peer channels created by this
application will be put into that group (as in Set(GROUP()=...).
If the <variable>OUTBOUND_GROUP_ONCE</variable> variable is set, all peer channels created by this
- application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,
+ application will be put into that group (as in Set(GROUP()=...). Unlike <variable>OUTBOUND_GROUP</variable>,
however, the variable will be unset after use.</para>
<para>This application sets the following channel variables:</para>
Modified: team/schmidts/unleash-the-beast/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/apps/app_followme.c?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/apps/app_followme.c (original)
+++ team/schmidts/unleash-the-beast/apps/app_followme.c Fri Jan 20 03:57:21 2012
@@ -67,20 +67,24 @@
<parameter name="followmeid" required="true" />
<parameter name="options">
<optionlist>
- <option name="s">
- <para>Playback the incoming status message prior to starting
- the follow-me step(s)</para>
- </option>
<option name="a">
<para>Record the caller's name so it can be announced to the
callee on each step.</para>
+ </option>
+ <option name="d">
+ <para>Disable the 'Please hold while we try to connect your call' announcement.</para>
+ </option>
+ <option name="I">
+ <para>Asterisk will ignore any connected line update requests
+ it may receive on this dial attempt.</para>
</option>
<option name="n">
<para>Playback the unreachable status message if we've run out
of steps to reach the or the callee has elected not to be reachable.</para>
</option>
- <option name="d">
- <para>Disable the 'Please hold while we try to connect your call' announcement.</para>
+ <option name="s">
+ <para>Playback the incoming status message prior to starting
+ the follow-me step(s)</para>
</option>
</optionlist>
</parameter>
@@ -130,13 +134,23 @@
};
struct fm_args {
+ /*! Inbound (caller) channel */
struct ast_channel *chan;
char *mohclass;
AST_LIST_HEAD_NOLOCK(cnumbers, number) cnumbers;
+ /*! Winning outbound (callee) channel */
+ struct ast_channel *outbound;
+ /*! Accumulated connected line information from inbound call. */
+ struct ast_party_connected_line connected_in;
+ /*! Accumulated connected line information from outbound call. */
+ struct ast_party_connected_line connected_out;
+ /*! TRUE if connected line information from inbound call changed. */
+ int pending_in_connected_update:1;
+ /*! TRUE if connected line information from outbound call is available. */
+ int pending_out_connected_update:1;
int status;
char context[AST_MAX_CONTEXT];
char namerecloc[AST_MAX_CONTEXT];
- struct ast_channel *outbound;
char takecall[20]; /*!< Digit mapping to take a call */
char nextindp[20]; /*!< Digit mapping to decline a call */
char callfromprompt[PATH_MAX]; /*!< Sound prompt name and path */
@@ -150,12 +164,17 @@
struct findme_user {
struct ast_channel *ochan;
+ /*! Accumulated connected line information from outgoing call. */
+ struct ast_party_connected_line connected;
+ long digts;
+ int ynidx;
int state;
char dialarg[256];
char yn[10];
- int ynidx;
- long digts;
- int cleared;
+ /*! TRUE if call cleared. */
+ int cleared:1;
+ /*! TRUE if connected line information is available. */
+ int pending_connected_update:1;
AST_LIST_ENTRY(findme_user) entry;
};
@@ -163,14 +182,16 @@
FOLLOWMEFLAG_STATUSMSG = (1 << 0),
FOLLOWMEFLAG_RECORDNAME = (1 << 1),
FOLLOWMEFLAG_UNREACHABLEMSG = (1 << 2),
- FOLLOWMEFLAG_DISABLEHOLDPROMPT = (1 << 3)
+ FOLLOWMEFLAG_DISABLEHOLDPROMPT = (1 << 3),
+ FOLLOWMEFLAG_IGNORE_CONNECTEDLINE = (1 << 4),
};
AST_APP_OPTIONS(followme_opts, {
- AST_APP_OPTION('s', FOLLOWMEFLAG_STATUSMSG ),
- AST_APP_OPTION('a', FOLLOWMEFLAG_RECORDNAME ),
- AST_APP_OPTION('n', FOLLOWMEFLAG_UNREACHABLEMSG ),
- AST_APP_OPTION('d', FOLLOWMEFLAG_DISABLEHOLDPROMPT ),
+ AST_APP_OPTION('a', FOLLOWMEFLAG_RECORDNAME),
+ AST_APP_OPTION('d', FOLLOWMEFLAG_DISABLEHOLDPROMPT),
+ AST_APP_OPTION('I', FOLLOWMEFLAG_IGNORE_CONNECTEDLINE),
+ AST_APP_OPTION('n', FOLLOWMEFLAG_UNREACHABLEMSG),
+ AST_APP_OPTION('s', FOLLOWMEFLAG_STATUSMSG),
});
static int ynlongest = 0;
@@ -524,13 +545,15 @@
if (!fmuser->cleared) {
clear_caller(fmuser);
}
+ ast_party_connected_line_free(&fmuser->connected);
ast_free(fmuser);
}
ast_free(findme_user_list);
}
-static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_user_list, struct number *nm, struct ast_channel *caller, char *namerecloc, int *status, struct fm_args *tpargs)
-{
+static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_user_list, struct number *nm, struct ast_channel *caller, char *namerecloc, struct fm_args *tpargs)
+{
+ struct ast_party_connected_line connected;
struct ast_channel *watchers[256];
int pos;
struct ast_channel *winner;
@@ -656,12 +679,21 @@
}
if (winner) {
/* Need to find out which channel this is */
- dg = 0;
- while ((winner != watchers[dg]) && (dg < 256))
- dg++;
- AST_LIST_TRAVERSE(findme_user_list, tmpuser, entry)
- if (tmpuser->ochan == winner)
+ for (dg = 0; dg < ARRAY_LEN(watchers); ++dg) {
+ if (winner == watchers[dg]) {
break;
+ }
+ }
+ if (dg) {
+ /* The winner is an outgoing channel. */
+ AST_LIST_TRAVERSE(findme_user_list, tmpuser, entry) {
+ if (tmpuser->ochan == winner) {
+ break;
+ }
+ }
+ } else {
+ tmpuser = NULL;
+ }
f = ast_read(winner);
if (f) {
if (f->frametype == AST_FRAME_CONTROL) {
@@ -715,32 +747,73 @@
ast_verb(3, "%s is ringing\n", winner->name);
break;
case AST_CONTROL_PROGRESS:
- ast_verb(3, "%s is making progress passing it to %s\n", winner->name, caller->name);
+ ast_verb(3, "%s is making progress\n", winner->name);
break;
case AST_CONTROL_VIDUPDATE:
- ast_verb(3, "%s requested a video update, passing it to %s\n", winner->name, caller->name);
+ ast_verb(3, "%s requested a video update\n", winner->name);
break;
case AST_CONTROL_SRCUPDATE:
- ast_verb(3, "%s requested a source update, passing it to %s\n", winner->name, caller->name);
+ ast_verb(3, "%s requested a source update\n", winner->name);
break;
case AST_CONTROL_PROCEEDING:
- ast_verb(3, "%s is proceeding passing it to %s\n", winner->name,caller->name);
+ ast_verb(3, "%s is proceeding\n", winner->name);
break;
case AST_CONTROL_HOLD:
- ast_verb(3, "Call on %s placed on hold\n", winner->name);
+ ast_verb(3, "%s placed call on hold\n", winner->name);
break;
case AST_CONTROL_UNHOLD:
- ast_verb(3, "Call on %s left from hold\n", winner->name);
+ ast_verb(3, "%s removed call from hold\n", winner->name);
break;
case AST_CONTROL_OFFHOOK:
case AST_CONTROL_FLASH:
/* Ignore going off hook and flash */
break;
+ case AST_CONTROL_CONNECTED_LINE:
+ if (!tmpuser) {
+ /*
+ * Hold connected line update from caller until we have a
+ * winner.
+ */
+ ast_verb(3,
+ "%s connected line has changed. Saving it until we have a winner.\n",
+ winner->name);
+ ast_party_connected_line_set_init(&connected, &tpargs->connected_in);
+ if (!ast_connected_line_parse_data(f->data.ptr, f->datalen, &connected)) {
+ ast_party_connected_line_set(&tpargs->connected_in,
+ &connected, NULL);
+ tpargs->pending_in_connected_update = 1;
+ }
+ ast_party_connected_line_free(&connected);
+ break;
+ }
+ if (ast_test_flag(&tpargs->followmeflags, FOLLOWMEFLAG_IGNORE_CONNECTEDLINE)) {
+ ast_verb(3, "Connected line update from %s prevented.\n",
+ winner->name);
+ } else {
+ ast_verb(3,
+ "%s connected line has changed. Saving it until answer.\n",
+ winner->name);
+ ast_party_connected_line_set_init(&connected, &tmpuser->connected);
+ if (!ast_connected_line_parse_data(f->data.ptr, f->datalen, &connected)) {
+ ast_party_connected_line_set(&tmpuser->connected,
+ &connected, NULL);
+ tmpuser->pending_connected_update = 1;
+ }
+ ast_party_connected_line_free(&connected);
+ }
+ break;
+ case AST_CONTROL_REDIRECTING:
+ /*
+ * Always ignore because the caller is already answered
+ * and is likely listening to MOH.
+ */
+ break;
case -1:
ast_verb(3, "%s stopped sounds\n", winner->name);
break;
default:
- ast_debug(1, "Dunno what to do with control type %d\n", f->subclass.integer);
+ ast_debug(1, "Dunno what to do with control type %d from %s\n",
+ f->subclass.integer, winner->name);
break;
}
}
@@ -761,36 +834,35 @@
}
if (!strcmp(tmpuser->yn, tpargs->nextindp)) {
ast_debug(1, "Next in dial plan step requested.\n");
- *status = 1;
ast_frfree(f);
- return NULL;
- }
-
- }
- }
-
- ast_frfree(f);
- } else {
- if (winner) {
- ast_debug(1, "we didn't get a frame. hanging up. dg is %d\n",dg);
- if (!dg) {
- clear_calling_tree(findme_user_list);
- return NULL;
- } else {
- tmpuser->state = -1;
- ast_hangup(winner);
- livechannels--;
- ast_debug(1, "live channels left %d\n", livechannels);
- if (!livechannels) {
- ast_verb(3, "no live channels left. exiting.\n");
return NULL;
}
}
}
- }
-
- } else
+
+ ast_frfree(f);
+ } else {
+ ast_debug(1, "we didn't get a frame. hanging up. dg is %d\n", dg);
+ if (!dg) {
+ /* Caller hung up. */
+ clear_calling_tree(findme_user_list);
+ return NULL;
+ } else {
+ /* Outgoing channel hung up. */
+ tmpuser->state = -1;
+ tmpuser->ochan = NULL;
+ ast_hangup(winner);
+ --livechannels;
+ ast_debug(1, "live channels left %d\n", livechannels);
+ if (!livechannels) {
+ ast_verb(3, "no live channels left. exiting.\n");
+ return NULL;
+ }
+ }
+ }
+ } else {
ast_debug(1, "timed out waiting for action\n");
+ }
}
/* --- WAIT FOR WINNER NUMBER END! -----------*/
@@ -810,7 +882,6 @@
struct findme_user *tmpuser;
struct findme_user *fmuser;
struct findme_user_listptr *findme_user_list;
- int status;
findme_user_list = ast_calloc(1, sizeof(*findme_user_list));
AST_LIST_HEAD_INIT_NOLOCK(findme_user_list);
@@ -825,7 +896,7 @@
}
caller = tpargs->chan;
- for (idx = 1; !winner && !ast_check_hangup(caller); ++idx) {
+ for (idx = 1; !ast_check_hangup(caller); ++idx) {
/* Find next followme numbers to dial. */
AST_LIST_TRAVERSE(&tpargs->cnumbers, nm, entry) {
if (nm->order == idx) {
@@ -916,16 +987,29 @@
continue;
}
- status = 0;
- winner = wait_for_winner(findme_user_list, nm, caller, tpargs->namerecloc, &status, tpargs);
-
- /* Clean up all calls but winner. */
+ winner = wait_for_winner(findme_user_list, nm, caller, tpargs->namerecloc, tpargs);
+ if (!winner) {
+ continue;
+ }
+
+ /* Destroy losing calls up to the winner. The rest will be destroyed later. */
while ((fmuser = AST_LIST_REMOVE_HEAD(findme_user_list, entry))) {
- if (!fmuser->cleared && fmuser->ochan != winner) {
- clear_caller(fmuser);
- }
- ast_free(fmuser);
- }
+ if (fmuser->ochan == winner) {
+ /* Pass any connected line info up. */
+ tpargs->connected_out = fmuser->connected;
+ tpargs->pending_out_connected_update = fmuser->pending_connected_update;
+ ast_free(fmuser);
+ break;
+ } else {
+ /* Destroy losing call. */
+ if (!fmuser->cleared) {
+ clear_caller(fmuser);
+ }
+ ast_party_connected_line_free(&fmuser->connected);
+ ast_free(fmuser);
+ }
+ }
+ break;
}
destroy_calling_tree(findme_user_list);
if (!winner) {
@@ -938,62 +1022,83 @@
static struct call_followme *find_realtime(const char *name)
{
- struct ast_variable *var = ast_load_realtime("followme", "name", name, SENTINEL), *v;
+ struct ast_variable *var;
+ struct ast_variable *v;
struct ast_config *cfg;
const char *catg;
- struct call_followme *new;
- struct ast_str *str = ast_str_create(16);
-
+ struct call_followme *new_follower;
+ struct ast_str *str;
+
+ str = ast_str_create(16);
+ if (!str) {
+ return NULL;
+ }
+
+ var = ast_load_realtime("followme", "name", name, SENTINEL);
if (!var) {
+ ast_free(str);
return NULL;
}
- if (!(new = alloc_profile(name))) {
+ if (!(new_follower = alloc_profile(name))) {
+ ast_variables_destroy(var);
+ ast_free(str);
return NULL;
}
for (v = var; v; v = v->next) {
if (!strcasecmp(v->name, "active")) {
if (ast_false(v->value)) {
- ast_mutex_destroy(&new->lock);
- ast_free(new);
+ ast_mutex_destroy(&new_follower->lock);
+ ast_free(new_follower);
+ ast_variables_destroy(var);
+ ast_free(str);
return NULL;
}
} else {
- profile_set_param(new, v->name, v->value, 0, 0);
+ profile_set_param(new_follower, v->name, v->value, 0, 0);
}
}
ast_variables_destroy(var);
- new->realtime = 1;
+ new_follower->realtime = 1;
/* Load numbers */
- if (!(cfg = ast_load_realtime_multientry("followme_numbers", "ordinal LIKE", "%", "name", name, SENTINEL))) {
- ast_mutex_destroy(&new->lock);
- ast_free(new);
+ cfg = ast_load_realtime_multientry("followme_numbers", "ordinal LIKE", "%", "name",
+ name, SENTINEL);
+ if (!cfg) {
+ ast_mutex_destroy(&new_follower->lock);
+ ast_free(new_follower);
+ ast_free(str);
return NULL;
}
for (catg = ast_category_browse(cfg, NULL); catg; catg = ast_category_browse(cfg, catg)) {
- const char *numstr, *timeoutstr, *ordstr;
+ const char *numstr;
+ const char *timeoutstr;
+ const char *ordstr;
int timeout;
struct number *cur;
+
if (!(numstr = ast_variable_retrieve(cfg, catg, "phonenumber"))) {
continue;
}
- if (!(timeoutstr = ast_variable_retrieve(cfg, catg, "timeout")) || sscanf(timeoutstr, "%30d", &timeout) != 1 || timeout < 1) {
+ if (!(timeoutstr = ast_variable_retrieve(cfg, catg, "timeout"))
+ || sscanf(timeoutstr, "%30d", &timeout) != 1
+ || timeout < 1) {
timeout = 25;
}
/* This one has to exist; it was part of the query */
ordstr = ast_variable_retrieve(cfg, catg, "ordinal");
ast_str_set(&str, 0, "%s", numstr);
if ((cur = create_followme_number(ast_str_buffer(str), timeout, atoi(ordstr)))) {
- AST_LIST_INSERT_TAIL(&new->numbers, cur, entry);
+ AST_LIST_INSERT_TAIL(&new_follower->numbers, cur, entry);
}
}
ast_config_destroy(cfg);
- return new;
+ ast_free(str);
+ return new_follower;
}
static void end_bridge_callback(void *data)
@@ -1126,6 +1231,9 @@
targs.status = 0;
targs.chan = chan;
ast_copy_string(targs.namerecloc, namerecloc, sizeof(targs.namerecloc));
+ ast_channel_lock(chan);
+ ast_connected_line_copy_from_caller(&targs.connected_in, &chan->caller);
+ ast_channel_unlock(chan);
findmeexec(&targs);
@@ -1163,12 +1271,28 @@
ast_hangup(outbound);
goto outrun;
}
+
+ /* Update connected line to caller if available. */
+ if (targs.pending_out_connected_update) {
+ if (ast_channel_connected_line_macro(outbound, caller, &targs.connected_out, 1, 0)) {
+ ast_channel_update_connected_line(caller, &targs.connected_out, NULL);
+ }
+ }
+
+ /* Update connected line to winner if changed. */
+ if (targs.pending_in_connected_update) {
+ if (ast_channel_connected_line_macro(caller, outbound, &targs.connected_in, 0, 0)) {
+ ast_channel_update_connected_line(outbound, &targs.connected_in, NULL);
+ }
+ }
+
res = ast_bridge_call(caller, outbound, &config);
ast_hangup(outbound);
}
outrun:
-
+ ast_party_connected_line_free(&targs.connected_in);
+ ast_party_connected_line_free(&targs.connected_out);
if (f->realtime) {
/* Not in list */
free_numbers(f);
Modified: team/schmidts/unleash-the-beast/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/apps/app_meetme.c?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/apps/app_meetme.c (original)
+++ team/schmidts/unleash-the-beast/apps/app_meetme.c Fri Jan 20 03:57:21 2012
@@ -5910,19 +5910,6 @@
return;
}
- /* We need to actually delete the previous versions of trunks and stations now */
- AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_stations, station, entry) {
- AST_RWLIST_REMOVE_CURRENT(entry);
- ast_free(station);
- }
- AST_RWLIST_TRAVERSE_SAFE_END;
-
- AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_trunks, trunk, entry) {
- AST_RWLIST_REMOVE_CURRENT(entry);
- ast_free(trunk);
- }
- AST_RWLIST_TRAVERSE_SAFE_END;
-
/* yay */
sla_load_config(1);
sla.reload = 0;
@@ -6821,6 +6808,24 @@
return 0;
}
+ if (reload) {
+ struct sla_station *station;
+ struct sla_trunk *trunk;
+
+ /* We need to actually delete the previous versions of trunks and stations now */
+ AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_stations, station, entry) {
+ AST_RWLIST_REMOVE_CURRENT(entry);
+ ast_free(station);
+ }
+ AST_RWLIST_TRAVERSE_SAFE_END;
+
+ AST_RWLIST_TRAVERSE_SAFE_BEGIN(&sla_trunks, trunk, entry) {
+ AST_RWLIST_REMOVE_CURRENT(entry);
+ ast_free(trunk);
+ }
+ AST_RWLIST_TRAVERSE_SAFE_END;
+ }
+
if ((val = ast_variable_retrieve(cfg, "general", "attemptcallerid")))
sla.attempt_callerid = ast_true(val);
Modified: team/schmidts/unleash-the-beast/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/apps/app_queue.c?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/apps/app_queue.c (original)
+++ team/schmidts/unleash-the-beast/apps/app_queue.c Fri Jan 20 03:57:21 2012
@@ -2346,9 +2346,8 @@
if (queue_vars) {
member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, SENTINEL);
if (!member_config) {
- ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
- ast_variables_destroy(queue_vars);
- return NULL;
+ ast_debug(1, "No queue_members defined in config extconfig.conf\n");
+ member_config = ast_config_new();
}
}
if (q) {
Modified: team/schmidts/unleash-the-beast/autoconf/ast_gcc_attribute.m4
URL: http://svnview.digium.com/svn/asterisk/team/schmidts/unleash-the-beast/autoconf/ast_gcc_attribute.m4?view=diff&rev=351706&r1=351705&r2=351706
==============================================================================
--- team/schmidts/unleash-the-beast/autoconf/ast_gcc_attribute.m4 (original)
+++ team/schmidts/unleash-the-beast/autoconf/ast_gcc_attribute.m4 Fri Jan 20 03:57:21 2012
@@ -11,8 +11,8 @@
if test "x$2" = "x"
then
AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
- []),
+ [AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
+ [])],
AC_MSG_RESULT(yes)
m4_ifval([$4],$4=1)
AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
@@ -20,8 +20,8 @@
)
else
AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
- []),
+ [AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
+ [])],
AC_MSG_RESULT(yes)
m4_ifval([$4],$4=1)
AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
Modified: team/schmidts/unleash-the-beast/autoconf/libcurl.m4
[... 4228 lines stripped ...]
More information about the asterisk-commits
mailing list