summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2012-02-28Astobj2 locking enhancement.Richard Mudgett
Add the ability to specify what kind of locking an ao2 object has when it is allocated. The locking could be one of: MUTEX, RWLOCK, or none. New API: ao2_t_alloc_options() ao2_alloc_options() ao2_t_container_alloc_options() ao2_container_alloc_options() ao2_rdlock() ao2_wrlock() ao2_tryrdlock() ao2_trywrlock() The OBJ_NOLOCK and AO2_ITERATOR_DONTLOCK flags have a slight meaning change. They no longer mean that the object is protected by an external mechanism. They mean the lock associated with the object has already been manually obtained by one of the ao2_lock calls. This change is necessary for RWLOCK support since they are not reentrant. Also an operation on an ao2 container may require promoting a read lock to a write lock by releasing the already held read lock to re-acquire as a write lock. Replaced API calls: ao2_t_link_nolock() ao2_link_nolock() ao2_t_unlink_nolock() ao2_unlink_nolock() with the respective ao2_t_link_flags() ao2_link_flags() ao2_t_unlink_flags() ao2_unlink_flags() API calls to be more flexible and to allow an anticipated enhancement to control linking duplicate objects into a container. The changes to format.c and format_cap.c are taking advantange of the new ao2 locking options to simplify the use of the format capabilities containers. Review: https://reviewboard.asterisk.org/r/1554/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Trailing whitespace cleanup.Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Add ability to clone ao2 containers.Richard Mudgett
Occasionally there is a need to put all objects in one container also into another container. Some reasons you might need to do this: 1) You need to reconfigure a container. You would do this by creating a new container with the new configuration and ao2_container_dup the old container into it. Then replace the old container with the new. Then destroy the old container. 2) You need the contents of a container to remain stable while operating on all of the objects. You would do this by creating a cloned container of the original with ao2_container_clone. The cloned container is a snapshot of the objects at the time of the cloning. When done, just destroy the cloned container. Review: https://reviewboard.asterisk.org/r/1746/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Fix ast_channel allocation init setting priority to -1 instead of 1.Richard Mudgett
* Fix opaquification conversion error. (closes issue ASTERISK-19424) Reported by: Jeremy Pepper Patches: asterisk-19424-initialize_priority_regression.diff (license #5026) patch uploaded by Michael L. Young git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Fix callerid of Originated calls.Richard Mudgett
Thanks to Matt Riddell for tracking this down. (closes issue ASTERISK-19385) Reported by: ornix ........ Merged revisions 357093 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357095 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Address comments from Mark MichelsonSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Deprecated macro usage for connected line, redirecting, and CCSSKinsey Moore
This commit adds GoSub alternatives to connected line, redirecting, and CCSS macro hooks so that macro can finally be deprecated. This also adds deprecation warnings for those features when used and in documentation. Review: https://reviewboard.asterisk.org/r/1760/ (closes issue SWP-4256) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Convert netsock.h over to use ast_sockaddrs rather than sockaddr_in and updateSean Bright
chan_iax2 to pass in the correct types. chan_iax2 is the only consumer for the various ast_netsock_* functions in trunk at this point, so this feels like a safe change to make. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Copy CDR variables when set during a bridgeTerry Wilson
This patch makes sure amaflags, accountcode, and userfield get copied to the bridge CDR when set during a bridge (like via a custom feature). (closes issue ASTERISK-16990) Review: https://reviewboard.asterisk.org/r/1721/ ........ Merged revisions 356963 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356964 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Make ast_netsock_set_qos() delegate to ast_set_qos().Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Prefer ast_set_qos() over ast_netsock_set_qos()Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Remove trailing whitespaceSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24astobj2.h documentation updates.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Allow SRTP policies to be reloadedMatthew Jordan
Currently, when using res_srtp, once the SRTP policy has been added to the current session the policy is locked into place. Any attempt to replace an existing policy, which would be needed if the remote endpoint negotiated a new cryptographic key, is instead rejected in res_srtp. This happens in particular in transfer scenarios, where the endpoint that Asterisk is communicating with changes but uses the same RTP session. This patch modifies res_srtp to allow remote and local policies to be reloaded in the underlying SRTP library. From the perspective of users of the SRTP API, the only change is that the adding of remote and local policies are now added in a single method call, whereas they previously were added separately. This was changed to account for the differences in handling remote and local policies in libsrtp. Review: https://reviewboard.asterisk.org/r/1741/ (closes issue ASTERISK-19253) Reported by: Thomas Arimont Tested by: Thomas Arimont Patches: srtp_renew_keys_2012_02_22.diff uploaded by Matt Jordan (license 6283) (with some small modifications for this check-in) ........ Merged revisions 356604 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356605 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Opaquification for ast_format structs in struct ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1770/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23Fix blind transfer parking issues if the dialed extension is not recognized ↵Richard Mudgett
as a parking extension. Custom parking extensions may not be coded such that the first and only extension priority is the Park application. These custom parking extensions will not be recognized as parking extensions. When a call is blind transferred to an extension that is not recognized as a parking extension, the normal blind transfer code causes the transferred channel to start executing dialplan. Calls that get parked in this manner do not know the original channel name that parked the call so the original parker could never be called back if the parked call is not retrieved before the timeout time. The parking space is also announced to the call being parked as a side effect of not knowing the original parking channel. * Fix handling of BLINDTRANSFER channel variable for call parking. * Fixed SIP blind transfer using the wrong dialplan context variable to check for the parking extension. (closes issue ASTERISK-19322) Reported by: aragon Tested by: rmudgett, jparker Review: https://reviewboard.asterisk.org/r/1730/ JIRA AST-766 ........ Merged revisions 356521 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356522 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23Revert some apparently accidental spacing changes.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22Track module use count for res_calendarTerry Wilson
If the res_calendar module was followed immediately by one of the calendar tech modules and "core stop gracefully" was run, Asterisk would crash. This patch adds use count tracking for res_calendar so that it is unloaded after the tech modules when shutting down gracefully. It is now not possible to unload all the of the calendar modules via "module unload res_calednar.so", but it is still possible to unload them all via "module unload -h res_calendar.so". Review: https://reviewboard.asterisk.org/r/1752/ ........ Merged revisions 356291 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356297 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22Rename ast_channel_emulate_dtmf_digit* funcsTerry Wilson
The accessors names for the "emulate_dtmf_digit" field on the ast_channel are misleading. Change them to ast_channel_dtmf_digit_to_emulate*. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-21Fix some opaquification-related compiler warningsTerry Wilson
(closes issue ASTERISK-19419) PseudoReview - seanbright on IRC git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-21Add missing newline to ccss state change notificationKinsey Moore
Move along, nothing to see here... ........ Merged revisions 356074 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-17Non-verbose output should always go to the remote console, regardless of the ↵Tilghman Lesher
previous level. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16Revert a change to audio_audiohook_write_list that had no affect.Sean Bright
When I made this change initially, I was under the false impression that the audiohooks structure remained on the channel after all of the hooks had been detached. This is not the case, ast ast_read takes care of removing the audiohooks structure if the lists are empty. ........ Merged revisions 355622 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355623 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14Re-commit the verbose branch.Tilghman Lesher
This change permits each verbose destination (consoles, logger) to have its own concept of what the verbosity level is. The big feature here is that the logger will now be able to capture a particular verbosity level without condemning each console to need to suffer that level of verbosity. Additionally, a stray 'core set verbose' will no longer change what will go to the log. Review: https://reviewboard.asterisk.org/r/1599/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13Opaquify char * and char[] in ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-10Fix AMI Redirect ExtraChannel not redirecting to the same exten and context.Richard Mudgett
The astman_get_header() never returns NULL so the check by the code for NULL would never fail. (closes issue ASTERISK-16974) Reported by: Nuno Borges Patches: 0018325.patch (license #6116) patch uploaded by Nuno Borges (modified) ........ Merged revisions 354835 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354836 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Make the config parser remove escaping backslashesKinsey Moore
The config parser in Asterisk does not currently remove a backslash that is used to escape a semicolon which would otherwise be interpreted as the start of a comment. The change here causes that backslash to be removed, but does not create a real escape system in the config parser. The biggest complication with a real escape system would be breaking existing configs everywhere (parsing \\ as \ and breaking on escaped non-semicolon characters) even though it would be the "right" way to do things. (closes issue ASTERISK-17121) Review: https://reviewboard.asterisk.org/r/1724/ ........ Merged revisions 354655 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354656 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Remove some unnecessary locking from ast_hangup().Russell Bryant
This patch removes some unnecessary locking of the channels container in ast_hangup(). The reason this came up is that this lock can very quickly block the entire system. If any of the channel cleanup code decides to block, it causes a problem for the whole system. For example, when audiohooks get destroyed, if that blocks for a while waiting on the mixmonitor thread to exit because it's busy blocking on some I/O, it causes a problem for many other threads in the meantime. Review: https://reviewboard.asterisk.org/r/1712/ ........ Merged revisions 354492 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354493 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: Clod Patry Review: https://reviewboard.asterisk.org/r/1651 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-06Add missing headers to AMI UnParkedCall event to uniquely identify the call.Richard Mudgett
The AMI UnParkedCall event was missing the Parkinglot and Uniqueid headers that the AMI ParkedCall event contains. (closes issue ASTERISK-19240) Reported by: Michael Yara ........ Merged revisions 354116 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354119 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02Fix TLS port binding behavior as well as reload behavior:Mark Michelson
* Removes references to tlsbindport from http.conf.sample and manager.conf.sample * Properly bind to port specified in tlsbindaddr, using the default port if specified. * On a reload, properly close socket if the service has been disabled. A note has been added to UPGRADE.txt to indicate how ports must be set for TLS. (closes issue ASTERISK-16959) reported by Olaf Holthausen (closes issue ASTERISK-19201) reported by Chris Mylonas (closes issue ASTERISK-19204) reported by Chris Mylonas Review: https://reviewboard.asterisk.org/r/1709 ........ Merged revisions 353770 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353820 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Remove inconsistency in CEL eventtype for user defined events.Richard Mudgett
The CEL eventtype field for ODBC and PGSQL backends should be USER_DEFINED instead of the user defined event name supplied by the CELGenUserEvent application. If the field is output as a number, the user defined name does not have a value and is always output as 21 for USER_DEFINED and the userdeftype field would be required to supply the user defined name. The following CEL backends (cel_odbc, cel_pgsql, cel_custom, cel_manager, and cel_sqlite3_custom) can be independently configured to remove this inconsistency. * Allows cel_manager, cel_custom, and cel_sqlite3_custom to behave the same way. (closes issue ASTERISK-17189) Reported by: Bryant Zimmerman Review: https://reviewboard.asterisk.org/r/1669/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Fix ExtenSpy and simplify the channel search functions.Richard Mudgett
When ast_channel name was opaquified, the channel search functions did not get converted correctly. As a result ExtenSpy which uses a channel iterator search by exten@context could never find anything. * Updated the doxygen documentation for the search functions in channel.h. Review: https://reviewboard.asterisk.org/r/1702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-31Fix memory leak in error paths for action_originate().Richard Mudgett
* Fix memory leak of vars in error paths for action_originate(). * Moved struct fast_originate_helper tech and data members to stringfields. * Simplified ActionID header handling for fast_originate(). * Added doxygen note to ast_request() and ast_call() and the associated channel callbacks that the data/addr parameters should be treated as const char *. Review: https://reviewboard.asterisk.org/r/1690/ ........ Merged revisions 353454 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353463 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30Re-link peers by IP when dnsmgr changes the IPTerry Wilson
Asterisk's dnsmgr currently takes a pointer to an ast_sockaddr and updates it anytime an address resolves to something different. There are a couple of issues with this. First, the ast_sockaddr is usually the address of an ast_sockaddr inside a refcounted struct and we never bump the refcount of those structs when using dnsmgr. This makes it possible that a refresh could happen after the destructor for that object is called (despite ast_dnsmgr_release being called in that destructor). Second, the module using dnsmgr cannot be aware of an address changing without polling for it in the code. If an action needs to be taken on address update (like re-linking a SIP peer in the peers_by_ip table), then polling for this change negates many of the benefits of having dnsmgr in the first place. This patch adds a function to the dnsmgr API that calls an update callback instead of blindly updating the address itself. It also moves calls to ast_dnsmgr_release outside of the destructor functions and into cleanup functions that are called when we no longer need the objects and increments the refcount of the objects using dnsmgr since those objects are stored on the ast_dnsmgr_entry struct. A helper function for returning the proper default SIP port (non-tls vs tls) is also added and used. This patch also incorporates changes from a patch posted by Timo Teräs to ASTERISK-19106 for related dnsmgr issues. (closes issue ASTERISK-19106) Review: https://reviewboard.asterisk.org/r/1691/ ........ Merged revisions 353371 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353397 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30Address OpenSSL initialization issues when using third-party libraries.Kevin P. Fleming
When Asterisk is used with various third-party libraries (CURL, PostgresSQL, many others) that have the ability themselves to use OpenSSL, it is possible for conflicts to arise in how the OpenSSL libraries are initialized and shutdown. This patch addresses these conflicts by 'wrapping' the important functions from the OpenSSL libraries in a new shared library that is part of Asterisk itself, and is loaded in such a way as to ensure that *all* calls to these functions will be dispatched through the Asterisk wrapper functions, not the native functions. This new library is optional, but enabled by default. See the CHANGES file for documentation on how to disable it. Along the way, this patch also makes a few other minor changes: * Changes MODULES_DIR to ASTMODDIR throughout the build system, in order to more closely match what is used during run-time configuration. * Corrects some errors in the configure script where AC_CHECK_TOOLS was used instead of AC_PATH_PROG. * Adds a new variable for linker flags in the build system (DYLINK), used for producing true shared libraries (as opposed to the dynamically loadable modules that the build system produces for 'regular' Asterisk modules). * Moves the Makefile bits that handle installation and uninstallation of the main Asterisk binary into main/Makefile from the top-level Makefile. * Moves a couple of useful preprocessor macros from optional_api.h to asterisk.h. Review: https://reviewboard.asterisk.org/r/1006/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-29Find even more network interfaces.Russell Bryant
The previous change made the code look for emN and pciN in addition to what it did originally, which was search for ethN. However, it needed to be looking for pciN#N, so that's what it does now. This also moves the memset() to be before every ioctl(). ........ Merged revisions 353175 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353176 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-28Add 'L16-256' MIME subtype alias for slin16.Kevin P. Fleming
Asterisk has supported the 'L16' MIME subtype for 16kHz signed linear (PCM) audio for quite some time, but some endpoints refer to it as 'L16-256'. This commit adds this as an alias for the existing format. ........ Merged revisions 353126 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353127 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-28Update ast_set_default_eid() to find more network interfaces.Russell Bryant
As of Fedora 15, ethN is not the name of ethernet interfaces. The names are emN or pciN. Update some code that searched for interfaces named ethN to look for the new names, as well. For more information about why this change was made, see this page: http://domsch.com/blog/?p=455 ........ Merged revisions 353077 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353078 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27Audit of ao2_iterator_init() usage for v1.8.Richard Mudgett
Fixes numerous reference leaks and missing ao2_iterator_destroy() calls as a result. Review: https://reviewboard.asterisk.org/r/1697/ ........ Merged revisions 352955 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352956 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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