summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
AgeCommit message (Collapse)Author
2008-07-01another minor ast_channel memory size decrease... for nearly all channels, ↵Kevin P. Fleming
'dialcontext' is only going to be set once during the channel's lifetime, so make it a string field instead of a char array git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-28yay for airplane ride optimizations... sort the fields in ast_channel by ↵Kevin P. Fleming
alignment requirements, saving 36 bytes per instance on a 64-bit platform git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13Merge changes from timing branchRussell Bryant
- Convert chan_iax2 to use the timing API - Convert usage of timing in the core to use the timing API instead of using DAHDI directly - Make a change to the timing API to add the set_rate() function - change the timing core to use a rwlock - merge a timing implementation, res_timing_dahdi Basic testing was successful using res_timing_dahdi git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. ↵Jeff Peeler
Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causeMichiel van Baak
- make data member of the ast_frame struct a named union instead of a void Recently the ast_queue_hangup function got a new parameter, the hangupcause Feedback came in that this is no good and that instead a new function should be created. This I did. The hangupcause was stored in the seqno member of the ast_frame struct. This is not very elegant, and since there's already a data member that one should be used. Problem is, this member was a void *. Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone wants to store another type in there in the future. This commit is so massive, because all ast_frame.data uses have to be altered to ast_frame.data.data Thanks russellb and kpfleming for the feedback. (closes issue #12674) Reported by: mvanbaak git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14Merged revisions 116463 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines Add ast_assert(), which can be used to handle fatal errors. It is only compiled in if dev-mode is enabled, and only aborts if DO_CRASH is defined. (inspired by issue #12650) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-01Modify TIMEOUT() to be accurate down to the millisecond.Tilghman Lesher
(closes issue #10540) Reported by: spendergrass Patches: 20080417__bug10540.diff.txt uploaded by Corydon76 (license 14) Tested by: blitzrage git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-24Pass the hangup cause all the way to the calling app/channel.Michiel van Baak
(closes issue #11328) Reported by: rain Patches: 20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14) brought up-to-date to trunk by me git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-21(closes issue #6113)Jeff Peeler
Reported by: oej Tested by: jpeeler This patch implements multiple parking lots for parked calls. The default parkinglot is used by default, however setting the channel variable PARKINGLOT in the dialplan will allow use of any other configured parkinglot. See configs/features.conf.sample for more details on setting up another non-default parkinglot. Also, one can (currently) set the default parkinglot to use in the driver configuration file via the parkinglot option. Patch initially written by oej, brought up to date and finalized by mvanbaak, and then stabilized and converted to astobj2 by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13Merged revisions 108583 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r108583 | russell | 2008-03-13 16:38:16 -0500 (Thu, 13 Mar 2008) | 11 lines Fix another issue that was causing crashes in chanspy. This introduces a new datastore callback, called chan_fixup(). The concept is exactly like the fixup callback that is used in the channel technology interface. This callback gets called when the owning channel changes due to a masquerade. Before this was introduced, if a masquerade happened on a channel being spyed on, the channel pointer in the datastore became invalid. (closes issue #12187) (reported by, and lots of testing from atis) (props to file for the help with ideas) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18Add a non-invasive API for application level manipulation of T38 on a ↵Joshua Colp
channel. This uses control frames (so they can even pass across IAX2) to negotiate T38 and provided a way of getting the current status of T38 using queryoption. This should by no means cause any issues and if it does I will take responsibility for it. (closes issue #11873) Reported by: dimas Patches: v4-t38-api.patch uploaded by dimas (license 88) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18Context tracing for channelsTilghman Lesher
(closes issue #11268) Reported by: moy Patches: chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30Constifying the interface to get pvt_ids in the bridge, based on Olle Johansson
suggestion from (const char *) Kevin. Thanks! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28Merged revisions 100581 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100581 | russell | 2008-01-28 11:15:41 -0600 (Mon, 28 Jan 2008) | 9 lines Make some deadlock related fixes. These bugs were discovered and reported internally at Digium by Steve Pitts. - Fix up chan_local to ensure that the channel lock is held before the local pvt lock. - Don't hold the channel lock when executing the timing function, as it can cause a deadlock when using chan_local. This actually changes the code back to be how it was before the change for issue #10765. But, I added some other locking that I think will prevent the problem reported there, as well. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22Add a generic function to set the bridged call PVT unique id stringOlle Johansson
as a channel variable BRIDGEPVTCALLID This is important for call tracing in log files and CDRs, so that the SIP callID can be traced along servers. The CHANNEL dialplan function won't work here, since the outbound channel is gone when we need the Call-ID. Other channel drivers may now implement the same function :-), but this patch only supports chan_sip.so. Inspired by (issue #11816) Reported by: ctooley Patch by oej git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03Document recent API additionTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31fix a spelling error in a commentRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04Merged revisions 90735 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90735 | mmichelson | 2007-12-03 17:12:17 -0600 (Mon, 03 Dec 2007) | 22 lines A big one... This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop. This is accomplished by creating a datastore on the calling channel which has a linked list of all devices dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore is detached from the channel and destroyed. This change also introduces some side effects to the code which I shall enumerate here: 1. Datastore inheritance has been backported from trunk into 1.4 2. A large chunk of code has been removed from app_dial. This chunk is the section of code which handles the call forward case after the channel has been requested but before it has been called. This was removed because call-forwarding still works fine without it, it makes the code less error-prone should it need changing, and it made this set of changes much less painful to just have the forwarding handled in one place in each module. 3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore which is attached to the channel may be created and attached in either app_dial or app_queue, so they need a common place to find the datastore info. This approach was taken in case similar datastores are needed in the future, there will be a common place to add them. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03Merged revisions 90548 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90548 | file | 2007-12-03 14:40:56 -0400 (Mon, 03 Dec 2007) | 2 lines Preserve the indication currently playing on a channel when a masquerade operation happens. (issue #BE-88) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30Adding support for the "automixmonitor" dial and queue options.Mark Michelson
This works in much the same way as the automonitor, except that instead of using the monitor app, it uses the mixmonitor app. By providing an 'x' or 'X' as a dial or queue option, a DTMF sequence may be entered (as defined in features.conf) to start the one-touch mixmonitor. This patch also introduces some new API calls to the audiohooks code for searching for an audiohook by type and for searching for a running audiohook by type. Big thanks to joetester for writing the initial patch, testing it and patiently waiting for it to be committed. (closes issue #10185, reported and patched by xmarksthespot) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29Merged revisions 90145 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90145 | russell | 2007-11-28 18:20:34 -0600 (Wed, 28 Nov 2007) | 5 lines This set of changes is to make some callerID handling thread-safe. The ast_set_callerid() function needed to lock the channel. Also, the handlers for the CALLERID() dialplan function needed to lock the channel when reading or writing callerid values directly on the channel structure. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28Merge some channel.h doxygen updates from team/russell/chan_refcountRussell Bryant
This was mostly to note whether a channel needed to be locked or not before calling these functions. However, I added some other things, too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27Document that the channel is not locked when the send_digit_begin and endRussell Bryant
callbacks get called. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-25Try to get channel.h and channel.c aligned in regards to ast_set_callerid as ↵Olle Johansson
well as change name of variables to follow the rest of the naming. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-25Housekeeping...Olle Johansson
- Fix typo in chan_sip - Remove changes to caller ID structure, moving it to branch (russellb) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-23Let's start with implementing the base architecture for UTF8 caller ID'sOlle Johansson
so we can handle multiple formats properly. This is not carved in stone, but a proposal to start with. We need to add support for transliterations as well as UTF8 handling, propably with libiconv. Murf is looking into that for the dialplan. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22formatting cleanupLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22shuffle a little bit the content of header files to reduce dependencies.Luigi Rizzo
In this commit: - move the ast_register/unregister_app functions to module.h to avoid the need to include pbx.h for the simpler apps; - move the ast_group structure to channel.h to remove the dependency of app.h on linkedlists.h Note, this is a long process that I am doing in small steps. The main difficulty is that now for each subsystem we have a single header (e.g. channel.h) included by the subsystem provider (usually one file, e.g. channel.c) and by its clients (dozens of them, e.g. we have some 70+ apps and 30+ functions). This requires the clients to include all the extra headers required by the provider (eg. lock.h, linkedlists.h, definitions of substructures...) even though many of the clients would be just happy with opaque struct declarations and function prototypes. The long term plan is to eventually rectify this structure so that the compilation can become faster, and also APIs are more stable. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesLuigi Rizzo
who really need it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17use autoconf results to conditionally compile timersubLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17Update the configure script check for sys/poll.h to also provide the result inRussell Bryant
include/asterisk/autoconfig.h. Also, move the conditional include of sys/poll.h or asterisk/poll-compat.h into asterisk/config.h instead of the two headers it existed in before. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17use poll as detected by configureLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16remove redundant #include "asterisk/compat.h",Luigi Rizzo
but make sure that asterisk/compiler.h is included everywhere git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15access channel locks through ast_channel_lock/unlock/trylock and notLuigi Rizzo
through ast_mutex primitives. To detect all occurrences, I have renamed the lock field in struct ast_channel so it is clear that it shouldn't be used directly. There are some uses in res/res_features.c (see details of the diff) that are error prone as they try and lock two channels without caring about the order (or without explaining why it is safe). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-31Remove old whisper remnants from channel.hJoshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-18Merged revisions 86330 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86330 | russell | 2007-10-18 13:03:10 -0500 (Thu, 18 Oct 2007) | 10 lines The channel needs to stay locked while running timer callbacks, as they access and modify channel data that may change elsewhere. I went through every timer callback in the source tree to make sure that none of them did any additional locking that could introduce deadlocks, and all is well. (closes issue #10765) Reported by: Ivan Patches: ast_1_4_11_svn_patch_channel_rc.diff uploaded by Ivan (license 229) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-27Merged revisions 84018 via svnmerge from Dwayne M. Hubbard
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84018 | dhubbard | 2007-09-27 18:12:25 -0500 (Thu, 27 Sep 2007) | 1 line if an Agent is redirected, the base channel should actually be redirected. This was causing multiple issues, especially issue 7706 and BE-160 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21Merged revisions 83432 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-05Merged revisions 81599 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81599 | russell | 2007-09-05 15:53:41 -0500 (Wed, 05 Sep 2007) | 11 lines Fix an issue that can occur when you do an attended transfer to parking. If you complete the transfer before the announcement of the parking spot finishes, then the channel being parked will hear the remainder of the announcement. These changes make it so that will not happen anymore. Basically, res_features sets a flag on the channel is playing the announcement to so that the file streaming core knows that it needs to watch out for a channel masquerade, and if it occurs, to abort the announcement. (closes BE-182) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28* Constify the uid field of channel datastoresRussell Bryant
* Convert some spaces to tabs in func_volume * Add a note in channel.h making it clear that none of the datastore API calls lock the channel they are given, so the channel should be locked before calling the functions that take a channel argument. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13constify the return value of reason2strRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10Merged revisions 79099 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79099 | murf | 2007-08-10 14:53:43 -0600 (Fri, 10 Aug 2007) | 1 line From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08Add support for using epoll instead of poll. This should increase ↵Joshua Colp
scalability and is done in such a way that we should be able to add support for other poll() replacements. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08Merge audiohooks branch into trunk. This is a new API for developers to ↵Joshua Colp
listen and manipulate the audio going through a channel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06Extend the ast_senddigit and ast_dtmf_stream API calls to allow the duration ↵Joshua Colp
of the DTMF digit(s) to be specified and make the SendDTMF application have the capability to use it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19After some study, thought, comparing, etc. I've backed out the previous ↵Steve Murphy
universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵Steve Murphy
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16Merge a bunch of doxygen updates to header files. This includes changes toRussell Bryant
use the \retval tag for documenting return values, fixing various warnings when generating the documentation, and various other things. (closes issue #10203, snuffy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09Implementation of a feature that will disable "missed calls" counters on SIP ↵Olle Johansson
phones. If the call is answered by another phone, other phones won't display the call as "missed". You can also add an option to the dial command so that you can have a "followme" scenario and not count the calls as "missed" when you cancel the call. Thanks to Ramon and Frank for feedback on this feature. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09Merged revisions 73985 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r73985 | tilghman | 2007-07-08 23:03:20 -0500 (Sun, 08 Jul 2007) | 2 lines Doxygen formatting fixes; fixes errors while 'make progdocs'. (Closes issue #10104) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73994 65c4cc65-6c06-0410-ace0-fbb531ad65f3