summaryrefslogtreecommitdiff
path: root/channel.c
AgeCommit message (Collapse)Author
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19suppress warnings introduced by putting states in an enumRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19convert lists of constants in channel.h to enums instead of #definesRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17Merged revisions 40227 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r40227 | russell | 2006-08-17 12:36:21 -0400 (Thu, 17 Aug 2006) | 3 lines revert bogus change to attempt to fix bug 7506 which actually causes half of the channels not to get "Newchannel" events at all (issue #7745) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15Make tonepair generated through fixed pointMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08Merge team/russell/ast_verbose_threadstorageRussell Bryant
- instead of defining a free() wrapper in a bunch of files, define it as ast_free() in utils.h and remove the copies from all the files. - centralize and abstract the code used for doing thread storage. The code lives in threadstorage.h, with one function being implemented in utils.c. This new API includes generic thread storage as well as special functions for handling thread local dynamic length string buffers. - update ast_inet_ntoa() to use the new threadstorage API - update ast_state2str() to use the new threadstorage API - update ast_cli() to use the new threadstorage API - Modify manager_event() to use thread storage. Instead of using a buffer of 4096 characters as the workspace for building the manager event, use a thread local dynamic string. Now there is no length limitation on the length of the body of a manager event. - Significantly simplify the handling of ast_verbose() ... - Instead of using a static char buffer and a lock to make sure only one thread can be using ast_verbose() at a time, use a thread local dynamic string as the workspace for preparing the verbose message. Instead of locking around the entire function, the only locking done now is when the message has been built and is being deliviered to the list of registered verbose message handlers. - This function was doing a strdup() on every message passed to it and keeping a queue of the last 200 messages in memory. This has been completely removed. The only place this was used was that if there were any messages in the verbose queue when a verbose handler was registered, all of the messages in the queue would be fed to it. So, I just made sure that the console verbose handler and the network verbose handler (for remote asterisk consoles) were registered before any verbose messages. pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at startup, but I didn't feel the performance hit of this message queue was worth saving the initial verbose output for these very rarely used modules. - I have removed the last three arguments to the verbose handlers, leaving only the string itself because they aren't needed anymore. For example, ast_verbose had some logic for telling the verbose handler to add a newline if the buffer was completely full. Now that the buffer can grow as needed, this doesn't matter anymore. - remove unused function, ast_verbose_dmesg() which was to dispatch the message queue - Convert the list of verbose handlers to use the linked list macros. - add missing newline characters to a few ast_verbose() calls - convert the list of log channels to use the linked list macros in logger.c - fix close_logger() to close all of the files it opened for logging - update ast_log() to use a thread local dynamic string for its workspace for preparing log messages instead of a buffer of size BUFSIZ (8kB on my system) allocated on the stack. The dynamic string in this case is limited to only growing to a maximum size of BUFSIZ. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07Merged revisions 39056 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r39056 | file | 2006-08-06 20:15:51 -0400 (Sun, 06 Aug 2006) | 2 lines Reset our stream and vstream pointers back to NULL so that any generator that uses them (file based MOH) will not try to close them again. (issue #7668 reported by jmls) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05- add DIALING_OFFHOOK and PRERING to ast_state2strRussell Bryant
- don't include a newline character when building a response for an unknown state (issue #7645, jonty) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05Merged revisions 38982 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38982 | russell | 2006-08-05 05:01:37 -0400 (Sat, 05 Aug 2006) | 6 lines Always generate a Newstate event in ast_setstate() instead of making it a Newchannel event if the state was AST_STATE_DOWN. The Newchannel event will always be generated in ast_request(), so this just causes a duplicated Newchannel event in some cases. (issue #7506, repoted by capouch, fixed by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05Merged revisions 38903-38904 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines suppress a compiler warning about the usage of a potentially uninitialized variable ........ r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines Fix an issue that would cause a NewCallerID manager event to be generated before the channel's NewChannel event. This was due to a somewhat recent change that included using ast_set_callerid() where it wasn't before. This function should not be used in the channel driver "new" functions. (issue #7654, fixed by me) Also, fix a couple minor bugs in usecount handling. chan_iax2 could have increased the usecount but then returned an error. The place where chan_sip increased the usecount did not call ast_update_usecount() ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01Merged revisions 38686 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38686 | kpfleming | 2006-08-01 18:07:06 -0500 (Tue, 01 Aug 2006) | 2 lines ensure that the 'feature digit timeout' value is taken into account when deciding how long the bridge should run (this fixes a problem report where a digit press that did not invoke a feature is never passed across the bridge) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28add ExtenSpy variant of ChanSpyKevin P. Fleming
implement whisper mode for ExtenSpy/ChanSpy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28just for fun, let's lock the whisper buffer for writing AND reading :-)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28move slinfactory structure definition back to header... it's just easier to ↵Kevin P. Fleming
use this way add infrastructure for whispering onto a channel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27more simplification, and correct a bug i introduced in the last commitKevin P. Fleming
fix prototype for a channel walking function to use a const input pointer use existing channel walk by name prefix instead of reproducing that code in this app git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27Merged revisions 38347 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38347 | kpfleming | 2006-07-27 10:40:03 -0500 (Thu, 27 Jul 2006) | 2 lines do a better job avoiding translation path teardown/setup when not needed ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27Merged revisions 38310 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38310 | kpfleming | 2006-07-26 21:43:49 -0500 (Wed, 26 Jul 2006) | 2 lines don't do useless translation destroy/build when the channel is already in the correct format ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27fix crashes with MALLOC_DEBUG enabled that were a result of my recent threadRussell Bryant
storage changes (fixes issue #7595) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23ast_malloc is sufficient here, since snprintf is called on the bufferRussell Bryant
immediately after it gets allocated, which will automatically NULL terminate the string git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23resolve another XXX comment by implementing proper handling of control framesRussell Bryant
in ast_write(), which is to call the channel's indicate function if it exists git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21make ast_state2str thread safe by using thread local storage instead of aRussell Bryant
static buffer for storing the result when the state value is unknown git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵Kevin P. Fleming
handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12G726-32 changes:Kevin P. Fleming
split support for G726-32 into RFC3551 and AAL2 packing orders, since both are in use change "G726-32" to be RFC3551 packing order, in spite of devices that use AAL2 order with this MIME type add ability to directly transcode between packing orders git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10Merged revisions 37361 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r37361 | kpfleming | 2006-07-10 16:01:35 -0500 (Mon, 10 Jul 2006) | 2 lines do masquerade-behind-proxy checking with better control over locks ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06patch resolves issue with when to decide if its right time Matt O'Gorman
to native bridge, feature redirect was not being checked. patch from bug #7296 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05prepare Asterisk for new zaptel.h/tonezone.h installation locationsKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24The Eurostar Commit! (it's amazing how much work you can get done on a 150 ↵Kevin P. Fleming
minute train ride from Paris to London <G>) support the new location for zaptel.h and tonezone.h use the dependency information output by menuselect to build Makefile rules for each module for header files and libraries combine the common rules into a top-level Makefile.rules file remove all (now) unnecessary stuff from subdir Makefiles change translator API so that the newpvt() callback returns an int instead of a pointer (it no longer allocates memory) alphabetize --with-<foo> options in configure script enhance Net-SNMP support in configure script to provide a --with-netsnmp option fix support for --with-pq so that if pg-config is not found when --with-pq is specified, an error will be generated add 'optional package' usage to modules now that menuselect can output it allow res_snmp to build by default, since the new loader changes coming soon will solve the function naming problem (and users can disable it via menuselect anyway) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23revert my changes that converted the jb on the channel to be dynamicallyRussell Bryant
allocated. These changes caused crashes when using a channel type that did not support the jitterbuffer. Instead of fixing why it's crashing, I'm going to implement this in a better way next week. The way I did it caused a jitterbuffer to be allocated on every channel where the channel type supported jitterbuffers, even if they were disabled. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22don't blow up if a jitterbuffer is not in useRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13adds support for t38 pass through patch brought up to trunk fromMatt O'Gorman
bug 5090 by josh colp. Thanks to everyone who help get this patch through especially to the author Steven Underwood. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12Merged revisions 33724 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r33724 | file | 2006-06-12 18:34:38 -0300 (Mon, 12 Jun 2006) | 2 lines Greatly simply the mixmonitor thread, and move channel reference directly to spy structure so that the core can modify it. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of testsOlle Johansson
and some patches (all disclaimed). - Don't change RTP properties if we reject a re-INVITE - Don't add video to an outbound channel if there's no video on the inbound channel - Don't include video in the "preferred codec" list for codec selection - Clean up and document code that parses and adds SDP attachments Since we do not transcode video, we can't handle video the same way as audio. This is a bug fix patch. In future releases, we need to work on a solution for video negotiation, not codecs but formats and framerates instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06fix a channel deadlock in ast_answerRussell Bryant
(deadlock reported by and debuged with hads on #asterisk-dev on IRC) (probably fixes issue #7267, maybe others) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04- 5 is the highest used debug level, so let's stay thereOlle Johansson
- Change formatting of RTP debug to align better git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 Make sure DEBUG is really cranked up before we decide to flood the logs ↵BJ Weschke
with messages about Internal timing when a channel has to make a decision about generating internal timing (eg - MOH) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01Merged revisions 31520 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r31520 | kpfleming | 2006-06-01 15:27:50 -0500 (Thu, 01 Jun 2006) | 2 lines handle Zap transfers behind chan_agent properly so the agent doesn't get stuck waiting for the call to hang up ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31Add support for using a jitterbuffer for RTP on bridged calls. This includesRussell Bryant
a new implementation of a fixed size jitterbuffer, as well as support for the existing adaptive jitterbuffer implementation. (issue #3854, Slav Klenov) Thank you very much to Slav Klenov of Securax and all of the people involved in the testing of this feature for all of your hard work! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31a few more control frame types that don't need to generate useless notices ↵Kevin P. Fleming
in the log git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25Merge in branch which gives you the ability to set the hangup causecode ↵Joshua Colp
using the Hangup application. (issue #7160 reported by kmilitzer branch by jcollie) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16Merged revisions 27468 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r27468 | kpfleming | 2006-05-16 15:05:17 -0500 (Tue, 16 May 2006) | 2 lines don't leak frames when deferring DTMF or dropping duplicate ANSWER frames (issue #7041, slightly different fix, reported/patched by clausf) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11use the proper method to get out of the bridge loopKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11initialize the bridge result to 'no result', so that we can check for code ↵Kevin P. Fleming
paths that set it to AST_BRIDGE_COMPLETE inside the loop (thanks Oskar!) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10remove almost all of the checks of the result from ast_strdupa() or alloca().Russell Bryant
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10ensure that control frames with payload can be sent to channel drivers via ↵Kevin P. Fleming
->indicate() update iax2_indicate to pass control frame payload to the connected channel add an API call for sending an indication with payload, and use it for control frames with payload git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09Make sure that we don't accept an answer on an inbound call and don't permit ↵Mark Spencer
asterisk to answer an outbound call git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09use an enum for control frame typesKevin P. Fleming
support sending control frames with payload git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09mark a couple of dubious pieces of codeLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08Minor cleanup on dtmf calling (bug #7076)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 Make the "Avoided Initial Deadlock for '....', X retries!" a LOG_DEBUG msg ↵BJ Weschke
instead of LOG_WARNING as this only has relevance to developers trying to resolve a possible problem. #6949 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25094 65c4cc65-6c06-0410-ace0-fbb531ad65f3