summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2012-01-25Remove "asterisk/version.h" in favor of "asterisk/ast_version.h".Kevin P. Fleming
A long time ago, in a land far far away, we added "asterisk/ast_version.h", which provides the ast_get_version() and ast_get_version_num() functions. These were added so that modules that needed the version information for the Asterisk instance they were loaded in could actually get it (as opposed the version that they were compiled against). We changed everything in the tree to use the new mechanism (although later main/test.c was added using the old method). However, the old mechanism was never removed, and as a result, new code is still trying to use it. This commit removes asterisk/version.h and replaces it with a header that will generate a compile-time error if you try to use it (the error message tells you which header you should use instead). It also removes the Makefile and build_tools bits that generated the file, and it updates main/test.c to use the 'proper' method of getting the Asterisk version information. This is an API change and thus is being committed for trunk only, but it's a fairly minor one and definitely improves the situation for out-of-tree modules. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25Fixes for sending SIP MESSAGE outside of calls.Richard Mudgett
* Fix authenticate MESSAGE losing custom headers added by the MESSAGE_DATA function in the authorization attempt. * Pass up better From header contents for SIP to use. Now is in the "display-name" <URI> format expected by MessageSend. (Note that this is a behavior change that could concievably affect some people.) * Block user from adding standard headers that are added automatically. (To, From,...) * Allow the user to override the Content-Type header contents sent by MessageSend. * Decrement Max-Forwards header if the user transferred it from an incoming message. * Expand SIP short header names so the dialplan and other code only has to deal with the full names. * Documents what SIP expects in the MessageSend(from) parameter. (closes issue ASTERISK-18992) Reported by: Yuri (closes issue ASTERISK-18917) Reported by: Shaun Clark Review: https://reviewboard.asterisk.org/r/1683/ ........ Merged revisions 352520 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25Eliminate unnecessary rebuilds of main/format*.c.Kevin P. Fleming
These files have no need to include "asterisk/version.h", and doing so forces them to be rebuilt each time a Subversion checkout moves between 'modified' and 'unmodified' states. ........ Merged revisions 352516 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23Fix grammar of comment.Mark Michelson
........ Merged revisions 352230 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352231 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23Fix blind transfers from failing if an 'h' extension is present.Mark Michelson
This prevents the 'h' extension from being run on the transferee channel when it is transferred via a native transfer mechanism such as SIP REFER. (closes ASTERISK-19173) Reported by: Ross Beer Tested by: Kristjan Vrban Patches: ASTERISK-19173 by Mark Michelson (license 5049) Review: https://reviewboard.asterisk.org/r/1685 ........ Merged revisions 352199 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352228 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-21Fix ast_app_dtget() time unit inconsistency.Richard Mudgett
Note: Noone calls ast_app_dtget() with the timeout parameter of zero so the bad code normally will never get executed. * Fix unnecessary floating point division in func_timeout.c timeout_write() when all other values are integers. (closes issue ASTERISK-16817) Reported by: Dmitry Andrianov ........ Merged revisions 352029 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352035 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20Various parking improvements.Mark Michelson
* Adds per-parking lot options comebackcontext and comebackdialtime * Makes comebacktoorigin settable per parking lot * Sets a PARKER channel variable when comebacktoorigin is disabled (closes issue ASTERISK-16643) Reported by: Mitch Sharp (bluecrow76) Patches: asterisk-1.6.2.17.2-park-features-comebackcontext-consolidated-v3.diff by Mitch Sharp (bluecrow76) license 5231 with updates by me. Review: https://reviewboard.asterisk.org/r/1674 Review: https://reviewboard.asterisk.org/r/963 Reviewed by Richard Mudgett git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16Add ABS() absolute value function to the expression parser.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16Sort the output of 'database showkey' as well.Sean Bright
You can pass wildcards (%) to the database CLI commands, so this will sort the returned list of matches. ........ Merged revisions 350978 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16Add missing code to set direct RTP setup information during dialing.Joshua Colp
........ Merged revisions 350975 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350976 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16Sort the output of 'database show' by key.Sean Bright
This more closely mimics the behavior of 'database show' before the conversion to sqlite3. ........ Merged revisions 350938 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-15Allow only one thread at a time to do asterisk cleanup/shutdown.Walter Doekes
Add locking around the really-really-quit part of the core stop/restart part. Previously more than one thread could be called to do cleanup, causing atexit handlers to be run multiple times, in turn causing segfaults. (issue ASTERISK-18883) Reviewed by: Terry Wilson Review: https://reviewboard.asterisk.org/r/1662/ Review: https://reviewboard.asterisk.org/r/1658/ ........ Merged revisions 350888 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350889 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13Make sure asterisk builds on OpenBSDKinsey Moore
OpenBSD defines SO_PEERCRED, but it returns a 'struct sockpeercred', not 'struct ucred', which causes compilation of main/asterisk.c to fail in read_credentials(). This allows configure to check for sockpeercred and asterisk to deal with it properly. (closes issue ASTERISK-18929) Reported-by: Barry Miller Patch-by: Barry Miller ........ Merged revisions 350730 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350731 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13Remove some dead code in ast_bridge_call().Richard Mudgett
None of the parameters to ast_bridge_call() can be NULL for the bridge to work so no need to check for it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13Add missing CEL logging fields to various CEL backends.Richard Mudgett
Multiple revisions 350555,350571 ........ r350555 | rmudgett | 2012-01-13 11:12:51 -0600 (Fri, 13 Jan 2012) | 12 lines Add missing CEL logging fields to various CEL backends. * Add missing eventextra to cel_psql.c and cel_odbc.c. * Add missing PeerAccount and EventExtra to cel_manager.c. * Add missing userdeftype support for cel_custom.conf.sample and cel_sqlite3_custom.conf.sample. (closes issue ASTERISK-17190) Reported by: Bryant Zimmerman ........ r350571 | rmudgett | 2012-01-13 11:23:57 -0600 (Fri, 13 Jan 2012) | 8 lines Use compatible names for event extra data for various CEL backends. * Change eventextra to extra in cel_psql.c and cel_odbc.c. * Change EventExtra to Extra in cel_manager.c. (issue ASTERISK-17190) ........ Merged revisions 350555,350571 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350585 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13Fix crash from bridge channel hangup race condition in ConfBridgeMatthew Jordan
This patch addresses two issues in ConfBridge and the channel bridge layer: 1. It fixes a race condition wherein the bridge channel could be hung up 2. It removes the deadlock avoidance from the bridging layer and makes the bridge_pvt an ao2 ref counted object Patch by David Vossel (mjordan was merely the commit monkey) (issue ASTERISK-18988) (closes issue ASTERISK-18885) Reported by: Dmitry Melekhov Tested by: Matt Jordan Patches: chan_bridge_cleanup_v.diff uploaded by David Vossel (license 5628) (closes issue ASTERISK-19100) Reported by: Matt Jordan Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1654/ ........ Merged revisions 350550 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-12Adds peer to CEL report on CEL_BRIDGE_START and CEL_BRIDGE_ENDJonathan Rose
(closes issue ASTERISK-17940) Reporter: Nic Colledge Patches: features_18.patch uploaded by Nic Colledge (license 6245) ........ Merged revisions 350501 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350502 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-11Remove extraneous BRIDGEPEER AMI VarSet event on a CEL dummy channel.Richard Mudgett
(closes issue ASTERISK-19180) Reported by: Corey Farrell Patches: asterisk_cel_noevent_varset.diff (license #5909) patch uploaded by Corey Farrell ........ Merged revisions 350452 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350453 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-11Always treat arguments to get_by_name_cb as stringsTerry Wilson
Initially, support was left in for the old style of searching, even though it wasn't actually used. In the case of name_len != 0, the OBJ_KEY flag isn't passed because we aren't matching on a full key and therefor can't use the hash function to optimize. The code left in to support the old way of searching unfortunately treated a prefix search like this as though an ast_channel struct was passed as an arg and caused a crash. This patch also adds needed parentheses around some matching conditions. (closes issue ASTERISK-19182) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Fix compiler warnings reported by gcc v4.2.4.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Fix shutdown handling of sqlite3 astdb.Walter Doekes
If a db_sync was scheduled just before shutdown, the atexit code calling db_sync would have no effect, causing the astdb commit thread to stay alive. This caused the SIP/realtime_sipregs test to fail. (The fallback kill would run the atexit code again and that would wreak havoc.) This fixes that the atexit kill condition is picked up properly. (closes issue ASTERISK-18883) Reviewed by: Terry Wilson Review: https://reviewboard.asterisk.org/r/1659 ........ Merged revisions 350180 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Make Asterisk -x command line parameter imply -r parameter presence.Richard Mudgett
The Asterisk -x command line parameter is documented inconsistently. * Made the -x documentation and behavior consistent. * Since this is also a new year, updated the copyright notices while here. (closes issue ASTERISK-19094) Reported by: Eugene Patches: issueA19094_correct_asterisk_option_x.patch (license #5674) patch uploaded by Walter Doekes (modified) Tested by: Eugene ........ Merged revisions 350075 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350076 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-05Allow playback of formats that don't support seekingKinsey Moore
ast_streamfile previously did unconditional seeking on files that broke playback of formats that don't support that functionality. This patch avoids the seek that was causing the problem. This regression was introduced in r158062. (closes issue ASTERISK-18994) Patch-by: Timo Teras ........ Merged revisions 349731 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349732 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-05Fix an issue where dsp.c would interpret multiple dtmf events from a single ↵Jonathan Rose
key press. When receiving calls from a mobile phone into a DISA system on a connection with significant interference, the reporter's Asterisk system would interpret DTMF incorrectly and replicate digits received. This patch resolves that by increasing the number of frames a mismatch has to be detected before assuming the DTMF is over by 1 frame and adjusts dtmf_detect function to reset hits and misses only when an edge is detected. (closes issue ASTERISK-17493) Reported by: Alec Davis Patches: bug18904-refactor.diff.txt uploaded by Alec Davis (license 5546) Review: https://reviewboard.asterisk.org/r/1130/ ........ Merged revisions 349728 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349729 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-05Ensures Asterisk closes when receiving terminal signals in 'no fork' mode.Jonathan Rose
When catching a signal, in no fork mode the console thread is identical to the thread responsible for catching the signal and closing Asterisk, which requires it to first dispense with the console thread. Prior to this patch, if these threads were identical, upon receiving a killing signal, the thread will send an URG signal to itself, which we also catch and then promptly do nothing with. Obviously this isn't useful behavior. (closes issue ASTERISK-19127) Reported By: Bryon Clark Patches: quit_on_signals.patch uploaded by Bryon Clark (license 6157) ........ Merged revisions 349672 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349673 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-04Fix documentation for SayNumber to reflect the fact that language is changed ↵Jonathan Rose
in CHANNEL() (closes issue ASTERISK-18962) reported by: Nir Simionovich ........ Merged revisions 349450 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349451 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-31Constify tag argument in REF_DEBUG related code.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-29Handle AST_CONTROL_UPDATE_RTP_PEER frames in local bridge loopMatthew Jordan
Failing to handle AST_CONTROL_UPDATE_RTP_PEER frames in the local bridge loop causes the loop to exit prematurely. This causes a variety of negative side effects, depending on when the loop exits. This patch handles the frame by essentially swallowing the frame in the local loop, as the current channel drivers expect the RTP bridge to handle the frame, and, in the case of the local bridge loop, no additional action is necessary. (issue ASTERISK-19040) (issue ASTERISK-19128) (issue ASTERISK-17725) (issue ASTERISK-18340) (closes issue ASTERISK-19095) Reported by: Stefan Schmidt Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1640/ ........ Merged revisions 349339 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349340 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-28Use ast_audiohook_write_list_empty to determine if our lists are empty insteadSean Bright
of duplicating that logic. ........ Merged revisions 349289 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349290 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-28Improve T.38 gateway V.21 preamble detection.Kevin P. Fleming
This commit removes the V.21 preamble detection code previously added to the generic DSP implementation in Asterisk, and instead enhances the res_fax module to be able to utilize V.21 preamble detection functionality made available by FAX technology modules. This commit also adds such support to res_fax_spandsp, which uses the Spandsp modem tone detection code to do the V.21 preamble detection. There should be no functional change here, other than much more reliable V.21 preamble detection (and thus T.38 gateway initiation). ........ Merged revisions 349248 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-27Once an audiohook is attached to a channel, we continue to transcode all of theSean Bright
frames, even after all of the hooks are detached. This patch short-cicuits us out before we transcode unnecessarily. ........ Merged revisions 349144 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349145 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23INFO/Record request configurable to use dynamic featuresJonathan Rose
Adds two new options to SIP peers allowing them to specify features (dynamic or builtin) to use when sending INFO/record requests. Recordonfeature activates whatever feature is specified when recieving a record: on request while recordofffeature activates whatever feature is specified when receiving a record: off request. Both of these features can be disabled by setting the feature to an empty string. (closes issue ASTERISK-16507) Reported by: Jon Bright Review: https://reviewboard.asterisk.org/r/1634/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23Fix extension state callback references in chan_sip.Richard Mudgett
Chan_sip gives a dialog reference to the extension state callback and assumes that when ast_extension_state_del() returns, the callback cannot happen anymore. Chan_sip then reduces the dialog reference count associated with the callback. Recent changes (ASTERISK-17760) have resulted in the potential for the callback to happen after ast_extension_state_del() has returned. For chan_sip, this could be very bad because the dialog pointer could have already been destroyed. * Added ast_extension_state_add_destroy() so chan_sip can account for the sip_pvt reference given to the extension state callback when the extension state callback is deleted. * Fix pbx.c awkward statecbs handling in ast_extension_state_add_destroy() and handle_statechange() now that the struct ast_state_cb has a destructor to call. * Ensure that ast_extension_state_add_destroy() will never return -1 or 0 for a successful registration. * Fixed pbx.c statecbs_cmp() to compare the correct information. The passed in value to compare is a change_cb function pointer not an object pointer. * Make pbx.c ast_merge_contexts_and_delete() not perform callbacks with AST_EXTENSION_REMOVED with locks held. Chan_sip is notorious for deadlocking when those locks are held during the callback. * Removed unused lock declaration for the pbx.c store_hints list. (closes issue ASTERISK-18844) Reported by: rmudgett Review: https://reviewboard.asterisk.org/r/1635/ ........ Merged revisions 348940 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348952 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-22Add Asterisk TestSuite event hooks to support ConfBridge testingMatthew Jordan
This patch adds initial testsuite event hooks so that ConfBridge tests can be executed in the Asterisk TestSuite. (issue ASTERISK-19059) ........ Merged revisions 348846 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-19Update documentation for MESSAGE_SEND_STATUS variable.Leif Madsen
(Closes issue ASTERISK-19056) Reported by: Yuri Patches: 348360.diff uploaded by Yuri (license #5242) ........ Merged revisions 348605 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16Clean-up on isle five for __ast_request_and_dial() and ast_call_forward().Richard Mudgett
* Add locking when a channel inherits variables and datastores in __ast_request_and_dial() and ast_call_forward(). Note: The involved channels are not active so there was minimal potential for problems. * Remove calls to ast_set_callerid() in __ast_request_and_dial() and ast_call_forward() because the set information is for the wrong direction. * Don't use C++ keywords for variable names in ast_call_forward(). * Run the redirecting interception macro if defined when forwarding a call in ast_call_forward(). Note: Currently will never execute because the only callers that supply a calling channel supply a hungup or zombie channel. * Make feature_request_and_dial() put the transferee into autoservice when it calls ast_call_forward() in case a redirection interception macro is run. Note: Currently will never happen because the caller channel (Party B) is always hungup at this time. * Make feature_request_and_dial() ignore the AST_CONTROL_PROCEEDING frame to silence a log message. ........ Merged revisions 348464 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348465 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16Fix cut and past error in ast_call_forward().Richard Mudgett
(issue ASTERISK-18836) ........ Merged revisions 348401 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348405 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16Fix crash during CDR update.Richard Mudgett
The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to be called by different threads for the same channel. The channel driver thread and the PBX thread running dialplan. * Add lock protection around CDR API calls that access an ast_channel pointer. (closes issue ASTERISK-18836) Reported by: gpluser Review: https://reviewboard.asterisk.org/r/1628/ ........ Merged revisions 348362 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348363 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14Add and document PARKEDCALL variable set during timeoutJonathan Rose
PARKEDCALL variable tracks which parking lot the call was last parked in. This can be used afterwards for flow control when returntoorigin is set to off. I went ahead and documented both this and the existing variable set during timeout (PARKINGSLOT) in the sample features.conf since there was no prior mention of variables being set during timeout. (closes issue ASTERISK-16239) Reported By: Clod Patry Patches: M17503.diff uploaded by Clod Patry (license 5138) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-12Backed out core changes from r346391Matthew Jordan
During testing, it was discovered that there were a number of side effects introduced by r346391 and subsequent check-ins related to it (r346429, r346617, and r346655). This included the /main/stdtime/ test 'hanging', as well as the remote console option failing to receive the appropriate output after a period of time. I only backed out the changes to main/ and utils/, as this was adequate to reverse the behavior experienced. (issue ASTERISK-18974) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-09Fix some parsing issues in add_exten_to_pattern_tree().Richard Mudgett
* Simplify compare_char() and avoid potential sign extension issue. * Fix infinite loop in add_exten_to_pattern_tree() handling of character set escape handling. * Added buffer overflow checks in add_exten_to_pattern_tree() character set collection. * Made ignore empty character sets. * Added escape character handling to end-of-range character in character sets. This has a slight change in behavior if the end-of-range character is an escape character. You must now escape it. * Fix potential sign extension issue when expanding character set ranges. * Made remove duplicated characters from character sets. The duplicate characters lower extension matching priority and prevent duplicate extension detection. * Fix escape character handling when the escape character is trying to escape the end-of-string. We could have continued processing characters after the end of the exten string. We could have added the previous character to the pattern matching tree incorrectly. (closes issue ASTERISK-18909) Reported by: Luke-Jr ........ Merged revisions 347811 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347812 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-08Mark channel running the h exten with the soft-hangup flag.Richard Mudgett
When a bridge is broken, ast_bridge_call() might execute the h exten on the calling channel. However, that channel may not have been the channel that broke the bridge by hanging up. The channel executing the h exten must be in a hung up state so things like AGI run in the correct mode. * Make sure ast_bridge_call() marks the channel it is executing the h exten on as hung up. (The AST_SOFTHANGUP_APPUNLOAD flag is used so as to match the pbx.c main dialplan execution loop when it executes the h exten.) (closes issue ASTERISK-18811) Reported by: David Hajek Patches: jira_asterisk_18811_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: David Hajek, rmudgett ........ Merged revisions 347595 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347600 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07Update AMI Getvar and Setvar documentation about supplying a channel name.Richard Mudgett
(closes issue ASTERISK-18958) Reported by: Red Patches: jira_asterisk_18958_v1.8.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 347438 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347439 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07Add ASTSBINDIR to the list of configurable pathsTerry Wilson
This patch also makes astdb2sqlite3 and astcanary use the configured directory instead of relying on $PATH. (closes issue ASTERISK-18959) Review: https://reviewboard.asterisk.org/r/1613/ ........ Merged revisions 347344 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06Documents CHANNEL(musicclass) taking priority over m([x]) in waitExtenJonathan Rose
If waitExten specifies a music class to use with its music on hold option, it will use CHANNEL(musicclass) instead if that channel variable has been set on the initiating channel. This documents that behavior in the waitExten app so that this can be known without checking the documentation of the code in function local_ast_moh_start. (closes issue ASTERISK-18804) ........ Merged revisions 347239 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347240 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-05Resolve duplicate label used in multiple priorities for the same extension.Jonathan Rose
Prior to this patch, if labels with the same name were used for different priorities in the same extension, the new label would be accepted, but it would be unusable since attempts to reach that label would just go to the first one. Now pbx.c detects this, generates a warning in logs, and culls the label before adding it to the dialplan. (closes issue ASTERISK-18807) Reported by: Kenneth Shumard Patches: pbx.c.patch uploaded by Kenneth Shumard (License 5077) ........ Merged revisions 346954 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346955 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-01Re-resolve the STUN address if a STUN poll fails for res_stun_monitor.Richard Mudgett
The STUN socket must remain open between polls or the external address seen by the STUN server is likely to change. However, if the STUN request poll fails then the STUN server address needs to be re-resolved and the STUN socket needs to be closed and reopened. * Re-resolve the STUN server address and create a new socket if the STUN request poll fails. * Fix ast_stun_request() return value consistency. * Fix ast_stun_request() to check the received packet for expected message type and transaction ID. * Fix ast_stun_request() to read packets until timeout or an associated response packet is found. The stun_purge_socket() hack is no longer required. * Reduce ast_stun_request() error messages to debug output. * No longer pass in the destination address to ast_stun_request() if the socket is already bound or connected to the destination. (closes issue ASTERISK-18327) Reported by: Wolfram Joost Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1595/ ........ Merged revisions 346700 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346701 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30Remove the few places where we try to ast_verbose() without a newline.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346655 65c4cc65-6c06-0410-ace0-fbb531ad65f3