summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2006-08-08* added possibility to change echocancel settings during callsChristian Richter
* removed the holded element from the chan_list struct, we know this from the state already * added a few tweaks to make HOLD/RETRIEVE work again (TRANSFER does not work yet) * added possibility to debug mISDN frames via syslog * added misdn_lib_port_is_blocked function to check if a port is blocked * removed ec_training=1 from empty_bc, we don't use ec_training anymore * removed unused misdn_lib_get_l2_status function * added the nt bit to dummy misdn_bchannel objects * setting bc->out_fac_type to FACILITY_NONE defaultly * removed HANDLER_DEBUG stuff for better readability git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39295 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-07Many many code cleanup changes given to me by OejMatt O'Gorman
Thanks, sorry I didn't put this in forever ago. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07This commit folds in changes to both stringfields (some enhancements to the ↵Steve Murphy
...field_set() macro, to optimize setting strings to empty, resetting strings to shorter contents, etc.) and to chan_iax2.c, to use stringfields in the user, peer, and pvt structs. Has been running stably on iaxtel, but while iaxtel has a large registration volume, it doesn't seem to have a high call volume. So far, it seems to reduce heap usage by over half. YMMV\! Please report any IAX bugs that might involve stringfields\! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07Fix accidental removal of if() in commit 38905Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07Issue #7651 - always send subscription-state (AuPix)Olle Johansson
Small change to the fix in the report. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07changed naming of mISDN channels, so that hinting works properChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07Merged revisions 39081 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r39081 | russell | 2006-08-06 21:28:29 -0400 (Sun, 06 Aug 2006) | 7 lines Fix a crash reported to me by hads on IRC. This crash would occur with the use of the "distinctiveringaftercid" option. Also, on this user's system, the crash would only occur when built without optimizations. This is because the bug is that the code would write past the end of an array that was allocated on the stack, and the structure of the stack is different with or without optimizations enabled. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07minor cleanupsRussell Bryant
- use appropriate types in some assignments - use ast_strlen_zero() - don't manually free cid fields since ast_set_callerid() will handle it git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05Merged revisions 38950 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38950 | russell | 2006-08-05 03:21:12 -0400 (Sat, 05 Aug 2006) | 3 lines don't advertise that this function can set a SIP header when it can only do reads ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38951 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-05It is better to hold a lock then not hold a lock when you are supposed to.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-04Minor optimization but use a linkedlists.h macro that pops the head off the ↵Joshua Colp
list instead of getting the first entry and then removing it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-04Don't assume that a referred by URI will always exist (issue #7641 reported ↵Joshua Colp
and fixed by AuPix) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03* removed pp_l2_check (fixed L2 bug in mISDNuser)Christian Richter
* added blocking flag to stack object. A port can be blocked/unblocked from the cli * added EVENT_PORT_ALARM to send alarm infos to the chan_misdn.c layer (later we can add a manager event for that) * added block_on_alarm option, to block the port whenever a ALARM occurs * added need_busy flag to indicate if we've sended a CONTROL_BUSY already * changed a bunch of cb_log(-1,..) to cb_log(0,..) due to funny behaviour in recent asterisk ast_log messages.. * fixed a few ETSI state violations, especially when finishing calls in different seldom states * changed debug levels a lot to make the log more readable in low debuglevels * some first fixes for the HOLD/RETRIEVE stuff (doesn't work totally still) * removed the PRECONNECTED state stuff * added cause 27 when we get a CLEANUP directly after a outgoing SETUP, this creates a CHANISUNAVAIL instead of a NOANSWER * removed the addr pointer from "misdn show stacks" that's not needed anymore and makes the output more unreadable * added cause saving on RELEASE/RELEASE_COMPLETE * set cause to 16 on prepare_bc * removed stack getting from ph_control functions, we don't really need it there * added beroec api git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02Merged revisions 38731 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38731 | kpfleming | 2006-08-02 14:29:56 -0500 (Wed, 02 Aug 2006) | 3 lines fix brain-damage I introduced when trying to fix the CANCEL/BYE sending mechanism for pending INVITES accept unknown 1xx responses as 183 responses (as RFC3261 mandates we should do) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02dtmf support. not everything else, trying to clear out those other bugsMatt O'Gorman
but more to come i guess. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31Merged revisions 38611 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38611 | kpfleming | 2006-07-31 16:14:11 -0500 (Mon, 31 Jul 2006) | 4 lines don't reissue hangup requests for SIP channels that have expired their RTP timeouts (one time is enough) don't rescan the SIP private structure list too fast, it can cause channels to not be able to hang up (issue #7495, and probably others) use ast_softhangup_nolock() since we already hold the channel's lock ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31make the counting of ingress, outgress, and total frames thread-safeRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28add macros for the pure and const attributes to compiler.h, in case they everRussell Bryant
need to be handled differently for a specific compiler git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28Add the function attribute "pure" or "const" to various functions that performRussell Bryant
int to string or string to int operations. "pure" essentially says that this function has no side effects aside from its result, and the result depends on nothing else other than its arguments and global variables. "const" is a more strict form of "pure", where the function also doesn't access any global variables. From the gcc manual: "Such a function can be subject to common subexpression elimination and loop optimization just as an arithmetic operator would be." This also tells the compiler that it is safe to call the function fewer times than the code says to, given the same arguments, since the result will always be the same. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28Merged revisions 38420 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38420 | file | 2006-07-28 14:49:00 -0400 (Fri, 28 Jul 2006) | 2 lines Make a copy of the request URI in check_user_full instead of modifying the one on the structure, and also strip params properly from the user portion of the SIP URI so as to preserve the domain (issue #7552 reported by dan42) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27Merged revisions 38328 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38328 | russell | 2006-07-27 00:25:41 -0400 (Thu, 27 Jul 2006) | 4 lines Fix crash when using the "regexten" option with MALLOC_DEBUG enabled. This was not reported in the bug tracker but the same bug has been demonstrated in other places in the code. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27Merged revisions 38288 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38288 | russell | 2006-07-26 21:58:41 -0400 (Wed, 26 Jul 2006) | 3 lines fix a crash when MALLOC_DEBUG is enabled and the regexten is enabled. The crash would occur when the extension got removed. (fixes issue #7484) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26Merged revisions 38234 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38234 | file | 2006-07-26 11:26:06 -0400 (Wed, 26 Jul 2006) | 2 lines Put default callerid into contact when the one specified is either NULL or has a zero string length. (issue #7590 reported by key2) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-25This exact deadlock situation that I observed can't happen in trunk due to theRussell Bryant
recent hold changes so that MOH is not started on the bridged channel directly. However, the change is still not a bad idea. Merged revisions 38200 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38200 | russell | 2006-07-25 15:43:38 -0400 (Tue, 25 Jul 2006) | 6 lines This resolves a deadlock that a tech support customer was getting frequently when his users would answer call waiting. If another thread is currently holding the zt_pvt lock for the first channel, unlock both channels and let asterisk retry the native bridge, just like what is done for the second channel directly below these changes. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24Start out with cleared RTP payload structures instead of defaults. This ↵Joshua Colp
should prevent issues where if a stream (audio/stream) is not present and it's RTP payload structure is combined with the overall capability then the capability would be every codec that Asterisk supports. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24move middle-of-the-block declaration at the top.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24fix uninitialized variableLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24Only deal with getting the supported payloads on audio if an audio RTP ↵Joshua Colp
stream exists git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-22use ast_atomic_fetchadd_int in chan_zap, sip, and iax2 for usecount handlingRussell Bryant
and fix a couple little things in passing - usecnt was not initialized in chan_iax2 - ast_update_use_count() was not called after incrementing the count in chan_sip git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 This corrects the crash condition present in #7575, but I'm not really sure ↵BJ Weschke
if it's the "right" fix. Please review and make any adjustments you see necessary. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21Merge a new implementation of ast_inet_ntoa, our thread safe replacement forRussell Bryant
inet_ntoa, which uses thread specific data (aka thread local storage) instead of stack allocatted buffers to store the result. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-20Only bitmaskify the RTP payload structure for video if an RTP structure ↵Joshua Colp
exists for it... otherwise the default values will cause codec combination madness git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19Fix a few doxygen warnings.North Antara
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38009 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-19Merged revisions 37949 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r37949 | kpfleming | 2006-07-19 12:10:10 -0500 (Wed, 19 Jul 2006) | 2 lines ensure that global 'maxauthreq' is reset to zero during 'reload' ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19revert this morning's incorrect indentation changeKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19First pass at in-place file manipulation via managerMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18move variable declarations to the beginning of a block.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15more Makefile cleanup and consistency stuffKevin P. Fleming
don't reuse LIBS variable from top-level Makefile (oops) build Asterisk binary after subdirs (preparing for embedded modules) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15use LDFLAGS and LIBS properly, and allow dependencies to provide LDFLAGS if ↵Kevin P. Fleming
needed (although none do today) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14There was an issue with ADSI and iax2, where on an iaxy with a normal phone ↵North Antara
connected, in vm_authenticate, it was try to start ADSI on the channel, and it WOULD because it was "supported", according to the iaxy. There is now a config option (adsi=yes) for this, which defaults to no. (config sample coming shortly) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14add missing unregistration of a manager action on module unloadRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14Rename a couple variables, to be consistent with the rest of the functionsNorth Antara
Abstract out some common code into a single function With the recent scheduler "issues", it pointed out a few things I might have been missing, so I added some rudimentary vrtp and rtcp stuff General cleanup... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13actually make the non-standard G726-32 behavior available for SIP clientsKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13Merged revisions 37531 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r37531 | kpfleming | 2006-07-13 11:44:23 -0500 (Thu, 13 Jul 2006) | 2 lines report address of peer trying to subscribe to unknown hint ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13added even more statefulness for sending out ↵Christian Richter
disconnect/release/release_complete messages. added support for incoming presentation/screening. fixed a bug that we generate TONE_EVENTS on hanguptone_indicatem, which caused asterisk to write blocking thread messages. added nodialtone option to prevent dialtone for always_immediate git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13allow users of RTP to use G726-32 AAL2 packing even when RFC3551 packing has ↵Kevin P. Fleming
been requested (Sipura/Grandstream ATAs and others will need this) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37501 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