]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
12 years agoImporting release summary for 1.8.24.0 release. 1.8.24.0
Asterisk Autobuilder [Mon, 21 Oct 2013 14:49:42 +0000 (14:49 +0000)] 
Importing release summary for 1.8.24.0 release.

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0@401309 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUpdate ChangeLog; .version; remove old summaries
Asterisk Autobuilder [Mon, 21 Oct 2013 14:47:34 +0000 (14:47 +0000)] 
Update ChangeLog; .version; remove old summaries

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0@401308 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCreate 1.8.24.0
Asterisk Autobuilder [Mon, 21 Oct 2013 14:29:02 +0000 (14:29 +0000)] 
Create 1.8.24.0

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0@401305 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoImporting release summary for 1.8.24.0-rc2 release. 1.8.24.0-rc2
Asterisk Autobuilder [Fri, 18 Oct 2013 16:43:36 +0000 (16:43 +0000)] 
Importing release summary for 1.8.24.0-rc2 release.

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0-rc2@401237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMake updates for Asterisk 1.8.24.0-rc2
Asterisk Autobuilder [Fri, 18 Oct 2013 16:33:13 +0000 (16:33 +0000)] 
Make updates for Asterisk 1.8.24.0-rc2

* Remove old summaries; update ChangeLog; version
* Merge r401178 for ASTERISK-22718

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0-rc2@401234 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCreate 1.8.24.0-rc2
Asterisk Autobuilder [Fri, 18 Oct 2013 15:56:52 +0000 (15:56 +0000)] 
Create 1.8.24.0-rc2

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0-rc2@401222 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUse autotagged externals 1.8.24.0-rc1
Asterisk Autobuilder [Thu, 19 Sep 2013 14:04:29 +0000 (14:04 +0000)] 
Use autotagged externals

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0-rc1@399448 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoImporting release summary for 1.8.24.0-rc1 release.
Asterisk Autobuilder [Thu, 19 Sep 2013 14:04:10 +0000 (14:04 +0000)] 
Importing release summary for 1.8.24.0-rc1 release.

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0-rc1@399447 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoImporting files for 1.8.24.0-rc1 release.
Asterisk Autobuilder [Thu, 19 Sep 2013 14:03:56 +0000 (14:03 +0000)] 
Importing files for 1.8.24.0-rc1 release.

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0-rc1@399446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCreating tag for the release of asterisk-1.8.24.0-rc1
Asterisk Autobuilder [Thu, 19 Sep 2013 14:01:48 +0000 (14:01 +0000)] 
Creating tag for the release of asterisk-1.8.24.0-rc1

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.8.24.0-rc1@399445 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix jitter buffer log file creation
Kinsey Moore [Wed, 18 Sep 2013 19:54:36 +0000 (19:54 +0000)] 
Fix jitter buffer log file creation

This adjusts '/'-to-'#' replacement to replace all instances of '/'
instead of just the first to ensure that the jitter buffer log file
gets the correct name as per Richard Kenner's suggestion.

(closes issue ASTERISK-21036)
Reported by: Richard Kenner

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399402 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUpdate prep_tarball with new documentation files on the Asterisk wiki
Matthew Jordan [Wed, 18 Sep 2013 17:15:32 +0000 (17:15 +0000)] 
Update prep_tarball with new documentation files on the Asterisk wiki

This will now pull both a command reference for the version being prepared,
as well as an Admin Guide that applies to all versions of Asterisk.

(issue ASTERISK-22439)
Reported by: Olle Johansson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399351 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid
Michael L. Young [Wed, 18 Sep 2013 01:32:36 +0000 (01:32 +0000)] 
Fix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid

When processing the lines under the [applicationmap] context in features.conf, a
segfault occurs from attempting to process a line with an invalid syntax
(basically missing most of the arguments).

Example:
[applicationmap]
automon=*6

* This patch moves the checking for empty arguments to before they are accessed.

* Also, checked the "todo" comment and removed it.  Some applications do not
  require arguments.

(closes issue ASTERISK-22416)
Reported by: CGI.NET
Tested by: CGI.NET
Patches:
    asterisk-22416-check-syntax-first_v2.diff by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2803

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399304 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_iax2: Fix saving the wrong expiry time in astdb.
Richard Mudgett [Mon, 16 Sep 2013 16:37:56 +0000 (16:37 +0000)] 
chan_iax2: Fix saving the wrong expiry time in astdb.

When a new IAX2 client registers, the astdb database is updated with the
value of minregexpire defined in iax.conf instead of using the expiry time
that is provided by the client.  The provided expiry time of the client is
updated after inserting the astdb entry.  As a consequence, restarting or
reloading asterisk creates clients whose registration may expire before
they reregister.  The clients are therefore unavailable after minregexpire
seconds until they reregister.

* Move updating of the expiry time to before inserting into the astdb.

(closes issue ASTERISK-22504)
Reported by: Stefan Wachtler
Patches:
      chan_iax2.c.patch (license #6533) patch uploaded by Stefan Wachtler

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399158 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDon't write to /tmp/refs when REF_DEBUG is not defined.
David M. Lee [Fri, 13 Sep 2013 20:47:54 +0000 (20:47 +0000)] 
Don't write to /tmp/refs when REF_DEBUG is not defined.

If MALLOC_DEBUG is enabled, then the debug destructor for the container
is used, which would erroneously write to /tmp/refs. This patch only
uses the debug destructor if ref_debug is used.

(closes issue ASTERISK-22536)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399098 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix several crashes in MeetMeAdmin
Kinsey Moore [Fri, 13 Sep 2013 13:31:24 +0000 (13:31 +0000)] 
Fix several crashes in MeetMeAdmin

This change ensures that MeetMeAdmin commands requiring a user actually
get a user and fixes another issue where an extra dereference could
occur for a last-entered user being ejected if a user identifier was
also provided.

(closes issue ASTERISK-21907)
Reported by: Alex Epshteyn
Review: https://reviewboard.asterisk.org/r/2844/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399033 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_sip: Revert r398835 due to failing tests involving originate
Jonathan Rose [Thu, 12 Sep 2013 20:09:32 +0000 (20:09 +0000)] 
chan_sip: Revert r398835 due to failing tests involving originate

(issue ASTERISK-22424)
Reported by: Jonathan Rose

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398977 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agores_musiconhold: Fix reference leaks caused when reloading with REF_DEBUG set
Jonathan Rose [Thu, 12 Sep 2013 16:35:37 +0000 (16:35 +0000)] 
res_musiconhold: Fix reference leaks caused when reloading with REF_DEBUG set

Due to a faulty function for debugging reference decrementing, it was possible
to reduce the refcount on the wrong object if two moh classes of the same name
were in the moh class container.

(closes issue ASTERISK-22252)
Reported by: Walter Doekes
Patches:
    18_moh_debug_ref_patch.diff Uploaded by Jonathan Rose (license 6182)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398937 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years ago'queue add member' help text correction
Rusty Newton [Thu, 12 Sep 2013 00:00:51 +0000 (00:00 +0000)] 
'queue add member' help text correction

You are adding dial strings to the queue, not channels. An aribitrary string
could be used, but you are typically referencing a channel. Correcting the
command help text.

(issue ASTERISK-22263)
(closes issue ASTERISK-22263)
Reported By: Rusty Newton

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398884 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDocumentation fix - waitfordialtone is not boolean, it's time in milliseconds
Rusty Newton [Wed, 11 Sep 2013 23:47:53 +0000 (23:47 +0000)] 
Documentation fix - waitfordialtone is not boolean, it's time in milliseconds

Changing text in chan_dahdi.conf sample to be accurate.

(issue ASTERISK-22308)
(closes issue ASTERISK-22308)
Reported By: Malcolm Davenport

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398880 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_sip: Reject calls without prior SDP on 200 OK
Jonathan Rose [Wed, 11 Sep 2013 19:39:36 +0000 (19:39 +0000)] 
chan_sip: Reject calls without prior SDP on 200 OK

If we receive a 200 OK without SDP, we will now check to see if
the remote address has been established for that channel's RTP
session and if the to tag for that channel has changed from
the most recent to tag in a response less than 200.
If either a change has been made since the last to-tag was
received or the remote address is unset, then we will drop
the call.

(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/diff/#index_header

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398835 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix incorrect usages of ast_realloc().
Richard Mudgett [Tue, 10 Sep 2013 17:53:58 +0000 (17:53 +0000)] 
Fix incorrect usages of ast_realloc().

There are several locations in the code base where this is done:
buf = ast_realloc(buf, new_size);

This is going to leak the original buf contents if the realloc fails.

Review: https://reviewboard.asterisk.org/r/2832/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398757 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFixed utils directory breakage from r398748, this time with extra hate.
David M. Lee [Tue, 10 Sep 2013 17:47:59 +0000 (17:47 +0000)] 
Fixed utils directory breakage from r398748, this time with extra hate.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398752 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFixed utils directory breakage from r398648
David M. Lee [Tue, 10 Sep 2013 17:22:23 +0000 (17:22 +0000)] 
Fixed utils directory breakage from r398648

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398748 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMALLOC_DEBUG: Change fence magic number to be completely different from the freed...
Richard Mudgett [Mon, 9 Sep 2013 23:15:38 +0000 (23:15 +0000)] 
MALLOC_DEBUG: Change fence magic number to be completely different from the freed magic number.

Race conditions between freeing a nul terminated string and
ast_strdup()'ing it are more likely to be detected if the fence and freed
magic numbers are completely different.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398703 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix DEBUG_THREADS when lock is acquired in __constructor__
David M. Lee [Mon, 9 Sep 2013 19:56:02 +0000 (19:56 +0000)] 
Fix DEBUG_THREADS when lock is acquired in __constructor__

This patch fixes some long-standing bugs in debug threads that were
exacerbated with recent Optional API work in Asterisk 12.

With debug threads enabled, on some systems, there's a lock ordering
problem between our mutex and glibc's mutex protecting its module list
(Ubuntu Lucid, glibc 2.11.1 in this instance). In one thread, the module
list will be locked before acquiring our mutex. In another thread, our
mutex will be locked before locking the module list (which happens in
the depths of calling backtrace()).

This patch fixes this issue by moving backtrace() calls outside of
critical sections that have the mutex acquired. The bigger change was to
reentrancy tracking for ast_cond_{timed,}wait, which wrongly assumed
that waiting on the mutex was equivalent to a single unlock (it actually
suspends all recursive locks on the mutex).

(closes issue ASTERISK-22455)
Review: https://reviewboard.asterisk.org/r/2824/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398648 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCommit the remainder of r398523
Kinsey Moore [Fri, 6 Sep 2013 20:56:31 +0000 (20:56 +0000)] 
Commit the remainder of r398523

This is a missing part of the commit in revision 398523 that corrects
the name of a variable.

(issue ASTERISK-22435)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398576 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix Jabber/XMPP distributed MWI
Kinsey Moore [Fri, 6 Sep 2013 19:16:14 +0000 (19:16 +0000)] 
Fix Jabber/XMPP distributed MWI

The mailbox and context are swapped on the receiving end for all users
of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
versions. This swaps those values to be correct when publishing to the
internal event system from Jabber/XMPP distributed MWI state.

(closes issue ASTERISK-22435)
Reported by: abelbeck
Tested by: Michael Keuter
Patches:
    asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
    asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398523 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_iax2: Reduce indentation in __attempt_transmit().
Richard Mudgett [Thu, 5 Sep 2013 19:00:20 +0000 (19:00 +0000)] 
chan_iax2: Reduce indentation in __attempt_transmit().

* Reduce indentation in __attempt_transmit().

* Don't update the static last error time variable every time in
__schedule_action() and socket_read().

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398456 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_iax2: Fix stray reference to worker thread idle_list.
Richard Mudgett [Thu, 5 Sep 2013 17:28:14 +0000 (17:28 +0000)] 
chan_iax2: Fix stray reference to worker thread idle_list.

* Fix stray reference to idle_list in cleanup_thread_list().  This may be
the reason for the note in iax2_process_thread() about threads not being
removed from the task lists.

* Move cleanup_thread_list(&idle_list) to after the other lists are
cleaned up.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398416 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_iax2: Fix bridgecallno deadlock avoidance.
Richard Mudgett [Thu, 5 Sep 2013 17:07:44 +0000 (17:07 +0000)] 
chan_iax2: Fix bridgecallno deadlock avoidance.

* Fix bridgecallno deadlock avoidance.  When doing deadlock avoidance, you
need to retest the status of values for each loop to see if you still need
the lock for bridgecallno.

* As a safety check, after acquiring the bridgecallno lock you should
check if iaxs[bridgecallno] is NULL just like the current callno checks.

* Move setting thread->iostate to IAX_IOSTATE_IDLE to after processing any
deferred frames to ensure that the iostate is IDLE when it is placed back
into the idle list.  defer_full_frame() tries to ensure
iax2_process_thread() wakes up to process the frame.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398379 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_iax2: Add missing control frame names to debug frame decode output. (Part 2)
Richard Mudgett [Wed, 4 Sep 2013 23:32:15 +0000 (23:32 +0000)] 
chan_iax2: Add missing control frame names to debug frame decode output. (Part 2)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398339 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_iax2: Add missing control frame names to debug frame decode output.
Richard Mudgett [Wed, 4 Sep 2013 22:52:18 +0000 (22:52 +0000)] 
chan_iax2: Add missing control frame names to debug frame decode output.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398301 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_misdn: Fix misdn debug output printed with arbitrary verbose levels.
Richard Mudgett [Wed, 4 Sep 2013 15:54:37 +0000 (15:54 +0000)] 
chan_misdn: Fix misdn debug output printed with arbitrary verbose levels.

Fix the misdn debug output to remote consoles.  chan_misdn uses
ast_console_puts() which doesn't know about verbose levels.  Better to use
ast_verbose() instead.  Without this patch the misdn debug messages are
appended to the verbose level which ever was set by the message sent to
the console before, i.e.  any undefined level.

(closes issue AST-1218)
Reported by: Guenther Kelleter
Patches:
      misdnlog.patch (license #6372) patch uploaded by Guenther Kelleter

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398235 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoBe a little more verbose when loading cel_custom.conf.
Walter Doekes [Mon, 2 Sep 2013 07:24:11 +0000 (07:24 +0000)] 
Be a little more verbose when loading cel_custom.conf.

Review: https://reviewboard.asterisk.org/r/2805/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398167 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix various memory leaks
Kevin Harwell [Fri, 30 Aug 2013 18:55:39 +0000 (18:55 +0000)] 
Fix various memory leaks

main/config.c - cleanup cache fie includes
res/res_security_log.c - unregister logger level
channesl/chan_sip.c - cleanup io context and notify_types

(closes issues ASTERISK-22378)
Reported by: Corey Farrell
Patches:
     config_shutdown.patch uploaded by coreyfarrell (license 5909)
     res_security_log.patch uploaded by coreyfarrell (license 5909)
     chan_sip-1.8.patch uploaded by coreyfarrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398102 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMemory leak fix
Kevin Harwell [Fri, 30 Aug 2013 17:50:03 +0000 (17:50 +0000)] 
Memory leak fix

ast_xmldoc_printable returns an allocated block that must be freed by the
caller.  Fixed manager.c and res_agi.c to stop leaking these results.

(closes issue ASTERISK-22395)
Reported by: Corey Farrell
Patches:
     manager-leaks-1.8.patch uploaded by coreyfarrell (license 5909)
     res_agi-xmldoc-leaks.patch uploaded by coreyfarrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398060 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix memory leak
Kevin Harwell [Fri, 30 Aug 2013 16:58:34 +0000 (16:58 +0000)] 
Fix memory leak

Fixed a features.c test that leaked a reference to a parked call.  This caused
chancount to never reach 0, so graceful shutdown stops.  Also added an
unregister test.

(closes issue ASTERISK-22413)
Reported by: Corey Farrell
Patches:
     features-TEST_FRAMEWORK.patch uploaded by coreyfarrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398021 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agotest_substituition: Fix failed test reporting to actually report failure.
Richard Mudgett [Fri, 30 Aug 2013 16:46:52 +0000 (16:46 +0000)] 
test_substituition: Fix failed test reporting to actually report failure.

You cannot put the "Testing <blah> pass/fail" on a single line before
actually performing the test.  Now any additional failure information is
logged before the test pass/fail announcement.

* Added an additional CDR(answer,u) test.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398018 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAST-2013-005: Fix crash caused by invalid SDP
Matthew Jordan [Tue, 27 Aug 2013 17:55:59 +0000 (17:55 +0000)] 
AST-2013-005: Fix crash caused by invalid SDP

If the SIP channel driver processes an invalid SDP that defines media
descriptions before connection information, it may attempt to reference
the socket address information even though that information has not yet
been set. This will cause a crash.

This patch adds checks when handling the various media descriptions that
ensures the media descriptions are handled only if we have connection
information suitable for that media.

Thanks to Walter Doekes, OSSO B.V., for reporting, testing, and providing
the solution to this problem.

(closes issue ASTERISK-22007)
Reported by: wdoekes
Tested by: wdoekes
patches:
  issueA22007_sdp_without_c_death.patch uploaded by wdoekes (License 5674)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397756 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAST-2013-004: Fix crash when handling ACK on dialog that has no channel
Matthew Jordan [Tue, 27 Aug 2013 15:49:14 +0000 (15:49 +0000)] 
AST-2013-004: Fix crash when handling ACK on dialog that has no channel

A remote exploitable crash vulnerability exists in the SIP channel driver if an
ACK with SDP is received after the channel has been terminated. The handling
code incorrectly assumed that the channel would always be present.

This patch adds a check such that the SDP will only be parsed and applied if
Asterisk has a channel present that is associated with the dialog.

Note that the patch being applied was modified only slightly from the patch
provided by Walter Doekes of OSSO B.V.

(closes issue ASTERISK-21064)
Reported by: Colin Cuthbertson
Tested by: wdoekes, Colin Cutherbertson
patches:
  issueA21064_fix.patch uploaded by wdoekes (License 5674)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397710 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix memory corruption when trying to get "core show locks".
Richard Mudgett [Fri, 23 Aug 2013 15:34:27 +0000 (15:34 +0000)] 
Fix memory corruption when trying to get "core show locks".

Review https://reviewboard.asterisk.org/r/2580/ tried to fix the mismatch
in memory pools but had a math error determining the buffer size and
didn't address other similar memory pool mismatches.

* Effectively reverted the previous patch to go in the same direction as
trunk for the returned memory pool of ast_bt_get_symbols().

* Fixed memory leak in ast_bt_get_symbols() when BETTER_BACKTRACES is
defined.

* Fixed some formatting in ast_bt_get_symbols().

* Fixed sig_pri.c freeing memory allocated by libpri when MALLOC_DEBUG is
enabled.

* Fixed __dump_backtrace() freeing memory from ast_bt_get_symbols() when
MALLOC_DEBUG is enabled.

* Moved __dump_backtrace() because of compile issues with the utils
directory.

(closes issue ASTERISK-22221)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2778/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397525 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd _IO_stdin_used in version-script to fix SIGBUSes on Sparc.
Walter Doekes [Thu, 22 Aug 2013 08:19:02 +0000 (08:19 +0000)] 
Add _IO_stdin_used in version-script to fix SIGBUSes on Sparc.

The --version-script,asterisk.exports linker flag (and the module
exports) didn't provide _IO_stdin_used in the list of exported symbols.
That causes some kind of libc compatibility mode to kick in, where
stdio file structures (stdout/stderr) land somewhere else. In the
case of the Sparc, they landed on misaligned memory.

This became apparent first after r376428 (Reorder startup sequence)
when a lot of ast_log's were replaced with fprintf's. Writing to
stderr triggered a SIGBUS. (Compared to x86 and amd64 architectures,
the Sparc is very picky about memory alignment.)

(issue ASTERISK-21763)
(issue ASTERISK-21665)

Reported by: Jeremy Kister
Review: https://reviewboard.asterisk.org/r/2760/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397377 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoComplete http_shutdown.
David M. Lee [Wed, 21 Aug 2013 17:00:07 +0000 (17:00 +0000)] 
Complete http_shutdown.

This patch frees up some resources allocated in http.c.
 * tcp listeners stopped
 * tls settings freed
 * uri redirects freed
 * unregister internal http.c uri's

(closes issue ASTERISK-22237)
Reported by: Corey Farrell

Patches:
    http.patch uploaded by Corey Farrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397308 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoSet 14400 as the default max bit rate if T38MaxBitRate is not specified
Matthew Jordan [Wed, 21 Aug 2013 14:56:09 +0000 (14:56 +0000)] 
Set 14400 as the default max bit rate if T38MaxBitRate is not specified

If an endpoint fails to include the T38MaxBitRate attribute during negotiation,
Asterisk will negotiate a bit rate of 2400 instead of the ITU recommended
bit rate of 14400. This patch fixes this by making AST_T38_RATE_14400 the
'default' value of the enum by assigning it a value of 0, such that if an
endpoint fails to include the attribute, the default will be 14400.

Note that Walter Doekes included the nice comment in frame.h about why we are
purposefully assigning AST_T38_RATE_14400 a value of 0.

(closes issue ASTERISK-22275)
Reported by: Andreas Steinmetz
patches:
  fax-fix.patch uploaded by anstein (License 6523)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397256 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix Not Storing Current Incoming Recv Address
Michael L. Young [Wed, 21 Aug 2013 02:09:21 +0000 (02:09 +0000)] 
Fix Not Storing Current Incoming Recv Address

In 1.8, r384779 introduced a regression by retrieving an old dialog and keeping
the old recv address since recv was already set.  This has caused a problem when
a proxy is involved since responses to incoming requests from the proxy server,
after an outbound call is established, are never sent to the correct recv
address.

In 11, r382322 introduced this regression.

The fix is to revert that change and always store the recv address on incoming
requests.

Thank you Walter Doekes for helping to point out this error and Mark Michelson
for your input/review of the fix.

(closes issue ASTERISK-22071)
Reported by: Alex Zarubin
Tested by: Alex Zarubin, Karsten Wemheuer
Patches:
    asterisk-22071-store-recvd-address.diff by Michael L. Young (license 5026)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397204 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRemove REF_DEBUG definition.
Mark Michelson [Tue, 20 Aug 2013 17:40:51 +0000 (17:40 +0000)] 
Remove REF_DEBUG definition.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397156 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix refcounting of sip_pvt in test_sip_rtpqos test and unlink it from the list of...
Mark Michelson [Tue, 20 Aug 2013 16:13:01 +0000 (16:13 +0000)] 
Fix refcounting of sip_pvt in test_sip_rtpqos test and unlink it from the list of pvts.

(closes issue ASTERISK-22248)
reported by Corey Farrell
patches:
test_sip_rtpqos.patch uploaded by Corey Farrell (license #5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397112 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUnregister CLI commands on exit
Kinsey Moore [Tue, 20 Aug 2013 15:26:24 +0000 (15:26 +0000)] 
Unregister CLI commands on exit

This patch ensures that CLI commands enabled by DEBUG_FD_LEAKS and
DEBUG_THREADLOCALS are cleaned up properly on exit.

(closes issue ASTERISK-22238)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    debug_cli_unregister.patch uploaded by Corey Farrell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397106 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix xmldoc memory leak
Kinsey Moore [Tue, 20 Aug 2013 14:24:52 +0000 (14:24 +0000)] 
Fix xmldoc memory leak

This fixes a single-attribute memory leak that was occurring when the
"required" attribute was not true.

(closes issue ASTERISK-22249)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    xmldoc-free_attr_required.patch uploaded by Corey Farrell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397064 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoProtect CEL from an invalid config on reload
Kinsey Moore [Tue, 20 Aug 2013 13:51:41 +0000 (13:51 +0000)] 
Protect CEL from an invalid config on reload

This patch fixes CEL to properly handle an invalid config on reload.

(closes issue ASTERISK-22259)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    cel-config.patch uploaded by Corey Farrell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397033 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd "autoframing" option to sip.conf.sample and h323.conf.sample.
Walter Doekes [Tue, 20 Aug 2013 11:46:08 +0000 (11:46 +0000)] 
Add "autoframing" option to sip.conf.sample and h323.conf.sample.

The autoframing option was added to chan_sip.c in r43243 (mogorman,
2006-09-19 01:32:57), but never made its way into the sample configs.

Review: https://reviewboard.asterisk.org/r/2768/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396994 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix invalid access to disposed memory in main/data unit test
Matthew Jordan [Tue, 20 Aug 2013 01:17:31 +0000 (01:17 +0000)] 
Fix invalid access to disposed memory in main/data unit test

It is not safe to iterate over a macro'd list of ao2 objects, deref them such
that the item's destructor is called, and leave them in the list. The list
macro to iterate over items requires the item to be a valid allocated object
in order to proceed to the next item; with MALLOC_DEBUG on the corruption of
the linked list is caught in the crash.

This patch fixes the invalid access to free'd memory by removing the ao2 item
from the list before de-refing it.

Note that this is a backport of r396915 from Asterisk trunk.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396958 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRemove leading spaces from the CLI command before parsing
Kinsey Moore [Thu, 15 Aug 2013 16:21:20 +0000 (16:21 +0000)] 
Remove leading spaces from the CLI command before parsing

If you've mistakenly put a space before typing in a command, the
leading space will be included as part of the command, and the command
parser will not find the corresponding command. This patch rectifies
that situation by stripping the leading spaces on commands.

Review: https://reviewboard.asterisk.org/r/2709/
Patch-by: Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396745 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoTweak comment for why usleep is used.
Joshua Colp [Wed, 14 Aug 2013 19:05:41 +0000 (19:05 +0000)] 
Tweak comment for why usleep is used.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoTweak test_hashtab_thrash test to allow the critical threads to execute.
Joshua Colp [Wed, 14 Aug 2013 18:07:37 +0000 (18:07 +0000)] 
Tweak test_hashtab_thrash test to allow the critical threads to execute.

Depending on certain conditions it was possible for the hashtab counting thread
to starve other threads, preventing them from executing in the expected fashion.
This change adds a sleep to allow the others to do what they need to do. While
this doesn't thrash the hashtab as much as previously, it at least works.

(closes issue ASTERISK-22276)
Reported by: Matt Jordan

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396619 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_sip: Convert 'just did sched_add waitid...' from warning to debug message.
Walter Doekes [Tue, 13 Aug 2013 18:44:21 +0000 (18:44 +0000)] 
chan_sip: Convert 'just did sched_add waitid...' from warning to debug message.

Patches:
    reviewboard-2377.patch uploaded by Paul Belanger
Review: https://reviewboard.asterisk.org/r/2377/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396582 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_sip: Fix IP-addr in warning when rejecting a contact ACL.
Walter Doekes [Tue, 13 Aug 2013 18:32:32 +0000 (18:32 +0000)] 
chan_sip: Fix IP-addr in warning when rejecting a contact ACL.

Patches:
    reviewboard-2155.patch uploaded by Paul Belanger
Review: https://reviewboard.asterisk.org/r/2155/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396579 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoConsistent memory allocation by ast_bt_get_symbols.
Walter Doekes [Thu, 8 Aug 2013 20:14:27 +0000 (20:14 +0000)] 
Consistent memory allocation by ast_bt_get_symbols.

Always use ast_alloc/ast_free. This is handled differently in trunk (r391012).

Review: https://reviewboard.asterisk.org/r/2580/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396427 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCheck result of ast_var_assign() calls for memory allocation failure.
Walter Doekes [Tue, 6 Aug 2013 08:14:59 +0000 (08:14 +0000)] 
Check result of ast_var_assign() calls for memory allocation failure.

We try to keep the system running even when all available memory is
spent.

Review: https://reviewboard.asterisk.org/r/2734/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396279 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix Registration Failure When A Peer And TLS Are Used
Michael L. Young [Mon, 5 Aug 2013 20:17:44 +0000 (20:17 +0000)] 
Fix Registration Failure When A Peer And TLS Are Used

If a peer is used in a register line and TLS is defined as the transport, the
registration fails since the transport on the dialog is never set properly
resulting in UDP being used instead of TLS.

This patch sets the dialog's transport based on the transport that was defined
in the register line.  If the register line does not specify a transport, the
parsing function for the register line always defaults back to UDP.

(closes issue ASTERISK-21964)
Reported by: Doug Bailey
Tested by: Doug Bailey
Patches:
    asterisk-21964-set-reg-dialog-transport.diff
by Michael L. Young (license 5026)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396240 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRestore Extra Line Break Between Peers When Running AMI Action SIPPeers
Michael L. Young [Mon, 5 Aug 2013 19:45:49 +0000 (19:45 +0000)] 
Restore Extra Line Break Between Peers When Running AMI Action SIPPeers

The commit (r387133) for fixing ASTERISK-21466 accidentally removed an extra
line break between the peers returned by the AMI action SIPPeers.  This
results in some parsers breaking because they expect this extra line break.

This patch restores that extra line break.

(closes issue ASTERISK-22239)
Reported by: Jacek Konieczny
Tested by: Jacek Konieczny, Michael L. Young
Patches:
    asterisk-ami_sippeers_separator.patch by Jacek Konieczny (license 6298)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396236 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdding a note to UPGRADE.txt about a change made to res_agi in order to
Michael L. Young [Mon, 5 Aug 2013 18:40:13 +0000 (18:40 +0000)] 
Adding a note to UPGRADE.txt about a change made to res_agi in order to
indicate when streaming an audio file fails like it is done in other parts
of the code to indicate an error.

Note was requested by Paul Belanger:
http://lists.digium.com/pipermail/asterisk-dev/2013-July/061420.html

(related to issue ASTERISK-21903)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396196 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUpdate copyright year to 2013 in asterisk.c; some whitespace fixes
Matthew Jordan [Mon, 22 Jul 2013 13:49:00 +0000 (13:49 +0000)] 
Update copyright year to 2013 in asterisk.c; some whitespace fixes

(closes issue ASTERISK-22179)
Reported by: Malcolm Davenport

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@395032 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoClean up documentation
Matthew Jordan [Sun, 21 Jul 2013 22:02:41 +0000 (22:02 +0000)] 
Clean up documentation

This patch cleans up documentation in func_channel for the following items:
* rtpsource
* secure_signaling
* secure_media

(closes issue ASTERISK-20969)
Reported by: snuffy
patches:
  func_chan-update.diff uploaded by snuffy (License 5024)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394980 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoProvide proper ring tone in indications.conf for Malaysia
Matthew Jordan [Sun, 21 Jul 2013 18:15:57 +0000 (18:15 +0000)] 
Provide proper ring tone in indications.conf for Malaysia

The ring tone provided in the sample indications.conf was incorrect. This patch
modifies the sample ring tone to be what it should:
  ring = 425/400,0/200,425/400,0/2000

This brings it in line with the tone definition in DAHDI 2.7.0. (zonedata.c)

(closes issue ASTERISK-21997)
Reported by: Filip Jenicek
patches:
  malaysia_ring.patch uploaded by phill (License 6277)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394940 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoTolerate presence of RFC2965 Cookie2 header by ignoring it
Matthew Jordan [Sun, 21 Jul 2013 03:09:16 +0000 (03:09 +0000)] 
Tolerate presence of RFC2965 Cookie2 header by ignoring it

This patch modifies parsing of cookies in Asterisk's http server by doing an
explicit comparison of the "Cookie" header instead of looking at the first
6 characters to determine if the header is a cookie header. This avoids
parsing "Cookie2" headers and overwriting the previously parsed "Cookie"
header.

Note that we probably should be appending the cookies in each "Cookie"
header to the parsed results; however, while clients can send multiple
cookie headers they never really do. While this patch doesn't improve
Asterisk's behavior in that regard, it shouldn't make it any worse either.

Note that the solution in this patch was pointed out on the issue by the
issue reporter, Stuart Henderson.

(closes issue ASTERISK-21789)
Reported by: Stuart Henderson
Tested by: mjordan, Stuart Henderson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394899 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUpdate PostgreSQL realtime scripts with schema for queue_log table
Matthew Jordan [Sun, 21 Jul 2013 02:38:09 +0000 (02:38 +0000)] 
Update PostgreSQL realtime scripts with schema for queue_log table

This patch updates the realtime SQL scripts with an entry that will create the
queue_log table. This brings the PostgreSQL scripts inline with the MySQL
scripts, with respect to what tables they will create.

(closes issue ASTERISK-21021)
Reported by: Eugene
patches:
  queue_log.sql uploaded by varnav (license 6360)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394896 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDocument connectedline parameter for chan_iax2
Matthew Jordan [Sun, 21 Jul 2013 02:19:21 +0000 (02:19 +0000)] 
Document connectedline parameter for chan_iax2

The connectedline parameter for a chan_iax2 peer was undocumented. This patch
documents the options in the sample configuration file.

(closes issue ASTERISK-21953)
Reported by: Birger "WIMPy" Harzenetter

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoProperly indicate failure to open an audio stream in res_agi
Michael L. Young [Thu, 18 Jul 2013 12:51:22 +0000 (12:51 +0000)] 
Properly indicate failure to open an audio stream in res_agi

If there is an error streaming an audio file, the current return status makes it
difficult for an AGI script to determine that there was an error with the audio
file.

This patches changes the result to return -1 and the function returns
RESULT_FAILURE instead of RESULT_SUCCESS.  From looking at other parts of
res_agi, this would appear to be the proper way to handle an error.

(closes issue ASTERISK-21903)
Reported by: Ariel Wainer
Tested by: Ariel Wainer
Patches:
asterisk-21903-return-stream-res_1.8.diff
by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2625/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394640 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoClarify documentation for function PASSTHRU
Matthew Jordan [Sun, 14 Jul 2013 01:53:15 +0000 (01:53 +0000)] 
Clarify documentation for function PASSTHRU

It is not apparent to the average user that the PASSTHRU function should not
be passed as ${PASSTHRU(string)} but just as PASSTHRU(string) to functions
which take a variable name and not its contents.

This patch clarifies the behavior in the documentation and provides an example.

(closes issue ASTERISK-21717)
Reported by: Richard Miller
patches:
  func_strings.diff uploaded by Richard Miller (license 5685)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394302 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix a longstanding issue with MFC-R2 configuration that prevented users
Moises Silva [Thu, 11 Jul 2013 16:25:39 +0000 (16:25 +0000)] 
Fix a longstanding issue with MFC-R2 configuration that prevented users
from mixing different variants or general MFC-R2 settings within the same E1 line.

Most users do not have a problem with this since MFC-R2 lines are usually fractional E1s, or
the whole E1 has the same country variant and R2 settings.

In Venezuela however is common to have inbound MFC-R2 and outbound DTMF-R2 within the same E1.

This fix now properly parses the chan_dahdi.conf file to generate a new openr2 context every
time a new channel => section is found and the configuration was changed.

(closes issue ASTERISK-21117)
Reported by: Rafael Angulo
Related Elastix issue: http://bugs.elastix.org/view.php?id=1612

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@394106 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoastobj2-ify the SLA code
Russell Bryant [Wed, 10 Jul 2013 01:41:42 +0000 (01:41 +0000)] 
astobj2-ify the SLA code

The SLA code within app_meetme was written before asotbj2 had been
merged into Asterisk.  Worse, support for reloads did not exist at first
and was added later as a bolt-on feature.  I knew at the time that
reloading was not safe at all while SLA was in use, so the reload would
be queued up to execute when the system was idle.  Unfortunately, this
approach was still prone to errors beyond the fact that this was the
only place in Asterisk where configuration was not reloaded
instantly when requested.

This patch converts various SLA objects to be reference counted objects
using astobj2.  This allows reloads to be processed while the system is
in use.  The code ensures that the objects will not disappear while one
of the other threads is using them.  However, they will be immediately
removed from the global trunk and station containers so no new calls
will use them if removed from configuration.

Review: https://reviewboard.asterisk.org/r/2581/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@393928 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_dahdi: Fix segfault reloading chan_dahdi when round robin is used.
Richard Mudgett [Wed, 3 Jul 2013 23:27:52 +0000 (23:27 +0000)] 
chan_dahdi: Fix segfault reloading chan_dahdi when round robin is used.

* Clear round_robin[] in dahdi_restart().

(closes issue ASTERISK-21847)
Reported by: Ivo Andonov
Patches:
      jira_asterisk_21847_v1.8.patch (license #5621) patch uploaded by rmudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@393627 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_mixmonitor: Fix crashes caused by unloading app_mixmonitor
Jonathan Rose [Fri, 14 Jun 2013 16:14:48 +0000 (16:14 +0000)] 
app_mixmonitor: Fix crashes caused by unloading app_mixmonitor

Unloading app_mixmonitor while active mixmonitors were running would
cause a segfault. This patch fixes that by making it impossible to
unload app_mixmonitor while mixmonitors are active.

Review: https://reviewboard.asterisk.org/r/2624/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391778 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix memory leak while loading priority modules
Matthew Jordan [Wed, 12 Jun 2013 02:19:52 +0000 (02:19 +0000)] 
Fix memory leak while loading priority modules

When we load a module with the LOAD_PRIORITY flag, we remove its entry from
the load order list. Unfortunately, we don't free the memory associated with
entry in the list. This patch corrects that and properly frees the memory for
the module in the list.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391489 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoIAX2: Transfer Reject: Lock bridgecallno before touching it, refactor
Alec L Davis [Tue, 11 Jun 2013 08:03:38 +0000 (08:03 +0000)] 
IAX2: Transfer Reject: Lock bridgecallno before touching it, refactor

1). When touching the bridgecallno, we need to lock it.

2). Remove magic number '0' and replace with TRANSFER_NONE.

3). Exit early if no bridgecallno.

4). Reduce indentation.

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2613/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391333 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd announce-to-first-user option for app_queue
Matthew Jordan [Mon, 10 Jun 2013 14:15:19 +0000 (14:15 +0000)] 
Add announce-to-first-user option for app_queue

In r386792, the ability to play prompts to the first caller in a call queue was
added. While this is arguably a bug fix for those who expect the first caller
to continue receiving prompts while the agent is dialed, it has the side effect
of preventing the first caller from hearing the agent immediately upon
bridging. This may not be a problem for those who really want this option, but
for those who didn't care whether or not the first caller in queue heard their
position, it was an issue.

This patch disables the ability for the first caller in the queue to hear
prompts and adds a new option, announce-to-first-user, to queues.conf. Those
who the behavior can enable it by setting this value to True.

Note that if we ever implement the ability to have the prompts be stopped
upon bridging, this option can be removed.

(closes issue ASTERISK-21782)
Reported by: Remi Quezada

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391215 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_iax2: nativebridge refactor, missed unlock bridgecallno
Alec L Davis [Mon, 10 Jun 2013 09:30:11 +0000 (09:30 +0000)] 
chan_iax2: nativebridge refactor, missed unlock bridgecallno

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391143 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agofix bad edit after conflict resolution
Alec L Davis [Mon, 10 Jun 2013 08:32:34 +0000 (08:32 +0000)] 
fix bad edit after conflict resolution

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391107 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoIAX2: refactor nativebridge transfer
Alec L Davis [Mon, 10 Jun 2013 07:56:49 +0000 (07:56 +0000)] 
IAX2: refactor nativebridge transfer

remove triple checking of iaxs[fr->callno]->transferring

reduce indentation.

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2602/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391065 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoIAX2: fix race condition with nativebridge transfers.
Alec L Davis [Mon, 10 Jun 2013 07:30:35 +0000 (07:30 +0000)] 
IAX2: fix race condition with nativebridge transfers.

1). When touching the bridgecallno, we need to lock it.

2). stop_stuff() which calls iax2_destroy_helper()
    Assumes the lock on the pvt is already held, when iax2_destroy_helper() is called.
    Thus we need to lock the bridgecallno pvt before we call stop_stuff(iaxs[fr->callno]->bridgecallno);

3).   When evaluating the state of 'callno->transferring' of the current leg,
    we can't change it to READY unless the bridgecallno is locked.
      Why, if we are interrupted by the other call leg before 'transferring = TRANSFER_RELEASED',
    the interrupt will find that it is READY and that the bridgecallno is also READY so Releases the legs.

(closes issue ASTERISK-21409)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2594/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391062 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoreject call attempts when gatekeeper is configured but not registered
Alexandr Anikin [Fri, 31 May 2013 08:10:30 +0000 (08:10 +0000)] 
reject call attempts when gatekeeper is configured but not registered

(closes issue ASTERISK-21800)
Reported by: Dmitry Melekhov
Patches:
        ASTERISK-21800-1.patch
Tested by: Dmitry Melekhov

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@390181 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix segfault when dealing with chan_agent channels.
Richard Mudgett [Wed, 29 May 2013 20:10:04 +0000 (20:10 +0000)] 
Fix segfault when dealing with chan_agent channels.

Check the returned bridged pointer for NULL to avoid a crash.  It looks
like chan_agent is returning a NULL pointer when it probably should be
returning a pointer to the channel the Agent channel is pretending to be.

(closes issue ASTERISK-21793)
Reported by: Rodrigo P. Telles
Patches:
      jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Rodrigo P. Telles

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@390044 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix a memory copying bug in slinfactory which was causing mixmonitor issues.
Jonathan Rose [Tue, 28 May 2013 17:35:12 +0000 (17:35 +0000)] 
Fix a memory copying bug in slinfactory which was causing mixmonitor issues.

Reported by: Michael Walton
Tested by: Jonathan Rose
Patches:
    slinfactory.c.ASTERISK-21799.patch uploaded by Michael Walton (license 6502)
(closes issue ASTERISK-21799)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@389895 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoPrint all logger messages on shutdown
Matthew Jordan [Fri, 24 May 2013 11:42:38 +0000 (11:42 +0000)] 
Print all logger messages on shutdown

When Asterisk shuts down and shuts down the loggin gsubsystem, any
messages currently in flight will not get logged. This patch prevents the
loop writing messages from breaking out prematurely, such that all of the
messages are logged.

(closes issue ASTERISK-21716)
Reported by: Corey Farrell
patches:
  logger-process-all-messages.patch uploaded by Corey Farrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@389676 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd doxygen.log to svn:ignore property.
Jason Parker [Mon, 20 May 2013 17:43:07 +0000 (17:43 +0000)] 
Add doxygen.log to svn:ignore property.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@389244 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix for segfault in __ast_rwlock_destroy with DEBUG_THREADS
Kevin Harwell [Wed, 15 May 2013 15:54:50 +0000 (15:54 +0000)] 
Fix for segfault in __ast_rwlock_destroy with DEBUG_THREADS

If DEBUG_THREADS is enabled __ast_rwlock_destroy causes a segfault while trying
to access a possible NULL t->track object.  A NULL check has been added before
trying to access the memory.

(closes issue ASTERISK-21724)
Reported by: Corey Farrell
Fixed by: Corey Farrell
Patches:
ast_rwlock_destroy-segv.patch uploaded by Corey Farrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388838 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUse srtp_shutdown when available
Kinsey Moore [Wed, 15 May 2013 12:37:29 +0000 (12:37 +0000)] 
Use srtp_shutdown when available

This allows the SRTP library to be shut down properly when the
functionality is offered by libsrtp.

Review: https://reviewboard.asterisk.org/r/2538/
(closes issue ASTERISK-21719)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388768 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRevert r388529 for now
Kinsey Moore [Mon, 13 May 2013 20:34:36 +0000 (20:34 +0000)] 
Revert r388529 for now

Adding the cleanup function needs some deeper thought since it
apparently doesn't exist for all variants of libsrtp.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388596 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agopbx: Fix lack of cleanup on macrolock and context_table
Jonathan Rose [Mon, 13 May 2013 18:16:21 +0000 (18:16 +0000)] 
pbx: Fix lack of cleanup on macrolock and context_table

(closes issue ASTERISK-21723)
Reported by: Corey Farrell
Patches:
    core-pbx-cleanup.patch uploaded by Correy Farrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388532 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoClose libsrtp properly
Kinsey Moore [Mon, 13 May 2013 18:05:11 +0000 (18:05 +0000)] 
Close libsrtp properly

Ensure that libsrtp is shutdown properly when res_srtp is unloaded.

(closes issue ASTERISK-21719)
Reported by: Corey Farrell
Patches:
    res_srtp-library-shutdown.patch uploaded by Corey Farrell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix SendText AMI action to never return non-zero.
Richard Mudgett [Mon, 13 May 2013 14:24:47 +0000 (14:24 +0000)] 
Fix SendText AMI action to never return non-zero.

AMI actions must never return non-zero unless they intend to close the AMI
connection.  (Which is almost never.)

(closes issue ASTERISK-21779)
Reported by: Paul Goldbaum

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAllow mISDN to send PROGRESS messsage.
Richard Mudgett [Fri, 10 May 2013 22:09:32 +0000 (22:09 +0000)] 
Allow mISDN to send PROGRESS messsage.

* Made isdn_msg_parser.c build a progress message with the mandatory
progress indicator IE.  (The mISDNuser NT state machine rejected sending
the incomplete message.)

Note: The associated mISDN and mISDNuser patches respectively are viewable
here:
http://svnview.digium.com/svn/thirdparty?view=rev&rev=200
http://svnview.digium.com/svn/thirdparty?view=rev&rev=201

(closes issue AST-1153)
Reported by: Guenther Kelleter
Patches:
      progress-chan_misdn.diff (license #6372) patch uploaded by Guenther Kelleter
      progress-misdn.diff (license #6372) mISDN patch uploaded by Guenther Kelleter
      progress-misdnuser.diff (license #6372) mISDNuser patch uploaded by Guenther Kelleter

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388425 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd version.c to list of ignored files in the utils directory.
Richard Mudgett [Fri, 10 May 2013 21:40:59 +0000 (21:40 +0000)] 
Add version.c to list of ignored files in the utils directory.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388423 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix memory leak in pbx_dundi
Mark Michelson [Fri, 10 May 2013 20:28:29 +0000 (20:28 +0000)] 
Fix memory leak in pbx_dundi

pbx_dundi added an io context without removing
it. This caused a memory leak when the module was
unloaded.

(closes ASTERISK-21718)
Reported by Corey Farrell
Patches:
pbx_dundi-ast_io_remove.patch uploaded by Corey Farrell (License #5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388376 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix The Payload Being Set On CN Packets And Do Not Set Marker Bit
Michael L. Young [Thu, 9 May 2013 03:58:42 +0000 (03:58 +0000)] 
Fix The Payload Being Set On CN Packets And Do Not Set Marker Bit

When we send out a CN packet (for instance, in the case of using rtpkeepalives),
we are not setting the payload code properly.  Also, we are setting the marker
bit when we shouldn't be according to RFC 3389, section 4.

AST_RTP_CN is not defined by AST_FORMAT codes.  Therefore, we should be using
ast_rtp_codecs_payload_code() rather than ast_rtp_codecs_payload_lookup().

11 and trunk already use the appropriate function.

* In 1.8, use ast_rtp_codecs_payload_code()

* Remove the setting of the marker bit

* Fix the debug message by incrementing the seqno after the debug message is set
  in order to display the correct seqno that was sent out

(closes issue ASTERISK-21246)
Reported by: Peter Katzmann
Tested by: Peter Katzmann, Michael L. Young
Patches:
    asterisk-21246-rtp-cng-payload-error_1.8_v2.diff
                                     uploaded by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2500/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@388111 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_sip: NOTIFYs for BLF start queuing up and fail to be sent out after retries...
Alec L Davis [Wed, 8 May 2013 07:17:17 +0000 (07:17 +0000)] 
chan_sip: NOTIFYs for BLF start queuing up and fail to be sent out after retries fail

RFC6665 4.2.2: ... after a failed State NOTIFY transaction remove the subscription

The problem is that the State Notify requests rely on the 200OK reponse for pacing control
and to not confuse the notify susbsystem.
The issue is, the pendinginvite isn't cleared if a response isn't received,
thus further notify's are never sent.

The solution, follow RFC 6665 4.2.2's 'SHOULD' and remove the subscription after failure.

(closes issue ASTERISK-21677)

Reported by: Dan Martens
Tested by: Dan Martens, David Brillert, alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2475/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@387875 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMake SLA reload more paranoid.
Russell Bryant [Mon, 6 May 2013 15:52:16 +0000 (15:52 +0000)] 
Make SLA reload more paranoid.

Reload support was originally not included for SLA.  It was added later,
but in a fairly non-traditional way.  It basically sets a flag
indicating that a reload is pending, and then waits for a time where it
thinks everything SLA related is idle and unused, and *then* executes
the reload.  It does this because the reload process is destructive.  It
starts by throwing everything away and starting over.

There are a number of problems with this approach.  One of them is that
the check to see if anything in use was incomplete.  This patch makes it
more complete and thus less likely for a crash to occur during reload
processing.  However, this approach still has problems so some much more
significant reworking of this code will need to come in as a next step.

Patch credit and testing by CoreDial, LLC.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@387688 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUpdate utils Makefile to handle r387294
Matthew Jordan [Thu, 2 May 2013 17:11:20 +0000 (17:11 +0000)] 
Update utils Makefile to handle r387294

Alec's patch that added the Asterisk version to 'core show locks' angered the
items in utils, as they exist somewhat outside of the Asterisk build system.
Some day, this Makefile should get nuked from high orbit, but for now, include
version.c in its list of stuff to pile in.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@387421 65c4cc65-6c06-0410-ace0-fbb531ad65f3