From d94bb98beca8a6eaf31ed889a172eca06045fedc Mon Sep 17 00:00:00 2001 From: dvossel Date: Thu, 7 Jul 2011 19:39:17 +0000 Subject: Adds pass-through support for codec CELT. This patch adds pass-through support for CELT. CELT formats are defined in codecs.conf and can be configured to any sample rate a CELT endpoint supports. This patch also addresses a crash in channel.c resulting from a frame list being freed incorrectly. This crash was discovered while testing a CELT translator which had to split encoded audio into multiple frames. The codec translator is not a part of this patch, but may be contributed in the future. Review: https://reviewboard.asterisk.org/r/1294/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@326855 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/format.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asterisk/format.h b/include/asterisk/format.h index 67e4178a2..d0f1021d5 100644 --- a/include/asterisk/format.h +++ b/include/asterisk/format.h @@ -28,6 +28,7 @@ #include "asterisk/astobj2.h" #include "asterisk/silk.h" +#include "asterisk/celt.h" #define AST_FORMAT_ATTR_SIZE 128 #define AST_FORMAT_INC 100000 @@ -99,6 +100,7 @@ enum ast_format_id { /*! Raw 16-bit Signed Linear (192000 Hz) PCM. maybe we're taking this too far. */ AST_FORMAT_SLINEAR192 = 27 + AST_FORMAT_TYPE_AUDIO, AST_FORMAT_SPEEX32 = 28 + AST_FORMAT_TYPE_AUDIO, + AST_FORMAT_CELT = 29 + AST_FORMAT_TYPE_AUDIO, /*! H.261 Video */ AST_FORMAT_H261 = 1 + AST_FORMAT_TYPE_VIDEO, -- cgit v1.2.3 From 9bf02656507672dabcc06c6beb221af3e35b5ea8 Mon Sep 17 00:00:00 2001 From: dvossel Date: Thu, 7 Jul 2011 22:16:10 +0000 Subject: Adds missing celt.h file from celt pass-through support patch. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@326900 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/celt.h | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 include/asterisk/celt.h (limited to 'include') diff --git a/include/asterisk/celt.h b/include/asterisk/celt.h new file mode 100644 index 000000000..f4ba032f4 --- /dev/null +++ b/include/asterisk/celt.h @@ -0,0 +1,74 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 2011, Digium, Inc. + * + * David Vossel + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +/*! + * \file + * \brief CELT Format Attributes + * + * \author David Vossel + */ +#ifndef _AST_FORMAT_CELT_H_ +#define _AST_FORMAT_CELT_H_ + +#define AST_CELT_DEFAULT_FRAME_SIZE 480 + +/*! CELT format attribute key value pairs, all are accessible through ast_format_get_value()*/ +enum celt_attr_keys { + CELT_ATTR_KEY_SAMP_RATE, /*!< value is an unsigned integer representing sample rate */ + CELT_ATTR_KEY_MAX_BITRATE, /*!< value is an int */ + CELT_ATTR_KEY_FRAME_SIZE, /*!< value is an int */ +}; + +#endif /* _AST_FORMAT_CELT_H */ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 2011, Digium, Inc. + * + * David Vossel + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +/*! + * \file + * \brief CELT Format Attributes + * + * \author David Vossel + */ +#ifndef _AST_FORMAT_CELT_H_ +#define _AST_FORMAT_CELT_H_ + +#define AST_CELT_DEFAULT_FRAME_SIZE 480 + +/*! CELT format attribute key value pairs, all are accessible through ast_format_get_value()*/ +enum celt_attr_keys { + CELT_ATTR_KEY_SAMP_RATE, /*!< value is an unsigned integer representing sample rate */ + CELT_ATTR_KEY_MAX_BITRATE, /*!< value is an int */ + CELT_ATTR_KEY_FRAME_SIZE, /*!< value is an int */ +}; + +#endif /* _AST_FORMAT_CELT_H */ -- cgit v1.2.3 From 41711d591d5f8f916a5afcb2dc0a517c4327fbfd Mon Sep 17 00:00:00 2001 From: qwell Date: Thu, 7 Jul 2011 22:39:54 +0000 Subject: I think reviewboard broke this. The whole file was doubled. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@326943 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/celt.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'include') diff --git a/include/asterisk/celt.h b/include/asterisk/celt.h index f4ba032f4..815525a7b 100644 --- a/include/asterisk/celt.h +++ b/include/asterisk/celt.h @@ -35,40 +35,3 @@ enum celt_attr_keys { }; #endif /* _AST_FORMAT_CELT_H */ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2011, Digium, Inc. - * - * David Vossel - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ - -/*! - * \file - * \brief CELT Format Attributes - * - * \author David Vossel - */ -#ifndef _AST_FORMAT_CELT_H_ -#define _AST_FORMAT_CELT_H_ - -#define AST_CELT_DEFAULT_FRAME_SIZE 480 - -/*! CELT format attribute key value pairs, all are accessible through ast_format_get_value()*/ -enum celt_attr_keys { - CELT_ATTR_KEY_SAMP_RATE, /*!< value is an unsigned integer representing sample rate */ - CELT_ATTR_KEY_MAX_BITRATE, /*!< value is an int */ - CELT_ATTR_KEY_FRAME_SIZE, /*!< value is an int */ -}; - -#endif /* _AST_FORMAT_CELT_H */ -- cgit v1.2.3 From d4998689668ee1f03f2c4daf2dbee2aefc1a070a Mon Sep 17 00:00:00 2001 From: dvossel Date: Mon, 11 Jul 2011 18:44:06 +0000 Subject: Updates follow_talker video_mode in confbridge application. follow_talker mode originally echoed the same video stream to all participants. As the primary talker switched around, the video stream would result in the talker seeing themselves. Now the primary talker sees the last person who was talking rather than themselves. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@327640 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/bridging.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/asterisk/bridging.h b/include/asterisk/bridging.h index 849f88741..54137b028 100644 --- a/include/asterisk/bridging.h +++ b/include/asterisk/bridging.h @@ -190,6 +190,9 @@ struct ast_bridge_video_talker_src_data { /*! Only accept video coming from this channel */ struct ast_channel *chan_vsrc; int average_talking_energy; + + /*! Current talker see's this person */ + struct ast_channel *chan_old_vsrc; }; struct ast_bridge_video_mode { @@ -527,8 +530,18 @@ void ast_bridge_set_talker_src_video_mode(struct ast_bridge *bridge); */ void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame); +/*! + * \brief Returns the number of video sources currently active in the bridge + */ +int ast_bridge_number_video_src(struct ast_bridge *bridge); + /*! * \brief Determine if a channel is a video src for the bridge + * + * \retval 0 Not a current video source of the bridge. + * \retval None 0, is a video source of the bridge, The number + * returned represents the priority this video stream has + * on the bridge where 1 is the highest priority. */ int ast_bridge_is_video_src(struct ast_bridge *bridge, struct ast_channel *chan); -- cgit v1.2.3 From f422ffb34848fa66d8291d618694c1612a527e23 Mon Sep 17 00:00:00 2001 From: twilson Date: Mon, 11 Jul 2011 19:49:35 +0000 Subject: Merged revisions 327682 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327682 | twilson | 2011-07-11 12:41:59 -0700 (Mon, 11 Jul 2011) | 9 lines Update chan_gtalk to work with changed GMail-based calls The messages sent by the GMail client have changed, but include the old-style messages as well. This patch checks for this case and uses the old-style offer. (closes issue ASTERISK-18084) Review: https://reviewboard.asterisk.org/r/1312/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@327683 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/jingle.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asterisk/jingle.h b/include/asterisk/jingle.h index bbe86c8f2..77820654c 100644 --- a/include/asterisk/jingle.h +++ b/include/asterisk/jingle.h @@ -44,6 +44,7 @@ #define JINGLE_DTMF_NS "urn:xmpp:tmp:jingle:dtmf" #define GOOGLE_NS "http://www.google.com/session" +#define GOOGLE_JINGLE_NS "urn:xmpp:jingle:1" #define GOOGLE_AUDIO_NS "http://www.google.com/session/phone" #define GOOGLE_VIDEO_NS "http://www.google.com/session/video" #define GOOGLE_TRANSPORT_NS "http://www.google.com/transport/p2p" -- cgit v1.2.3 From f4348dccf22bedc458d060f20a269a11a004485d Mon Sep 17 00:00:00 2001 From: mnicholson Date: Tue, 12 Jul 2011 15:23:24 +0000 Subject: do v21 detection instead of CED detection for the fax gateway git-svn-id: http://svn.digium.com/svn/asterisk/trunk@327769 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/dsp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h index 333415200..78c9a74ac 100644 --- a/include/asterisk/dsp.h +++ b/include/asterisk/dsp.h @@ -45,7 +45,8 @@ #define DSP_FAXMODE_DETECT_CNG (1 << 0) #define DSP_FAXMODE_DETECT_CED (1 << 1) -#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED) +#define DSP_FAXMODE_DETECT_V21 (1 << 2) +#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED | DSP_FAXMODE_DETECT_V21) #define DSP_TONE_STATE_SILENCE 0 #define DSP_TONE_STATE_RINGING 1 -- cgit v1.2.3 From 2abe989c60aa7892a23f95eebaadb6163e70a866 Mon Sep 17 00:00:00 2001 From: rmudgett Date: Fri, 15 Jul 2011 00:23:14 +0000 Subject: Merged revisions 328329 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.10 ........ r328329 | rmudgett | 2011-07-14 19:19:32 -0500 (Thu, 14 Jul 2011) | 2 lines Make hint watcher callback take const strings for context and exten parameters. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328344 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/extconf.h | 2 +- include/asterisk/pbx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asterisk/extconf.h b/include/asterisk/extconf.h index a5d36ad23..1a04b01bf 100644 --- a/include/asterisk/extconf.h +++ b/include/asterisk/extconf.h @@ -111,7 +111,7 @@ struct ast_exten { char stuff[0]; }; /* from pbx.h */ -typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data); +typedef int (*ast_state_cb_type)(const char *context, const char *exten, enum ast_extension_states state, void *data); struct ast_timing { int hastime; /*!< If time construct exists */ unsigned int monthmask; /*!< Mask for month */ diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index 1489ee2d6..36bc0724c 100644 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -76,7 +76,7 @@ struct ast_ignorepat; struct ast_sw; /*! \brief Typedef for devicestate and hint callbacks */ -typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data); +typedef int (*ast_state_cb_type)(const char *context, const char *exten, enum ast_extension_states state, void *data); /*! \brief Data structure associated with a custom dialplan function */ struct ast_custom_function { -- cgit v1.2.3 From ce69aa8bf49ec77f2c0ba83825c3d79f6591359d Mon Sep 17 00:00:00 2001 From: twilson Date: Tue, 19 Jul 2011 02:00:56 +0000 Subject: Merged revisions 328717 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328717 | twilson | 2011-07-18 20:55:32 -0500 (Mon, 18 Jul 2011) | 14 lines Merged revisions 328716 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328716 | twilson | 2011-07-18 20:35:53 -0500 (Mon, 18 Jul 2011) | 7 lines Make AST_LIST_REMOVE safer AST_LIST_REMOVE shouldn't modify the element passed in if it isn't found. This commit also adds linked list unit tests. Review: https://reviewboard.asterisk.org/r/1321/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328718 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/linkedlists.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index 8e86470f5..4c9e27b28 100644 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -838,7 +838,10 @@ struct { \ */ #define AST_LIST_REMOVE(head, elm, field) ({ \ __typeof(elm) __res = NULL; \ - if ((head)->first == (elm)) { \ + __typeof(elm) __tmp = elm; \ + if (!__tmp) { \ + __res = NULL; \ + } else if ((head)->first == (elm)) { \ __res = (head)->first; \ (head)->first = (elm)->field.next; \ if ((head)->last == (elm)) \ @@ -854,7 +857,9 @@ struct { \ (head)->last = curelm; \ } \ } \ - (elm)->field.next = NULL; \ + if (__res) { \ + (__res)->field.next = NULL; \ + } \ (__res); \ }) -- cgit v1.2.3 From 4b03897207848035c13ad20f8f69b3c264f0c448 Mon Sep 17 00:00:00 2001 From: kmoore Date: Tue, 19 Jul 2011 18:07:22 +0000 Subject: Merged revisions 328824 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328824 | kmoore | 2011-07-19 13:05:21 -0500 (Tue, 19 Jul 2011) | 18 lines Merged revisions 328823 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328823 | kmoore | 2011-07-19 12:57:18 -0500 (Tue, 19 Jul 2011) | 11 lines RTP bridge away with inband DTMF and feature detection When deciding whether Asterisk was allowed to bridge the call away from the core, chan_sip did not take into account the usage of features on dialed channels that require monitoring of DTMF on channels utilizing inband DTMF. This would cause Asterisk to allow the call to be locally or remotely bridged, preventing access to the data required to detect activations of such features. (closes 17237) Review: https://reviewboard.asterisk.org/r/1302/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328825 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/rtp_engine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index e04303ca6..30270ec4a 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -349,6 +349,8 @@ struct ast_rtp_engine { void (*alt_remote_address_set)(struct ast_rtp_instance *instance, struct ast_sockaddr *sa); /*! Callback for changing DTMF mode */ int (*dtmf_mode_set)(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode); + /*! Callback for getting DTMF mode */ + enum ast_rtp_dtmf_mode (*dtmf_mode_get)(struct ast_rtp_instance *instance); /*! Callback for retrieving statistics */ int (*get_stat)(struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats, enum ast_rtp_instance_stat stat); /*! Callback for setting QoS values */ -- cgit v1.2.3 From 28da2a199d7e1624ac56ccb27d3671117f4e2717 Mon Sep 17 00:00:00 2001 From: russell Date: Thu, 21 Jul 2011 20:26:44 +0000 Subject: Merged revisions 329257 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/10 ........ r329257 | russell | 2011-07-21 15:22:36 -0500 (Thu, 21 Jul 2011) | 2 lines s/1.10/10.0/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@329258 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/netsock2.h | 2 +- include/asterisk/rtp_engine.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asterisk/netsock2.h b/include/asterisk/netsock2.h index afb1ea90f..83af23a97 100644 --- a/include/asterisk/netsock2.h +++ b/include/asterisk/netsock2.h @@ -453,7 +453,7 @@ int ast_sockaddr_is_ipv4(const struct ast_sockaddr *addr); int ast_sockaddr_is_ipv4_mapped(const struct ast_sockaddr *addr); /*! - * \since 1.10 + * \since 10.0 * * \brief * Determine if an IPv4 address is a multicast address diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index 30270ec4a..7e27f5a82 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -1061,7 +1061,7 @@ struct ast_rtp_payload_type ast_rtp_codecs_payload_lookup(struct ast_rtp_codecs * \retval pointer to format structure on success * \retval NULL on failure * - * \since 1.10 + * \since 10.0 */ struct ast_format *ast_rtp_codecs_get_payload_format(struct ast_rtp_codecs *codecs, int payload); -- cgit v1.2.3