summaryrefslogtreecommitdiff
path: root/channels/chan_zap.c
AgeCommit message (Collapse)Author
2006-08-29make menuselect configure process be silent when possibleKevin P. Fleming
don't use #ifdef inside a macro call... it appears various versions of gcc have bugs related to this git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29Merge team/russell/frame_cachingRussell Bryant
There are some situations in Asterisk where ast_frame and/or iax_frame structures are rapidly allocatted and freed (at least 50 times per second for one call). This code significantly improves the performance of ast_frame_header_new(), ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping a thread-local cache of these structures and using frames from the cache whenever possible instead of calling malloc/free every time. This commit also converts the ast_frame and iax_frame structures to use the linked list macros. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25Note to self, always compile before committing.Matthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25Don't send proceeding twice (#7800)Matthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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-09This bug existed in one extra place that is not also in 1.2 ... So, fix it!Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39455 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 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-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-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-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-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-12Merged revisions 37417 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r37417 | kpfleming | 2006-07-12 08:18:21 -0500 (Wed, 12 Jul 2006) | 2 lines get rid of some more printf's (although most of these were ifdef-ed out) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-08Support hold/unhold in Zap, update IAX2 parser to know about modern ↵Mark Spencer
commands, forward hold/unhold in dial, add hold device state and implement holding in the SLA. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06Asterisk portion of the T309 patch. (#7271)Matthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06make chan_zap use proper test for libpri supportKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05update dependency information to match new names for dependenciesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37085 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-24search for Zaptel and libtonezone separately in the configure scriptKevin P. Fleming
various other minor fixes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35812 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-23reduce indentationRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22- dynamically allocate the ast_jb structure that is on the channel structureRussell Bryant
so that channels not using a jitterbuffer don't waste as much memory - ensure that the channel drivers that use jitterbuffers can handle a failure from configuring a jitterbuffer on a new channel because of a memory allocation error - On passing through these channel drivers, configure the jitterbuffer before starting the PBX thread instead of afterwards. If the pbx fails to start for whatever reason, this would have caused a crash. - Also on passing, move the increase of the usecount to after all of the possible failure conditions in the function - fix a place where ast_update_use_count() was not called - ensure that the owner channel pointer of the channel pvt strcutures is set to NULL in failure conditions git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35553 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-07remove the WITH_SMDI defineRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06revert my changes to convert fields of zt_pvt to use stringfields. When I didRussell Bryant
this, I was not keeping in mind the fact that after a stringfield is overwritten by another string, the memory used by the old string can not be recovered. I would like to go back through these changes and make sure that stringfields are not used for fields that are written to many times before these changes are committed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06Add q.921 state information. (#7260)Matthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06don't return -1 if zapata.conf is not present (part of the patch fromRussell Bryant
issue #7290, tzafrir) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06- use stringfields in a bunch of the fields of the zt_pvt structure in chan_zapRussell Bryant
- constify some arguments to functions in callerid.c / callerid.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01- add the ability to configure forced jitterbuffers on h323, jingle,Russell Bryant
and mgcp channels - remove the jitterbuffer configuration from the pvt structures in the sip, zap, and skinny channel drivers, as copying the same global configuration into each pvt structure has no benefit. - update and fix some typos in jitterbuffer related documentation (issue #7257, north, with additional updates and modifications) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31clean up various whitespace issues (issue #7236, casper)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31move the includes of abstract_jb.h to be with the rest of the asterisk includes.Russell Bryant
These used to be wrapped in a #ifdef git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31078 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-24Merged revisions 29969 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r29969 | kpfleming | 2006-05-24 11:17:26 -0500 (Wed, 24 May 2006) | 2 lines respect 'usecallingpres' in zapata.conf even if CLID has not been set for the channel (issue #7123) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23Bump up the echo tail length optionMatthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19Clean up some chan_zap code to make it more readable. (issue #6834 reported ↵Joshua Colp
by ppyy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19Merged revisions 28698 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r28698 | file | 2006-05-19 14:04:02 -0300 (Fri, 19 May 2006) | 2 lines Make the minidle option actually exist as documented (issue #7159 reported by imran) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19fix up a patch that did not merge properly from 1.2 ... weird Russell Bryant
(issue #6866, flefoll) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17Add distinctive ring detection with Caller ID for Australia, New Zealand, ↵Joshua Colp
and other countries. (issue #3596 reported by deon patch by dbowerman with minor mods by moi) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16Add option for enabling and disabling echo cancellationMatthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10remove some chekc sof the result of ast_mutex_lock (issue #7119, Mithraen)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26531 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-06Merged revisions 25123 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r25123 | russell | 2006-05-05 20:05:27 -0400 (Fri, 05 May 2006) | 3 lines ensure that the appropriate manager events are sent in all of the places where alarms are detected or cleared (issue #6866, flefoll) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 Provide the ability to adjust txgain/rxgain on a channel level via the ↵BJ Weschke
CHANNEL() function git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01move some code used only --with-pri in the properLuigi Rizzo
conditionally-compiled area. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30remove unusable MFC/R2 supportKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27allows for chan_zap to have all channels reloadedMatt O'Gorman
via zap restart patch from bug 6955 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27Make sure we use the correct event type when we're moving channels around :-)Matthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵Kevin P. Fleming
autoconf and menuselect tools for Asterisk! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3