]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
13 years agoCRC4 in "dahdi show status" gives wrong impression to T1 users
Kinsey Moore [Thu, 18 Aug 2011 19:28:00 +0000 (19:28 +0000)] 
CRC4 in "dahdi show status" gives wrong impression to T1 users

Change CRC4 to CRC in the output of "dahdi show status" so that it can apply in
more situations without confusing users, especially since T1 lines use CRC6
instead of CRC4.

(closes issue AST-471)

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

13 years agoMove BETTER_BACKTRACES out of development mode, as it's useful when DEBUG_THREADS...
Tilghman Lesher [Thu, 18 Aug 2011 14:46:54 +0000 (14:46 +0000)] 
Move BETTER_BACKTRACES out of development mode, as it's useful when DEBUG_THREADS is enabled.

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

13 years agoRe-add support for spaces in pathnames, including now spaces in DESTDIR.
Tilghman Lesher [Wed, 17 Aug 2011 19:21:36 +0000 (19:21 +0000)] 
Re-add support for spaces in pathnames, including now spaces in DESTDIR.

This was initially added to 1.8 prior to release, primarily to support the
standard paths on Mac OS X, but was partially reverted recently in Subversion,
due to the lack of support for spaces in DESTDIR.  This commit restores support
for the standard paths on Mac OS X, and also includes support for spaces in
DESTDIR.

(closes issue ASTERISK-18290)
Reported by: pabelanger

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

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

13 years agoDon't read from a disarmed or invalid timerfd
Terry Wilson [Wed, 17 Aug 2011 17:35:27 +0000 (17:35 +0000)] 
Don't read from a disarmed or invalid timerfd

Numerous isues have been reported for deadlocks that are caused by
a blocking read in res_timing_timerfd on a file descriptor that will
never be written to. This patch adds some checks to make sure that
the timerfd is both valid and armed before calling read().

Should fix: ASTERISK-18142, ASTERISK-18197, ASTERISK-18166, AST-486
AST-495, AST-507 and possibly others.

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

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

13 years agoOutgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.
Richard Mudgett [Wed, 17 Aug 2011 15:51:08 +0000 (15:51 +0000)] 
Outgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.

France Telecom brings layer 2 and layer 1 down on BRI lines when the line
is idle.  When layer 1 goes down Asterisk cannot make outgoing calls and
the HA8 and HB8 cards also get IRQ misses.

The inability to make outgoing calls is because the line is in red alarm
and Asterisk will not make calls over a line it considers unavailable.
The IRQ misses for the HA8 and HB8 card are because the hardware is
switching clock sources from the line which just brought layer 1 down to
internal timing.

There is a DAHDI option for the B410P card to not tell Asterisk that layer
1 went down so Asterisk will allow outgoing calls: "modprobe wcb4xxp
teignored=1".  There is a similar DAHDI option for the HA8 and HB8 cards:
"modprobe wctdm24xxp bri_teignored=1".  Unfortunately that will not clear
up the IRQ misses when the telco brings layer 1 down.

* Add layer 2 persistence option to customize the layer 2 behavior on BRI
PTMP lines.  The new option has three settings: 1) Use libpri default
layer 2 setting.  2) Keep layer 2 up.  Bring layer 2 back up when the peer
brings it down.  3) Leave layer 2 down when the peer brings it down.
Layer 2 will be brought up as needed for outgoing calls.

JIRA AST-598

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

13 years agoprint a warning instructing the user to disable storesipcause if we process 100
Matthew Nicholson [Wed, 17 Aug 2011 14:31:30 +0000 (14:31 +0000)] 
print a warning instructing the user to disable storesipcause if we process 100
or more scheduler entries at a time

AST-580

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

13 years agoFlag test modules as 'core'
Paul Belanger [Tue, 16 Aug 2011 20:10:13 +0000 (20:10 +0000)] 
Flag test modules as 'core'

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

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

13 years agoASTERISK-18067 ASTERISK-15479 - White Space affects mailbox value, multiple MWI subs
Jonathan Rose [Tue, 16 Aug 2011 17:38:19 +0000 (17:38 +0000)] 
ASTERISK-18067 ASTERISK-15479 - White Space affects mailbox value, multiple MWI subs

Before, having multiple subscriptions to mailboxes on a sip peer set via the mailbox
setting in sip.conf would only result in updates being sent on whichever mailbox
triggered the mwi event.  Now all of them get counted regardless.  Also fixes a bug
involving parsing of the mailbox option in sip.conf so that trailing and leading
spaces before/after commas are trimmed.

(closes issue ASTERISK-18067)
Reported by: aragon

(closes issue ASTERISK-15479)
Reported by: Ben Winslow
Patches: chan_sip.c-mwi_multi_mailbox_fix-1.6.2.13.diff (License #5288) patch uploaded by Ben Winslow

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

13 years agoFix multiple parking issues.
Richard Mudgett [Tue, 16 Aug 2011 16:31:36 +0000 (16:31 +0000)] 
Fix multiple parking issues.

JIRA ASTERISK-17183
Multi-parkinglot directs calls to wrong parkinglot.
JIRA ASTERISK-17870
Cannot retrieve parked calls.
JIRA ASTERISK-17430
ParkedCall() with no extension should pickup first available call and does not.
JIRA AST-576
Issues with parking lots

* Removed searching for parking lots by extension.  Parking lots can only
be found by the parking lot name since parking lot access extensions and
spaces are not guaranteed to be unique.

* Added parking_lot_name option to the Park and ParkedCall applications.
Updated documentation for Park and ParkedCall applications.

* Add parkext_exclusive configuration option to make parking entry
extensions specify which parking lot they access.

(closes issue ASTERISK-17183)
Reported by: David Cabrejos
Tested by: rmudgett, David Cabrejos

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

(closes issue ASTERISK-17430)
Reported by: Philippe Lindheimer

JIRA ASTERISK-17452
Parking_offset not used
JIRA AST-624
'next' setting for findslot does nothing

* Reimplemented since findslot feature option broken by -r114655.

(closes issue ASTERISK-17452)
Reported by: David Woolley
Tested by: rmudgett

JIRA ASTERISK-15792
Dialplan continues execution after transfer to park.

This happens for DTMF attended transfer, DTMF blind transfer, and DTMF
one-touch-parking if the party initiating these features also initiated
the call.

* Fixed the return code from the affected builtin features when parking a
call.

(closes issue ASTERISK-15792)
Reported by: Mat Murdock
Tested by: rmudgett, twilson

JIRA AST-607
The courtesytone is not playing to the expected call when picking up a
parked call.

This is mostly a documentation problem.  However, the option is not reset
to the default when features.conf is reloaded.

* Updated features.conf.sample documentation for courtesytone and
parkedplay options.

* Reset the parkedplay option to default when features.conf is reloaded.

JIRA AST-615
AMI Park action followed by features reload results in orphaned channels
in parking lot.

* Reloading features.conf will not touch parking lots that have calls
still parked in them.  Reload again at a later time.

Misc additional fixes:

* Added unit test for parking lot dialplan usage checking.

* Made update connected line when a parked call is retrieved from a
parking lot.

* Made retrieved parked call stop ringing or MOH depending upon how the
call was waiting in the parking lot.

* Made CLI "features show" indicate if the parking lot is enabled for use.

* Added PARKINGDYNEXTEN channel variable to allow dynamic parking lots to
specify the parking lot access extension.

* Made AMI ParkedCalls action ParkedCall events have a Parkinglot header.

* Made AMI ParkedCalls action ParkedCallsComplete event have a Total
header.

* Fixed potential deadlock from AMI Park action holding channel locks
while calling masq_park_call().

* Fixed several places where ast_strdupa() were used inside of loops.
(Mostly fixed by refactoring the loop body into its own function.)

* Fixed copy_parkinglot() copying too much from the source parking lot.
Extracted the parking lot configuration settings into struct
parkinglot_cfg.

* Refactored courtesytone playing code to put the channel not playing the
tone in autoservice.

* Fix when pbx-parkingfailed is played that the other channel is put in
autoservice if it exists.

* Fixed parkinglot reference leak in parked_call_exec() error paths.

* Fixed parkinglot_unref() use of parkinglot after it was unreffed.

* Made destroy the struct ast_parkinglot parkings lock when done.

* Refactored the features.conf parking lot configuration code to eliminate
redundancy.

* Fixed feature reload to better protect parking lots.

* Fixed parking lot container reference leak in handle_parkedcalls().

* Fixed the total count in handle_parkedcalls().

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

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

13 years agouse DEFAULT_STORE_SIP_CAUSE to set the default value for the 'storesipcause' option
Matthew Nicholson [Tue, 16 Aug 2011 15:06:31 +0000 (15:06 +0000)] 
use DEFAULT_STORE_SIP_CAUSE to set the default value for the 'storesipcause' option

AST-580

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

13 years agoAdded the 'storesipcause' option to sip.conf to allow the user to disable the
Matthew Nicholson [Tue, 16 Aug 2011 14:20:43 +0000 (14:20 +0000)] 
Added the 'storesipcause' option to sip.conf to allow the user to disable the
setting of HASH(SIP_CAUSE,<chan name>) on the channel.

Having chan_sip set HASH(SIP_CAUSE,<chan name>) on the channel carries a
significant performance penalty because of the usage of the MASTER_CHANNEL()
dialplan function.

AST-580

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

13 years agoFix some minor chan_dahdi config load issues.
Richard Mudgett [Mon, 15 Aug 2011 17:24:08 +0000 (17:24 +0000)] 
Fix some minor chan_dahdi config load issues.

* Address chan_dahdi.conf dahdichan option todo item about needing line
number.

* Make ignore_failed_channels option also apply to dahdichan option.

* Don't attempt to create a default pseudo channel if the chan_dahdi.conf
channel/channels option is not allowed.

* Add a similar check for dahdichan in normal chan_dahdi.conf sections as
is done in users.conf.

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

13 years agoFix noisy message when briding channels
Paul Belanger [Mon, 15 Aug 2011 15:21:16 +0000 (15:21 +0000)] 
Fix noisy message when briding channels

(closes issue ASTERISK-18270)
Reported by: Federico Alves

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

13 years agoFixes locking inversion issues present in the handling of the sip REFER method.
David Vossel [Mon, 15 Aug 2011 15:12:16 +0000 (15:12 +0000)] 
Fixes locking inversion issues present in the handling of the sip REFER method.

(closes issue ASTERISK-18082)
Reported by: James Van Vleet

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

14 years agoUnlock the channel before calling update_queue.
Matthew Nicholson [Fri, 12 Aug 2011 19:01:27 +0000 (19:01 +0000)] 
Unlock the channel before calling update_queue.

Holding the channel lock when calling update_queue which attempts to lock the
queue lock can cause a deadlock. This deadlock involves the following chain:

1. hold chan lock -> wait queue lock
2. hold queue lock -> wait agent list lock
3. hold agent list lock -> wait chan list lock
4. hold chan list lock -> wait chan lock

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

14 years agoSuppress warning message when using DAHDITransfer or DAHDIHangup.
Richard Mudgett [Fri, 12 Aug 2011 18:58:40 +0000 (18:58 +0000)] 
Suppress warning message when using DAHDITransfer or DAHDIHangup.

* The fake event should only be processed by the channel that currently
owns the private and not the associated call waiting or 3-way channel.

JIRA AST-620
JIRA SWP-3616

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

14 years agoAMI actions DAHDIHangup and DAHDITransfer have no effect.
Richard Mudgett [Fri, 12 Aug 2011 17:47:57 +0000 (17:47 +0000)] 
AMI actions DAHDIHangup and DAHDITransfer have no effect.

The AMI actions DAHDIHangup and DAHDITransfer have no effect on a DAHDI
channel.  These two AMI actions are highly specialized to analog channels
and appear to make the channel behave like a jack port for headsets.

* Made the faked DAHDI event get processed before a normal media stream
read in dahdi_read() instead of trying to trigger an exception read by
setting the AST_FLAG_EXCEPTION flag.  Apparently a change was made long
ago that changed how AST_FLAG_EXCEPTION is processed in the core.
Unfortunately, the faked DAHDI events no longer worked when that happened.

* Updated the DAHDI AMI action documentation for the following actions:
DAHDITransfer, DAHDIHangup, DAHDIDialOffhook, DAHDIDNDon, DAHDIDNDoff,
DAHDIShowChannels, and DAHDIRestart.

* Made use sscanf() instead of atoi() for better error checking of the
DAHDIChannel header string.

JIRA AST-620
JIRA SWP-3616

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

14 years agoFix netsock2 multiple zero-expansion test
Terry Wilson [Fri, 12 Aug 2011 16:30:26 +0000 (16:30 +0000)] 
Fix netsock2 multiple zero-expansion test

Remove erroneous single bracket.

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

14 years agoLogger does not warn of failure to open logging channels
Kinsey Moore [Fri, 12 Aug 2011 16:20:25 +0000 (16:20 +0000)] 
Logger does not warn of failure to open logging channels

Currently, logger only prints an error message to stderr when it fails to open
a logger channel where many users will not see it because the logger lock is
held.  The alternative provided by this patch is to log the error to all
attached consoles in the hopes that it will be easier to see.  Additionally,
this patch prevents the failed logger channel from being added to the list
where it would silently fail on each call to the Asterisk logger.

(closes issue ASTERISK-16231)
Review: https://reviewboard.asterisk.org/r/1338

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

14 years agoFixes 32bit compilation warnings brought on by 331634 in app_dial and app_meetme
Jonathan Rose [Fri, 12 Aug 2011 15:49:17 +0000 (15:49 +0000)] 
Fixes 32bit compilation warnings brought on by 331634 in app_dial and app_meetme

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

14 years agoUse proper values for 64-bit option flags.
Jason Parker [Thu, 11 Aug 2011 21:46:39 +0000 (21:46 +0000)] 
Use proper values for 64-bit option flags.

Also, reusing bits es no bueno, so change the value of a duplicate.

(issue ASTERISK-18239)

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

14 years agoSegfault in shell_helper in func_shell.c.
Richard Mudgett [Thu, 11 Aug 2011 21:39:58 +0000 (21:39 +0000)] 
Segfault in shell_helper in func_shell.c.

The return value of popen() was not checked for failure to open.

(closes issue ASTERISK-18109)
JIRA SWP-3633
Reported by: Michael Myles
Tested by: rmudgett

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

14 years agoSIP Notify via AMI or CLI leaks SIP PVTs
Kinsey Moore [Wed, 10 Aug 2011 22:23:08 +0000 (22:23 +0000)] 
SIP Notify via AMI or CLI leaks SIP PVTs

Any SIP notify sent via AMI or CLI leaks a SIP PVT with ref count +2.  Removing
the additional ref just before the invite and adding an unref following it
corrects the issue as seen via REF_DEBUG.  The unref existed in a distant
revision and it appears as though the wrong ref operation was removed.

(closes issue ASTERISK-18091)
Review: https://reviewboard.asterisk.org/r/1332/

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

14 years agoOutput of queue log not started until logger reloaded.
Richard Mudgett [Wed, 10 Aug 2011 20:29:59 +0000 (20:29 +0000)] 
Output of queue log not started until logger reloaded.

ASTERISK-15863 caused a regression with queue logging.  The output of the
queue log is not started until the logger configuration is reloaded.

* Queue log initialization is completely delayed until the first message
is posted to the queue log system.  Including the initial opening of the
queue log file.

* Fixed rotate_file() ROTATE strategy to give the file just rotated out to
the configured exec function after rotate.  Just like the other strategies.

* Fixed logger reload to always post the queue reload entry instead of
just if there is a queue log file.

* Refactored some code to eliminate some redundancy and to reduce stack
utilization.

(closes issue ASTERISK-17036)
JIRA SWP-2952
Reported by: Juan Carlos Valero
Patches:
      jira_asterisk_17036_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett

(closes issue ASTERISK-18208)
Reported by: Christian Pinedo

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

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

14 years agoAMI action ModuleReload returns Error if Module: missing or empty
Kinsey Moore [Wed, 10 Aug 2011 13:47:46 +0000 (13:47 +0000)] 
AMI action ModuleReload returns Error if Module: missing or empty

An empty string was not being checked for properly causing identification of
the module to be reloaded to fail and return an Error with message
"No such module."

(closes issue AST-616)

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

14 years agoMisc minor items found in code.
Richard Mudgett [Tue, 9 Aug 2011 22:12:59 +0000 (22:12 +0000)] 
Misc minor items found in code.

* Add some reentrancy protection in pbx.c when creating the contexts_table
hash table.

* Fix inverted test in chan_sip.c conditional code.

* Fix uninitialized variable and use of the wrong variable in chan_iax2.c.

* Fix test of return value in app_parkandannounce.c.  Explicitly testing
for -1 is bad if the function does not actually return that value when it
fails.

* Fixup some comments and add some curly braces in features.c.

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

14 years agomove ast_cond_signal for admitted call after all data filled/freed
Alexandr Anikin [Tue, 9 Aug 2011 16:13:09 +0000 (16:13 +0000)] 
move ast_cond_signal for admitted call after all data filled/freed
clear all log channels by pointed number not only first
free allocated callToken in ooh323_answer

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

14 years agoRegenerate asterisk man page from sgml.
Jason Parker [Tue, 9 Aug 2011 15:58:16 +0000 (15:58 +0000)] 
Regenerate asterisk man page from sgml.

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

14 years agoIn-queue MOH stops after a periodic announcement
Kinsey Moore [Mon, 8 Aug 2011 20:52:45 +0000 (20:52 +0000)] 
In-queue MOH stops after a periodic announcement

If the seek value is past the end of file when resuming G.722 MOH, MOH will
cease to function for the duration of the MOH session through all starts and
stops until saved state is cleared.  Adjusting the code to guarantee a single
valid read (which is already assumed) fixes the bug.

(closes issue ASTERISK-18077)
Review: https://reviewboard.asterisk.org/r/1328/
Tested-by: Jonathan Rose <jrose@digium.com>
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@331038 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMake libsrtp instructions more explicit when linking fails
Terry Wilson [Thu, 4 Aug 2011 20:29:19 +0000 (20:29 +0000)] 
Make libsrtp instructions more explicit when linking fails

(closes issue ASTERISK-18139)

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

14 years agochange gk client behaivour on rrq/grq failures to setup timers
Alexandr Anikin [Thu, 4 Aug 2011 19:37:16 +0000 (19:37 +0000)] 
change gk client behaivour on rrq/grq failures to setup timers
and next tries after timeout instead of complete failure in the ooh323
stack

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

14 years agoediting files in main/editline does not ensure rebuild of libedit.a
Kinsey Moore [Wed, 3 Aug 2011 15:14:36 +0000 (15:14 +0000)] 
editing files in main/editline does not ensure rebuild of libedit.a

When editing a source file in main/editline, the build system does not rebuild
libedit.a and uses the already existing one instead.  Adding a PHONY to
CHECK_SUBDIR fixes this problem.

(closes issue ASTERISK-16221)
Patch-by: Walter Doekes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330762 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCall pickup broken for DAHDI channels when beginning with #
Kinsey Moore [Wed, 3 Aug 2011 13:38:17 +0000 (13:38 +0000)] 
Call pickup broken for DAHDI channels when beginning with #

The call pickup feature did not work on DAHDI devices for anything other than
feature codes beginning with * since all feature codes in chan_dahdi were
originally hard-coded to begin with *.  This patch is also applied to
chan_dahdi.c to fix this bug with radio modes.

(closes issue AST-621)
Review: https://reviewboard.asterisk.org/r/1336/

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

14 years agoConvert an error message to actually be helpful.
Kevin P. Fleming [Tue, 2 Aug 2011 20:51:56 +0000 (20:51 +0000)] 
Convert an error message to actually be helpful.

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

14 years agoFixes crash in chan_iax2.
David Vossel [Tue, 2 Aug 2011 16:15:08 +0000 (16:15 +0000)] 
Fixes crash in chan_iax2.

Fixes crash in chan_iax2 resulting from an edge case in the
way control frames are queued during calltoken negotiation is complete.

(closes issue ASTERISK-17610)
Reported by: mgrobecker

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

14 years agoOptimization to buffer initialization fix.
David Vossel [Tue, 2 Aug 2011 16:07:02 +0000 (16:07 +0000)] 
Optimization to buffer initialization fix.

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

14 years agoFixes uninitialized string buffer in log message.
David Vossel [Tue, 2 Aug 2011 15:53:21 +0000 (15:53 +0000)] 
Fixes uninitialized string buffer in log message.

(closes issue ASTERISK-17200)
Reported by: lmadsen

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

14 years agoBlocked revisions 330505 via svnmerge
Jonathan Rose [Mon, 1 Aug 2011 21:20:40 +0000 (21:20 +0000)] 
Blocked revisions 330505 via svnmerge

........
  r330505 | jrose | 2011-08-01 16:19:47 -0500 (Mon, 01 Aug 2011) | 3 lines

  fixes reference leak pointed out by rmudgett in https://reviewboard.asterisk.org/r/1337/
........

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

14 years agoBlocked revisions 330490 via svnmerge
Jonathan Rose [Mon, 1 Aug 2011 21:09:15 +0000 (21:09 +0000)] 
Blocked revisions 330490 via svnmerge

........
  r330490 | jrose | 2011-08-01 16:08:10 -0500 (Mon, 01 Aug 2011) | 12 lines

  Asterisk 18103 - Fix reload crash caused by destroying default parking lot

  Default parking lot was being destroyed in reload and was not being rebuilt properly.
  This patch keeps features.c reload from destroying the default parking lot in 1.6.2.
  Bug was caused by a hasty backport which didn't test reload enough times to catch the
  problem.

  (Closes Issue ASTERISK-18103)
  Reported by: 808blogger

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

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

14 years agoIncorrect playback for Spanish in some circumstances
Kinsey Moore [Mon, 1 Aug 2011 15:22:10 +0000 (15:22 +0000)] 
Incorrect playback for Spanish in some circumstances

When you say the time in spanish and it is 01:00 - 01:59 or 13:00 - 13:59 you
must use female pronunciation "1F". The function "say_date_with_format_es" does
not take this in account.

(closes ASTERISK-15016)
Patch-by: Luis Jimenez
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330433 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRemove some redundant locking code in ast_do_masquerade().
Richard Mudgett [Sat, 30 Jul 2011 23:56:29 +0000 (23:56 +0000)] 
Remove some redundant locking code in ast_do_masquerade().

Also updated some comments.

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

14 years agoprevent double masqurading channels when one is been hung up and deadlock avoidance...
Gregory Nietsky [Sat, 30 Jul 2011 15:25:16 +0000 (15:25 +0000)] 
prevent double masqurading channels when one is been hung up and deadlock avoidance is used.

There is a race condition in ast_do_masquerade / ast_hangup (at least)

Reported by me signed off by schmidts with input from David Vossel

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

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

14 years agoCorrect the check for O_RDONLY.
Sean Bright [Fri, 29 Jul 2011 17:18:56 +0000 (17:18 +0000)] 
Correct the check for O_RDONLY.

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

14 years agoOnly write to wav files that were opened to be written to.
Sean Bright [Fri, 29 Jul 2011 16:58:08 +0000 (16:58 +0000)] 
Only write to wav files that were opened to be written to.

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

14 years agoMake console colors work for TERM=xterm-256color
Terry Wilson [Thu, 28 Jul 2011 21:42:41 +0000 (21:42 +0000)] 
Make console colors work for TERM=xterm-256color

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

14 years agoMerged revisions 330033 from
Richard Mudgett [Thu, 28 Jul 2011 17:04:24 +0000 (17:04 +0000)] 
Merged revisions 330033 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

..........
  r330033 | rmudgett | 2011-07-28 11:26:38 -0500 (Thu, 28 Jul 2011) | 15 lines

  Datacalls with B410P fail.

  Incoming and outgoing call legs of a data call are using different
  formats: a-law, u-law.  When the call is bridged, the media stream is run
  through translation to convert the media formats.  The translation is bad
  for data calls.

  * Make incoming call that does not explicitly specify u-law or a-law use
  the DAHDI channel's default law.  The outgoing call always uses the
  default law from the DAHDI channel.

  (closes issue ABE-2800)
  Patches:
jira_abe_2800_companding.patch (license #5621) patch uploaded by rmudgett
..........

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

14 years agoFix a SIP transfer deadlock.
Jason Parker [Thu, 28 Jul 2011 15:45:24 +0000 (15:45 +0000)] 
Fix a SIP transfer deadlock.

The locking in this function is very scary.  There are like 6 structs involved.

(closes issue AST-470)

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

14 years agocheck for CONFIG_STATUS_FILE_INVALID when loading the res_fax config file
Matthew Nicholson [Thu, 28 Jul 2011 15:26:56 +0000 (15:26 +0000)] 
check for CONFIG_STATUS_FILE_INVALID when loading the res_fax config file

Patch by: tzafrir
Reported by: tzafrir
(closes issue ASTERISK-18161)

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

14 years agoMake the output of Externhost in 'sip show settings' more consistent.
Sean Bright [Thu, 28 Jul 2011 11:34:33 +0000 (11:34 +0000)] 
Make the output of Externhost in 'sip show settings' more consistent.

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

14 years agoChange support for ConfBridge() in 1.8 to Extended.
Leif Madsen [Wed, 27 Jul 2011 19:27:14 +0000 (19:27 +0000)] 
Change support for ConfBridge() in 1.8 to Extended.

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

14 years agoExplicitly sort the module list so that the menuselect lists are sorted.
Sean Bright [Wed, 27 Jul 2011 19:17:46 +0000 (19:17 +0000)] 
Explicitly sort the module list so that the menuselect lists are sorted.

(closes issue ASTERISK-18141)
Reported by: Richard Miller
Patches:
sort-order.diff uploaded by seanbright (License #5060)
Tested by: leifmadsen

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

14 years agoFix New Zealand indications profile based on http://www.telepermit.co.nz/TNA102.pdf
Jonathan Rose [Wed, 27 Jul 2011 18:10:30 +0000 (18:10 +0000)] 
Fix New Zealand indications profile based on http://www.telepermit.co.nz/TNA102.pdf

(closes issue ASTERISK-16263)
Reported by: richardf
Patches:
      nz-indications.patch uploaded by richardf (License #6015)

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

14 years agoDuration and billsec are swapped in high resolution time.
Tilghman Lesher [Wed, 27 Jul 2011 04:23:46 +0000 (04:23 +0000)] 
Duration and billsec are swapped in high resolution time.

Closes ASTERISK-18024
Patches:
20110726__ASTERISK-18024.diff by Tilghman Lesher (License 5003)

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

14 years agoChanges sound file for prepend "then-press-pound" to "vm-then-pound" which is the...
Jonathan Rose [Tue, 26 Jul 2011 14:04:55 +0000 (14:04 +0000)] 
Changes sound file for prepend "then-press-pound" to "vm-then-pound" which is the same
prompt, only it turned out "then-press-pound" was part of extra sounds. Also, vm is more
appropriate anyway.

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

14 years agoFixes some voicemail forwarding behavior based around prepend mode.
Jonathan Rose [Tue, 26 Jul 2011 13:25:35 +0000 (13:25 +0000)] 
Fixes some voicemail forwarding behavior based around prepend mode.

Formerly, prepend forwarding would have the user record a message with no useful prompt
and an expectation for the user to push a button on the phone when finished recording.
If a length of silence was detected instead, the recording would be canceled and the user
would re-enter the voicemail forwarding menu. Subsequent time-outs in prepend recording
would also bug out in the sense that they would write over the original message and get
sent to the recipient regardless of whether they timed out or were accepted. This patch
fixes this issue and adds a prompt which will be played after a timeout informing the
user that they needed to press a button. Currently, the sound files that we have are
somewhat inadquate for this, so after the call we simply have Allison say "Please try
again. Then press pound." which actually relies on two separate sound files. Just one
would be more appropriate.

reporter: Vlad Povorozniuc
Review: https://reviewboard.asterisk.org/r/1327/

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

14 years agoDecrease verbose messages to debug, to help clean up CLI.
Paul Belanger [Mon, 25 Jul 2011 19:49:40 +0000 (19:49 +0000)] 
Decrease verbose messages to debug, to help clean up CLI.

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

14 years agoFix memory leak in an allocation error path of handle_statechange().
Richard Mudgett [Fri, 22 Jul 2011 21:10:40 +0000 (21:10 +0000)] 
Fix memory leak in an allocation error path of handle_statechange().

* Make use buffer accessor function in handle_statechange() rather than
directly accessing the struct member.

* Make use less redundant loop construct for iterating over hints.

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

14 years agoDeadlocks dealing with dialplan hints during reload.
Richard Mudgett [Fri, 22 Jul 2011 15:44:58 +0000 (15:44 +0000)] 
Deadlocks dealing with dialplan hints during reload.

There are two remaining different deadlocks reported dealing with dialplan
hints.

The deadlock in ASTERISK-17666 is caused by invalid locking order in
ast_remove_hint().  The hints container must be locked before the hint
object.

The deadlock in ASTERISK-17760 is caused by a catch-22 situation in
handle_statechange().  The deadlock is caused by not having the conlock
before calling the watcher callbacks.  Unfortunately, having that lock
causes a different deadlock as reported in ASTERISK-16961.

* Fixed ast_remove_hint() locking order.

* Made handle_statechange() no longer call the watcher callbacks holding
any locks that matter.

* Made hint ao2 destructor do the watcher callbacks for extension
deactivation to guarantee that they get called.

* Fixed hint reference leak in ast_add_hint() if the callback container
constructor failed.

* Fixed hint reference leak in complete_core_show_hint() for every hint it
found for CLI tab completion.

* Adjusted locking in ast_merge_contexts_and_delete() for safety.

* Added context_merge_lock to prevent ast_merge_contexts_and_delete() and
handle_statechange() from interfering with each other.

* Fixed ast_change_hint() not taking into account that the extension is
used for the hash key.

(closes issue ASTERISK-17666)
Reported by: irroot
Tested by: irroot
JIRA SWP-3318

(closes issue ASTERISK-17760)
Reported by: Byron Clark
Tested by: irroot
JIRA SWP-3393

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

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

14 years agoDocument parkinglot in chan_dahdi.conf.sample.
Richard Mudgett [Thu, 21 Jul 2011 18:04:09 +0000 (18:04 +0000)] 
Document parkinglot in chan_dahdi.conf.sample.

* Document existing feature in chan_dahdi.conf.sample.

* Remove some dead code related to the parkinglot option.

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

14 years agoUpdate PickupChan documentation.
Richard Mudgett [Thu, 21 Jul 2011 17:30:57 +0000 (17:30 +0000)] 
Update PickupChan documentation.

The PickupChan uses the ampersand as the argument separator.
Was documented as:
PickupChan(channel[,channel2[,...][,options]])

Fixed documentation to:
PickupChan(Technology/Resource[&Technology2/Resource2[&...]][,options])

This is a continuation of ASTERISK-17494 for v1.8 and later.

(closes issue ASTERISK-18144)
Reported by: Erik Smith
Patches:
      pickupchan_ducumentation-v2.patch (License #6263) patch uploaded by Erik Smith
Tested by: Erik Smith

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

14 years agoDialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked!
Richard Mudgett [Thu, 21 Jul 2011 16:46:21 +0000 (16:46 +0000)] 
Dialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked!

This appears to be a leftover from when ast_channel was converted to ao2
objects.

Simply removed the extraneous unlock.

(closes issue ASTERISK-17772)

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

14 years agoAsterisk now requires libpri 1.4.11+ for PRI support.
Paul Belanger [Wed, 20 Jul 2011 21:20:36 +0000 (21:20 +0000)] 
Asterisk now requires libpri 1.4.11+ for PRI support.

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

14 years agoBackport useful CLI "pri show channels" command to v1.8.
Richard Mudgett [Wed, 20 Jul 2011 20:52:33 +0000 (20:52 +0000)] 
Backport useful CLI "pri show channels" command to v1.8.

The "pri show channels" command is useful for debuging to see if there are
any stuck B channels.

..........
  r307964 | rmudgett | 2011-02-15 15:42:55 -0600 (Tue, 15 Feb 2011) | 9 lines

  Add CLI "pri show channels" command.

  List the current mapping of DAHDI B channels to Asterisk channel names and
  which calls are on hold or call-waiting.  Calls on hold or call-waiting
  are not associated with any B channel.

  JIRA LIBPRI-27
  JIRA SWP-2547

..........
  r308205 | rmudgett | 2011-02-17 14:21:56 -0600 (Thu, 17 Feb 2011) | 1 line

  Add more verbage to CLI command 'pri show channels' usage.

..........
  r312579 | rmudgett | 2011-04-04 11:17:58 -0500 (Mon, 04 Apr 2011) | 59 lines

  Change also updates 'pri show channels' command with the "chan idle"
  column to report if a channel is available for use.

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

14 years agoWe can't guarantee an eth0 is present
Terry Wilson [Wed, 20 Jul 2011 20:16:58 +0000 (20:16 +0000)] 
We can't guarantee an eth0 is present

FreeBSD test fails on this case presumably because there is no eth0 on the test
machine. Better to just remove this test for now.

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

14 years agoInband DTMF regression
Kinsey Moore [Wed, 20 Jul 2011 19:00:23 +0000 (19:00 +0000)] 
Inband DTMF regression

The functionality of inband DTMF in chan_sip relied upon
ast_rtp_instance_dtmf_mode_get/set not working properly to avoid calling
ast_rtp_instance_dtmf_begin/end on RTP streams with inband DTMF. According to
documentation, ast_rtp_instance_dtmf_begin/end is meant only for RFC2833 DTMF,
never inband.  This fixes the regression introduced in revision 328823.

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

14 years agoRevert partial attempt at handling pathnames with spaces.
Kevin P. Fleming [Tue, 19 Jul 2011 21:29:07 +0000 (21:29 +0000)] 
Revert partial attempt at handling pathnames with spaces.

Revision 299794 attempted to improve the build system to be able to handle
pathnames (primarily DESTDIR) with spaces in them, since this is common on
some platforms (including Mac OSX). Unfortunately, the changes were incomplete
and did not actually provide the desired behavior, and as a side effect the
functionality that ensured that stale headers in the Asterisk 'include' directory
were removed got broken. In addition, the check for stale (and possibly
incompatible) modules in the Asterisk 'modules' directory also got broken, and
would never report any stale modules. Users upgrading to this version or later
versions would then see unexpected module load errors.

Since there are few users who actually want to install Asterisk into paths
that contain spaces, and a proper fix for the build system would take many hours,
the best solution for now is to just revert the partial solution.

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

14 years agoRTP bridge away with inband DTMF and feature detection
Kinsey Moore [Tue, 19 Jul 2011 17:57:18 +0000 (17:57 +0000)] 
RTP bridge away with inband DTMF and feature detection

When deciding whether Asterisk was allowed to bridge the call away from the
core, chan_sip did not take into account the usage of features on dialed
channels that require monitoring of DTMF on channels utilizing inband DTMF.
This would cause Asterisk to allow the call to be locally or remotely bridged,
preventing access to the data required to detect activations of such features.

(closes 17237)
Review: https://reviewboard.asterisk.org/r/1302/

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

14 years agoMeetMe requests a PIN twice in some circumstances
Kinsey Moore [Tue, 19 Jul 2011 15:43:32 +0000 (15:43 +0000)] 
MeetMe requests a PIN twice in some circumstances

If a call to MeetMe includes both the dynamic(D) and always request PIN(P)
options, MeetMe will ask for the PIN two times: once for creating the
conference and once for entering the conference.  This behavior was introduced
in rev 311616 when adding the CONFFLAG_ALWAYSPROMPT option to the logic branch
controlling PIN entry for joining a conference.

(closes AST-601)
Review: https://reviewboard.asterisk.org/r/1305/

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

14 years agoMake AST_LIST_REMOVE safer
Terry Wilson [Tue, 19 Jul 2011 01:35:53 +0000 (01:35 +0000)] 
Make AST_LIST_REMOVE safer

AST_LIST_REMOVE shouldn't modify the element passed in if it isn't found. This
commit also adds linked list unit tests.

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

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

14 years agoapp_dial may double free a channel datastore
Mark Murawki [Mon, 18 Jul 2011 20:47:04 +0000 (20:47 +0000)] 
app_dial may double free a channel datastore

When starting a call with originate, and having the callee channel run Bridge() on pickup, we will double free the dialed_interface_info datastore, causing a crash.  Make sure to check if the datastore still exists before trying to free it.

(closes issue ASTERISK-17917)
Reported by: Mark Murawski
Tested by: Mark Murawski

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

14 years agoIf the sip private structure is null, sip_setoption() will defref the null pointer...
Mark Murawki [Mon, 18 Jul 2011 12:35:57 +0000 (12:35 +0000)] 
If the sip private structure is null, sip_setoption() will defref the null pointer and crash.

Ideally, sip_setoption shouldn't be called if there is a lack of a sip private structure.  But this will fix a crash.

(closes issue ASTERISK-17909)
Reported by: Mark Murawski
Tested by: Mark Murawski

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

14 years agoFixed invalid read and null pointer deref on asterisk shutdown.
Mark Murawki [Mon, 18 Jul 2011 12:06:50 +0000 (12:06 +0000)] 
Fixed invalid read and null pointer deref on asterisk shutdown.

In some cases when starting asterisk with -c and hitting control-c to shutdown, there will be an invalid read and null pointer deref causing a crash.

(closes issue ASTERISK-17927)
Reported by: Mark Murawski
Tested by: Mark Murawski, Kinsey Moore, Tilghman Lesher

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

14 years agoTypo
Tilghman Lesher [Mon, 18 Jul 2011 07:10:15 +0000 (07:10 +0000)] 
Typo

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

14 years agoRevert changes to defaultenabled state for modules in Asterisk 1.8
Leif Madsen [Fri, 15 Jul 2011 20:41:12 +0000 (20:41 +0000)] 
Revert changes to defaultenabled state for modules in Asterisk 1.8

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

14 years agosmall gk processing fixes:
Alexandr Anikin [Fri, 15 Jul 2011 19:22:24 +0000 (19:22 +0000)] 
small gk processing fixes:
- decrease for 1 second registration ttl for very low expirations (some
  providers expire few earlier than TTL)
- delete rrq and registration expire timers on URQ received as we make
  new registration.

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

14 years agoMissing SIP pvt and channel unlock in sip_set_rtp_peer().
Richard Mudgett [Thu, 14 Jul 2011 23:12:06 +0000 (23:12 +0000)] 
Missing SIP pvt and channel unlock in sip_set_rtp_peer().

Regression introduced by -r326144.

Add missing SIP pvt and channel unlock in sip_set_rtp_peer().

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

14 years agoIntroduce <support_level> tags in MODULEINFO.
Leif Madsen [Thu, 14 Jul 2011 20:13:06 +0000 (20:13 +0000)] 
Introduce <support_level> tags in MODULEINFO.
This change introduces MODULEINFO into many modules in Asterisk in order to show
the community support level for those modules. This is used by changes committed
to menuselect by Russell Bryant recently (r917 in menuselect). More information about
the support level types and what they mean is available on the wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States

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

14 years agoMonitor application arguments requirements fixed.
Jonathan Rose [Thu, 14 Jul 2011 19:21:02 +0000 (19:21 +0000)] 
Monitor application arguments requirements fixed.

Monitor was requiring options in spite of no individual option on Monitor being required.

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

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

14 years agoAdd ATXFER_NULL_TECH note in features.conf.sample.
Richard Mudgett [Wed, 13 Jul 2011 18:46:38 +0000 (18:46 +0000)] 
Add ATXFER_NULL_TECH note in features.conf.sample.

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

14 years agoCorrect double-free situation in manager output processing.
Kevin P. Fleming [Tue, 12 Jul 2011 22:53:53 +0000 (22:53 +0000)] 
Correct double-free situation in manager output processing.

The process_output() function calls ast_str_append() and xml_translate() on its
'out' parameter, which is a pointer to an ast_str buffer. If either of these
functions need to reallocate the ast_str so it will have more space, they will
free the existing buffer and allocate a new one, returning the address of the
new one. However, because process_output only receives a pointer to the ast_str,
not a pointer to its caller's variable holding the pointer, if the original
ast_str is freed, the caller will not know, and will continue to use it (and
later attempt to free it).

(reported by jkroon on #asterisk-dev)

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

14 years agosearch in the current context for 'a' and 'o' instead of 'default'
Matthew Nicholson [Tue, 12 Jul 2011 20:07:20 +0000 (20:07 +0000)] 
search in the current context for 'a' and 'o' instead of 'default'

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

14 years agoFix uninstall target, so that modules dir gets cleared again.
Jason Parker [Tue, 12 Jul 2011 19:38:44 +0000 (19:38 +0000)] 
Fix uninstall target, so that modules dir gets cleared again.

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

14 years agoAdded additional checks for mailbox / password beginning with '*' character
Matthew Jordan [Tue, 12 Jul 2011 19:10:34 +0000 (19:10 +0000)] 
Added additional checks for mailbox / password beginning with '*' character

A bug existed such that if a user entered a password with '*', and the extension 'a' did not exist, an invalid mailbox would be created and the user authenticated.  The code was changed to prevent this from occurring, and to prevent users from having mailboxes or passwords defined that begin with the '*' character.

(closes issue ASTERISK-17443)
Reported by: Kevin Scott Adams
Tested by: Matt Jordan

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

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

14 years agoUse 'printf' (POSIX issue 4) instead of 'echo -n', for portability.
Tilghman Lesher [Tue, 12 Jul 2011 15:35:46 +0000 (15:35 +0000)] 
Use 'printf' (POSIX issue 4) instead of 'echo -n', for portability.

The problem with using 'echo -n' is that it is not portable.  While BSD systems
required that the '-n' option be removed and interpreted, System V required
that all strings should be echoed with no interpretation of options.  This
fundamental difference of behavior means that it is never possible to use the
'-n' flag to echo in tests which are meant to be portable.

In this case, on Mac OS X 10.6, the /bin/sh shell builtin 'echo' uses the
System V semantics of the command, and thus the SHELL test failed on that
platform.

http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html#tag_04_41_16

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

14 years agoUpdate chan_gtalk to work with changed GMail-based calls
Terry Wilson [Mon, 11 Jul 2011 19:41:59 +0000 (19:41 +0000)] 
Update chan_gtalk to work with changed GMail-based calls

The messages sent by the GMail client have changed, but include the
old-style messages as well. This patch checks for this case and
uses the old-style offer.

(closes issue ASTERISK-18084)
Review: https://reviewboard.asterisk.org/r/1312/

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

14 years agoreset our buffer each iteration when doing variable substitution
Matthew Nicholson [Mon, 11 Jul 2011 13:53:59 +0000 (13:53 +0000)] 
reset our buffer each iteration when doing variable substitution

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

14 years agoProperly building the Debian armhf (HardFloat) port.
Tzafrir Cohen [Mon, 11 Jul 2011 10:56:23 +0000 (10:56 +0000)] 
Properly building the Debian armhf (HardFloat) port.

Remove the line that should have been removed in r327411.

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

14 years agofix building the Debian armhf (HardFloat) port
Tzafrir Cohen [Mon, 11 Jul 2011 10:46:34 +0000 (10:46 +0000)] 
fix building the Debian armhf (HardFloat) port

Fixes http://buildd.debian-ports.org/status/fetch.php?pkg=asterisk&arch=armhf&ver=1%3A1.8.4.4~dfsg-2&stamp=1309935385
(Missing pthreads)

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

14 years agoAdd .o files to svn:ignore property, since it's only ignored if locally configured...
Jason Parker [Fri, 8 Jul 2011 22:27:14 +0000 (22:27 +0000)] 
Add .o files to svn:ignore property, since it's only ignored if locally configured to do so.

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

14 years agoINVITE 403 Forbidden response always retransmits the maximum times.
Richard Mudgett [Fri, 8 Jul 2011 21:41:58 +0000 (21:41 +0000)] 
INVITE 403 Forbidden response always retransmits the maximum times.

Asterisk sends a 403 Forbidden response if authentication fails for an
INVITE as required.  However, it ignores the ACK and keeps retransmitting
the response.

* Made not delete the to-tag in the dialog so the expected ACK can be
matched with the dialog and stop the retransmissions.

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

14 years agoReset our ast_str before passing it on to dialplan function backends.
Matthew Nicholson [Fri, 8 Jul 2011 19:52:51 +0000 (19:52 +0000)] 
Reset our ast_str before passing it on to dialplan function backends.

It is possible for a dialplan backend to not modify the given buffer or ast_str
and still return success. This causes any previous value stored in the buffer
to be used as if the new function call provided it. Some functions also append
to the given buffer assuming it is empty.

The test_substitution unit test has also been modified to detect this problem.

(closes issue ASTERISK-17878)

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

14 years agoFix an error and add more log message info to help see why this fails on FreeBSD.
Russell Bryant [Fri, 8 Jul 2011 16:00:05 +0000 (16:00 +0000)] 
Fix an error and add more log message info to help see why this fails on FreeBSD.

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

14 years agoResolve some set-but-unused-variable warnings.
Russell Bryant [Fri, 8 Jul 2011 15:28:44 +0000 (15:28 +0000)] 
Resolve some set-but-unused-variable warnings.

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

14 years agoSome code cleanup in pbx.c
Richard Mudgett [Fri, 8 Jul 2011 01:08:05 +0000 (01:08 +0000)] 
Some code cleanup in pbx.c

* Mostly comment and format changes.

* ast_context_remove_extension_callerid() and ast_add_extension_nolock()
will write lock the found specific context.

* ast_context_find() will now tolerate a NULL name.

* Eliminated some inlined versions of find_context() and
find_context_locked().

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

14 years agolibgen.h is also needed on Darwin for basename(3)
Tilghman Lesher [Thu, 7 Jul 2011 19:17:19 +0000 (19:17 +0000)] 
libgen.h is also needed on Darwin for basename(3)

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

14 years agores_odbc patch by tilghman to fix integers with null values
Jonathan Rose [Thu, 7 Jul 2011 16:04:51 +0000 (16:04 +0000)] 
res_odbc patch by tilghman to fix integers with null values

Addresses some improper sql statements in res_odbc that would cause an update to fail on
realtime peers due to trying to set as "(NULL)" rather than an actual NULL.

(closes issue #1922STERISK-17791)
Reported by: marcelloceschia
Patches:
      20110505__issue19223.diff.txt uploaded by tilghman (license 14)

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

14 years agouse sips: or sip: depending on the transport in use when building reply digest
Matthew Nicholson [Thu, 7 Jul 2011 15:28:25 +0000 (15:28 +0000)] 
use sips: or sip: depending on the transport in use when building reply digest
URIs

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

14 years agomake the uri parameter used in reply digests more standards compliant in
Matthew Nicholson [Thu, 7 Jul 2011 15:25:49 +0000 (15:25 +0000)] 
make the uri parameter used in reply digests more standards compliant in
certain cases by prepending "sip:" or "sips:" to it

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

14 years agoReverts fix for timerfd locking issue.
David Vossel [Wed, 6 Jul 2011 15:26:49 +0000 (15:26 +0000)] 
Reverts fix for timerfd locking issue.

jrose discovered a performance issue with this
fix that prevents his analog phones from working
when using timerfd as a timing source.  Until
it is understood what is causing this performance
problem, this patch is being reverted.

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

14 years agoRemoving type attributes, as a change to menuselect makes them no longer necessary.
Tilghman Lesher [Wed, 6 Jul 2011 14:35:01 +0000 (14:35 +0000)] 
Removing type attributes, as a change to menuselect makes them no longer necessary.

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