summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-08-29Fix a race condition where a canceled call was answered.Mark Michelson
RFC 5407 section 3.1.2 details a scenario where a UAC sends a CANCEL at the same time that a UAS sends a 200 OK for the INVITE that the UAC is canceling. When this occurs, it is the role of the UAC to immediately send a BYE to terminate the call. This scenario was reproducible by have a Digium phone with two lines place a call to a second phone that forwarded the call to the second line on the original phone. The Digium phone, upon realizing that it was connecting to itself, would attempt to cancel the call. The timing of this happened to trigger the aforementioned race condition about 80% of the time. Asterisk was not doing its job of sending a BYE when receiving a 200 OK on a cancelled INVITE. The result was that the ast_channel structure was destroyed but the underlying SIP session, as well as the PJSIP inv_session and dialog, were still alive. Attempting to perform an action such as a transfer, once in this state, would result in Asterisk crashing. The circumstances are now detected properly and the session is ended as recommended in RFC 5407. (closes issue AST-1209) reported by John Bigelow ........ Merged revisions 397945 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Memory leaks fixKevin Harwell
(closes ASTERISK-22376) Reported by: John Hardin Patches: memleak.patch uploaded by jhardin (license 6512) memleak2.patch uploaded by jhardin (license 6512) ........ Merged revisions 397946 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Revert r394939 due to (numerous) objectionsMatthew Jordan
The patch from ASTERISK-21965 was committed perhaps a bit too hastily. Walter and Tzafrir have pointed out numerous issues with the approach and have propsed an alternative in r/2757. Since it's not a time critical issue and is not worth holding up the release of 12 for it, I've gone ahead and reverted r394939 from 12/trunk and re-opened ASTERISK-21965. ........ Merged revisions 397938 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Account for {} in Swagger notesDavid M. Lee
........ Merged revisions 397927 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Recursively search for '.c' files when making documentation with 'make full'Matthew Jordan
Without this, documentation defined in sub-folders is ignored. Since having properly generated documentation is especially important in Asterisk 12 - not having it can cause a module to not load - 'make full' needs to look in all .c files. ........ Merged revisions 397924 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Multiple revisions 397921-397922Mark Michelson
........ r397921 | mmichelson | 2013-08-29 10:42:10 -0500 (Thu, 29 Aug 2013) | 6 lines Resolve assumptions that bridge snapshots would be non-NULL for transfer stasis events. Attempting to transfer an unbridged call would result in crashes in either CEL code or in the conversion to AMI messages. ........ r397922 | mmichelson | 2013-08-29 10:42:29 -0500 (Thu, 29 Aug 2013) | 3 lines Remove extra debug message. ........ Merged revisions 397921-397922 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Actually *add* the database schema management utilitiesMatthew Jordan
In r397874, the scripts were removed... but not replaced. Thanks to Michael Young for noticing this! ........ Merged revisions 397911 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Fix some uninitialized buffers for CDR handling valgrind found.Richard Mudgett
* Made ast_strftime_locale() ensure that the output buffer is initialized. The std library strftime() returns 0 and does not touch the buffer if it has an error. However, the function can also return 0 without an error. (closes issue ASTERISK-22412) Reported by: rmudgett ........ Merged revisions 397902 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Fixed problems with ast_cdr_serialize_variables().Richard Mudgett
* Fixed return value of ast_cdr_serialize_variables() on error. It needs to return 0 indicating no CDR variables found. * Made ast_cdr_serialize_variables() check the return value of cdr_object_format_property() and assert if nonzero. A member of the cdr_readonly_vars[] was not handled. * Removed unused elements from cdr_readonly_vars[]: total_duration, total_billsec, first_start, and first_answer. ........ Merged revisions 397900 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Made the on/off in CLI "cdr set debug [on|off]" case insensitive.Richard Mudgett
........ Merged revisions 397898 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Make CDR variable name chandling consistently case insensitive.Richard Mudgett
........ Merged revisions 397896 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Make CDR code deal with channel names case insensitively.Richard Mudgett
........ Merged revisions 397894 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Some CDR code optimization.Richard Mudgett
........ Merged revisions 397892 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Whitespace and curly braces.Richard Mudgett
........ Merged revisions 397885 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Improve detection of answer on SIP blind transfer.Mark Michelson
A problem encountered during testing was that res_pjsip_refer would not ever send a NOTIFY with a 200 OK sipfrag. This is because the framehook that was supposed to send the NOTIFY would never be told that an answer had occurred. This happened for two reasons: 1) The transferee channel on which the framehook was on was already up. 2) Answers are rarely if ever written to channels. Rather, the ast_answer() or ast_raw_answer() function is used to answer channels. Thanks to a suggestion by Matt Jordan, the best way to detect that the call had been answered was to find out when the transferee channel joined a bridge. With stasis this is an easy task. So now, in addition to the framehook logic, there is a stasis subscription used to determine when the transferee has entered a bridge. Once it has entered, an appropriate NOTIFY is sent. ........ Merged revisions 397876 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Add database schema management using AlembicMatthew Jordan
This patch replaces contrib/realtime/ with a new setup for managing the database schema required for database integration with Asterisk. In addition to initializing a database with the proper schema, alembic can do a database migration to assist with upgrading Asterisk in the future. Hopefully this helps make setting up and operating Asterisk with a database easier. With this the schema only needs to be maintained in one place instead of once per database. The schemas I have added here have a bit of improvement over the examples that were there before (some added consistency and added some missing indexes). Managing the schema in one place here also applies to all databases supported by SQLAlchemy. See contrib/ast-db-manage/README.md for more details. Review: https://reviewboard.asterisk.org/r/2731 patch by Russell Bryant (license 6300) ........ Merged revisions 397874 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Update CHANGES file for Asterisk 12Matthew Jordan
This updates the Asterisk 12 CHANGES file with the things that were missed during the development cycle. Review: https://reviewboard.asterisk.org/r/2795/ ........ Merged revisions 397870 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28pbx.c: Make ast_str_substitute_variables_full() not mask variables.Richard Mudgett
........ Merged revisions 397859 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28ast_free() is null tollerant.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Match use of ast_free() with ast_calloc() and add some curly braces.Richard Mudgett
........ Merged revisions 397856 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28Fix dialog matching in the SIP distributor.Mark Michelson
Dialog matching is performed in the distributor for the sole purpose of retrieving an associated serializer so the request may be serialized. This patch fixes two problems. First, incoming CANCEL requests that had no to-tag (which really should be *all* CANCEL requests) would not match with a dialog. An earlier bug fix to deal with early CANCEL requests would result in the CANCEL being replied to with a 481. The fix for this is to find the matching INVITE transaction and get the dialog from that transaction. Second, no SIP responses were matching dialogs. This is because we were inverting the tags that we were passing into PJSIP's dialog finding function. This logic has been corrected by setting local and remote tag variables based on whether the incoming message is a request or response. ........ Merged revisions 397854 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27ARI: WebSocket event cleanupDavid M. Lee
Stasis events (which get distributed over the ARI WebSocket) are created by subscribing to the channel_all_cached and bridge_all_cached topics, filtering out events for channels/bridges currently subscribed to. There are two issues with that. First was a race condition, where messages in-flight to the master subscribe-to-all-things topic would get sent out, even though the events happened before the channel was put into Stasis. Secondly, as the number of channels and bridges grow in the system, the work spent filtering messages becomes excessive. Since r395954, individual channels and bridges have caching topics, and can be subscribed to individually. This patch takes advantage, so that channels and bridges are subscribed to on demand, instead of filtering the global topics. The one case where filtering is still required is handling BridgeMerge messages, which are published directly to the bridge_all topic. Other than the change to how subscriptions work, this patch mostly just moves code around. Most of the work generating JSON objects from messages was moved to .to_json handlers on the message types. The callback functions handling app subscriptions were moved from res_stasis (b/c they were global to the model) to stasis/app.c (b/c they are local to the app now). (closes issue ASTERISK-21969) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2754/ ........ Merged revisions 397816 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27Made MALLOC_DEBUG less CPU intensive by default.Richard Mudgett
Storing a backtrace for each allocation in anticipation of a memory management problem is very CPU intensive. * Added the CLI "memory backtrace {on|off}" command to request that the backtrace be gathered only on request. The backtrace is off by default. (issue ASTERISK-22221) Reported by: Matt Jordan ........ Merged revisions 397809 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27AST-2013-005: Fix crash caused by invalid SDPMatthew Jordan
If the SIP channel driver processes an invalid SDP that defines media descriptions before connection information, it may attempt to reference the socket address information even though that information has not yet been set. This will cause a crash. This patch adds checks when handling the various media descriptions that ensures the media descriptions are handled only if we have connection information suitable for that media. Thanks to Walter Doekes, OSSO B.V., for reporting, testing, and providing the solution to this problem. (closes issue ASTERISK-22007) Reported by: wdoekes Tested by: wdoekes patches: issueA22007_sdp_without_c_death.patch uploaded by wdoekes (License 5674) ........ Merged revisions 397756 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 397757 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 397758 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 397759 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27AST-2013-004: Fix crash when handling ACK on dialog that has no channelMatthew Jordan
A remote exploitable crash vulnerability exists in the SIP channel driver if an ACK with SDP is received after the channel has been terminated. The handling code incorrectly assumed that the channel would always be present. This patch adds a check such that the SDP will only be parsed and applied if Asterisk has a channel present that is associated with the dialog. Note that the patch being applied was modified only slightly from the patch provided by Walter Doekes of OSSO B.V. (closes issue ASTERISK-21064) Reported by: Colin Cuthbertson Tested by: wdoekes, Colin Cutherbertson patches: issueA21064_fix.patch uploaded by wdoekes (License 5674) ........ Merged revisions 397710 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 397711 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 397712 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 397713 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27Fix uninitialized value in struct ast_control_pvt_cause_code usage.Richard Mudgett
........ Merged revisions 397744 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 397745 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-26Better handle clearing the OUTGOING flag when a channel leaves a bridgeMatthew Jordan
When a channel with the OUTGOING flag leaves a bridge, and it will survive being pulled from the bridge (either because it will execute dialplan, go into another bridge, or live in a friendly autoloop), we have to clear the OUTGOING flag. This is the signal to the CDR engine that this channel is no longer a second class citizen, i.e., it is not "dialed". The soft hangup flags are only half the picture. If a channel is being moved from one bridge to another, the soft hangup flags aren't set; however, the state of the bridge_channel will not be hung up. Since the channel does not have one of the two hang up states, that implies that the channel is still technically alive. This patch modifies the check so that it checks both the soft hangup flags as well as the bridge_channel state. If either suggests that the channel is going to persist, we clear the OUTGOING flag. ........ Merged revisions 397690 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-26Fixed bucket.c for systems where tv_usec is not an unsigned long.David M. Lee
........ Merged revisions 397673 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-26bridging: Fix a livelock with local channel optimization.Richard Mudgett
Use a better means of waking up the bridge channel thread. ........ Merged revisions 397650 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-26chan_dahdi: Add some missing build cleanup.Richard Mudgett
........ Merged revisions 397643 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-25Fix bucket unit testsMatthew Jordan
After the review for buckets was completed (r2715), the handling of names in the bucket core was deferred to the wizards. As such, the bucket unit tests cannot expect that passing a URI with a scheme specified but no actual resource name will automatically fail. The tests have been updated to not make this check. ........ Merged revisions 397630 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-25Fix the config_options_testMatthew Jordan
The config options test requires the entire configuration item to be transparent from the documentation system. So we let it do that too. As an aside, please do not use this power for evil. Documentation is your friend, and you really should document your configurations. Hiding your module's configuration information from the system attempting to enforce some sanity in the universe is something only a Bond villain would contemplate. ........ Merged revisions 397628 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-25Add rtpengine configuration parameterMatthew Jordan
The rtpengine configuration parameter was documented in the XML documentation, but it was not actually registered with the sorcery object. This adds the parameter with a default of "asterisk", such that res_rtp_asterisk is chosen as the default RTP implementation. (closes issue ASTERISK-22380) Reported by: Rusty Newton Tested by: Rusty Newton ........ Merged revisions 397621 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Set new merge properties on 12Matthew Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Fix building of trunk.Joshua Colp
Note: This is why I commit on the weekend. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Fix channel reference leak in Originated channelsMatthew Jordan
When originating channels, ast_pbx_outgoing_* caused the dialed channel reference to be bumped twice. Ostensibly, this routine is bumping the channel lifetime such that the channel doesn't get nuked in between locks/unlocks; however, since the routine should return the dialed channel with its reference bumped, it only needs to do this one time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Blocked revisions 397604Joshua Colp
........ Make libuuid an optional dependency for res_rtp_asterisk instead of a requirement. Review: https://reviewboard.asterisk.org/r/2777/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Add some clarifying documentation to the rewrite_contact endpoint option.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Blank line tweaks.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Add the bucket API.Joshua Colp
Bucket is a URI based API for the creation, retrieval, updating, and deletion of "buckets" and files contained within them. Review: https://reviewboard.asterisk.org/r/2715/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Fix a bug where the argc value was passed as no_doc when registering custom ↵Joshua Colp
sorcery types. This also adds a _nodoc equivalent. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Add test events necessary for bridge tests to pass in the test suite.Mark Michelson
(closes issue AST-1200) reported by John Bigelow Review: https://reviewboard.asterisk.org/r/2790/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Fix error in using ast_channel_snapshot_type before initializationMatthew Jordan
Starting Asterisk would kick back an ERROR message stating that the Stasis message type ast_channel_snapshot_type was used prior to initialization. This occurred due to the caching topic being created prior to the message type that it depended on. This patch re-orders the start up such that the message type is initialized prior to the caching topic. It also checks the return value of the initialization of the agent login/logoff types. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23bridge_native_rtp: Fix hold chain bugs caused by native RTP bridge framehookJonathan Rose
Issuing hold/unhold would lead to odd behavior. Between two chan_sip devices, a hold could cause an endless chain of updates while with pjsip a similar chain would begin but then end somewhat randomly. This patch fixes that by no longer tweaking the RTP glue on both sides of the call for every HOLD/UNHOLD/UPDATE_RTP_PEER frame. (issue ASTERISK-22217) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2794/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Handle DTMF and hold wrapup when a channel leaves the bridging system.Richard Mudgett
DTMF start/end and hold/unhold events have state because a DTMF begin event and hold event must be ended by something. The following cases need to be handled when a channel is moved around in the system. * When a channel leaves a bridge it may owe a DTMF end event to the bridge. * When a channel leaves a bridge it may owe an UNHOLD event to the bridge. (This case is explicitly ignored because things like transfers need explicit control over this.) * When a channel leaves the bridging system it may need to simulate a DTMF end event to the channel. * When a channel leaves the bridging system it may need to simulate an UNHOLD event to the channel. The patch also fixes the following: * Fixes playing a file and restarting MOH using the latest MOH class used. (closes issue ASTERISK-22043) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2791/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Fix sorcery unit testsMatthew Jordan
When strict XML documentation checking was re-enabled, the test objects used in sorcery would fail to register as the types were not marked internal and the nodoc option wasn't used for the options. This fixes that problem, such that, as one would hope, they once again pass. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Fix memory corruption when trying to get "core show locks".Richard Mudgett
Review https://reviewboard.asterisk.org/r/2580/ tried to fix the mismatch in memory pools but had a math error determining the buffer size and didn't address other similar memory pool mismatches. * Effectively reverted the previous patch to go in the same direction as trunk for the returned memory pool of ast_bt_get_symbols(). * Fixed memory leak in ast_bt_get_symbols() when BETTER_BACKTRACES is defined. * Fixed some formatting in ast_bt_get_symbols(). * Fixed sig_pri.c freeing memory allocated by libpri when MALLOC_DEBUG is enabled. * Fixed __dump_backtrace() freeing memory from ast_bt_get_symbols() when MALLOC_DEBUG is enabled. * Moved __dump_backtrace() because of compile issues with the utils directory. (closes issue ASTERISK-22221) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2778/ ........ Merged revisions 397525 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 397528 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Prevent seg fault in off nominal path when registered option fails to validateMatthew Jordan
If an option is registered to a type and it is the last known type in the list of registered types, and the option fails to register, an overrun of the types array can occur due to the index variable having been already incremented. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23PSJIP - sip.conf to res_sip.conf scriptKevin Harwell
Most, if not all, of the backing features of a conf file should now be implemented (e.g. multi-line comments, includes, templates, etc...). A few of the options still need to be mapped. Those are currently listed in the 'sip_to_res_sip.py' file. Things to do: (1) There is more work to do here, at least for the sip.conf items that aren't currently parsed. An issue will be created for that. (2) All of the scripts should probably be passed through pylint and have as many PEP8 issues fixed as possible. (3) A public review is probably warranted at that point of the entire script. Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23ARI: Correct error codes for bridge operationsDavid M. Lee
This patch adds error checking to ARI bridge operations, when adding/removing channels to/from bridges. In general, the error codes fall out as follows: * Bridge not found - 404 Not Found * Bridge not in Stasis - 409 Conflict * Channel not found - 400 Bad Request * Channel not in Stasis - 422 Unprocessable Entity * Channel not in this bridge (on remove) - 422 Unprocessable Entity (closes issue ASTERISK-22036) Review: https://reviewboard.asterisk.org/r/2769/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397565 65c4cc65-6c06-0410-ace0-fbb531ad65f3