[asterisk-commits] twilson: branch group/srtp_reboot r268129 - in /team/group/srtp_reboot: ./ ap...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 4 16:03:49 CDT 2010
Author: twilson
Date: Fri Jun 4 16:03:39 2010
New Revision: 268129
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=268129
Log:
Merged revisions 267041,267065,267093,267096-267097,267138,267181,267261,267303,267305,267350,267352,267399,267445,267490,267492,267537,267622,267624,267669,267714,267775,267819,267862-267863,267877,267928,267972,268051,268127 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r267041 | pabelanger | 2010-06-02 12:25:05 -0500 (Wed, 02 Jun 2010) | 14 lines
Merged revisions 267009 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r267009 | pabelanger | 2010-06-02 13:14:37 -0400 (Wed, 02 Jun 2010) | 7 lines
Cleanup error/warning messages in AEL2 parser
(closes issue #16684)
Reported by: Silmaril
Patches:
patch_ael2_logmsg.diff uploaded by Silmaril (license 979)
........
................
r267065 | jpeeler | 2010-06-02 12:29:35 -0500 (Wed, 02 Jun 2010) | 12 lines
Fix infinite loop when loading codec speex
This changes the sample slinear frame data to contain non-zero data so that
translation calculations for speex works when preprocessing and VAD is turned
on. The encoder expects samples to be returned, but when attempted with the
mentioned two options and silent sample frames everything was discarded.
(closes issue #17240)
Reported by: seandarcy
Review: https://reviewboard.asterisk.org/r/682/
................
r267093 | russell | 2010-06-02 12:57:39 -0500 (Wed, 02 Jun 2010) | 2 lines
Silence a compiler warning.
................
r267096 | rmudgett | 2010-06-02 13:10:15 -0500 (Wed, 02 Jun 2010) | 38 lines
Generic Advice of Charge.
Asterisk Generic AOC Representation
- Generic AOC encode/decode routines.
(Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
- AST_CONTROL_AOC frame type to represent generic encoded AOC data
- Manager events for AOC-S, AOC-D, and AOC-E messages
Asterisk App Support
- app_dial AOC-S pass-through support on call setup
- app_queue AOC-S pass-through support on call setup
AOC Unit Tests
- AOC Unit Tests for encode/decode routines
- AOC Unit Test for manager event representation.
SIP AOC Support
- Pass-through of generic AOC-D and AOC-E messages to snom phones via the
snom AOC specification.
- Creation of chan_sip page3 flags for the addition of the new
'snom_aoc_enabled' sip.conf option.
IAX AOC Support
- Natively supports AOC pass-through through the use of the new
AST_CONTROL_AOC frame type
DAHDI AOC Support
- ETSI PRI full AOC Pass-through support
- 'aoc_enable' chan_dahdi.conf option for independently enabling
pass-through of AOC-S, AOC-D, AOC-E.
- 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
- DAHDI A() dial string option for requesting AOC services.
example usage:
;requests AOC-S, AOC-D, and AOC-E on call setup
exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))
Review: https://reviewboard.asterisk.org/r/552/
................
r267097 | mmichelson | 2010-06-02 13:13:18 -0500 (Wed, 02 Jun 2010) | 9 lines
Prevent use of uninitialized values.
Two struct sockaddr_ins are created when applying directmedia
host access rules. The addresses of these are passed to the RTP
engine to be filled in. However, the RTP engine inspects the fields
of the structs before actually taking action. This inspection caused
valgrind to be a bit unhappy.
................
r267138 | russell | 2010-06-02 13:53:38 -0500 (Wed, 02 Jun 2010) | 4 lines
Add a CLI command that blocks until Asterisk has fully booted.
Review: https://reviewboard.asterisk.org/r/684/
................
r267181 | dvossel | 2010-06-02 14:33:56 -0500 (Wed, 02 Jun 2010) | 2 lines
Update CHANGES and aoc help doc to reflect AOC additions
................
r267261 | rmudgett | 2010-06-02 16:05:32 -0500 (Wed, 02 Jun 2010) | 20 lines
Add ETSI Call Waiting support.
Add the ability to announce a call to an endpoint when there are no B
channels available. A call waiting call is a SETUP message with no B
channel selected.
Relevant specification: EN 300 056, EN 300 057, EN 300 058
For DAHDI/ISDN channels, the CHANNEL() dialplan function now supports the
"no_media_path" option.
* Returns "0" if there is a B channel associated with the call.
* Returns "1" if no B channel is associated with the call. The call is
either on hold or is a call waiting call.
If you are going to allow incoming call waiting calls then you need to use
CHANNEL(no_media_path) do determine if you must drop a call to accept the
new call.
Review: https://reviewboard.asterisk.org/r/568/
................
r267303 | russell | 2010-06-02 16:41:54 -0500 (Wed, 02 Jun 2010) | 6 lines
Ensure the -Wno-strict-aliasing flag makes it, even if ASTCFLAGS has been specified.
When ASTCFLAGS was specified with the make command, Makefile.rules was using
the specified value from the command line and not the one here, making it so this
flag would go missing.
................
r267305 | russell | 2010-06-02 16:44:06 -0500 (Wed, 02 Jun 2010) | 2 lines
Fix a build error on mac.
................
r267350 | rmudgett | 2010-06-02 17:28:58 -0500 (Wed, 02 Jun 2010) | 9 lines
Add ETSI Malicious Call ID support.
Add the ability to report malicious callers as an AMI event in the call
event class.
Relevant specification: EN 300 180
Review: https://reviewboard.asterisk.org/r/576/
................
r267352 | russell | 2010-06-02 17:46:37 -0500 (Wed, 02 Jun 2010) | 7 lines
try to fix some random chan_h323 compilation failures
After some debugging, the random chan_h323 build failures appear to be due
to complications introduced by some chan_h323 specific build stuff getting
triggered during a clean. Simplify this by moving the h323 clean commands
down into channels/makefile.
................
r267399 | rmudgett | 2010-06-02 19:02:14 -0500 (Wed, 02 Jun 2010) | 8 lines
Add ETSI Message Waiting Indication (MWI) support.
Add the ability to report waiting messages to ISDN endpoints (phones).
Relevant specification: EN 300 650 and EN 300 745
Review: https://reviewboard.asterisk.org/r/599/
................
r267445 | russell | 2010-06-03 09:48:09 -0500 (Thu, 03 Jun 2010) | 2 lines
Comment out a rule that likes to run implicitly unnecessarily, breaking builds
................
r267490 | russell | 2010-06-03 12:05:30 -0500 (Thu, 03 Jun 2010) | 2 lines
Remove a line that was killing Asterisk on startup.
................
r267492 | mmichelson | 2010-06-03 12:09:11 -0500 (Thu, 03 Jun 2010) | 7 lines
Remove unnecessary code relating to PLC.
The logic for handling generic PLC is now handled in ast_write in
channel.c instead of in translation code.
Review: https://reviewboard.asterisk.org/r/683/
................
r267537 | russell | 2010-06-03 12:31:41 -0500 (Thu, 03 Jun 2010) | 2 lines
Don't stop Asterisk if chan_usbradio isn't configured.
................
r267622 | rmudgett | 2010-06-03 13:38:00 -0500 (Thu, 03 Jun 2010) | 1 line
Make compile again.
................
r267624 | lmadsen | 2010-06-03 13:53:24 -0500 (Thu, 03 Jun 2010) | 7 lines
Update UPGRADE.txt and CHANGE for CDR functionality changes.
Updated the UPGRADE.txt and CHANGES file stating that CDR records will not be explicity
written unless cdr.conf exists and is configured.
(closes issue #17373)
Reported by: wdoekes
Tested by: pabelanger
................
r267669 | tilghman | 2010-06-03 14:46:42 -0500 (Thu, 03 Jun 2010) | 8 lines
Handle OOM errors more gracefully.
(closes issue #17084)
Reported by: falves11
Patches:
issue17084_162_A.diff uploaded by falves11 (license 374)
Tested by: falves11
................
r267714 | russell | 2010-06-03 15:41:24 -0500 (Thu, 03 Jun 2010) | 4 lines
Remove a LOG_WARNING.
This came up when using the sample configs, and just indicates expected behavior.
................
r267775 | tilghman | 2010-06-03 20:20:17 -0500 (Thu, 03 Jun 2010) | 14 lines
Merged revisions 267759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r267759 | tilghman | 2010-06-03 20:16:26 -0500 (Thu, 03 Jun 2010) | 7 lines
Make the default install path appear to be /usr on Linux, instead of /usr/local.
Also, reorganize the options, so that they're more alphabetical.
(closes issue #17013)
Reported by: klaus3000
........
................
r267819 | tilghman | 2010-06-03 20:36:46 -0500 (Thu, 03 Jun 2010) | 2 lines
If there's a default, turn it on, even when the option isn't specified.
................
r267862 | tilghman | 2010-06-03 21:58:55 -0500 (Thu, 03 Jun 2010) | 5 lines
As signed linear audio data is accessed as 16-bit values, certain processors require the values to be aligned in memory.
(closes issue #16912)
Reported by: michaelevdokimov
................
r267863 | twilson | 2010-06-03 22:11:31 -0500 (Thu, 03 Jun 2010) | 6 lines
Send an ACK for every final response received for an INVITE
From issue ABE-2247. RFC 3261 compliance for sections 13.2.24 and 17.1.1.2.
Review: https://reviewboard.asterisk.org/r/692/
................
r267877 | tilghman | 2010-06-03 22:20:47 -0500 (Thu, 03 Jun 2010) | 8 lines
As signed linear audio data is accessed as 16-bit values, certain processors require the values to be aligned in memory.
(closes issue #16912)
Reported by: michaelevdokimov
Patches:
asterisk.patch uploaded by michaelevdokimov (license 997)
Tested by: michaelevdokimov
................
r267928 | rmudgett | 2010-06-04 09:45:03 -0500 (Fri, 04 Jun 2010) | 15 lines
Incoming overlap dialing no longer works after sig_pri extraction.
The problem would manifest itself if your dialplan matching could accept
more digits to match than were actually dialed. The time out waiting for
overlap digits disconnected the call instead of matching any accumulated
digits to the dialplan.
Accidental conversion of a break out of loop as a break out of switch.
(closes issue #17401)
Reported by: avalentin
Patches:
issue17401_digit_timeout.patch uploaded by rmudgett (license 664)
Tested by: avalentin, rmudgett
................
r267972 | tilghman | 2010-06-04 11:31:25 -0500 (Fri, 04 Jun 2010) | 9 lines
Merged revisions 267971 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r267971 | tilghman | 2010-06-04 11:27:02 -0500 (Fri, 04 Jun 2010) | 2 lines
As-fixiate the build process
........
................
r268051 | tilghman | 2010-06-04 14:40:00 -0500 (Fri, 04 Jun 2010) | 13 lines
Merged revisions 268050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r268050 | tilghman | 2010-06-04 14:38:57 -0500 (Fri, 04 Jun 2010) | 6 lines
Build menuselect with the build environment's compiler, not the host (target)'s compiler.
(closes issue #17464)
Reported by: pprindeville
Tested by: tilghman
........
................
r268127 | tilghman | 2010-06-04 15:42:27 -0500 (Fri, 04 Jun 2010) | 9 lines
Merged revisions 268126 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r268126 | tilghman | 2010-06-04 15:41:24 -0500 (Fri, 04 Jun 2010) | 2 lines
AC_CONFIG_SUBDIRS has a bad side-effect on cross-compiles.
........
................
Added:
team/group/srtp_reboot/doc/advice_of_charge.txt
- copied unchanged from r268127, trunk/doc/advice_of_charge.txt
team/group/srtp_reboot/include/asterisk/aoc.h
- copied unchanged from r268127, trunk/include/asterisk/aoc.h
team/group/srtp_reboot/main/aoc.c
- copied unchanged from r268127, trunk/main/aoc.c
team/group/srtp_reboot/tests/test_aoc.c
- copied unchanged from r268127, trunk/tests/test_aoc.c
Modified:
team/group/srtp_reboot/ (props changed)
team/group/srtp_reboot/CHANGES
team/group/srtp_reboot/Makefile
team/group/srtp_reboot/UPGRADE.txt
team/group/srtp_reboot/apps/app_dial.c
team/group/srtp_reboot/apps/app_queue.c
team/group/srtp_reboot/apps/app_voicemail.c
team/group/srtp_reboot/autoconf/ast_ext_lib.m4
team/group/srtp_reboot/autoconf/libcurl.m4
team/group/srtp_reboot/channels/Makefile
team/group/srtp_reboot/channels/chan_dahdi.c
team/group/srtp_reboot/channels/chan_sip.c
team/group/srtp_reboot/channels/chan_usbradio.c
team/group/srtp_reboot/channels/h323/Makefile.in
team/group/srtp_reboot/channels/sig_pri.c
team/group/srtp_reboot/channels/sig_pri.h
team/group/srtp_reboot/channels/sip/include/sip.h
team/group/srtp_reboot/codecs/codec_adpcm.c
team/group/srtp_reboot/codecs/codec_alaw.c
team/group/srtp_reboot/codecs/codec_dahdi.c
team/group/srtp_reboot/codecs/codec_g722.c
team/group/srtp_reboot/codecs/codec_g726.c
team/group/srtp_reboot/codecs/codec_gsm.c
team/group/srtp_reboot/codecs/codec_lpc10.c
team/group/srtp_reboot/codecs/codec_ulaw.c
team/group/srtp_reboot/configs/chan_dahdi.conf.sample
team/group/srtp_reboot/configs/manager.conf.sample
team/group/srtp_reboot/configs/sip.conf.sample
team/group/srtp_reboot/configure
team/group/srtp_reboot/configure.ac
team/group/srtp_reboot/funcs/func_odbc.c
team/group/srtp_reboot/include/asterisk/autoconfig.h.in
team/group/srtp_reboot/include/asterisk/channel.h
team/group/srtp_reboot/include/asterisk/frame.h
team/group/srtp_reboot/include/asterisk/slin.h
team/group/srtp_reboot/include/asterisk/translate.h
team/group/srtp_reboot/main/Makefile
team/group/srtp_reboot/main/ast_expr2.y
team/group/srtp_reboot/main/asterisk.c
team/group/srtp_reboot/main/ccss.c
team/group/srtp_reboot/main/channel.c
team/group/srtp_reboot/main/cli.c
team/group/srtp_reboot/main/features.c
team/group/srtp_reboot/main/manager.c
team/group/srtp_reboot/main/translate.c
team/group/srtp_reboot/makeopts.in
team/group/srtp_reboot/utils/extconf.c
Propchange: team/group/srtp_reboot/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/group/srtp_reboot/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 4 16:03:39 2010
@@ -1,1 +1,1 @@
-/trunk:1-267019
+/trunk:1-268128
Modified: team/group/srtp_reboot/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/CHANGES?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/CHANGES (original)
+++ team/group/srtp_reboot/CHANGES Fri Jun 4 16:03:39 2010
@@ -65,6 +65,8 @@
a channel has secure media and/or signaling.
* Added directmediapermit/directmediadeny to limit which peers can send direct media
to each other
+ * Added the 'snom_aoc_enabled' option to turn on support for sending Advice of
+ Charge messages to snom phones.
IAX2 Changes
-----------
@@ -216,6 +218,11 @@
required to have secure signaling and/or media.
* CHANNEL(secure_signaling) and CHANNEL(secure_media) to get whether or not
the current channel has secure signaling and/or media.
+ * For DAHDI/ISDN channels, the CHANNEL() dialplan function now supports the
+ "no_media_path" option.
+ Returns "0" if there is a B channel associated with the call.
+ Returns "1" if no B channel is associated with the call. The call is either
+ on hold or is a call waiting call.
Dialplan Variables
------------------
@@ -349,6 +356,11 @@
to eliminate tromboned calls. A tromboned call goes out an interface and comes
back into the same interface. Tromboned calls happen because of call routing,
call deflection, call forwarding, and call transfer.
+ * Added the ability to send and receive ETSI Advice-Of-Charge messages.
+ * Added the ability to support call waiting calls. (The SETUP has no B channel
+ assigned.)
+ * Added Malicious Call ID (MCID) event to the AMI call event class.
+ * Added Message Waiting Indication (MWI) support for ISDN PTMP endpoints (phones).
Asterisk Manager Interface
--------------------------
@@ -379,6 +391,8 @@
'sip show peers'.
* Added Advice-Of-Charge events (AOC-S, AOC-D, and AOC-E) in the new
aoc event class.
+ * Added Advice-Of-Charge manager action, AOCMessage, for generating AOC-D and
+ AOC-E messages on a channel.
Channel Event Logging
---------------------
@@ -635,6 +649,12 @@
This means the asterisk pid file will now be in /var/run/asterisk/asterisk.pid on LINUX
instead of the /var/run/asterisk.pid where it used to be. This will make
installs as non-root easier to manage.
+
+CDR
+---
+
+* The cdr.conf file must exist and be correctly programmed in order for CDR records to
+ be written; they will no longer be explicitly written.
Asterisk Manager Interface
--------------------------
Modified: team/group/srtp_reboot/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/Makefile?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/Makefile (original)
+++ team/group/srtp_reboot/Makefile Fri Jun 4 16:03:39 2010
@@ -81,6 +81,7 @@
export AR
export RANLIB
export HOST_CC
+export BUILD_CC
export INSTALL
export STRIP
export DOWNLOAD
@@ -899,7 +900,7 @@
- at menuselect/nmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
# options for make in menuselect/
-MAKE_MENUSELECT=CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
+MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
menuselect/menuselect: menuselect/makeopts
+$(MAKE_MENUSELECT) menuselect
Modified: team/group/srtp_reboot/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/UPGRADE.txt?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/UPGRADE.txt (original)
+++ team/group/srtp_reboot/UPGRADE.txt Fri Jun 4 16:03:39 2010
@@ -1,6 +1,6 @@
===========================================================
===
-=== Information for upgrading between Asterisk 1.6 versions
+=== Information for upgrading between Asterisk versions
===
=== These files document all the changes that MUST be taken
=== into account when upgrading between the Asterisk
@@ -179,6 +179,9 @@
* res_jabber: autoprune has been disabled by default, to avoid misconfiguration
that would end up being interpreted as a bug once Asterisk started removing
the contacts from a user list.
+
+* The cdr.conf file must exist and be configured correctly in order for CDR
+ records to be written.
From 1.6.0.1 to 1.6.1:
Modified: team/group/srtp_reboot/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/apps/app_dial.c?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/apps/app_dial.c (original)
+++ team/group/srtp_reboot/apps/app_dial.c Fri Jun 4 16:03:39 2010
@@ -62,6 +62,7 @@
#include "asterisk/global_datastores.h"
#include "asterisk/dsp.h"
#include "asterisk/cel.h"
+#include "asterisk/aoc.h"
#include "asterisk/ccss.h"
#include "asterisk/indications.h"
@@ -638,6 +639,7 @@
struct ast_party_connected_line connected;
/*! TRUE if an AST_CONTROL_CONNECTED_LINE update was saved to the connected element. */
unsigned int pending_connected_update:1;
+ struct ast_aoc_decoded *aoc_s_rate_list;
};
static int detect_disconnect(struct ast_channel *chan, char code, struct ast_str *featurecode);
@@ -645,6 +647,7 @@
static void chanlist_free(struct chanlist *outgoing)
{
ast_party_connected_line_free(&outgoing->connected);
+ ast_aoc_destroy_decoded(outgoing->aoc_s_rate_list);
ast_free(outgoing);
}
@@ -1053,6 +1056,14 @@
ast_party_connected_line_free(&connected_caller);
}
}
+ if (o->aoc_s_rate_list) {
+ size_t encoded_size;
+ struct ast_aoc_encoded *encoded;
+ if ((encoded = ast_aoc_encode(o->aoc_s_rate_list, &encoded_size, o->chan))) {
+ ast_indicate_data(in, AST_CONTROL_AOC, encoded, encoded_size);
+ ast_aoc_destroy_encoded(encoded);
+ }
+ }
peer = c;
ast_copy_flags64(peerflags, o,
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
@@ -1113,6 +1124,14 @@
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
ast_channel_update_connected_line(in, &connected_caller);
ast_party_connected_line_free(&connected_caller);
+ }
+ }
+ if (o->aoc_s_rate_list) {
+ size_t encoded_size;
+ struct ast_aoc_encoded *encoded;
+ if ((encoded = ast_aoc_encode(o->aoc_s_rate_list, &encoded_size, o->chan))) {
+ ast_indicate_data(in, AST_CONTROL_AOC, encoded, encoded_size);
+ ast_aoc_destroy_encoded(encoded);
}
}
peer = c;
@@ -1230,6 +1249,17 @@
}
}
break;
+ case AST_CONTROL_AOC:
+ {
+ struct ast_aoc_decoded *decoded = ast_aoc_decode(f->data.ptr, f->datalen, o->chan);
+ if (decoded && (ast_aoc_get_msg_type(decoded) == AST_AOC_S)) {
+ ast_aoc_destroy_decoded(o->aoc_s_rate_list);
+ o->aoc_s_rate_list = decoded;
+ } else {
+ ast_aoc_destroy_decoded(decoded);
+ }
+ }
+ break;
case AST_CONTROL_REDIRECTING:
if (ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
ast_verb(3, "Redirecting update to %s prevented.\n", in->name);
Modified: team/group/srtp_reboot/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/apps/app_queue.c?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/apps/app_queue.c (original)
+++ team/group/srtp_reboot/apps/app_queue.c Fri Jun 4 16:03:39 2010
@@ -94,6 +94,7 @@
#include "asterisk/strings.h"
#include "asterisk/global_datastores.h"
#include "asterisk/taskprocessor.h"
+#include "asterisk/aoc.h"
#include "asterisk/callerid.h"
#include "asterisk/cel.h"
#include "asterisk/data.h"
@@ -820,6 +821,7 @@
unsigned int pending_connected_update:1;
/*! TRUE if caller id is not available for connected line */
unsigned int dial_callerid_absent:1;
+ struct ast_aoc_decoded *aoc_s_rate_list;
};
@@ -2654,6 +2656,7 @@
}
oo = outgoing;
outgoing = outgoing->q_next;
+ ast_aoc_destroy_decoded(oo->aoc_s_rate_list);
callattempt_free(oo);
}
}
@@ -3333,6 +3336,14 @@
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
ast_channel_update_connected_line(in, &connected_caller);
ast_party_connected_line_free(&connected_caller);
+ }
+ }
+ if (o->aoc_s_rate_list) {
+ size_t encoded_size;
+ struct ast_aoc_encoded *encoded;
+ if ((encoded = ast_aoc_encode(o->aoc_s_rate_list, &encoded_size, o->chan))) {
+ ast_indicate_data(in, AST_CONTROL_AOC, encoded, encoded_size);
+ ast_aoc_destroy_encoded(encoded);
}
}
peer = o;
@@ -3452,6 +3463,14 @@
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
ast_channel_update_connected_line(in, &connected_caller);
ast_party_connected_line_free(&connected_caller);
+ }
+ }
+ if (o->aoc_s_rate_list) {
+ size_t encoded_size;
+ struct ast_aoc_encoded *encoded;
+ if ((encoded = ast_aoc_encode(o->aoc_s_rate_list, &encoded_size, o->chan))) {
+ ast_indicate_data(in, AST_CONTROL_AOC, encoded, encoded_size);
+ ast_aoc_destroy_encoded(encoded);
}
}
peer = o;
@@ -3520,6 +3539,17 @@
} else {
if (ast_channel_connected_line_macro(o->chan, in, f, 1, 1)) {
ast_indicate_data(in, AST_CONTROL_CONNECTED_LINE, f->data.ptr, f->datalen);
+ }
+ }
+ break;
+ case AST_CONTROL_AOC:
+ {
+ struct ast_aoc_decoded *decoded = ast_aoc_decode(f->data.ptr, f->datalen, o->chan);
+ if (decoded && (ast_aoc_get_msg_type(decoded) == AST_AOC_S)) {
+ ast_aoc_destroy_decoded(o->aoc_s_rate_list);
+ o->aoc_s_rate_list = decoded;
+ } else {
+ ast_aoc_destroy_decoded(decoded);
}
}
break;
Modified: team/group/srtp_reboot/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/apps/app_voicemail.c?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/apps/app_voicemail.c (original)
+++ team/group/srtp_reboot/apps/app_voicemail.c Fri Jun 4 16:03:39 2010
@@ -12395,7 +12395,9 @@
char attach[] = "/var/lib/asterisk/sounds/en/tt-weasels", attach2[] = "/var/lib/asterisk/sounds/en/tt-somethingwrong";
char buf[256] = ""; /* No line should actually be longer than 80 */
struct ast_channel *chan = NULL;
- struct ast_vm_user *vmu, vmus;
+ struct ast_vm_user *vmu, vmus = {
+ .flags = 0,
+ };
FILE *file;
struct {
char *name;
Modified: team/group/srtp_reboot/autoconf/ast_ext_lib.m4
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/autoconf/ast_ext_lib.m4?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/autoconf/ast_ext_lib.m4 (original)
+++ team/group/srtp_reboot/autoconf/ast_ext_lib.m4 Fri Jun 4 16:03:39 2010
@@ -53,7 +53,8 @@
fi
;;
esac
- ])
+ ],
+ [m4_ifval($4, [$2="$4"])])
AC_SUBST($2)
])
Modified: team/group/srtp_reboot/autoconf/libcurl.m4
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/autoconf/libcurl.m4?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/autoconf/libcurl.m4 (original)
+++ team/group/srtp_reboot/autoconf/libcurl.m4 Fri Jun 4 16:03:39 2010
@@ -55,6 +55,7 @@
AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
+ AC_SUBST(PBX_CURL)
AC_ARG_WITH(libcurl,
AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
Modified: team/group/srtp_reboot/channels/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/channels/Makefile?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/channels/Makefile (original)
+++ team/group/srtp_reboot/channels/Makefile Fri Jun 4 16:03:39 2010
@@ -63,8 +63,8 @@
clean::
$(MAKE) -C misdn clean
- if [ -f h323/Makefile ]; then $(MAKE) -C h323 clean; fi
rm -f sip/*.o sip/*.i
+ rm -f h323/libchanh323.a h323/Makefile.ast h323/*.o h323/*.dep
dist-clean::
rm -f h323/Makefile
Modified: team/group/srtp_reboot/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/channels/chan_dahdi.c?view=diff&rev=268129&r1=268128&r2=268129
==============================================================================
--- team/group/srtp_reboot/channels/chan_dahdi.c (original)
+++ team/group/srtp_reboot/channels/chan_dahdi.c Fri Jun 4 16:03:39 2010
@@ -800,7 +800,10 @@
unsigned int didtdd:1; /*!< flag to say its done it once */
/*! \brief TRUE if analog type line dialed no digits in Dial() */
unsigned int dialednone:1;
- /*! \brief TRUE if in the process of dialing digits or sending something. */
+ /*!
+ * \brief TRUE if in the process of dialing digits or sending something.
+ * \note This is used as a receive squelch for ISDN until connected.
+ */
unsigned int dialing:1;
/*! \brief TRUE if the transfer capability of the call is digital. */
unsigned int digital:1;
@@ -1075,6 +1078,8 @@
* \note The "group" bitmapped group string read in from chan_dahdi.conf
*/
ast_group_t group;
+ /*! \brief Default call PCM encoding format: DAHDI_LAW_ALAW or DAHDI_LAW_MULAW. */
+ int law_default;
/*! \brief Active PCM encoding format: DAHDI_LAW_ALAW or DAHDI_LAW_MULAW */
int law;
int confno; /*!< Our conference */
@@ -2232,7 +2237,8 @@
p->dsp = NULL;
}
- law = DAHDI_LAW_DEFAULT;
+ p->law = p->law_default;
+ law = p->law_default;
res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETLAW, &law);
if (res < 0)
ast_log(LOG_WARNING, "Unable to set law on channel %d to default: %s\n", p->channel, strerror(errno));
@@ -2391,10 +2397,22 @@
int audio;
int newlaw = -1;
- /* Set to audio mode at this point */
- audio = 1;
- if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &audio) == -1)
- ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n", p->channel, audio, strerror(errno));
+ switch (p->sig) {
+ case SIG_PRI_LIB_HANDLE_CASES:
+ if (((struct sig_pri_chan *) p->sig_pvt)->no_b_channel) {
+ /* PRI nobch pseudo channel. Does not handle ioctl(DAHDI_AUDIOMODE) */
+ break;
+ }
+ /* Fall through */
+ default:
+ /* Set to audio mode at this point */
+ audio = 1;
+ if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &audio) == -1) {
+ ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n",
+ p->channel, audio, strerror(errno));
+ }
+ break;
+ }
if (law != SIG_PRI_DEFLAW) {
dahdi_setlaw(p->subs[SUB_REAL].dfd, (law == SIG_PRI_ULAW) ? DAHDI_LAW_MULAW : DAHDI_LAW_ALAW);
@@ -2414,6 +2432,54 @@
break;
}
return dahdi_new(p, state, startpbx, SUB_REAL, newlaw, transfercapability, requestor ? requestor->linkedid : "");
+}
+#endif /* defined(HAVE_PRI) */
+
+static int set_actual_gain(int fd, float rxgain, float txgain, float rxdrc, float txdrc, int law);
+
+#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Open the PRI channel media path.
+ * \since 1.8
+ *
+ * \param p Channel private control structure.
+ *
+ * \return Nothing
+ */
+static void my_pri_open_media(void *p)
+{
+ struct dahdi_pvt *pvt = p;
+ int res;
+ int dfd;
+ int set_val;
+
+ dfd = pvt->subs[SUB_REAL].dfd;
+
+ /* Open the media path. */
+ set_val = 1;
+ res = ioctl(dfd, DAHDI_AUDIOMODE, &set_val);
+ if (res < 0) {
+ ast_log(LOG_WARNING, "Unable to enable audio mode on channel %d (%s)\n",
+ pvt->channel, strerror(errno));
+ }
+
+ /* Set correct companding law for this call. */
+ res = dahdi_setlaw(dfd, pvt->law);
+ if (res < 0) {
+ ast_log(LOG_WARNING, "Unable to set law on channel %d\n", pvt->channel);
+ }
+
+ /* Set correct gain for this call. */
+ if (pvt->digital) {
+ res = set_actual_gain(dfd, 0, 0, pvt->rxdrc, pvt->txdrc, pvt->law);
+ } else {
+ res = set_actual_gain(dfd, pvt->rxgain, pvt->txgain, pvt->rxdrc, pvt->txdrc,
+ pvt->law);
+ }
+ if (res < 0) {
+ ast_log(LOG_WARNING, "Unable to set gains on channel %d\n", pvt->channel);
+ }
}
#endif /* defined(HAVE_PRI) */
@@ -2734,6 +2800,17 @@
new_chan->dsp_features = old_chan->dsp_features;
old_chan->dsp = NULL;
old_chan->dsp_features = 0;
+
+ /* Transfer flags from the old channel. */
+ new_chan->dialing = old_chan->dialing;
+ new_chan->digital = old_chan->digital;
+ new_chan->outgoing = old_chan->outgoing;
+ old_chan->dialing = 0;
+ old_chan->digital = 0;
+ old_chan->outgoing = 0;
+
+ /* More stuff to transfer to the new channel. */
+ new_chan->law = old_chan->law;
}
static int sig_pri_tone_to_dahditone(enum sig_pri_tone tone)
@@ -2997,6 +3074,9 @@
ast_module_unref(ast_module_info->self);
}
+#if defined(HAVE_PRI_CALL_WAITING)
+static void my_pri_init_config(void *priv, struct sig_pri_pri *pri);
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
static int dahdi_new_pri_nobch_channel(struct sig_pri_pri *pri);
static struct sig_pri_callback dahdi_pri_callbacks =
@@ -3016,11 +3096,15 @@
.set_dnid = my_pri_set_dnid,
.set_rdnis = my_pri_set_rdnis,
.new_nobch_intf = dahdi_new_pri_nobch_channel,
+#if defined(HAVE_PRI_CALL_WAITING)
+ .init_config = my_pri_init_config,
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
.get_orig_dialstring = my_get_orig_dialstring,
.make_cc_dialstring = my_pri_make_cc_dialstring,
.update_span_devstate = dahdi_pri_update_span_devstate,
.module_ref = my_module_ref,
.module_unref = my_module_unref,
+ .open_media = my_pri_open_media,
};
#endif /* defined(HAVE_PRI) */
@@ -3155,6 +3239,7 @@
.set_needringing = my_set_needringing,
};
+/*! Round robin search locations. */
static struct dahdi_pvt *round_robin[32];
#if defined(HAVE_SS7)
@@ -4179,7 +4264,7 @@
if (slavechannel < 1) {
p->confno = zi.confno;
}
- memcpy(&c->curconf, &zi, sizeof(c->curconf));
+ c->curconf = zi;
ast_debug(1, "Added %d to conference %d/%d\n", c->dfd, c->curconf.confmode, c->curconf.confno);
return 0;
}
@@ -4850,13 +4935,8 @@
#ifdef HAVE_PRI
if (dahdi_sig_pri_lib_handles(p->sig)) {
- struct dahdi_params ps;
-
- memset(&ps, 0, sizeof(ps));
- if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &ps)) {
- ast_log(LOG_ERROR, "Could not get params\n");
- }
- res = sig_pri_call(p->sig_pvt, ast, rdest, timeout, (ps.curlaw == DAHDI_LAW_MULAW) ? PRI_LAYER_1_ULAW : PRI_LAYER_1_ALAW);
+ res = sig_pri_call(p->sig_pvt, ast, rdest, timeout,
+ (p->law == DAHDI_LAW_ALAW) ? PRI_LAYER_1_ALAW : PRI_LAYER_1_ULAW);
ast_mutex_unlock(&p->lock);
return res;
}
@@ -5736,7 +5816,8 @@
}
revert_fax_buffers(p, ast);
dahdi_setlinear(p->subs[SUB_REAL].dfd, 0);
- law = DAHDI_LAW_DEFAULT;
+ p->law = p->law_default;
+ law = p->law_default;
res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETLAW, &law);
dahdi_disable_ec(p);
update_conf(p);
@@ -5907,7 +5988,8 @@
revert_fax_buffers(p, ast);
- law = DAHDI_LAW_DEFAULT;
+ p->law = p->law_default;
+ law = p->law_default;
res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETLAW, &law);
if (res < 0)
ast_log(LOG_WARNING, "Unable to set law on channel %d to default: %s\n", p->channel, strerror(errno));
@@ -6464,6 +6546,22 @@
}
ast_mutex_unlock(&p->lock);
#endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
+ } else if (!strcasecmp(data, "no_media_path")) {
+ ast_mutex_lock(&p->lock);
+ switch (p->sig) {
+ case SIG_PRI_LIB_HANDLE_CASES:
+ /*
+ * TRUE if the call is on hold or is call waiting because
+ * there is no media path available.
+ */
+ snprintf(buf, len, "%d", ((struct sig_pri_chan *) p->sig_pvt)->no_b_channel);
+ break;
+ default:
+ *buf = '\0';
+ res = -1;
+ break;
+ }
+ ast_mutex_unlock(&p->lock);
#endif /* defined(HAVE_PRI) */
} else {
*buf = '\0';
@@ -8871,12 +8969,10 @@
{
struct ast_channel *tmp;
format_t deflaw;
- int res;
int x;
int features;
struct ast_str *chan_name;
struct ast_variable *v;
- struct dahdi_params ps;
if (i->subs[idx].owner) {
ast_log(LOG_WARNING, "Channel %d already has a %s call\n", i->channel,subnames[idx]);
@@ -8907,21 +9003,29 @@
}
#endif /* defined(HAVE_PRI) */
ast_channel_cc_params_init(tmp, i->cc_params);
- memset(&ps, 0, sizeof(ps));
- res = ioctl(i->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &ps);
- if (res) {
- ast_log(LOG_WARNING, "Unable to get parameters, assuming MULAW: %s\n", strerror(errno));
- ps.curlaw = DAHDI_LAW_MULAW;
- }
- if (ps.curlaw == DAHDI_LAW_ALAW)
- deflaw = AST_FORMAT_ALAW;
- else
- deflaw = AST_FORMAT_ULAW;
if (law) {
- if (law == DAHDI_LAW_ALAW)
+ i->law = law;
+ if (law == DAHDI_LAW_ALAW) {
deflaw = AST_FORMAT_ALAW;
- else
+ } else {
deflaw = AST_FORMAT_ULAW;
+ }
+ } else {
+ switch (i->sig) {
+ case SIG_PRI_LIB_HANDLE_CASES:
+ /* Make sure companding law is known. */
+ i->law = (i->law_default == DAHDI_LAW_ALAW)
+ ? DAHDI_LAW_ALAW : DAHDI_LAW_MULAW;
+ break;
+ default:
+ i->law = i->law_default;
+ break;
+ }
+ if (i->law_default == DAHDI_LAW_ALAW) {
+ deflaw = AST_FORMAT_ALAW;
+ } else {
+ deflaw = AST_FORMAT_ULAW;
+ }
}
ast_channel_set_fd(tmp, 0, i->subs[idx].dfd);
tmp->nativeformats = deflaw;
@@ -11538,6 +11642,7 @@
destroy_dahdi_pvt(tmp);
return NULL;
}
+ tmp->law_default = p.curlaw;
tmp->law = p.curlaw;
tmp->span = p.spanno;
span = p.spanno - 1;
@@ -11777,9 +11882,24 @@
pris[span].pri.cc_qsig_signaling_link_rsp =
conf->pri.pri.cc_qsig_signaling_link_rsp;
#endif /* defined(HAVE_PRI_CCSS) */
+#if defined(HAVE_PRI_CALL_WAITING)
+ pris[span].pri.max_call_waiting_calls =
+ conf->pri.pri.max_call_waiting_calls;
+ pris[span].pri.allow_call_waiting_calls =
+ conf->pri.pri.allow_call_waiting_calls;
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
pris[span].pri.transfer = conf->chan.transfer;
pris[span].pri.facilityenable = conf->pri.pri.facilityenable;
+#if defined(HAVE_PRI_AOC_EVENTS)
+ pris[span].pri.aoc_passthrough_flag = conf->pri.pri.aoc_passthrough_flag;
+ pris[span].pri.aoce_delayhangup = conf->pri.pri.aoce_delayhangup;
+#endif /* defined(HAVE_PRI_AOC_EVENTS) */
ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list));
+#if defined(HAVE_PRI_MWI)
+ ast_copy_string(pris[span].pri.mwi_mailboxes,
+ conf->pri.pri.mwi_mailboxes,
+ sizeof(pris[span].pri.mwi_mailboxes));
+#endif /* defined(HAVE_PRI_MWI) */
ast_copy_string(pris[span].pri.idledial, conf->pri.pri.idledial, sizeof(pris[span].pri.idledial));
ast_copy_string(pris[span].pri.idleext, conf->pri.pri.idleext, sizeof(pris[span].pri.idleext));
ast_copy_string(pris[span].pri.internationalprefix, conf->pri.pri.internationalprefix, sizeof(pris[span].pri.internationalprefix));
@@ -11792,6 +11912,20 @@
for (x = 0; x < PRI_MAX_TIMERS; x++) {
pris[span].pri.pritimers[x] = conf->pri.pri.pritimers[x];
}
+
+#if defined(HAVE_PRI_CALL_WAITING)
+ /* Channel initial config parameters. */
+ pris[span].pri.ch_cfg.stripmsd = conf->chan.stripmsd;
+ pris[span].pri.ch_cfg.hidecallerid = conf->chan.hidecallerid;
+ pris[span].pri.ch_cfg.hidecalleridname = conf->chan.hidecalleridname;
+ pris[span].pri.ch_cfg.immediate = conf->chan.immediate;
+ pris[span].pri.ch_cfg.priexclusive = conf->chan.priexclusive;
+ pris[span].pri.ch_cfg.priindication_oob = conf->chan.priindication_oob;
+ pris[span].pri.ch_cfg.use_callerid = conf->chan.use_callerid;
+ pris[span].pri.ch_cfg.use_callingpres = conf->chan.use_callingpres;
+ ast_copy_string(pris[span].pri.ch_cfg.context, conf->chan.context, sizeof(pris[span].pri.ch_cfg.context));
+ ast_copy_string(pris[span].pri.ch_cfg.mohinterpret, conf->chan.mohinterpret, sizeof(pris[span].pri.ch_cfg.mohinterpret));
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
} else {
ast_log(LOG_ERROR, "Channel %d is reserved for D-channel.\n", p.chanpos);
destroy_dahdi_pvt(tmp);
@@ -12262,8 +12396,10 @@
return 1;
}
-static int available(struct dahdi_pvt *p)
-{
+static int available(struct dahdi_pvt **pvt, int is_specific_channel)
+{
+ struct dahdi_pvt *p = *pvt;
+
if (p->inalarm)
return 0;
@@ -12273,7 +12409,15 @@
#ifdef HAVE_PRI
switch (p->sig) {
case SIG_PRI_LIB_HANDLE_CASES:
- return sig_pri_available(p->sig_pvt);
+ {
+ struct sig_pri_chan *pvt_chan;
+ int res;
+
+ pvt_chan = p->sig_pvt;
[... 5459 lines stripped ...]
More information about the asterisk-commits
mailing list