[asterisk-commits] file: branch file/bridging r100113 - in /team/file/bridging: ./ channels/ inc...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 24 10:02:36 CST 2008
Author: file
Date: Thu Jan 24 10:02:35 2008
New Revision: 100113
URL: http://svn.digium.com/view/asterisk?view=rev&rev=100113
Log:
Merged revisions 100039,100057,100076,100093-100095,100112 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r100039 | qwell | 2008-01-23 19:09:11 -0400 (Wed, 23 Jan 2008) | 1 line
Move code from res_features into (new file) main/features.c
........
r100057 | kpfleming | 2008-01-23 20:04:35 -0400 (Wed, 23 Jan 2008) | 4 lines
fix flag bit definitions to make code from issue #11049 actually work; along the way, clarify comments and add some dummy flag definitions for other multi-bit flags to hopefully stop this from happening in the future
(closes issue #11049)
........
r100076 | file | 2008-01-23 23:07:34 -0400 (Wed, 23 Jan 2008) | 2 lines
Testing something...
........
r100093 | file | 2008-01-23 23:25:52 -0400 (Wed, 23 Jan 2008) | 2 lines
Test hopefully over.
........
r100094 | file | 2008-01-23 23:30:56 -0400 (Wed, 23 Jan 2008) | 2 lines
Add some spacing.
........
r100095 | file | 2008-01-23 23:34:57 -0400 (Wed, 23 Jan 2008) | 2 lines
Some more cosmetic changes.
........
r100112 | file | 2008-01-24 11:54:32 -0400 (Thu, 24 Jan 2008) | 2 lines
Remove dependency on res_features from some channel drivers. It is now part of the core and no longer exists as a module.
........
Removed:
team/file/bridging/res/res_features.c
Modified:
team/file/bridging/ (props changed)
team/file/bridging/.cleancount
team/file/bridging/CHANGES
team/file/bridging/channels/chan_iax2.c
team/file/bridging/channels/chan_mgcp.c
team/file/bridging/channels/chan_sip.c
team/file/bridging/channels/chan_zap.c
team/file/bridging/include/asterisk/_private.h
team/file/bridging/include/asterisk/features.h
team/file/bridging/main/Makefile
team/file/bridging/main/asterisk.c
team/file/bridging/main/channel.c
team/file/bridging/main/loader.c
Change Statistics:
0 files changed
Propchange: team/file/bridging/
------------------------------------------------------------------------------
automerge = *
Propchange: team/file/bridging/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan 24 10:02:35 2008
@@ -1,1 +1,1 @@
-/trunk:1-100022
+/trunk:1-100112
Modified: team/file/bridging/.cleancount
URL: http://svn.digium.com/view/asterisk/team/file/bridging/.cleancount?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/.cleancount (original)
+++ team/file/bridging/.cleancount Thu Jan 24 10:02:35 2008
@@ -1,1 +1,1 @@
-33
+34
Modified: team/file/bridging/CHANGES
URL: http://svn.digium.com/view/asterisk/team/file/bridging/CHANGES?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/CHANGES (original)
+++ team/file/bridging/CHANGES Thu Jan 24 10:02:35 2008
@@ -409,6 +409,8 @@
* Updated the ParkedCall application to allow you to not specify a parking
extension. If you don't specify a parking space to pick up, it will grab
the first one available.
+ * Added cli command 'features reload' to reload call features from features.conf
+ * Moved into core asterisk binary.
Language Support Changes
------------------------
@@ -498,4 +500,3 @@
specifying which socket to use to connect to the running Asterisk daemon
(-s)
* Added logging to 'make update' command. See update.log
-
Modified: team/file/bridging/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/channels/chan_iax2.c?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/channels/chan_iax2.c (original)
+++ team/file/bridging/channels/chan_iax2.c Thu Jan 24 10:02:35 2008
@@ -31,7 +31,6 @@
/*** MODULEINFO
<use>zaptel</use>
<use>crypto</use>
- <depend>res_features</depend>
***/
#include "asterisk.h"
Modified: team/file/bridging/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/channels/chan_mgcp.c?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/channels/chan_mgcp.c (original)
+++ team/file/bridging/channels/chan_mgcp.c Thu Jan 24 10:02:35 2008
@@ -27,9 +27,6 @@
*
* \ingroup channel_drivers
*/
-/*** MODULEINFO
- <depend>res_features</depend>
- ***/
#include "asterisk.h"
Modified: team/file/bridging/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/channels/chan_sip.c?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/channels/chan_sip.c (original)
+++ team/file/bridging/channels/chan_sip.c Thu Jan 24 10:02:35 2008
@@ -82,10 +82,6 @@
* the sip_hangup() function
*/
-/*** MODULEINFO
- <depend>res_features</depend>
- ***/
-
/*! \page sip_session_timers SIP Session Timers in Asterisk Chan_sip
The SIP Session-Timers is an extension of the SIP protocol that allows end-points and proxies to
@@ -906,20 +902,20 @@
#define SIP_CALL_LIMIT (1 << 7) /*!< D: Call limit enforced for this call */
#define SIP_INC_COUNT (1 << 8) /*!< D: Did this dialog increment the counter of in-use calls? */
#define SIP_INC_RINGING (1 << 9) /*!< D: Did this connection increment the counter of in-use calls? */
-#define SIP_DEFER_BYE_ON_TRANSFER (1 << 11) /*!< D: Do not hangup at first ast_hangup */
-
-#define SIP_PROMISCREDIR (1 << 12) /*!< DP: Promiscuous redirection */
-#define SIP_TRUSTRPID (1 << 13) /*!< DP: Trust RPID headers? */
-#define SIP_USEREQPHONE (1 << 14) /*!< DP: Add user=phone to numeric URI. Default off */
-#define SIP_USECLIENTCODE (1 << 15) /*!< DP: Trust X-ClientCode info message */
+#define SIP_DEFER_BYE_ON_TRANSFER (1 << 10) /*!< D: Do not hangup at first ast_hangup */
+
+#define SIP_PROMISCREDIR (1 << 11) /*!< DP: Promiscuous redirection */
+#define SIP_TRUSTRPID (1 << 12) /*!< DP: Trust RPID headers? */
+#define SIP_USEREQPHONE (1 << 13) /*!< DP: Add user=phone to numeric URI. Default off */
+#define SIP_USECLIENTCODE (1 << 14) /*!< DP: Trust X-ClientCode info message */
/* DTMF flags - see str2dtmfmode() and dtmfmode2str() */
-#define SIP_DTMF (3 << 16) /*!< DP: DTMF Support: four settings, uses two bits */
-#define SIP_DTMF_RFC2833 (0 << 16) /*!< DP: DTMF Support: RTP DTMF - "rfc2833" */
-#define SIP_DTMF_INBAND (1 << 16) /*!< DP: DTMF Support: Inband audio, only for ULAW/ALAW - "inband" */
-#define SIP_DTMF_INFO (2 << 16) /*!< DP: DTMF Support: SIP Info messages - "info" */
-#define SIP_DTMF_AUTO (3 << 16) /*!< DP: DTMF Support: AUTO switch between rfc2833 and in-band DTMF */
-#define SIP_DTMF_SHORTINFO (4 << 16) /*!< DP: DTMF Support: SIP Info messages - "info" - short variant */
+#define SIP_DTMF (7 << 15) /*!< DP: DTMF Support: five settings, uses three bits */
+#define SIP_DTMF_RFC2833 (0 << 15) /*!< DP: DTMF Support: RTP DTMF - "rfc2833" */
+#define SIP_DTMF_INBAND (1 << 15) /*!< DP: DTMF Support: Inband audio, only for ULAW/ALAW - "inband" */
+#define SIP_DTMF_INFO (2 << 15) /*!< DP: DTMF Support: SIP Info messages - "info" */
+#define SIP_DTMF_AUTO (3 << 15) /*!< DP: DTMF Support: AUTO switch between rfc2833 and in-band DTMF */
+#define SIP_DTMF_SHORTINFO (4 << 15) /*!< DP: DTMF Support: SIP Info messages - "info" - short variant */
/* NAT settings - see nat2str() */
#define SIP_NAT (3 << 18) /*!< DP: four settings, uses two bits */
@@ -929,13 +925,15 @@
#define SIP_NAT_ALWAYS (3 << 18) /*!< DP: NAT Both ROUTE and RFC3581 */
/* re-INVITE related settings */
-#define SIP_REINVITE (7 << 20) /*!< DP: three bits used */
+#define SIP_REINVITE (7 << 20) /*!< DP: four settings, uses three bits */
+#define SIP_REINVITE_NONE (0 << 20) /*!< DP: no reinvite allowed */
#define SIP_CAN_REINVITE (1 << 20) /*!< DP: allow peers to be reinvited to send media directly p2p */
#define SIP_CAN_REINVITE_NAT (2 << 20) /*!< DP: allow media reinvite when new peer is behind NAT */
#define SIP_REINVITE_UPDATE (4 << 20) /*!< DP: use UPDATE (RFC3311) when reinviting this peer */
/* "insecure" settings - see insecure2str() */
-#define SIP_INSECURE (3 << 23) /*!< DP: two bits used */
+#define SIP_INSECURE (3 << 23) /*!< DP: three settings, uses two bits */
+#define SIP_INSECURE_NONE (0 << 23) /*!< DP: secure mode */
#define SIP_INSECURE_PORT (1 << 23) /*!< DP: don't require matching port for incoming requests */
#define SIP_INSECURE_INVITE (1 << 24) /*!< DP: don't require authentication for incoming INVITEs */
Modified: team/file/bridging/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/channels/chan_zap.c?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/channels/chan_zap.c (original)
+++ team/file/bridging/channels/chan_zap.c Thu Jan 24 10:02:35 2008
@@ -42,7 +42,6 @@
<depend>zaptel_vldtmf</depend>
<depend>zaptel</depend>
<depend>tonezone</depend>
- <depend>res_features</depend>
<use>pri</use>
<use>ss7</use>
***/
Modified: team/file/bridging/include/asterisk/_private.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/_private.h?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/include/asterisk/_private.h (original)
+++ team/file/bridging/include/asterisk/_private.h Thu Jan 24 10:02:35 2008
@@ -32,6 +32,7 @@
int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
int astobj2_init(void); /*!< Provided by astobj2.c */
int ast_file_init(void); /*!< Provided by file.c */
+int ast_features_init(void); /*!< Provided by features.c */
/*!
* \brief Reload asterisk modules.
Modified: team/file/bridging/include/asterisk/features.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/features.h?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/include/asterisk/features.h (original)
+++ team/file/bridging/include/asterisk/features.h Thu Jan 24 10:02:35 2008
@@ -109,4 +109,7 @@
void ast_rdlock_call_features(void);
void ast_unlock_call_features(void);
+/*! \brief Reload call features from features.conf */
+int ast_features_reload(void);
+
#endif /* _AST_FEATURES_H */
Modified: team/file/bridging/main/Makefile
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/Makefile?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/main/Makefile (original)
+++ team/file/bridging/main/Makefile Thu Jan 24 10:02:35 2008
@@ -29,7 +29,8 @@
netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.o \
strcompat.o threadstorage.o dial.o event.o adsistub.o audiohook.o \
- astobj2.o hashtab.o global_datastores.o $(RESAMPLE_OBJS) version.o bridging.o
+ astobj2.o hashtab.o global_datastores.o $(RESAMPLE_OBJS) version.o \
+ features.o bridging.o
# we need to link in the objects statically, not as a library, because
# otherwise modules will not have them available if none of the static
Modified: team/file/bridging/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/asterisk.c?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/main/asterisk.c (original)
+++ team/file/bridging/main/asterisk.c Thu Jan 24 10:02:35 2008
@@ -96,6 +96,7 @@
#include "asterisk/network.h"
#include "asterisk/cli.h"
#include "asterisk/channel.h"
+#include "asterisk/features.h"
#include "asterisk/ulaw.h"
#include "asterisk/alaw.h"
#include "asterisk/callerid.h"
@@ -3165,6 +3166,8 @@
exit(1);
}
+ ast_features_init();
+
if (init_framer()) {
printf(term_quit());
exit(1);
Modified: team/file/bridging/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/channel.c?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/main/channel.c (original)
+++ team/file/bridging/main/channel.c Thu Jan 24 10:02:35 2008
@@ -206,10 +206,12 @@
ast_cli(a->fd, FORMAT, "Type", "Description", "Devicestate", "Indications", "Transfer");
ast_cli(a->fd, FORMAT, "----------", "-----------", "-----------", "-----------", "--------");
+
if (AST_RWLIST_RDLOCK(&channels)) {
ast_log(LOG_WARNING, "Unable to lock channel list\n");
return CLI_FAILURE;
}
+
AST_LIST_TRAVERSE(&backends, cl, list) {
ast_cli(a->fd, FORMAT, cl->tech->type, cl->tech->description,
(cl->tech->devicestate) ? "yes" : "no",
@@ -217,8 +219,11 @@
(cl->tech->transfer) ? "yes" : "no");
count_chan++;
}
+
AST_RWLIST_UNLOCK(&channels);
+
ast_cli(a->fd, "----------\n%d channel drivers registered.\n", count_chan);
+
return CLI_SUCCESS;
#undef FORMAT
@@ -605,10 +610,13 @@
fmts &= AST_FORMAT_AUDIO_MASK;
/* Find the first preferred codec in the format given */
- for (x=0; x < (sizeof(prefs) / sizeof(prefs[0]) ); x++)
+ for (x = 0; x < (sizeof(prefs) / sizeof(prefs[0]) ); x++) {
if (fmts & prefs[x])
return prefs[x];
+ }
+
ast_log(LOG_WARNING, "Don't know any of 0x%x formats\n", fmts);
+
return 0;
}
Modified: team/file/bridging/main/loader.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/loader.c?view=diff&rev=100113&r1=100112&r2=100113
==============================================================================
--- team/file/bridging/main/loader.c (original)
+++ team/file/bridging/main/loader.c Thu Jan 24 10:02:35 2008
@@ -46,6 +46,7 @@
#include "asterisk/rtp.h"
#include "asterisk/http.h"
#include "asterisk/lock.h"
+#include "asterisk/features.h"
#ifdef DLFCNCOMPAT
#include "asterisk/dlfcn-compat.h"
@@ -247,6 +248,7 @@
{ "rtp", ast_rtp_reload },
{ "http", ast_http_reload },
{ "logger", logger_reload },
+ { "features", ast_features_reload },
{ NULL, NULL }
};
More information about the asterisk-commits
mailing list