summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2012-03-05Eliminate double close of file descriptor in manager.cJonathan Rose
The process_output function in manager.c attempted to call fclose and close immediately afterwards. Since fclose implies close, this resulted in a potential double free on file descriptors. This patch changes that behavior and also adds error checking to fclose and close depending on which was deemed necessary. Also error messages. Thanks to Rosen Iliev for pointing out the location of the problem. (closes issue ASTERISK-18453) Reported By: Jaco Kroon Review: https://reviewboard.asterisk.org/r/1793/ ........ Merged revisions 358214 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358215 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Fix case-sensitivity for device-specific event subscriptions and CCSSKinsey Moore
This change fixes case-sensitivity for device-specific subscriptions such that the technology identifier is case-insensitive while the remainder of the device string is still case-sensitive. This should also preserve the original case of the device string as passed in to the event system. CCSS is the only feature affected as it is the only consumer of device-specific event subscriptions. The second part of this patch addresses similar case-sensitivity issues within CCSS itself that prevented it from functioning correctly after the fix to the events system. This adds a unit test to verify that the event system works as expected. (closes issue ASTERISK-19422) Review: https://reviewboard.asterisk.org/r/1780/ ........ Merged revisions 357940 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357941 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Remove ISDN hold restriction for non-bridged calls.Richard Mudgett
The check if an ISDN call is bridged before it could be placed on hold is not necessary and is overly restrictive. The check was originally done to prevent problems with call transfers in case a user tried to transfer a call connected to an application to another call connected to an application. The ISDN transfer code has not required this restriction for quite some time because ECT could transfer any two active calls to each other. * Remove ISDN hold restriction for calls connected to applications. * Made ast_waitfordigit_full() ignore AST_CONTROL_HOLD and AST_CONTROL_UNHOLD instead of generating a warning message. (closes issue ASTERISK-19388) Reported by: Birger Harzenetter Tested by: rmudgett ........ Merged revisions 357894 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357895 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Fix race condition that can cause important control frames (such as a ↵Mark Michelson
hangup) to be missed. This takes two actions. 1. Move the reading of the alertpipe in __ast_read() to immediately before the removal of frames from the readq. This means we won't do something silly like read from the alertpipe, then ignore the fact that there's a frame to get from the readq since channel's fdno is the AST_TIMING_FD. 2. When ast_settimeout() sets the rate to 0 and the timingfunc to NULL, if the channel's fdno is the AST_TIMING_FD, then set the fdno to -1. This is because if the rate is 0 and the timingfunc is NULL, it means that the channel's timing fd is being invalidated, so any pending reads should not occur. This may actually solve more issues than the referenced one below, but it's not known at this time for sure. (closes issue ASTERISK-19223) reported by Frank-Michael Wittig Review: https://reviewboard.asterisk.org/r/1779 ........ Merged revisions 357761 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357762 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01Opaquify ast_channel typedefs, fd arrays, and softhangup flagTerry Wilson
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01Prevent outbound SIP NOTIFY packets from displaying a port of 0Kinsey Moore
In the change from 1.6.2 to 1.8, ast_sockaddr was introduced which changed the behavior of ast_find_ourip such that port number was wiped out. This caused the port in internip (which is used for Contact and Call-ID on NOTIFYs) to be 0. This change causes ast_find_ourip to be port-preserving again. (closes issue ASTERISK-19430) ........ Merged revisions 357665 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357667 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Update stringfield documentation for removed second va_list in favor of va_copy.Walter Doekes
In r320946, the second va_list that was passed to ast_string_field_build_va and friends, was removed. This patch updates the documentation to reflect that. ........ Merged revisions 357620 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Fix REF_DEBUG compile errors.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Convert struct ast_tcptls_session_instance to finally use the ao2 object lock.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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