summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2012-10-11Continue to group config filesAndrew Latham
(issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11Don't make chan_sip export global symbols.Mark Michelson
During testing, it was discovered that having chan_sip export global symbols was problematic. The biggest problem was that load order was affected. Trying to use realtime could be problematic since in all likelihood the necessary realtime driver(s) would not be loaded before chan_sip. In addition, it was found that it was impossible to use the Digium Phone Module for Asterisk since it must be loaded before chan_sip since it must hook into chan_sip's configuration parsing. The solution is to use a virtual table in the same manner that other modules in Asterisk do, like app_voicemail. (closes issue ASTERISK-20545) Reported by: kmoore ........ Merged revisions 374842 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11Fix incorrect billing duration reported when batch mode is enabledMatthew Jordan
Similar to r369351, the billing duration can be skewed when batch mode is enabled. This happened much more rarely than the duration, as it only occured when the call was answered (thereby indicating an actual answer time) and immediately hung up on (indicating a billsec of 0). Since a billing time of '0' can either mean that the call immediately ended or that the CDR was improperly answered, we have to use additional information to know whether or not we can trust the CDR billsec value. Prior to this patch, we looked to see if we had a valid answer time. If we did, and billsec was zero, we used the current time to calculate what billsec value we could from the CDR being written. If batch mode is enabled, this will incorrectly report a billsec value being much greater than the actual duration of the call. Instead of relying on the presence of an answer time to know whether or not we can re-calculate the billsec for the CDR, we now also use the presence of the CDR's end time to know if we need to re-calculate or whether we can trust the billsec value that we have. This prevents erroneous jumps in the billsec value, while still making sure that in the worst case, some billing time will be calculated. (closes issue AST-1016) Reported by: Thomas Arimont Tested by: Thomas Arimont ........ Merged revisions 374843 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374844 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374845 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-10Fix segfault regression from r370681Kinsey Moore
Due to usage of ast_hook_send_action, AMI action handling code should be able to handle a NULL mansession->session. This would cause a crash on NULL dereference if action_originate was called from ast_hook_send_action. (closes issue ASTERISK-20544) ........ Merged revisions 374792 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-09Fix execution of 'i' extension due to uninitialized variable.Richard Mudgett
The fix for ASTERISK-18243 added code that could potentially use dst_exten[] uninitialized. As a result the 'i' exten may not be executed when it should. (closes issue ASTERISK-20455) Reported by: Richard Miller Patches: pbx-1.8.16.0.diff (license #5685) patch uploaded by Richard Miller Made some cosmetic modifications. ........ Merged revisions 374758 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374763 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374771 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-07Trivial patch to make 'best_score' defined for all architectures.Matthew Jordan
Fixes trivial build error on Solaris: acl.c: In function `get_local_address': acl.c:196: error: `best_score' undeclared (first use in this function) acl.c:196: error: (Each undeclared identifier is reported only once acl.c:196: error: for each function it appears in.) make[2]: *** [acl.o] Error 1 (issue ASTERISK-20366) Reported by: Ben Klang Tested by: Ben Klang patches: 0002-main-acl.c-Trivial.-best_score-should-be-defined-for.patch by Shaun Ruffell (license 5417) ........ Merged revisions 374632 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-06Update documentation for MessageSend application/command's From field for XMPPMatthew Jordan
When using the channel technology agnostic application/AMI command MessageSend, the "From" field is technically optional for the SIP channel driver. However, if being sent by the XMPP resource module (either res_xmpp or res_jabber), the "From" field is necessary, and must correspond to a defined account. This patch updates the documentation for this application/AMI command to reflect this. (closes issue ASTERISK-20405) Reported by: Leif Madsen ........ Merged revisions 374611 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-05Multiple revisions 374570,374581David M. Lee
........ r374570 | dlee | 2012-10-05 15:14:41 -0500 (Fri, 05 Oct 2012) | 22 lines Improve AMI long line error handling In AMI's parser, when it receives a long line (> 1024 characters), it discards that line, but continues to process the message normally. Typically, this is not a problem because a) who has lines that long and b) usually a discarded line results in an invalid message. But if that line is specifying an optional field, then the message will be processed, you get a 'Response: Success', but things don't work the way you expected them to. This patch changes the behavior when a line-too-long parse error occurs. * Changes the log message to avoid way-too-long (and truncated anyways) log messages * Adds a 'parsing' status flag to Response: Success * Sets parsing = MESSAGE_LINE_TOO_LONG if, well, a line is too long * Responds with an appropriate error if parsing != MESSAGE_OKAY (closes issue AST-961) Reported by: John Bigelow Review: https://reviewboard.asterisk.org/r/2142/ ........ r374581 | dlee | 2012-10-05 15:20:28 -0500 (Fri, 05 Oct 2012) | 1 line I've committed too much. Reverting part of r374570. ........ Merged revisions 374570,374581 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374586 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374587 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04dsp.c User Configurable DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_ENDAlec L Davis
Instead of a recompile, allow values to be adjusted in dsp.conf For binary distributions allows easy adjustment for wobbly GSM calls, and other reasons. Defaults to DTMF_HITS_TO_BEGIN=2 and DTMF_MISSES_TO_END=3 (closes issue ASTERISK-17493) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2144/ ........ Merged revisions 374479 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374481 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374485 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04dsp.c fix incorrect DTMF Digit_Duration.Alec L Davis
it's always short by 'hits_to_begin*DTMF_GSIZE', or 25.5ms if hitstobegin=2 (issue ASTERISK-16003) Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2145/ ........ Merged revisions 374475 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374476 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374477 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04Fix DBDelTree error codes for AMI, CLI and AGIDavid M. Lee
The AMI DBDelTree command will return Success/Key tree deleted successfully even if the given key does not exist. The CLI command 'database deltree' had a similar problem, but was saved because it actually responded with '0 database entries removed'. AGI had a slightly different error, where it would return success if the database was unavailable. This came from confusion about the ast_db_deltree retval, which is -1 in the event of a database error, or number of entries deleted (including 0 for deleting nothing). * Changed some poorly named res variables to num_deleted * Specified specific errors when calling ast_db_deltree (database unavailable vs. entry not found vs. success) * Fixed similar bug in AGI database deltree, where 'Database unavailable' results in successful result (closes issue AST-967) Reported by: John Bigelow Review: https://reviewboard.asterisk.org/r/2138/ ........ Merged revisions 374426 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374427 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374428 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04Add support for applying direct media ACLs between differing channel ↵Joshua Colp
technologies. Review: https://reviewboard.asterisk.org/r/2122/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04dsp.c User configuration of DTMF_NORMAL_TWIST and DTMF_REVERSE_TWIST valuesAlec L Davis
Asterisk's DTMF Specifications are based on AT&T specs, which may not be compatible in other countries. Various countries have different specifications for the maximum power level differences between the DTMF low group and high group of frequencies. Power level difference between frequencies for different Administrations/RPOAs NTT = Max. 5 dB AT&T = 4dB(reverse) to 8dB(normal) Danish = Max. 6 dB Australian = Max. 10 dB Brazilian = Max. 9 dB ETSI = Max. 6 dB from ETSI ES 201 235-3 V1.3.1 (2006-03) Now allow 4 variables to be individually configured in dsp.conf, with reasonable min/max of 2dB to 20dB. Default is AT&T specifications Add's the following variables to dsp.conf ;dtmf_normal_twist=6.31 ;dtmf_reverse_twist=2.51 ;relax_dtmf_normal_twist=6.31 ;relax_dtmf_reverse_twist=3.98 (closes issue ASTERISK-20442) Reported by: tbsky Tested by: tbsky,alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2141/ ........ Merged revisions 374384 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374385 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374386 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-03Destroy the generic_monitors container after the core_instances in ccssMatthew Jordan
For each item in core_instances disposed of in the shutdown of ccss, any generic monitor instances referenced by the objects will be removed from generic_monitors during their destruction. Hilarity ensues if generic_monitors no longer exists. Thanks to the Asterisk Test Suite's generic_ccss test for complaining loudly when it ran into this. ........ Merged revisions 374300 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374301 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02Missed an astobj2.c debug tag.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02* Add ref debug tags to astobj2.c ref usage.Richard Mudgett
* Make container nodes not show up in the ref debug log. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02Ensure Shutdown AMI event is still fired during Asterisk shutdownMatthew Jordan
Richard pointed out that having the manager dispose of itself gracefully during shutdown meant that the Shutdown event will no longer get fired. This patch moves the AMI event just prior to running the atexit callbacks. ........ Merged revisions 374230 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374231 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374248 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02Fix findings from check-in on r374177Matthew Jordan
Richard pointed out two problems with the check-in from r374177: * The ast_msg_shutdown function declaration doesn't match the prototype in main/message.c. * The ref/alloc function usage in astobj2 (in trunk) can use the ao2_t_* variants of the functions to allow the REF_DEBUG flag to enable/disable their debug counterparts. ........ Merged revisions 374210 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374211 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02Fix a variety of ref counting issuesMatthew Jordan
This patch resolves a number of ref leaks that occur primarily on Asterisk shutdown. It adds a variety of shutdown routines to core portions of Asterisk such that they can reclaim resources allocate duringd initialization. Review: https://reviewboard.asterisk.org/r/2137 ........ Merged revisions 374177 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374178 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374196 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01Doxygen CleanupAndrew Latham
Start adding configuration file linking and pages. Add module loading doxygen block. Breaking up commits to keep it easy to track (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01app_queue: Support persisting and loading of long member lists.Sean Bright
Greenlight in #asterisk brought up that he was receiving an error message "Could not create persistent member string, out of space" when running app_queue in Asterisk 10. dump_queue_members() made an assumption that 8K would be enough to store the generated string, but with queues that have large member lists this is not always the case. This patch removes the limitation and uses ast_str instead of a fixed sized buffer. The complicating factor comes from the fact that ast_db_get requires a buffer and buffer size argument, which doesn't let us pull back more than what we pass in, so I introduced a new ast_db_get_allocated() which returns an ast_strdup()'d copy of the value from astdb. As an aside, I did some testing on the maximum size of data that we can store in the BDB library we distribute and was able to store a 10MB string and retrieve it with no problems, so I feel this is a safe patch. Review: https://reviewboard.asterisk.org/r/2136/ ........ Merged revisions 374108 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374135 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374150 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01Use ast_copy_string instead of strncpy to guarantee a NUL terminated string.Sean Bright
........ Merged revisions 374132 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374133 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01Change core show help output format.Richard Mudgett
The CLI "core show help" output leaves something to be desired. 1) The command is truncated to a maximum of 30 characters. 2) The output columns are mirrored from the 31st column. Current output format: logger mute Toggle logging output to a console logger reload Reopens the log files logger rotate Rotates and reopens the log files logger set level {DEBUG|NOTICE Enables/Disables a specific logging level for this console logger show channels List configured log channels New format: logger mute -- Toggle logging output to a console logger reload -- Reopens the log files logger rotate -- Rotates and reopens the log files logger set level {DEBUG|NOTICE|WARNING|ERROR|VERBOSE|DTMF} {on|off} -- Enables/Disables a specific logging level for this console logger show channels -- List configured log channels Review: https://reviewboard.asterisk.org/r/2133/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28Add pause one second W dial modifier.Richard Mudgett
* The following dialplan applications now recognize 'W' to pause sending DTMF for one second in addition to the previously existing 'w' that paused sending DTMF for half a second. Dial, ExternalIVR, and SendDTMF. * The chan_dahdi analog port dialing and deferred DTMF dialing for PRI now distinguishes between 'w' and 'W'. The 'w' pauses dialing for half a second. The 'W' pauses dialing for one second. * Created dahdi_dial_str() in chan_dahdi that eliminated a lot of duplicated dialing code and diagnostic messages for the channel driver. (closes issue ASTERISK-20039) Reported by: Jeremiah Gowdy Patches: jgowdy-wait-6-22-2012.diff (license #5621) patch uploaded by Jeremiah Gowdy Expanded patch to add support in chan_dahdi. Tested by: rmudgett git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28Reset hangup flags on channels created through messages and cleanup globalsBrent Eagles
in res_xmpp on unload. This patch fixes an issue where hangup flags were not being reset on a channel, affecting subsequent use of that channel. The patch also adds some additional cleanup to res_xmpp to fix an issue with reloading the module. (closes ASTERISK-20360) Reported by: Noah Engelberth Tested by: beagles Review: https://reviewboard.asterisk.org/r/2134/ ........ Merged revisions 374019 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-27Cleanup ast_dtmf_stream()Richard Mudgett
* Made ast_dtmf_stream() wait after starting the silence generator rather than before. * Made ast_dtmf_stream() put the peer in autoservice for the whole time things are being done to the chan. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-27loader: Ensure dependent modules are properly initialized.Joshua Colp
If an Asterisk module specifies a dependency in ast_module_info.nonoptreq, it is possible for Asterisk to skip calling the modules's .load function. Asterisk was loading and linking the module via load_dynamic_module() but was not adding the module to the resource_heap. Therefore the module was not initialized based on it's priority along with the other modules in the heap. Now use load_resource() instead of load_dynamic_module() for non-optional requirement. This will add the module to the resource_heap so the module can be properly initialized in the correct order. This is required if there are any module global data structures initialized in the .load() callback for the module on platforms which do not support weak references. (issue ASTERISK-20439) Reported by: sruffell Patches: 0001-loader-Ensure-dependent-modules-are-properly-initial.patch uploaded by sruffell (license 5417) ........ Merged revisions 373909 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373910 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373911 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25Fix saying of date in Dutch.Mark Michelson
The Dutch say the date before the month. (closes issue ASTERISK-20353) Reported by: Teun Ouwehand ........ Merged revisions 373773 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373774 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373775 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25Allow for redirecting reasons to be set to arbitrary strings.Mark Michelson
This allows for the REDIRECTING dialplan function to be used to set the reason to any string. The SIP channel driver has been modified to set the redirecting reason string to the value received in a Diversion header. In addition, SIP 480 response reason text will set the redirecting reason as well. (closes issue AST-942) reported by Malcolm Davenport (closes issue AST-943) reported by Malcolm Davenport Review: https://reviewboard.asterisk.org/r/2101 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-22Doxygen Updates Janitor WorkAndrew Latham
* Whitespace, doc-blocks, spelling, case, missing and incorrect tags. * Add cleanup to Makefile for the Doxygen configuration update * Start updating Doxygen configuration for cleaner output * Enable inclusion of configuration files into documentation * remove mantisworkflow... * update documentation README * Add markup to Tilghman's email and talk with him about updating his email, he knows... * no code changes on this commit other than the mentioned Makefile change (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21Doxygen Updates - janitor workAndrew Latham
Doxygen updates including mistakes, misspellings, missing parameters, updates for Doxygen style. Some missing txt file links are removed but their content or essense will be included in some later updates. A majority of the txt files were removed in the 1.6 era but never noted. The HR and EXTREF are simple changes that make the documentation more compatable with more versions of Doxygen. Further updates coming. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21dsp.c: remove more whitespace mentioned in review2107Alec L Davis
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21dsp.c ast_dsp_call_progress use local short variable in loop, plus other cleanupAlec L Davis
janitor cleanup. No functional change. 1). ast_dsp_call_progress: use 'short samp' instead of s[x] inside loop. apply same casting as other _init, dsp->energy = (int32_t) samp * (int32_t) samp 2). ast_dtmf_detect_init: move repeated setting of s->energy to outside of loop. do goertzel_init loop first before setting s->lasthit and s->current_hit, consistant with ast_dsp_digitreset() 3). ast_mf_detect_init: do goertzel_init loop first before setting s->hits[] and s->current_hit, consistant with ast_dsp_digitreset() 4). Don't chain init different variables, as the type may change Review https://reviewboard.asterisk.org/r/2107/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20Add support for DTLS-SRTP to res_rtp_asterisk and chan_sip.Joshua Colp
As mentioned on the review for this, WebRTC has moved towards choosing DTLS-SRTP as the mechanism for key exchange for SRTP. This commit adds support for this but makes it available for normal SIP clients as well. Testing has been done to ensure that this introduces no regressions with existing behavior and also that it functions as expected. Review: https://reviewboard.asterisk.org/r/2113/ ........ Merged revisions 373229 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20Named call pickup groups. Fixes, missing functionality, and improvements.Richard Mudgett
* ASTERISK-20383 Missing named call pickup group features: CHANNEL(callgroup) - Need CHANNEL(namedcallgroup) CHANNEL(pickupgroup) - Need CHANNEL(namedpickupgroup) Pickup() - Needs to also select from named pickup groups. * ASTERISK-20384 Using the pickupexten, the pickup channel selection could fail even though there was a call it could have picked up. In a call pickup race when there are multiple calls to pickup and two extensions try to pickup a call, it is conceivable that the loser will not pick up any call even though it could have picked up the next oldest matching call. Regression because of the named call pickup group feature. * See ASTERISK-20386 for the implementation improvements. These are the changes in channel.c and channel.h. * Fixed some locking issues in CHANNEL(). (closes issue ASTERISK-20383) Reported by: rmudgett (closes issue ASTERISK-20384) Reported by: rmudgett (closes issue ASTERISK-20386) Reported by: rmudgett Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2112/ ........ Merged revisions 373220 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20dsp.c: remove whitespace mentioned in review2107Alec L Davis
Related https://reviewboard.asterisk.org/r/2107/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-18Make the casing of CALL_ID in debug messages consistent to satisfy my OCD.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-18Don't crash when passing a NULL message to __astman_get_header.Sean Bright
Before this commit, __astman_get_header would blindly dereference the passed in 'struct message *' to traverse the header list. There are cases, however, such as '*CLI> sip qualify peer foo' where the message pointer is NULL, so we need to check for that. ........ Merged revisions 373131 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373132 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373133 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-14Resolve memory leaks in TLS initialization and TLS client connectionsMatthew Jordan
This patch resolves two sources of memory leaks when using TLS in Asterisk: 1) It removes improper initialization (and multiple re-initializations) of portions of the SSL library. Asterisk calls SSL_library_init and SSL_load_error_strings during SSL initialization; collectively this obviates the need for calling any of the following during initialization or client connection handling: * ERR_load_crypto_strings (handled by SSL_load_error_strings) * OpenSSL_add_all_algorithms (synonym for SSL_library_init) * SSLeay_add_ssl_algorithms (synonym for SSL_library_init) 2) Failure to completely clean up all memory allocated by Asterisk and by the SSL library for TLS clients. This included not freeing the SSL_CTX object in the SIP channel driver, as well as not clearing the error stack when the TLS client exited. Note that these memory leaks were found by Thomas Arimont, and this patch was essentially written by him with some minor tweaks. (closes issue AST-889) Reported by: Thomas Arimont Tested by: Thomas Arimont patches: (bugAST-889.patch) by Thomas Arimont (license 5525) Review: https://reviewboard.asterisk.org/r/2105 ........ Merged revisions 373061 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373062 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373079 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-13Fixed make clean when configured --disable-asterisksslDavid M. Lee
........ Merged revisions 373047 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-13Fix timeouts for ast_waitfordigit[_full].David M. Lee
ast_waitfordigit_full would simply pass its timeout to ast_waitfor_nandfds, expecting it to decrement the timeout by however many milliseconds were waited. This is a problem if it consistently waits less than 1ms. The timeout will never be decremented, and we wait... FOREVER! This patch makes ast_waitfordigit_full manage the timeout itself. It maintains the previously undocumented behavior that negative timeouts wait forever. (closes issue ASTERISK-20375) Reported by: Mark Michelson Tested by: Mark Michelson Review: https://reviewboard.asterisk.org/r/2109/ ........ Merged revisions 373024 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373025 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373029 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12Enhance astobj2 to support other types of containers.Richard Mudgett
The new API allows for sorted containers, insertion options, duplicate handling options, and traversal order options. * Adds the ability for containers to be sorted when they are created. * Adds container creation options to handle duplicates when they are inserted. * Adds container creation option to insert objects at the beginning or end of the container traversal order. * Adds OBJ_PARTIAL_KEY to allow searching with a partial key. The partial key works similarly to the OBJ_KEY flag. (The real search speed improvement with this flag will come when red-black trees are added.) * Adds container traversal and iteration order options: Ascending and Descending. * Adds an AST_DEVMODE compile feature to check the stats and integrity of registered containers using the CLI "astobj2 container stats <name>" and "astobj2 container check <name>". The channels container is normally registered since it is one of the most important containers in the system. * Adds ao2_iterator_restart() to allow iteration to be restarted from the beginning. * Changes the generic container object to have a v_method table pointer to support other types of containers. * Changes the container nodes holding objects to be ref counted. The ref counted nodes and v_method table pointer changes pave the way to allow other types of containers. * Includes a large astobj2 unit test enhancement that tests the new features. (closes issue ASTERISK-19969) Reported by: rmudgett Review: https://reviewboard.asterisk.org/r/2078/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12logger: Add rotatestrategy option of 'none' which does not perform rotationsJonathan Rose
With this option in use, it may be necessary to regulate your log files externally. (closes issue ASTERISK-20189) Reported by: Jaco Kroon Patches: asterisk-logger-norotate-trunk.patch uploaded by Jaco Kroon (license 5671) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12Fixed r372696 when configured --disable-asteriskssl; properly install ↵David M. Lee
libasteriskssl.dylib on OS X. I didn't realize that libasteriskssl.c was still compiled, even when you disable asteriskssl; it simple gets statically linked into asterisk. ........ Merged revisions 372930 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-11Fix inability to shutdown gracefully due to an unending channel reference.Mark Michelson
message.c makes use of a special message queue channel that exists in thread storage. This channel never goes away due to the fact that the taskprocessor used by message.c does not get shut down, meaning that it never ends the thread that stores the channel. This patch fixes the problem by shutting down the taskprocessor when Asterisk is shut down. In addition, the thread storage has a destructor that will release the channel reference when the taskprocessor is destroyed. (closes issue AST-937) Reported by Jason Parker Patches: AST-937.patch uploaded by Mark Michelson (License #5049) Tested by Jason Parker ........ Merged revisions 372885 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372888 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-11Fix bad channel application data reference.Mark Michelson
When channels get bridged due to an AMI bridge action or a DTMF attended transfer, the two channels that get bridged have their application data pointing to the other channel's name. This means that if one channel is hung up but the other moves on, it means that the channel that moves on will have its application data pointing at freed memory. (issue ASTERISK-20335) Reported by: aragon ........ Merged revisions 372840 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372841 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372886 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10Deprecate chan_gtalk, chan_jingle, and res_jabberKinsey Moore
chan_gtalk, chan_jingle, and res_jabber are now deprecated in favor of using chan_motif and res_xmpp. They are a feature-equivalent replacement and are written to be more easily maintainable. (closes issue ASTERISK-20298) Review: https://reviewboard.asterisk.org/r/2082/ Reported-by: Leif Madsen ........ Merged revisions 372795 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10Masquerade: Retain parkinglot settings made by CHANNEL function.Jonathan Rose
Prior to this patch, the user would have a parkinglot set on a channel that was parked and when the channel was retrieved, any attempt by that channel to park would simply use the default. This patch makes parkinglot values set in this way be retained through the masquerade. (closes issue AST-990) Reported by: Nick Huskinson Patches: masquerade_parkinglot_patch.diff Uploaded by Jonathan Rose (license 6182) ........ Merged revisions 372736 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372737 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372754 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-08Add OPENSSL_INCLUDE to the CFLAGS for ssl.c and tcptls.c.David M. Lee
Without this flag, those files will compile with the system installed OpenSSL headers (if they exist). This is a real bummer if a different path was specified using --with-ssl= (closes issue ASTERISK-20392) ........ Merged revisions 372682 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Recorded merge of revisions 372695 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Recorded merge of revisions 372696 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07Fix MALLOC_DEBUG version of ast_strndup().Richard Mudgett
(closes issue ASTERISK-20349) Reported by: Brent Eagles ........ Merged revisions 372655 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372656 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372657 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372658 65c4cc65-6c06-0410-ace0-fbb531ad65f3