summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-02-17Add an implementation of the heap data structure.Russell Bryant
A heap is a convenient data structure for implementing a priority queue. Code from svn/asterisk/team/russell/heap/. Review: http://reviewboard.digium.com/r/160/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17TypoOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Merge a large set of updates to the Asterisk indications API.Russell Bryant
This patch includes a number of changes to the indications API. The primary motivation for this work was to improve stability. The object management in this API was significantly flawed, and a number of trivial situations could cause crashes. The changes included are: 1) Remove the module res_indications. This included the critical functionality that actually loaded the indications configuration. I have seen many people have Asterisk problems because they accidentally did not have an indications.conf present and loaded. Now, this code is in the core, and Asterisk will fail to start without indications configuration. There was one part of res_indications, the dialplan applications, which did belong in a module, and have been moved to a new module, app_playtones. 2) Object management has been significantly changed. Tone zones are now managed using astobj2, and it is no longer possible to crash Asterisk by issuing a reload that destroys tone zones while they are in use. 3) The API documentation has been filled out. 4) The API has been updated to follow our naming conventions. 5) Various bits of code throughout the tree have been updated to account for the API update. 6) Configuration parsing has been mostly re-written. 7) "Code cleanup" The code is from svn/asterisk/team/russell/indications/. Review: http://reviewboard.digium.com/r/149/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Add assertions in the quest to track down a refcount leak.Tilghman Lesher
(closes issue #14485) Reported by: davevg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Fix a race condition that caused device states to become incorrect for hints.Russell Bryant
The problem here is that the hint processing code was subscribed to the wrong event type. So, it started processing state for a hint too soon, before the device state cache had been updated. Also, fix a similar bug in app_queue, as it was also subscribed to the wrong event type. (closes issue #14461) Reported by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17TypoOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17If there are no realtime engines, there's no reason to check for realtime ↵Olle Johansson
families git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17In this version, we can combine the queries, because we support droppingTilghman Lesher
nonexistent columns. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Merged revisions 176426 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176426 | tilghman | 2009-02-16 18:49:22 -0600 (Mon, 16 Feb 2009) | 10 lines After a 'sip reload', qualifies for realtime peers weren't immediately restarted, instead waiting until the next registration. We're now caching the qualify across a reload/restart and starting the qualify immediately upon loading the peer. (closes issue #14196) Reported by: pdf Patches: 20090120__bug14196_1.4.diff.txt uploaded by pdf (license 663) Tested by: pdf ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Might want to update the buffer pointer after a realloc (or we crash)Tilghman Lesher
(closes issue #14485) Reported by: davevg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16add support for Siren7 and Siren14 flavors of prompts and music on holdKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 176354 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176354 | dvossel | 2009-02-16 17:30:52 -0600 (Mon, 16 Feb 2009) | 8 lines Fixes issue with AST_CONTROL_SRCUPDATE not being relayed correctly during bridging This should have been committed with rev176247, but I missed it. srcupdate frames no longer break out of the native bridge, but are not being sent to the other call leg either. This fixs that. issue #13749 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Use the correct list macros for deleting an item from the middle of a list.Tilghman Lesher
(issue #13777) Reported by: pj Patches: 20090203__bug13777.diff.txt uploaded by Corydon76 (license 14) Tested by: pj git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 176216 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176216 | kpfleming | 2009-02-16 15:10:38 -0600 (Mon, 16 Feb 2009) | 3 lines fix a flaw in the ast_string_field_build() family of API calls; these functions made no attempt to reuse the space already allocated to a field, so every time the field was written it would allocate new space, leading to what appeared to be a memory leak. ........ r176254 | kpfleming | 2009-02-16 15:41:46 -0600 (Mon, 16 Feb 2009) | 3 lines correct a logic error in the last stringfields commit... don't mark additional space as allocated if the string was built using already-allocated space ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 176249,176252 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176249 | mmichelson | 2009-02-16 15:34:27 -0600 (Mon, 16 Feb 2009) | 14 lines Open the DAHDI pseudo device and set it to be nonblocking atomically Apparently on FreeBSD, attempting to set the O_NONBLOCKING flag separately from opening the file was causing an "inappropriate ioctl for device" error. While I cannot fathom why this would be happening, I certainly am not opposed to making the code a bit more compact/efficient if it also fixes a bug. (closes issue #14482) Reported by: ys Patches: meetme.patch uploaded by ys (license 281) Tested by: ys ........ r176252 | mmichelson | 2009-02-16 15:39:21 -0600 (Mon, 16 Feb 2009) | 3 lines Remove unused variable and make dev-mode compilation happy ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 175597 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/trunk ........ r175597 | dvossel | 2009-02-13 14:11:55 -0600 (Fri, 13 Feb 2009) | 4 lines Fixed iax2 key rotation backwards compatibility Turns key rotation back on by default. Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility. This eliminates the need for the keyrotate option in iax.conf, so it has been removed. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Assist proper thread synchronization when stopping the logger thread.Mark Michelson
I was finding that on my dev box, occasionally attempting to "stop now" in trunk would cause Asterisk to hang. I traced this to the fact that the logger thread was waiting on a condition which had already been signalled. The logger thread also need to be sure to check the value of the close_logger_thread variable. The close_logger_thread variable is only checked when the list of logmessages is empty. This allows for the logger thread to print and free any pending messages before exiting. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Can't set debug level 2 (intense debugging) unless the syntax matchesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Remove chan_features.Russell Bryant
Review: http://reviewboard.digium.com/r/161/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 176029 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176029 | file | 2009-02-16 11:33:53 -0400 (Mon, 16 Feb 2009) | 9 lines Don't have the Via header stored as a stringfield as it can change often during the lifetime of a dialog. This issue crept up with subscriptions on the AA50. When an outgoing NOTIFY is sent a new branch value is created and the Via header is changed to reflect it. Since this was a stringfield a new spot in the pool was used for the value while the old was left untouched/unused. If the current pool was full a new pool was created. This would cause memory usage to increase steadily. (issue #AA50-2332) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Make the causes array static, and remove the type name as it is not needed.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 175921 via svnmerge from Michiel van Baak
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175921 | mvanbaak | 2009-02-16 00:37:03 +0100 (Mon, 16 Feb 2009) | 3 lines fix mis-spelling of the word registered. Reported by De_Mon on #asterisk-dev. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15Make ast_sched_report() and ast_sched_dump() thread safe.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15Fix a number of problems with ast_sched_report().Russell Bryant
1) It had numerous coding guidelines violations with regards to formatting. 2) It allocated memory using ast_calloc() that was never freed. 3) It didn't check for failure from the allocation. 4) It used sprintf() and strcat() to build the result, doing zero checking to prevent writing past the end of the provided buffer. The function also lacks API documentation, but that has not been addressed in this commit. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15Merged revisions 175825 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175825 | oej | 2009-02-15 21:33:17 +0100 (Sön, 15 Feb 2009) | 2 lines format_ilbc does not depend on codec libraries and can therefore always be made. My mistake. Ursäkta! ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15Merged revisions 175792 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175792 | oej | 2009-02-15 21:20:21 +0100 (Sön, 15 Feb 2009) | 2 lines Disable format_ilbc.so by default, like codec_ilbc.so ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15Merged revisions 175777 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175777 | oej | 2009-02-15 20:48:38 +0100 (Sön, 15 Feb 2009) | 2 lines Make sure that the debug line is not printed on debug level 0 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Blocked revisions 175698 via svnmergeJason Parker
........ r175698 | qwell | 2009-02-13 15:53:16 -0600 (Fri, 13 Feb 2009) | 1 line Zaptel is not DAHDI. Rather, Zaptel is actually Zaptel. (in case you're confused, DAHDI is still DAHDI) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Merge queue-reset branch to AsteriskMark Michelson
From a user point-of-view, this adds new CLI commands and Manager Actions to better facilitate the reloading of queues and the resetting of their statistics. The new CLI commands are the "queue reload" and "queue reset stats" commands. The new manager actions are the QueueReload and QueueReset commands. Review: http://reviewboard.digium.com/r/115 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Add manager events for chanspy starting or stoppingMark Michelson
(closes issue #14469) Reported by: caio1982 Patches: chanspy_events2.diff uploaded by caio1982 (license 22) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13fix a few more XML documentation problemsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13add missing </para>Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Fixed iax2 key rotation backwards compatibilityDavid Vossel
Turns key rotation back on by default. Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility. This eliminates the need for the keyrotate option in iax.conf, so it has been removed. Review: http://reviewboard.digium.com/r/159/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Merged revisions 175590 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175590 | mmichelson | 2009-02-13 13:47:48 -0600 (Fri, 13 Feb 2009) | 16 lines Fix a potential crash situation when using IMAP voicemail If calling into VoiceMailMain when using IMAP storage, it was possible to crash Asterisk by hanging up the phone when prompted for a voicemail mailbox. This patch fixes the issue. While it may appear that this patch is superficial, it allows code execution to continue to the failure case just below the IMAP_STORAGE code block where this patch has been applied (closes issue #14473) Reported by: dwpaul Patches: voicemail_imap_crash_no_mailbox.patch uploaded by dwpaul (license 689) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Add an option to keep the recorded file upon hangup.Joshua Colp
(closes issue #14341) Reported by: fnordian git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13document G.722.1/.1C supportKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Add basic (passthrough, playback, record) support for ITU G.722.1 and ↵Kevin P. Fleming
G.722.1C (also known as Siren7 and Siren14) This patch adds passthrough, file recording and file playback support for the codecs listed above, with negotiation over SIP/SDP supported. Due to Asterisk's current limitation of treating a codec/bitrate combination as a unique codec, only G.722.1 at 32 kbps and G.722.1C at 48 kbps are supported. Along the way, some related work was done: 1) The rtpPayloadType structure definition, used as a return result for an API call in rtp.h, was moved from rtp.c to rtp.h so that the API call was actually usable. The only previous used of the API all was chan_h323.c, which had a duplicate of the structure definition instead of doing it the right way. 2) The hardcoded SDP sample rates for various codecs in chan_sip.c were removed, in favor of storing these sample rates in rtp.c along with the codec definitions there. A new API call was added to allow retrieval of the sample rate for a given codec. 3) Some basic 'a=fmtp' parsing for SDP was added to chan_sip, because chan_sip *must* decline any media streams offered for these codecs that are not at the bitrates that we support (otherwise Bad Things (TM) would result). Review: http://reviewboard.digium.com/r/158/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13add 'faxbuffers' configuration option information to CHANGESDwayne M. Hubbard
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Add dynamic fax buffer configuration option to chan_dahdi.confDwayne M. Hubbard
When the 'faxdetect' configuration option is used, one may also want to use the 'faxbuffers' configuration option in chan_dahdi.conf. This option will dynamically use the configured 'faxbuffers' buffer policy on a channel for the life of the call following the detection of fax tones. The faxbuffers buffer policy will be reverted during call teardown. An example use of 'faxbuffers' is below. This example would switch to using 6 buffers with a full buffer policy. faxbuffers=>6,full git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Blocked revisions 175407 via svnmergeMark Michelson
........ r175407 | mmichelson | 2009-02-12 17:22:44 -0600 (Thu, 12 Feb 2009) | 12 lines Fix a place where filestreams were not refcounted properly This section was already present in trunk and other branches, but did not exist in 1.4. (closes issue #14395) Reported by: ZX81 Patches: 14395.patch uploaded by putnopvut (license 60) Tested by: ZX81 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Remove useless string copy, and make sscanf safe againRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Adds force encryption option to iax.confDavid Vossel
This patch adds forceencryption=yes as an iax.conf option. When force encryption is enabled, no unencrypted connections are allowed. This insures all connections are encrypted. This is a new feature, so CHANGES and iax.conf.sample are updated as well. (closes issue #13285) Reported by: sgofferj Tested by: russell Review: http://reviewboard.digium.com/r/150/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Merged revisions 175311 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175311 | tilghman | 2009-02-12 15:19:40 -0600 (Thu, 12 Feb 2009) | 9 lines Fix crashes when receiving certain T.38 packets. Also, increase the maximum size of T.38 packets and warn users when they try to set the limits above those maximums. (closes issue #13050) Reported by: schern Patches: 20090212__bug13050.diff.txt uploaded by Corydon76 (license 14) Tested by: schern ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Merged revisions 175294 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175294 | jpeeler | 2009-02-12 14:34:36 -0600 (Thu, 12 Feb 2009) | 9 lines Fix ParkedCall event information for From field in the case of a blind transfer If the parker information can not be obtained from the peer, try and see if the BLINDTRANSFER channel variable has been set. Previously, a blind transfer to the ParkAndAnnounce app would return nothing for the From. Closes AST-189 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Avoid using ast_strdupa() in a loop.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Don't enable something by default that has a dependency on something _not_ ↵Russell Bryant
enabled by default. menuselect was not happy with this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12correct warning message to not refer specifically to DAHDIKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Merged revisions 175187 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175187 | jpeeler | 2009-02-12 11:57:10 -0600 (Thu, 12 Feb 2009) | 6 lines Fix crash in event of failed attempt to transfer to parking The peer may not necessarily exist, such as in the case of a transfer to ParkAndAnnounce. In this case don't try to play a sound to it. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Setting key rotation to be off by defaultDavid Vossel
Key rotation breaks compatibility between (trunk/1.6.1) and (1.2/1.4/1.6.0). As a follow up to this, I am investigating possible ways to allow key rotation to be on by default and not affect the other branches, but for now it must be turned off. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Merged revisions 175124 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175124 | russell | 2009-02-12 10:51:13 -0600 (Thu, 12 Feb 2009) | 27 lines Don't send DTMF for infinite time if we do not receive an END event. I thought that this was going to end up being a pretty gnarly fix, but it turns out that there was actually already a configuration option in rtp.conf, dtmftimeout, that was intended to handle this situation. However, in between Asterisk 1.2 and Asterisk 1.4, the code that processed the option got lost. So, this commit brings it back to life. The default timeout is 3 seconds. However, it is worth noting that having this be configurable at all is not really the recommended behavior in RFC 2833. From Section 3.5 of RFC 2833: Limiting the time period of extending the tone is necessary to avoid that a tone "gets stuck". Regardless of the algorithm used, the tone SHOULD NOT be extended by more than three packet interarrival times. A slight extension of tone durations and shortening of pauses is generally harmless. Three seconds will pretty much _always_ be far more than three packet interarrival times. However, that behavior is not required, so I'm going to leave it with our legacy behavior for now. Code from svn/asterisk/team/russell/issue_14460 (closes issue #14460) Reported by: moliveras ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175125 65c4cc65-6c06-0410-ace0-fbb531ad65f3