]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
13 years agoA long time ago in a galaxy far far away a IPv6 update was made,
Gregory Nietsky [Mon, 19 Sep 2011 13:27:52 +0000 (13:27 +0000)] 
A long time ago in a galaxy far far away a IPv6 update was made,
chan_h323 was not updated causeing all to flee to chan_ooh323.

the brave Jedi [asterisk developers] pondered this miscarrige of justice
and restored order to the force for the sake of closing out 2 old issues.

(closes issue ASTERISK-17278)
(closes issue ASTERISK-17500)
Reported by: dread, sybasesql
Tested by: irroot
Reviewed by: IRC (russellb, kpfleming)

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

13 years agoMake sure manager_debug option is reset at reload
Olle Johansson [Mon, 19 Sep 2011 12:06:48 +0000 (12:06 +0000)] 
Make sure manager_debug option is reset at reload

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

13 years agoRevert accidental change that fixes OS/X Lion support
Olle Johansson [Mon, 19 Sep 2011 10:02:07 +0000 (10:02 +0000)] 
Revert accidental change that fixes OS/X Lion support

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

13 years agoAdd missing unlock at MWI message sending time
Olle Johansson [Mon, 19 Sep 2011 09:40:44 +0000 (09:40 +0000)] 
Add missing unlock at MWI message sending time

(closes issue ASTERISK-18573)

Patches:
   sip_mwi_lock.patch (license #5041) by Gregory Hinton Nietsky

Thanks to irrot for the reminder, to Gregory for the patch!

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

13 years agoWhitespace fix
Terry Wilson [Fri, 16 Sep 2011 22:10:56 +0000 (22:10 +0000)] 
Whitespace fix

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

13 years agoAdd missing frame types to func_frame_trace
Terry Wilson [Fri, 16 Sep 2011 22:04:25 +0000 (22:04 +0000)] 
Add missing frame types to func_frame_trace

Also casts control frames to the proper enum so that the compile will catch
new additions.

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

13 years agoFix bad RTP media bridges in directmedia calls on peers separated by multiple Asteris...
Jonathan Rose [Fri, 16 Sep 2011 19:53:40 +0000 (19:53 +0000)] 
Fix bad RTP media bridges in directmedia calls on peers separated by multiple Asterisk nodes.

In a situation involving devices on separate Asterisk trunks, the remote RTP bridge would
break when starting a call with directmedia. This patch queues a new type of control frame
so that our RTP bridge loop can properly detect when these situations occur and check to see
if peers need to be updated in order to send their media to the proper location.

(Closes issue ASTERISK-18340)
Reported by: Thomas Arimont
(Closes issue ASTERISK-17725)
Reported by: kwk
Tested by: twilson, jrose

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

13 years agoMake a note that inotify won't work with an NFS mounted spooler directory.
Sean Bright [Fri, 16 Sep 2011 19:06:27 +0000 (19:06 +0000)] 
Make a note that inotify won't work with an NFS mounted spooler directory.

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

13 years agoThe round robin routing routine in chan_misdn.c is broken.
Gregory Nietsky [Fri, 16 Sep 2011 10:09:17 +0000 (10:09 +0000)] 
The round robin routing routine in chan_misdn.c is broken.

it rotates between ports but never checks the channels in the ports.

i have extensivly tested it and verified it works on 1 upto 4 ports.
before the patch only 1 out of each port was used now all are used as
expected.

(closes issue ASTERISK-18413)
Reported by: irroot
Tested by: irroot
Reviewed by: irroot

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

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

13 years agoLocking order in app_queue.c causes deadlocks.
Gregory Nietsky [Thu, 15 Sep 2011 15:46:21 +0000 (15:46 +0000)] 
Locking order in app_queue.c causes deadlocks.

a channel lock must never be held with the queues container lock held.

the deadlock occured on masquerade.

the queues container lock is a relic of the past the old queue module lock.
with ao2 there is no need to hold this lock when dealing with members this
patch removes unneeded locks.

(closes issue ASTERISK-18101)
(closes issue ASTERISK-18487)
Reported by: Paul Rolfe, Jason Legault
Tested by: irroot, Jason Legault, Paul Rolfe
Reviewed by: Matthew Nicholson

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

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

13 years agolock the channel before calling ast_bridged_channel() to prevent a seg fault.
Gregory Nietsky [Thu, 15 Sep 2011 08:15:22 +0000 (08:15 +0000)] 
lock the channel before calling ast_bridged_channel() to prevent a seg fault.

AMI agents list called on shutdown causes a segfault, introducing proper locking
will prevent this.

(closes issue ASTERISK-18092)

Reported by: agustina
Patches: chan_agent.patch (License #5041) patch uploaded by irroot

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

13 years agoRemove unnecessary libpri dependency checks in the configure script.
Richard Mudgett [Wed, 14 Sep 2011 18:21:35 +0000 (18:21 +0000)] 
Remove unnecessary libpri dependency checks in the configure script.

Using the --with-pri option with the configure script generated an error
about not having PRI_L2_PERSISTENCE if you did not have the absolute
latest libpri SVN checkout installed.

The AST_EXT_LIB_SETUP_DEPENDENT macro in the configure.ac script seems to
be for libraries that are dependent upon other libraries and not
necessarily for optional/added features within a library.

(closes issue ASTERISK-18535)
Reported by: Michael Keuter

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

13 years agoFixed cut-n-paste regression using the wrong variable.
Richard Mudgett [Wed, 14 Sep 2011 15:53:25 +0000 (15:53 +0000)] 
Fixed cut-n-paste regression using the wrong variable.

Fixes the missing DAHDI channels when using the newer chan_dahdi.conf
sections for channel configuration.

(closes issue ASTERISK-18496)
Reported by: Sean Darcy
Patches:
      jira_asterisk_18496_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Sean Darcy, rmudgett

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

13 years agoThe tech and data members of fast_originate_helper are not string fields.
Matthew Nicholson [Wed, 14 Sep 2011 13:28:16 +0000 (13:28 +0000)] 
The tech and data members of fast_originate_helper are not string fields.

ASTERISK-17709

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

13 years agoRemove obsolete todo comment about PICKUPRESULT.
Richard Mudgett [Tue, 13 Sep 2011 22:10:15 +0000 (22:10 +0000)] 
Remove obsolete todo comment about PICKUPRESULT.

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

13 years agodo parse defaultlanguage from asterisk.conf
Tzafrir Cohen [Tue, 13 Sep 2011 21:33:20 +0000 (21:33 +0000)] 
do parse defaultlanguage from asterisk.conf

Do parse the option "defaultlanguage" from the [options] section of
asterisk.conf, as in the sample config file. Otherwise the build-time
default language (normally "en") is always the default one.

Review: https://reviewboard.asterisk.org/r/1342/
Signed-off-by: Tzafrir Cohen (License #5035) <tzafrir.cohen@xorcom.com>
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@335716 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMeetme should have 'core' support level
Paul Belanger [Tue, 13 Sep 2011 21:30:18 +0000 (21:30 +0000)] 
Meetme should have 'core' support level

(closes issue ASTERISK-18542)

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

13 years agoMove mandatory checks closer to the beginning of the file.
Tilghman Lesher [Tue, 13 Sep 2011 18:52:38 +0000 (18:52 +0000)] 
Move mandatory checks closer to the beginning of the file.

If these are going to fail, they should fail as quickly as possible.

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

13 years agoDon't limit the size of appdata for manager originate actions.
Matthew Nicholson [Tue, 13 Sep 2011 18:20:52 +0000 (18:20 +0000)] 
Don't limit the size of appdata for manager originate actions.

ASTERISK-17709
Patch by: tilghman (with modifications)

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

13 years agoFix a crash in res_ais.
Russell Bryant [Tue, 13 Sep 2011 07:11:36 +0000 (07:11 +0000)] 
Fix a crash in res_ais.

This patch resolves a crash observed in a load testing environment that
involved the use of the res_ais module.  I observed some crashes where
the event delivery callback would get called, but the length parameter
incidcating how much data there was to read was 0.  The code assumed
(with good reason I would think) that if this callback got called, there
was an event available to read.  However, if the rare case that there's
nothing there, catch it and return instead of blowing up.

More specifically, the change always ensure that the size of the received
event in the cluster is always big enough to be a real ast_event.

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

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

13 years agoProperly set caller_warning and callee_warning before we try to use them.
Matthew Nicholson [Mon, 12 Sep 2011 15:54:41 +0000 (15:54 +0000)] 
Properly set caller_warning and callee_warning before we try to use them.

ASTERISK-18199
Patch by: elguero
Testing by: rtang

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

13 years agoPrevent a race condition when the bridge technology changes. This change was
Matthew Nicholson [Mon, 12 Sep 2011 15:49:24 +0000 (15:49 +0000)] 
Prevent a race condition when the bridge technology changes. This change was
ported from asterisk 10.

ASTERISK-18155

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

13 years agoEnsure frames are not written to dialed channel if ringback is requested
Kinsey Moore [Mon, 12 Sep 2011 14:21:17 +0000 (14:21 +0000)] 
Ensure frames are not written to dialed channel if ringback is requested

When a single channel was dialed and there was media to be forwarded to the
calling channel, the media was written without regard for ringback causing
silence to be heard in some circumstances.  This regression was introduced
when the meaning of "single" changed to mean only the number of channels
dialed.

(closes issue ASTERISK-18083)

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

13 years agoPrevent IAX2 from getting IPv6 addresses via DNS
Kinsey Moore [Mon, 12 Sep 2011 13:25:42 +0000 (13:25 +0000)] 
Prevent IAX2 from getting IPv6 addresses via DNS

IAX2 does not support IPv6 and getting such addresses from DNS can cause error
messages on the remote end involving bad IPv4 address casts in the presence of
IPv6/IPv4 tunnels.  This patch ensures that IAX2 will not encounter IPv6
addresses via DNS queries.

(closes issue ASTERISK-18090)

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

13 years agoLock the peer->mvipvt to avoid crashes with SIP history enabled
Olle Johansson [Mon, 12 Sep 2011 13:25:30 +0000 (13:25 +0000)] 
Lock the peer->mvipvt to avoid crashes with SIP history enabled

After the launch of 1.6 event-based MWI we have two threads handling the peer->mwipvt,
which cause issues with SIP history additions in combination with the max limit for
number of history entries.

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

(closes issue ASTERISK-18288)

Thanks to irrot for peer review. Work with this bug funded by IPvision AS

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

13 years agobuild_peer doesnt unlink a peer object from peers_by_ip container which leads to...
Stefan Schmidt [Mon, 12 Sep 2011 11:09:19 +0000 (11:09 +0000)] 
build_peer doesnt unlink a peer object from peers_by_ip container which leads to a wrong refcounter value.
adding an ao2_unlink from the peers_by_ip container fix it.

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

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

13 years agoUpdated SIP 484 handling; added Incomplete control frame
Matthew Jordan [Fri, 9 Sep 2011 16:09:09 +0000 (16:09 +0000)] 
Updated SIP 484 handling; added Incomplete control frame

When a SIP phone uses the dial application and receives a 484 Address
Incomplete response, if overlapped dialing is enabled for SIP, then
the 484 Address Incomplete is forwarded back to the SIP phone and the
HANGUPCAUSE channel variable is set to 28.  Previously, the Incomplete
application dialplan logic was automatically triggered; now, explicit
dialplan usage of the application is required.

Additionally, this patch adds a new AST_CONTOL_FRAME type called
AST_CONTROL_INCOMPLETE.  If a channel driver receives this control frame,
it is an indication that the dialplan expects more digits back from the
device.  If the device supports overlap dialing it should attempt to
notify the device that the dialplan is waiting for more digits; otherwise,
it can handle the frame in a manner appropriate to the channel driver.

(closes issue ASTERISK-17288)
Reported by: Mikael Carlsson
Tested by: Matthew Jordan

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

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

13 years agoFix crash with res_fax when MALLOC_DEBUG and "core stop gracefully" are used.
Richard Mudgett [Thu, 8 Sep 2011 22:27:40 +0000 (22:27 +0000)] 
Fix crash with res_fax when MALLOC_DEBUG and "core stop gracefully" are used.

Asterisk crashes if MALLOC_DEBUG is enabled when res_fax tries to
unregister its logger level.

* Make ast_logger_unregister_level() use ast_free() instead of free().
When MALLOC_DEBUG is enabled, ast_free() does not degenerate into a call
to free().  Therefore, if you allocated memory with a form of ast_malloc
you must free it with ast_free.

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

13 years agoCleanup chan_iax2.c log messages
Paul Belanger [Wed, 7 Sep 2011 19:35:52 +0000 (19:35 +0000)] 
Cleanup chan_iax2.c log messages

Review: https://code.asterisk.org/code/cru/CR-AST-11

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

13 years agoFix AMI action Park crash.
Richard Mudgett [Wed, 7 Sep 2011 19:31:44 +0000 (19:31 +0000)] 
Fix AMI action Park crash.

* Made AMI action Park not say anything to the parker channel (AMI header
Channel2) since the AMI action is a third party parking the call.  (This
is a change in behavior that cannot be preserved without a lot of effort.)

* Made not play pbx-parkingfailed if the Park 's' option is used.

JIRA AST-660

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

13 years agoAdding the Feature to sent a Reason Header in a SIP Cancel message by set the flag...
Stefan Schmidt [Wed, 7 Sep 2011 13:26:50 +0000 (13:26 +0000)] 
Adding the Feature to sent a Reason Header in a SIP Cancel message by set the flag AST_FLAG_ANSWERED_ELSEWHERE before doing a masquerade in the pickup function.

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

13 years agoperoid typo
Alec L Davis [Wed, 7 Sep 2011 08:12:49 +0000 (08:12 +0000)] 
peroid typo

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

13 years agoPrevent segfault if call arrives before Asterisk is fully booted.
Alec L Davis [Wed, 7 Sep 2011 07:33:39 +0000 (07:33 +0000)] 
Prevent segfault if call arrives before Asterisk is fully booted.

Prevent ast_pbx_start and ast_run_start from starting a new thread unless asterisk
is fully booted.

alecdavis (license 585)
Tested by: alecdavis

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

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

13 years agoMake SQL query in app_voicemail.c portable LIMIT is not portable.
Gregory Nietsky [Tue, 6 Sep 2011 13:48:03 +0000 (13:48 +0000)] 
Make SQL query in app_voicemail.c portable LIMIT is not portable.

Regression from r312212

(closes issue ASTERISK-18255)
Reported by: Leif Madsen
Tested by: Leif Madsen

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

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

13 years agoMusicOnHold has extra unref which may lead to memory corruption and crash.
Richard Mudgett [Fri, 2 Sep 2011 20:59:49 +0000 (20:59 +0000)] 
MusicOnHold has extra unref which may lead to memory corruption and crash.

The problem happens when a call is disconnected and you had started a MOH
class that does not use the files mode.  If you define REF_DEBUG and
recreate the problem, it will announce itself with the following warning:
Attempt to unref mohclass 0xb70722e0 (default) when only 1 ref remained,
and class is still in a container!

* Fixed moh_alloc() and moh_release() functions not handling the
state->class reference consistently.

(closes issue ASTERISK-18346)
Reported by: Mark Murawski
Patches:
      jira_asterisk_18346_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Mark Murawski

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

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

13 years agoFix potential memory allocation failure crashes in config.c.
Richard Mudgett [Fri, 2 Sep 2011 17:10:58 +0000 (17:10 +0000)] 
Fix potential memory allocation failure crashes in config.c.

* Added required checks to the returned memory allocation pointers to
prevent crashes.

* Made ast_include_rename() create a replacement ast_variable list node if
the new filename is longer than the available space.  Fixes potential
crash and memory leak.

* Factored out ast_variable_move() from ast_variable_update() so
ast_include_rename() can also use it when creating a replacement
ast_variable list node.

* Made the filename stuffed at the end of the struct a minimum allocated
size in ast_variable_new() in case ast_include_rename() changes the stored
filename.

* Constify struct char pointers pointing to strings stuffed at the end of
the struct for: ast_variable, cache_file_mtime, and ast_config_map.

* Factored out cfmtime_new() to remove inlined code and allow some struct
pointers to become const.

* Removed the list lock from struct cache_file_mtime that was never used.

* Added doxygen comments to several structure elements and better
documented what strings are stuffed at the struct end char array.

* Reworked ast_config_text_file_save() and set_fn() to handle allocation
failure of the include file scratch pad object tracking blank lines.

* Made ast_config_text_file_save() fn[] declared with PATH_MAX to ensure
it is long enough for any filename with path.  Also reduced the number of
container fileset buckets from a rediculus 180,000 to 1023.

JIRA AST-618

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

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

13 years agoRemove 1.6 compatibility documentation from 1.8, as it no longer applies.
Tilghman Lesher [Thu, 1 Sep 2011 17:38:33 +0000 (17:38 +0000)] 
Remove 1.6 compatibility documentation from 1.8, as it no longer applies.

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

13 years agoCreate a local alias for ast_odbc_clear_cache.
Tilghman Lesher [Thu, 1 Sep 2011 17:28:09 +0000 (17:28 +0000)] 
Create a local alias for ast_odbc_clear_cache.

As a function pointer, the reference has to be resolved at load time
irrespective of the RTLD_LAZY flag.  Creating a local alias solves
this problem, because the structure is initialized with that local
function pointer, while the actual function can remain lazily linked
until runtime.

The reason why this is important is because we lazily load function
references during the module loading process, in order to obtain
priority values for each module, ensuring that modules are loaded in
the correct order.  Previous to this change, when this module was
initially loaded, the module loader would emit a symbol resolution
error, because of the above requirement.

Closes ASTERISK-18399 (reported by Mikael Carlsson, fix suggested by
Walter Doekes, patch by me)

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

13 years agoDisable T.38 when we get a invite with image media port set to 0
Matthew Nicholson [Wed, 31 Aug 2011 18:50:33 +0000 (18:50 +0000)] 
Disable T.38 when we get a invite with image media port set to 0

ASTERISK-17678

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

13 years agoNo DAHDI channel available for conference, user introduction disabled.
Richard Mudgett [Wed, 31 Aug 2011 15:57:12 +0000 (15:57 +0000)] 
No DAHDI channel available for conference, user introduction disabled.

The following error will consistently occur when trying to dial into a
MeetMe conference when the server does not have DAHDI hardware installed:

app_meetme.c: No DAHDI channel available for conference, user introduction
disabled (is chan_dahdi loaded?)

While chan_dahdi is loaded correctly during compilation and install of
Asterisk/Dahdi, including associated modules, etc., a chan_dahdi.conf
configuration file in /etc/asterisk is not created by FreePBX if hardware
does not exist, causing MeetMe to be unable to open a DAHDI pseudo
channel.

* Allow chan_dahdi to create a pseudo channel when there is no
chan_dahdi.conf file to load.

(closes issue ASTERISK-17398)
Reported by: Preston Edwards
Patches:
      jira_asterisk_17398_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett

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

13 years agoCall pickup race leaves orphaned channels or crashes.
Richard Mudgett [Wed, 31 Aug 2011 15:20:31 +0000 (15:20 +0000)] 
Call pickup race leaves orphaned channels or crashes.

Multiple users attempting to pickup a call that has been forked to
multiple extensions either crashes or fails a masquerade with a "bad
things may happen" message.

This is the scenario that is causing all the grief:
1) Pickup target is selected
2) target is marked as being picked up in ast_do_pickup()
3) target is unlocked by ast_do_pickup()
4) app dial or queue gets a chance to hang up losing calls and calls
ast_hangup() on target
5) SINCE A MASQUERADE HAS NOT BEEN SETUP YET BY ast_do_pickup() with
ast_channel_masquerade(), ast_hangup() completes successfully and the
channel is no longer in the channels container.
6) ast_do_pickup() then calls ast_channel_masquerade() to schedule the
masquerade on the dead channel.
7) ast_do_pickup() then calls ast_do_masquerade() on the dead channel
8) bad things happen while doing the masquerade and in the process
ast_do_masquerade() puts the dead channel back into the channels container
9) The "orphaned" channel is visible in the channels list if a crash does
not happen.

This patch does the following:

* Made ast_hangup() set AST_FLAG_ZOMBIE on a successfully hung-up channel
and not release the channel lock until that has happened.

* Made __ast_channel_masquerade() not setup a masquerade if either channel
has AST_FLAG_ZOMBIE set.

* Fix chan_agent misuse of AST_FLAG_ZOMBIE since it would no longer work.

(closes issue ASTERISK-18222)
Reported by: Alec Davis
Tested by: rmudgett, Alec Davis, irroot, Karsten Wemheuer

(closes issue ASTERISK-18273)
Reported by: Karsten Wemheuer
Tested by: rmudgett, Alec Davis, irroot, Karsten Wemheuer

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

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

13 years agoCorrect an AMI protocol violation with SIPshowpeer
Kinsey Moore [Wed, 31 Aug 2011 15:18:37 +0000 (15:18 +0000)] 
Correct an AMI protocol violation with SIPshowpeer

The response of SIPshowpeer ends with "\r\n\r\n". Since other commands are
ended by using \r\n this confuses any interfacing script.

(closes issue ASTERISK-17486)

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

13 years agocleanups in ACF/ARJ GK replies processing
Alexandr Anikin [Tue, 30 Aug 2011 21:16:30 +0000 (21:16 +0000)] 
cleanups in ACF/ARJ GK replies processing
fixed long (24 sec) pause if acf/arj proccessed
before ast_cond_wait called to wait this

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

13 years agoRefresh peer address if DNS unavailable at peer creation
Terry Wilson [Mon, 29 Aug 2011 21:38:31 +0000 (21:38 +0000)] 
Refresh peer address if DNS unavailable at peer creation

If Asterisk starts and no DNS is available, outbound registrations will fail
indefinitely. This patch copies the address from the sip_registry struct, which
will be updated, to the peer->addr when necessary.

If dnsmgr is enabled, the registration fails without the patch because even
though the address on the registry is updated via dnsmgr, the address is just
copied on the first try. Since we use ast_sockaddr_copy, dnsmgr can't update
the address that is copied to the sip_pvt or peers.

Closes issue ASTERISK-18000

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

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

13 years agoAdd some do not hold locks notes to channel.h
Richard Mudgett [Mon, 29 Aug 2011 21:06:16 +0000 (21:06 +0000)] 
Add some do not hold locks notes to channel.h

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

13 years agoFix deadlock potential of chan_mobile.c:mbl_ast_hangup().
Richard Mudgett [Mon, 29 Aug 2011 21:05:43 +0000 (21:05 +0000)] 
Fix deadlock potential of chan_mobile.c:mbl_ast_hangup().

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

13 years agoFixed improperly formatted TestEvent AMI message in app_voicemail
Matthew Jordan [Mon, 29 Aug 2011 17:11:15 +0000 (17:11 +0000)] 
Fixed improperly formatted TestEvent AMI message in app_voicemail

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

13 years agoAccidental use of variable client->status instead of client->state in from ASTERISK...
Jonathan Rose [Mon, 29 Aug 2011 15:55:34 +0000 (15:55 +0000)] 
Accidental use of variable client->status instead of client->state in from ASTERISK-18078

(issue ASTERISK-18078)

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

13 years agochan_vpb: remove unused variables (gcc4.6)
Tzafrir Cohen [Sun, 28 Aug 2011 09:49:55 +0000 (09:49 +0000)] 
chan_vpb: remove unused variables (gcc4.6)

GCC 4.6 detects variables that get assined to, but never used later.
Also removes some remmed-out lines that become invalid.

(closes issue ASTERISK-18336)
Signed-off-by: Tzafrir Cohen (License #5035) <tzafrir.cohen@xorcom.com>,
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@333507 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years ago[patch] Buddies are always auto-registered when processing the roster
Jonathan Rose [Fri, 26 Aug 2011 16:19:07 +0000 (16:19 +0000)] 
[patch] Buddies are always auto-registered when processing the roster

Reporter said autoregister flag was ignored for registering 'buddies' which
had a subscription to us. Verified that this was the case and observed how
the patch addressed this and made sure it didn't break anything.

(closes issue ASTERISK-14233)
Reported by: Simon Arlott
Patches:
      asterisk-0015229.patch (license #5756) patch uploaded by Simon Arlott
Tested by: Jonathan Rose

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

13 years agoFixed incorrect pointer copy to structure copy in revision 333339
Matthew Jordan [Fri, 26 Aug 2011 14:36:25 +0000 (14:36 +0000)] 
Fixed incorrect pointer copy to structure copy in revision 333339

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

13 years agoBug fixes for voicemail user emailsubject / emailbody.
Matthew Jordan [Fri, 26 Aug 2011 13:36:36 +0000 (13:36 +0000)] 
Bug fixes for voicemail user emailsubject / emailbody.

This code change fixes a few issues with the voicemail user override of
emailbody and emailsubject, including escaping the strings, potential memory
leaks, and not overriding the voicemail defaults.  Revision 325877 fixed this
for ASTERISK-16795, but did not fix it for ASTERISK-16781.  A subsequent
check-in prevented 325877 from being applied to 10.  This check-in resolves
both issues, and applies the changes to 1.8, 10, and trunk.

(closes issue ASTERISK-16781)
Reported by: Sebastien Couture
Tested by: mjordan

(closes issue ASTERISK-16795)
Reported by: mdeneen
Tested by: mjordan

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

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

13 years agoFix for DESTDIR spaces patch.
Jason Parker [Thu, 25 Aug 2011 19:00:55 +0000 (19:00 +0000)] 
Fix for DESTDIR spaces patch.

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

13 years agoSegfault when publishing device states via XMPP and not connected
Jonathan Rose [Thu, 25 Aug 2011 18:47:42 +0000 (18:47 +0000)] 
Segfault when publishing device states via XMPP and not connected

When using publishing device state with res_jabber, Asterisk will attempt
to send a device state using the unconnected client using iks_send_raw
and crash. This patch checks the validity of the connection before
attempting to send the device state.

(closes issue ASTERISK-18078)
Reported by: Michael L. Young
Patches:
      res_jabber-segfault-pubsub-not-connected2.patch (license #5026) patch uploaded by Michael L. Young
Tested by: Jonathan Rose

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

13 years agoFix installation into directories containing spaces.
Jason Parker [Thu, 25 Aug 2011 15:27:06 +0000 (15:27 +0000)] 
Fix installation into directories containing spaces.

This also vastly simplifies the logic in sounds/Makefile

(Closes issue ASTERISK-18290)
Reported by: Paul Belanger
Review: https://reviewboard.asterisk.org/r/1379/

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

13 years agoMemory Leak in app_queue
Richard Mudgett [Tue, 23 Aug 2011 18:14:01 +0000 (18:14 +0000)] 
Memory Leak in app_queue

The patch that was committed in the 1.6.x versions of Asterisk for
ASTERISK-15862 actually fixed two issues.  One was not applicable to 1.8
but the other is.  queue_leak.patch fixes the portion applicable to 1.8.

(closes issue ASTERISK-18265)
Reported by: Fred Schroeder
Patches:
      queue_leak.patch (license #5049) patch uploaded by mmichelson
Tested by: Thomas Arimont

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

13 years agodefault 'sipstorecause' to no
Matthew Nicholson [Tue, 23 Aug 2011 18:11:50 +0000 (18:11 +0000)] 
default 'sipstorecause' to no

We've decided to disable this feature by default in future 1.8 versions.  This
would be an unexpected behavior change for anyone depending on that SIP_CAUSE
update in their dialplan.

Please refer to the asterisk-dev mailing list more information:
http://lists.digium.com/pipermail/asterisk-dev/2011-August/050626.html

(issue AST-580)

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

13 years agoRevert previous commit. Not ready yet.
Richard Mudgett [Mon, 22 Aug 2011 22:11:54 +0000 (22:11 +0000)] 
Revert previous commit.  Not ready yet.

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

13 years agoSigned
Richard Mudgett [Mon, 22 Aug 2011 22:02:52 +0000 (22:02 +0000)] 
Signed

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

13 years agoMinor code optimizations.
Richard Mudgett [Mon, 22 Aug 2011 21:22:24 +0000 (21:22 +0000)] 
Minor code optimizations.

* Simplify ast_category_browse() logic for easier understanding.

* Remove dead code in ast_variable_delete() and simplify some of its
logic.

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

13 years agoRevert previous commit
Paul Belanger [Mon, 22 Aug 2011 19:41:24 +0000 (19:41 +0000)] 
Revert previous commit

It seems google is still making changes to the protocol.

(issue ASTERISK-18301)

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

13 years agoReference leaks in app_queue.
Richard Mudgett [Mon, 22 Aug 2011 19:32:19 +0000 (19:32 +0000)] 
Reference leaks in app_queue.

* Fixed load_realtime_queue() leaking a queue reference when it overwrites
q when processing a realtime queue.
(issue ASTERISK-18265)

* Make join_queue() unreference the queue returned by
load_realtime_queue() when it is done with the pointer.  The
load_realtime_queue() returns a reference to the just loaded realtime
queue.

* Fixed queues container reference leak in queues_data_provider_get().

* queue_unref() should not return q that was just unreferenced.

* Made logic in __queues_show() and queues_data_provider_get() when
calling load_realtime_queue() easier to understand.

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

13 years agoReview: https://reviewboard.asterisk.org/r/1364/
Matthew Jordan [Mon, 22 Aug 2011 18:15:51 +0000 (18:15 +0000)] 
Review: https://reviewboard.asterisk.org/r/1364/

This update adds a new AMI event, TestEvent, which is enabled when the TEST_FRAMEWORK compiler flag is defined.  It also adds initial usage of this event to app_voicemail.  The TestEvent AMI event is used extensively by the voicemail tests in the Asterisk Test Suite.

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

13 years agoMemory leaks in realtime_multi_xxx() when database access returns error.
Richard Mudgett [Mon, 22 Aug 2011 18:14:59 +0000 (18:14 +0000)] 
Memory leaks in realtime_multi_xxx() when database access returns error.

* Fix realtime_multi_pgsql() configuration memory leak when the database
access returns an error.

* Fix realtime_multi_odbc() configuration category use after free when the
database access returns an error.

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

13 years agoMemory leak reading realtime database variable list.
Richard Mudgett [Mon, 22 Aug 2011 17:00:03 +0000 (17:00 +0000)] 
Memory leak reading realtime database variable list.

Calling ast_load_realtime() can leak the last list node if the read list
only contains empty variable value items.

* Fixed list filter loop in ast_load_realtime() to delete the list node
immediately instead of the next time through the loop.  The next time
through the loop may not happen if the node to delete is the last in the
list.

(issue ASTERISK-18277)
(issue ASTERISK-18265)
Patches:
      jira_asterisk_18265_v1.8_config.patch (license #5621) patch uploaded by rmudgett

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

13 years agoFix outgoing calls in chan_gtalk
Paul Belanger [Sun, 21 Aug 2011 14:31:31 +0000 (14:31 +0000)] 
Fix outgoing calls in chan_gtalk

(closes issue ASTERISK-18301)
Reported by: az1324

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

13 years agoFix possible error on stringification of IPv4-mapped addrs
Terry Wilson [Thu, 18 Aug 2011 21:26:01 +0000 (21:26 +0000)] 
Fix possible error on stringification of IPv4-mapped addrs

The FreeBSD netsock2 test has been failing for a while. We were
pasing sa->len to getnameinfo instead of sa_tmp->len.

ASTERISK-18289

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

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