]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agomanager: Protect data structures during shutdown.
Richard Mudgett [Fri, 24 Jan 2014 17:54:18 +0000 (17:54 +0000)] 
manager: Protect data structures during shutdown.

Occasionally, the manager module would get an "INTERNAL_OBJ: bad magic
number" error on a "core restart gracefully" command if an AMI connection
is established.

* Added ao2_global_obj protection to the sessions global container.

* Fixed the order of unreferencing a session object in session_destroy().

* Removed unnecessary container traversals of the white/black filters
during session_destructor().

(closes issue AST-1242)
Reported by: Guenther Kelleter

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

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

11 years agopbx.c: Pre-initialize timezone to avoid crash on destroy
Scott Griepentrog [Wed, 22 Jan 2014 22:18:03 +0000 (22:18 +0000)] 
pbx.c: Pre-initialize timezone to avoid crash on destroy

In ast_build_timing, initialize the timezone value to NULL
in order to avoid deferencing an uninitialized value later
when calling ast_destroy_timing.  The timezone value could
be uninitialized if ast_build_timing were to fail due to a
zero length time string.

(closes issue ASTERISK-22861)
Reported by: Sebastian Murray-Roberts
Review: https://reviewboard.asterisk.org/r/3134/
Patches:
     ast_build_timing-initialize-timezone.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 406241 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoConfBridge: Fix channel parameter documentation
Kinsey Moore [Wed, 22 Jan 2014 19:31:12 +0000 (19:31 +0000)] 
ConfBridge: Fix channel parameter documentation

Confbridge AMI and CLI commands for mute, unmute, and setting the
single video source can accept channel prefixes in lieu of a full
channel name, but documentation states only that it is required and is
a channel name. This corrects the documentation.

(closes issue PQ-1397)
Reported by: Steve Pitts

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

11 years agochan_sip: Decline image streams on unsupported transports
Kinsey Moore [Wed, 22 Jan 2014 18:30:18 +0000 (18:30 +0000)] 
chan_sip: Decline image streams on unsupported transports

This change allows chan_sip to decline individual image streams over
unsupported transports in the SDP of the 200 response. Previously,
an image stream offer with RTP/AVP as the transport would cause
chan_sip to respond with a 488.

(closes issue ASTERISK-22988)
Reported by: adomjan
Original patch by: adomjan
........

Merged revisions 406170 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agomanager: Clarify eventfilter documentation. Textual changes only.
Walter Doekes [Tue, 21 Jan 2014 21:05:11 +0000 (21:05 +0000)] 
manager: Clarify eventfilter documentation. Textual changes only.

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

Merged revisions 406079 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_mgcp: Enforce locking for oseq
Kinsey Moore [Tue, 21 Jan 2014 19:59:34 +0000 (19:59 +0000)] 
chan_mgcp: Enforce locking for oseq

This restricts direct usage of global oseq so that all accesses are
locked and threads are not racing to get oseq values that they did not
claim.

This also fixes a build error in res_pktccops under dev mode.

(closes issue ASTERISK-23100)
Reported by: adomjan
Patch by: adomjan
........

Merged revisions 406037 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_dahdi/PRI: Suppress CONNECTED_LINE updates when nothing in the udpate is valid.
Richard Mudgett [Mon, 20 Jan 2014 22:04:50 +0000 (22:04 +0000)] 
chan_dahdi/PRI: Suppress CONNECTED_LINE updates when nothing in the udpate is valid.

* Also simplified some subddress handling code.

(closes issue ASTERISK-23008)
Reported by: Michael Cargile
........

Merged revisions 405926 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoDocumentation: doc fixes across various parts of the code for ASTERISK issues 23061...
Rusty Newton [Fri, 17 Jan 2014 15:40:37 +0000 (15:40 +0000)] 
Documentation: doc fixes across various parts of the code for ASTERISK issues 23061,23028,23046,23027

Fixes typos of "transfered" instead of "transferred" in various code. Fixes incorrect gosub param help text for app_queue.
Fixes Asterisk man pages containing unquoted minus signs. Adds note about the "textsupport" option in sip.conf.sample.

(issue ASTERISK-23061)
(issue ASTERISK-23028)
(issue ASTERISK-23046)
(issue ASTERISK-23027)
(closes issue ASTERISK-23061)
(closes issue ASTERISK-23028)
(closes issue ASTERISK-23046)
(closes issue ASTERISK-23027)
Reported by: Eugene, Jeremy Laine, Denis Pantsyrev
Patches:
 transferred.patch uploaded by Jeremy Laine (license 6561)
 hyphen.patch uploaded by Jeremy Laine (license 6561)
 sip.conf.sample.patch uploaded by Eugene (license 6360)
........

Merged revisions 405791 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agomanager: Originate doesn't abort on failed format_cap allocation
Kevin Harwell [Thu, 16 Jan 2014 19:51:17 +0000 (19:51 +0000)] 
manager: Originate doesn't abort on failed format_cap allocation

action_originate responds to the remote system with an error when cap==NULL,
but doesn't return (abort the originate).  Patched to return.

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

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

11 years agores_fax: check_modem_rate() returned incorrect rate for V.27
Kevin Harwell [Thu, 16 Jan 2014 18:57:43 +0000 (18:57 +0000)] 
res_fax: check_modem_rate() returned incorrect rate for V.27

According to the new standard for V.27 and V.32 they are able to transmit
at a bit rate of 4,800 or 9,600.  The check_mode_rate function needed to be
updated to reflect this.  Also, because of this change the default 'minrate'
value was updated to be 4800.

(closes issue ASTERISK-22790)
Reported by: Paolo Compagnini
Patches:
     res_fax.txt uploaded by looserouting (license 6548)
........

Merged revisions 405656 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agocel_manager: Don't crash if configuration file is invalid.
Joshua Colp [Wed, 15 Jan 2014 16:35:30 +0000 (16:35 +0000)] 
cel_manager: Don't crash if configuration file is invalid.

The cel_manager module did not properly handle the case where the
configuration file was invalid. The module will now output a warning
message and disable itself if this occurs.

Reported by: Bryan Walters
........

Merged revisions 405581 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: No BYE message sent after INVITE with Replaces
Scott Griepentrog [Tue, 14 Jan 2014 18:43:56 +0000 (18:43 +0000)] 
chan_sip: No BYE message sent after INVITE with Replaces

Setting channel state DOWN is an unnecessary step that was
only being done in handle_invite_replaces().  This changes
that by removing the call and reducing locking.

(closes issue ASTERISK-23010)
Reported by: Ryan Tilton
Review: https://reviewboard.asterisk.org/r/3116/
........

Merged revisions 405486 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: fix Local From tag on outbound register regression
Scott Griepentrog [Tue, 14 Jan 2014 18:12:52 +0000 (18:12 +0000)] 
chan_sip: fix Local From tag on outbound register regression

In ASTERISK-12117, an improvement to insure consistant local from tags
on outbound registrations resulted in an undesirable behavior - caused
by leftover unexpired sip_pvt dialogs (with the previous cseq number),
resulting in many uncessary REGISTER requests.  Instead of significant
rework of transmit_register(), this change deletes the dialogs after a
200 OK response indiciating a successful registration, keeping the old
dialogs from interfering with normal operation.

(closes issue ASTERISK-22946)
Reported by: Stephan Eisvogel
Review: https://reviewboard.asterisk.org/r/3109/
........

Merged revisions 405433 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoverbosity: Fix performance of console verbose messages.
Richard Mudgett [Tue, 14 Jan 2014 17:26:35 +0000 (17:26 +0000)] 
verbosity: Fix performance of console verbose messages.

The per console verbose level feature as previously implemented caused a
large performance penalty.  The fix required some minor incompatibilities
if the new rasterisk is used to connect to an earlier version.  If the new
rasterisk connects to an older Asterisk version then the root console
verbose level is always affected by the "core set verbose" command of the
remote console even though it may appear to only affect the current
console.  If an older version of rasterisk connects to the new version
then the "core set verbose" command will have no effect.

* Fixed the verbose performance by not generating a verbose message if
nothing is going to use it and then filtered any generated verbose
messages before actually sending them to the remote consoles.

* Split the "core set debug" and "core set verbose" CLI commands to remove
the per module verbose support that cannot work with the per console
verbose level.

* Added a silent option to the "core set verbose" command.

* Fixed "core set debug off" tab completion.

* Made "core show settings" list the current console verbosity in addition
to the root console verbosity.

* Changed the default verbose level of the 'verbose' setting in the
logger.conf [logfiles] section.  The default is now to once again follow
the current root console level.  As a result, using the AMI Command action
with "core set verbose" could again set the root console verbose level and
affect the verbose level logged.

(closes issue AST-1252)
Reported by: Guenther Kelleter

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

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

11 years agochan_sip: Hangup transferer/transferee when transfer to Parking fails
Matthew Jordan [Tue, 14 Jan 2014 15:32:16 +0000 (15:32 +0000)] 
chan_sip: Hangup transferer/transferee when transfer to Parking fails

When performing a SIP transfer to a Park extension, if the Park fails, chan_sip
will currently not hang up either the transferer or the transfer target. This
results in the channels being orphaned with no thread to service frames,
resulting in stuck channels.

This patch immediately hangs up the two channels if a Park fails.

(closes issue ASTERISK-22834)
Reported by: rsw686
Tested by: rsw686

(closes issue ASTERISK-23047)
Reported by: Tommy Thompson
Tested by: Tommy Thomspon

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

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

11 years agores/Makefile: alias dist-clean to distclean
Matthew Jordan [Mon, 13 Jan 2014 21:45:35 +0000 (21:45 +0000)] 
res/Makefile: alias dist-clean to distclean

A 'make distclean' is equivalent to 'make dist-clean' in the top most Makefile.
This patch updates the res/Makefile to recognize both distclean and dist-clean.
Note that this is needed for removing build.mak, which can run into problems
if the source file of Asterisk or its path is changed after build.mak is
generated.

(issue ASTERISK-22480)
Reported by: Matt Jordan

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

11 years agoLogging callid: Fix some sizeof() references per coding guidelines.
Richard Mudgett [Fri, 10 Jan 2014 17:50:40 +0000 (17:50 +0000)] 
Logging callid: Fix some sizeof() references per coding guidelines.

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

11 years agores_rtp_asterisk: Fails to resume WebRTC call from hold
Kevin Harwell [Thu, 9 Jan 2014 16:49:55 +0000 (16:49 +0000)] 
res_rtp_asterisk: Fails to resume WebRTC call from hold

In ast_rtp_ice_start if the ice session create check list failed, start check
was never initiated and ice_started was never set to true.  Upon re-entering
the function (for instance, [un]hold) it would try to create the check list
again with duplicate remote candidates.

Fixed so that if the create check list fails the necessary data structures
are properly re-initialized for any subsequent retries.

Note, it was decided to not stop ice support (by calling ast_rtp_ice_stop) on a
check list failure because it possible things might still work.  However, a
debug message was added to help with any future troubleshooting.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Patches:
     works_on_my_machine.patch uploaded by xytis (license 6558)

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

11 years agoapp_confbridge: Fix crash caused when waitmarked/marked users leave together
Matthew Jordan [Thu, 9 Jan 2014 15:41:31 +0000 (15:41 +0000)] 
app_confbridge: Fix crash caused when waitmarked/marked users leave together

When waitmarked users join a ConfBridge, the conference state is transitioned
from EMPTY -> INACTIVE. In this state, the users are maintined in a waiting
users list. When a marked user joins, the ConfBridge conference transitions
from INACTIVE -> MULTI_MARKED, and all users are put onto the active list of
users. This process works correctly.

When the marked user leaves, if they are the last marked user, the MULTI_MARKED
state does the following:
(1) It plays back a message to the bridge stating that the leader has left the
    conference. This requires an unlocking of the bridge.
(2) It moves waitmarked users back to the waiting list
(3) It transitions to the appropriate state: in this case, INACTIVE

However, because it plays the prompt back to the bridge before moving the users
and before finishing the state transition, this creates a race condition: with
the bridge unlocked, waitmarked users who leave the conference (or are kicked
from it) can cause a state transition of the bridge to another state before
the conference is transitioned to the INACTIVE state. This causes the state
machine to get a bit wonky, often leading to a crash when the MULTI_MARKED state
attempts to conclude its processing.

This patch fixes this problem:
(1) It prevents kicked users from being kicked again. That's just a nicety.
(2) More importantly, it fixes the race condition by only playing the prompt
    once the state has transitioned correctly to INACTIVE. If waitmarked users
    sneak out during the prompt being played, no harm no foul.

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

Note that the patch committed here is essentially the same as uploaded by
Simon Moxon on ASTERISK-22740, with the addition of the double kick prevention.

(closes issue AST-1258)
Reported by: Steve Pitts

(closes issue ASTERISK-22740)
Reported by: Simon Moxon
patches:
  ASTERISK-22740.diff uploaded by Simon Moxon (license 6546)

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

11 years ago"Minimun" typo.
Walter Doekes [Thu, 9 Jan 2014 14:12:40 +0000 (14:12 +0000)] 
"Minimun" typo.
........

Merged revisions 405160 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agopbx_lua: Add support for Lua 5.2
Kinsey Moore [Wed, 8 Jan 2014 16:17:32 +0000 (16:17 +0000)] 
pbx_lua: Add support for Lua 5.2

This adds support for Lua 5.2 in pbx_lua which is available on newer
operating systems.

(closes issue ASTERISK-23011)
Review: https://reviewboard.asterisk.org/r/3075/
Reported by: George Joseph
Patch by: George Joseph
........

Merged revisions 405090 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoUPGRADE: Add a note about non-functionality
Kinsey Moore [Wed, 8 Jan 2014 15:43:45 +0000 (15:43 +0000)] 
UPGRADE: Add a note about non-functionality

Add a note that the "retry on 403 response to REGISTER" for chan_sip is
non-functional in the versions in which it was first introduced.
........

Merged revisions 405088 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoAdd the missing part of r400140
Kinsey Moore [Tue, 7 Jan 2014 20:45:15 +0000 (20:45 +0000)] 
Add the missing part of r400140

When the patch to add retry-on-forbidden-response was committed, part
of the patch for chan_sip was not committed which caused the feature to
be entirely nonfunctional. This corrects the code in question.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874
........

Merged revisions 405033 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoasterisk.c: suppress live_dangerously warning on rasterisk
Tzafrir Cohen [Fri, 3 Jan 2014 22:24:18 +0000 (22:24 +0000)] 
asterisk.c: suppress live_dangerously warning on rasterisk

Even since the fixes of AST-2013-007, Asterisk prints the following
warning on startup if the user decided to live dangerously:

  Privilege escalation protection disabled!
  See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.

This message is intended for the logs and interactive startup. No need
for it to appear on a remote console. This commit removes it from there.

(closes issue ASTERISK-23084)
Review: https://reviewboard.asterisk.org/r/3101/
........

Merged revisions 404861 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agocel_pgsql: module not correctly reloading
Kevin Harwell [Fri, 3 Jan 2014 21:58:17 +0000 (21:58 +0000)] 
cel_pgsql: module not correctly reloading

Upon reload the module unconditionally "unloaded" the module (freeing memory
and setting pointers to NULL) and then when attempting a "load" if the config
file had not changed then nothing would be reinitialized.

By moving the "unload" to occur conditionally (reload only) after an attempted
configuration load, but before module "loading" alleviates the issue. The module
now loads/unloads/reloads correctly.

(closes issue ASTERISK-22871)
Reported by: Matteo
........

Merged revisions 404857 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_dahdi: dahdi show channels slices PRI channel dnid on output
Kevin Harwell [Fri, 3 Jan 2014 18:57:59 +0000 (18:57 +0000)] 
chan_dahdi: dahdi show channels slices PRI channel dnid on output

dahdi show channels output slices the callerid (which is dnid copied over on
PRI channels). If the channel naming structures look like:

 'DAHDI/i1/1408409XXXX-6'

then the output slices 1408409XXXX down to 1408409XXX. This patch just opens
it up to 15 chars so you can see the whole thing.

(closes issue ASTERISK-22918)
Reported by: outtolunc
Patches:
     svn_chan_dahdi.c.format12_15.diff.txt uploaded by outtolunc (license 5198)
........

Merged revisions 404784 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoapp_meetme: compiler warning
Kevin Harwell [Fri, 3 Jan 2014 18:27:25 +0000 (18:27 +0000)] 
app_meetme: compiler warning

Fixed a compiler warning (errors in 'dev-mode') given by gcc version 4.8.1.
The one in app_meetme involved the 'sizeof-pointer-memaccess'
(see: http://gcc.gnu.org/gcc-4.8/porting_to.html) warning. Fixed so
it would no longer issue a warning and can compile again in 'dev-mode'.

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

Merged revisions 404742 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agofunc_strings: use memmove to prevent overlapping memory on strcpy
Scott Griepentrog [Thu, 2 Jan 2014 19:35:54 +0000 (19:35 +0000)] 
func_strings: use memmove to prevent overlapping memory on strcpy

When calling REPLACE() with an empty replace-char argument, strcpy
is used to overwrite the the matching <find-char>.  However as the
src and dest arguments to strcpy must not overlap, it causes other
parts of the string to be overwritten with adjacent characters and
the result is mangled.  Patch replaces call to strcpy with memmove
and adds a test suite case for REPLACE.

(closes issue ASTERISK-22910)
Reported by: Gareth Palmer
Review: https://reviewboard.asterisk.org/r/3083/
Patches:
    func_strings.patch uploaded by Gareth Palmer (license 5169)
........

Merged revisions 404674 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agocel_pgsql: deadlock on unload and core_event_dispatcher
Kevin Harwell [Tue, 31 Dec 2013 21:26:00 +0000 (21:26 +0000)] 
cel_pgsql: deadlock on unload and core_event_dispatcher

A deadlock can happen between a thread unloading or reloading the cel_pgsql
module and the core_event_dispatcher taskprocessor thread. Description of
what is happening:

Thread 1 (for example, a netconsole thread):

    a "module reload cel_pgsql" is launched
    the thread enter the "my_unload_module" function (cel_pgsql.c)
    the thread acquire the write lock on psql_columns
    the thread enter the "ast_event_unsubscribe" function (event.c)
    the thread try to acquire the write lock on ast_event_subs[sub->type]

Thread 2 (core_event_dispatcher taskprocessor thread):

    the taskprocessor pop a CEL event
    the thread enter the "handle_event" function (event.c)
    the thread acquire the read lock on ast_event_subs[sub->type]
    the thread callback the "pgsql_log" function (cel_pgsql.c), since it's a subscriber of CEL events
    the thread try to acquire a read lock on psql_columns

(closes issue ASTERISK-22854)
Reported by: Etienne Lessard
Patches:
     cel_pgsql_fix_deadlock_event.patch uploaded by hexanol (license 6394)
........

Merged revisions 404603 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochannels.c: core show channeltypes slicing
Kevin Harwell [Mon, 30 Dec 2013 23:16:04 +0000 (23:16 +0000)] 
channels.c: core show channeltypes slicing

'core show channeltypes' type column is being sliced, resulting in incomplete
type names.

(closes issue ASTERISK-22919)
Reported by: outtolunc
Patches:
     svn_channel.c.format_15.diff.txt uploaded by outtolunc (license 5198)

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

11 years agosay.c: correct time for polish
Scott Griepentrog [Fri, 20 Dec 2013 21:15:41 +0000 (21:15 +0000)] 
say.c: correct time for polish

In ast_say_date_with_format_pl(), change ast_say_number() to
use tm_sec instead of tm_mn.

(closes issue ASTERISK-22856)
Reported by: Robert Mordec
Review: https://reviewboard.asterisk.org/r/3082/
Patches:
     say.c.patch uploaded by veilen (license 6555)
........

Merged revisions 404456 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agores_fax.c: crash on framehook with no dsp in fax detect
Scott Griepentrog [Thu, 19 Dec 2013 16:57:29 +0000 (16:57 +0000)] 
res_fax.c: crash on framehook with no dsp in fax detect

In fax_detect_framehook() a null pointer reference can occur where a
voice frame is processed but no dsp is attached to the fax detection
structure.  The code block that rejects frames that detection cannot
be processed on is checking for dsp but falls through when it should
instead return, as this change implements.

(closes issue ASTERISK-22942)
Reported by: adomjan
Review: https://reviewboard.asterisk.org/r/3076/

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

11 years agoastdb: crash in sqlite3 during shutdown
Scott Griepentrog [Thu, 19 Dec 2013 16:30:33 +0000 (16:30 +0000)] 
astdb: crash in sqlite3 during shutdown

When Asterisk is shut down, the astdb_atexit() function releases
(finalize) the previously initiated (prepared) SQL statements in
sqlite3.  Another thread making a subsequent request can cause a
crash in sqlite3.  This patch eliminates that issue by resetting
the statement pointer after it is released/cleared.  The sqlite3
code detects the null pointer, and aborts the operation cleanly.

(closes issue AST-1265)
Reported by: Alexander Hömig
(closes issue ASTERISK-22350)
Reported by: Birger "WIMPy" Harzenetter
Review: https://reviewboard.asterisk.org/r/3078/

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

11 years agoHandle temporary failures on gk registration
Alexandr Anikin [Thu, 19 Dec 2013 08:15:45 +0000 (08:15 +0000)] 
Handle temporary failures on gk registration
Introduce new 'stopped' state for gk client and restart gk client
on failures
Remove ooh323 stack command lock as it is not need now.
(closes issue ASTERISK-21960)
Reported by: Dmitry Melekhov
Patches:
ASTERISK-21960.patch
ASTERISK-21960-stacklockup-2.patch
Tested by: Dmitry Melekhov

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

11 years agoAdd AMI event for presence state.
Jason Parker [Wed, 18 Dec 2013 22:34:21 +0000 (22:34 +0000)] 
Add AMI event for presence state.

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

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

11 years agoooh323c: Fix gcc 4.6.3 compiler warnings.
Richard Mudgett [Wed, 18 Dec 2013 20:19:30 +0000 (20:19 +0000)] 
ooh323c: Fix gcc 4.6.3 compiler warnings.
........

Merged revisions 404212 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agores_calendar: Protect channel when adding datastore.
Joshua Colp [Wed, 18 Dec 2013 11:59:49 +0000 (11:59 +0000)] 
res_calendar: Protect channel when adding datastore.

This change adds a missing channel lock when adding a datastore
to a channel.
........

Merged revisions 404135 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agofunc_strings: Documentation fix for QUOTE()
Rusty Newton [Wed, 18 Dec 2013 00:28:49 +0000 (00:28 +0000)] 
func_strings: Documentation fix for QUOTE()

Example output was inaccurate.

(issue ASTERISK-22970)
(closes issue ASTERISK-22970)
Reported by: Gareth Palmer
Patches:
   func_strings.patch uploaded by Gareth Palmer (license 5169)
........

Merged revisions 404081 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoSeveral components: fixing Typos in comments and code, "avaliable" instead of "available"
Rusty Newton [Tue, 17 Dec 2013 23:35:07 +0000 (23:35 +0000)] 
Several components: fixing Typos in comments and code, "avaliable" instead of "available"

(issue ASTERISK-23021)
(closes issue ASTERISK-23021)
Reported by: Jeremy Lainé
Tested by: Rusty Newton
Patches:
   available.patch uploaded by Jeremy Lainé (license 6561)

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

11 years agosecurity: Inhibit execution of privilege escalating functions
David M. Lee [Mon, 16 Dec 2013 17:14:14 +0000 (17:14 +0000)] 
security: Inhibit execution of privilege escalating functions

This patch allows individual dialplan functions to be marked as
'dangerous', to inhibit their execution from external sources.

A 'dangerous' function is one which results in a privilege escalation.
For example, if one were to read the channel variable SHELL(rm -rf /)
Bad Things(TM) could happen; even if the external source has only read
permissions.

Execution from external sources may be enabled by setting
'live_dangerously' to 'yes' in the [options] section of asterisk.conf.
Although doing so is not recommended.

(closes issue ASTERISK-22905)
Review: http://reviewboard.digium.internal/r/432/
........

Merged revisions 403913 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agopbx.c: put copy of ast_exten.data on stack to prevent memory corruption
Scott Griepentrog [Mon, 16 Dec 2013 15:55:04 +0000 (15:55 +0000)] 
pbx.c: put copy of ast_exten.data on stack to prevent memory corruption

During dialplan execution in pbx_extension_helper(), the contexts global
read lock prevents link list corruption, but was released with a pointer
to the ast_exten and data later used in variable substitution.  Instead,
this patch removes pbx_substitute_variables() and locates a copy of the
ast_exten data on the stack before releasing the lock, where ast_exten
could get free'd by another thread performing a module reload.

(issue AST-1179)
Reported by: Thomas Arimont
(issue AST-1246)
Reported by: Alexander Hömig
Review: https://reviewboard.asterisk.org/r/3055/
........

Merged revisions 403862 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoapp_sms: BufferOverflow when receiving odd length 16 bit message
Scott Griepentrog [Mon, 16 Dec 2013 15:25:37 +0000 (15:25 +0000)] 
app_sms: BufferOverflow when receiving odd length 16 bit message

This patch prevents an infinite loop overwriting memory when
a message is received into the unpacksms16() function, where
the length of the message is an odd number of bytes.

(closes issue ASTERISK-22590)
Reported by: Jan Juergens
Tested by: Jan Juergens
........

Merged revisions 403853 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoReset peer outboundproxy on sip.conf reload
Russell Bryant [Wed, 11 Dec 2013 19:14:52 +0000 (19:14 +0000)] 
Reset peer outboundproxy on sip.conf reload

If you set a peer's outboundproxy and then removed it from the config,
this would not get picked up in a config reload.  This patch fixes that
by resetting it in set_peer_defaults().

Closes ASTERISK-19454
Review: https://reviewboard.asterisk.org/r/3065/
........

Merged revisions 403634 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agores_fax_spandsp: Always init T.38 session to avoid crashes during state change
Matthew Jordan [Mon, 9 Dec 2013 03:11:05 +0000 (03:11 +0000)] 
res_fax_spandsp: Always init T.38 session to avoid crashes during state change

Prior to this patch, res_fax_spandsp was conservative with how it initialized
the spandsp T.38 context. It would only initialize it if the driver thought
the current state was a T.38 fax. While this works fine in nominal situations,
in certain off nominal situations, res_fax_spandsp can believe that a T.38
fax will not occur when in fact one has started. In particular, this was
discovered when res_fax would fall back to audio after timing out on a T.38
upgrade. The SIP channel driver would continue to retry the re-INVITE and -
if the remote end responded after res_fax timed out with a 200 OK - a T.38
frame would be delivered to the res_fax stack when it no longer expected it.

As it turns out, there does not appear to be any downside to always
initializing the T.38 context, other than the actual memory allocation.
Since that avoids this off nominal situation (and others which are equally
likely hard to predict), this is the safest way to avoid this problem.

Much thanks to Torrey as well for providing a scenario that reproduces this
issue.

(closes issue ASTERISK-21242)
Reported by: Ashley Winters
Tested by: Torrey Searle
patches:
  always-init-t38.patch uploaded by awinters (License 6477)
  A_PARTY.xml uploaded by tsearle (License 5334)
........

Merged revisions 403449 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoCheck and reject non-digits e164 values on peers and general sections in ooh323.conf
Alexandr Anikin [Mon, 2 Dec 2013 17:55:49 +0000 (17:55 +0000)] 
Check and reject non-digits e164 values on peers and general sections in ooh323.conf
Regenerate e164 endpoint list on reload ooh323
(issue ASTERISK-22901)
Reported by: Cyril CONSTANTIN
Patches:
ASTERISK-22901.patch

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

11 years agotranslate: Move freeing of frame to after it is used.
Joshua Colp [Fri, 22 Nov 2013 17:11:07 +0000 (17:11 +0000)] 
translate: Move freeing of frame to after it is used.

When translating from one format to another it is possible
to inform the translation function that the source frame should
be freed. This was previously done immediately but shortly
afterwards the frame that was freed was accessed and used again.

This change moves code around a bit so that the frame is now
freed after it has been completely used.

(closes issue ASTERISK-22788)
Reported by: Corey Farrell
Patches:
translate-access-after-free-11up.patch uploaded by coreyfarrell (license 5909)
translate-access-after-free-1.8.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 403014 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_dahdi: Fix crash during caller ID read
Kinsey Moore [Tue, 12 Nov 2013 15:00:36 +0000 (15:00 +0000)] 
chan_dahdi: Fix crash during caller ID read

Asterisk will sometimes core dump during caller id read on analog
channels due to a negative return value from the read() in
my_get_callerid that slips through as a negative length argument to
callerid_feed() if the errno returned by DAHDI is ELAST. This change
ensures that the negative return is treated properly even when it is
ELAST.

(closes issue ASTERISK-22746)
Reported by: Michael Walton
Patches:
    chan_dahdi_cid_crash_fix.r401410.patch uploaded by Michael Walton (License 6502)
........

Merged revisions 402708 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoGet rid of some inaccurate comments.
Mark Michelson [Mon, 11 Nov 2013 19:26:08 +0000 (19:26 +0000)] 
Get rid of some inaccurate comments.

I'm doing some unrelated work in app_confbridge and finding
these "invalid pin" comments to be annoying. Get out!

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

11 years agoapp_queue: Honor penalty limits of 0
Kinsey Moore [Mon, 11 Nov 2013 15:35:22 +0000 (15:35 +0000)] 
app_queue: Honor penalty limits of 0

In the current app_queue code from 1.8 up to trunk the upper and lower
penalties can be set to 0 but the value is interpreted to be disabled
instead of actually setting limits. This is especially evident if min
and max limits are set to 0 and members with penalties of 0 and 1 are
in the queue since the member with penalty 1 will still receive calls.
This patch adjusts the special disabled value to be INT_MAX instead of
0.

(closes issue ASTERISK-20862)
Review: https://reviewboard.asterisk.org/r/2995/
Reported by: Schmooze Com
........

Merged revisions 402645 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: keep same local (from) tag for outgoing register requests
Scott Griepentrog [Fri, 8 Nov 2013 22:48:34 +0000 (22:48 +0000)] 
chan_sip: keep same local (from) tag for outgoing register requests

For outbound register requests the tag on the From line was
updated every 20 seconds prior to a successful registration
and also once for each registration renewal.  That behavior
can possibly cause the registration to be denied because of
the different tag, and is not aligned with the intention of
RFC 3261 8.1.3.5 "... request constitutes a new transaction
and SHOULD have the same value of the Call-ID, To, and From
of the previous request...".  This updates chan_sip to have
a field to keep the local tag in the registration structure
and use that tag for registration requests where the callid
is also unchanged.

(closes issue ASTERISK-12117)
Reported by: Pawel Pierscionek
Review: https://reviewboard.asterisk.org/r/2988/
........

Merged revisions 402604 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoRecorded merge of revisions 402468 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Kevin Harwell [Tue, 5 Nov 2013 15:11:07 +0000 (15:11 +0000)] 
Recorded merge of revisions 402468 from http://svn.asterisk.org/svn/asterisk/branches/1.8

........
chan_sip: notify dialog info ignores presentation indicator in callerid

The presentation indicator in a callerid (e.g. set by dialplan function
Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog Info Notifies
are generated during extension monitoring.  Added a check to make sure the
name and/or number presentations on the callee (remote identity) are set to
allow.  If they are restricted then "anonymous" is used instead.

(closes issue AST-1175)
Reported by: Thomas Arimont
Review: https://reviewboard.asterisk.org/r/2976/

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

11 years agochan_sip: notify dialog info ignores presentation indicator in callerid
Kevin Harwell [Mon, 4 Nov 2013 20:52:58 +0000 (20:52 +0000)] 
chan_sip: notify dialog info ignores presentation indicator in callerid

The presentation indicator in a callerid (e.g. set by dialplan function
Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog Info Notifies
are generated during extension monitoring.  Added a check to make sure the
name and/or number presentations on the callee (remote identity) are set to
allow.  If they are restricted then "anonymous" is used instead.

(closes issue AST-1175)
Reported by: Thomas Arimont
Review: https://reviewboard.asterisk.org/r/2976/

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

11 years agoconfbridge: Separate user muting from system muting overrides.
Richard Mudgett [Sat, 2 Nov 2013 02:11:03 +0000 (02:11 +0000)] 
confbridge: Separate user muting from system muting overrides.

The system overrides the user muting requests when MOH is playing or a
waitmarked user is waiting for a marked user to join.  System muting
overrides interfere with what the user may wish the muting to be when the
system override ends.

* User muting requests are now independent of the system muting overrides.
The effective muting is now the logical or of the user request and system
override.

* Added a Muted column to the CLI "confbridge list <conference>" command.

* Added a Muted header to the AMI ConfbridgeList action ConfbridgeList
event.

(closes issue AST-1102)
Reported by: John Bigelow

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

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

11 years agoconfig: Allow ConfBridge DTMF menus to have '#' as the first digit.
Richard Mudgett [Fri, 1 Nov 2013 23:52:45 +0000 (23:52 +0000)] 
config: Allow ConfBridge DTMF menus to have '#' as the first digit.

ConfBridge allows custom DTMF menus to be created in the confbridge.conf
file by assigning a DTMF key sequence to a sequence of actions as follows:

DTMF-sequence = action,action...

Unfortunately, the normal config file processing code interprets an
initial '#' character as starting a directive such as #include.

* Add the ability to escape the first non-blank character in a config line
so the '#' character can be used without triggering the directive
processing code.

(closes issue AFS-2)
(closes issue ASTERISK-22478)
Reported by: Nicolas Tanski
Patches:
      jira_asterisk_22478_v11.patch (license #5621) patch uploaded by rmudgett (modified)

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

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

11 years agochan_sip: Fix RTCP port for SRFLX ICE candidates
Kinsey Moore [Fri, 1 Nov 2013 12:31:49 +0000 (12:31 +0000)] 
chan_sip: Fix RTCP port for SRFLX ICE candidates

This corrects one-way audio between Asterisk and Chrome/jssip as a
result of Asterisk inserting the incorrect RTCP port into RTCP SRFLX
ICE candidates. This also exposes an ICE component enumeration to
extract further details from candidates.

(closes issue ASTERISK-21383)
Reported by: Shaun Clark
Review: https://reviewboard.asterisk.org/r/2967/

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

11 years agocore/loader: Don't call dlclose in a while loop
Matthew Jordan [Thu, 31 Oct 2013 15:59:50 +0000 (15:59 +0000)] 
core/loader: Don't call dlclose in a while loop

For awhile now, we've noticed continuous integration builds hanging on CentOS 6
64-bit build agents. After resolving a number of problems with symbols, strange
locks, and other shenanigans, the problem has persisted. In all cases, gdb
shows the Asterisk process stuck in loader.c on one of the infinite while loops
that calls dlclose repeatedly until success.

The documentation of dlclose states that it returns 0 on success; any other
value on error. It does not state that repeatedly calling it will eventually
clear those errors. Most likely, the repeated calls to dlclose was to force a
close by exhausting the references on the library; however, that will never
succeed if:
(a) There is some fundamental error at work in the loaded library that
    precludes unloading it
(b) Some other loaded module is referencing a symbol in the currently loaded
    module

This results in Asterisk sitting forever.

Since we have matching pairs of dlopen/dlclose, this patch opts to only call
dlclose once, and log out as an ERROR if dlclose fails to return success. If
nothing else, this might help to determine why on the CentOS 6 64-bit build agent
things are not closing successfully.

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

Merged revisions 402287 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoUpdates for 1.4.25 core sounds and 1.4.14 extra sounds, plus new en_GB language set
Rusty Newton [Tue, 29 Oct 2013 23:42:45 +0000 (23:42 +0000)] 
Updates for 1.4.25 core sounds and 1.4.14 extra sounds, plus new en_GB language set

The new sound packages relate to issues: ASTERISK-22544, ASTERISK-22411, ASTERISK-21413, ASTERISK-20782
Modified sounds/Makefile for the new sound versions and to account for the new en_GB language set.

(issue ASTERISK-22659)
(closes issue ASTERISK-22659)
(closes issue ASTERISK-22411)
(closes issue ASTERISK-22544)
........

Merged revisions 402224 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoRemove some spammy debug messages; improve clarity of others
Matthew Jordan [Tue, 29 Oct 2013 12:49:53 +0000 (12:49 +0000)] 
Remove some spammy debug messages; improve clarity of others

Debug messages aren't free. Even when the debug level is sufficiently low such
that the messages are never evaluated, there is a cost to having to parse
Asterisk logs that contain debug messages that (a) fail to convey sufficient
information or (b) occur so frequently as to be next to meaningless. Based on
having to stare at lots of DEBUG messages, this patch makes the following
changes:

* channel.c: When copying variables from a parent channel to a child channel,
  specify the channels involved. Do not log anything for a variable that is not
  inherited; the fact that it doesn't have an _ or __ already signifies that it
  won't be inherited.
* pbx.c: Specify what function evaluation has occurred that created the result.
* translate.c: Bump up the translator path messages to 10. I've never once had
  to use these debug messages, and for each format that is registered (on
  startup) and unregistered (on shutdown) the entire f^2 matrix is logged out.
  For short tests in the Asterisk Test Suite, this should make finding the
  actual test much easier.
* xmldoc.c: The debug message that 'blah' is not found in the tree is expected.
  Often, description elements - which are not required - are not provided.
  This debug message adds no additional value, as it is not indicative of an
  error or helpful in debugging which element did not contain a 'blah' element
  as a child. If an element is supposed to contain a child element, then that
  XML tree should have failed validation in the first place.

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

Merged revisions 402150 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: Clarify 'Forcerport' Setting Displayed When Running "sip show peers"
Michael L. Young [Mon, 28 Oct 2013 14:50:12 +0000 (14:50 +0000)] 
chan_sip: Clarify 'Forcerport' Setting Displayed When Running "sip show peers"

While looking at ASTERISK-22236, Walter Doekes pointed out that when running
"sip show peers", the setting being displayed can be confusing.  The display of
"N" used to mean NAT (i.e. yes).  The NAT setting has gone through many
different changes resulting in the display of different characters to try and
convey what the current setting is for 'Forcerport' (A for Auto and Forcerport
is currently on, a for Auto but Forcerport is off, Y for yes, and N for no).
During the initial code review to try and clarify these settings (especially
since "N" no longer meant what it used to mean in prior versions of Asterisk),
Mark Michelson suggested using the full space available to display the settings
which helped to make the settings very clear.  That was a great suggestion.

Therefore, this patch does the following:

* The column for 'Forcerport' now will show: Auto (Yes), Auto (No), Yes, or No.

* A column for the 'Comedia' setting has been added.  It too will display the
  setting in a non-cryptic way: Auto (Yes), Auto (No), Yes, or No.

* UPGRADE.txt has been updated to document this change.

(closes issue ASTERISK-22728)
Reported by: Walter Doekes
Tested by: Michael L. Young
Patches:
    asterisk-forcerport-display-clarification_v3.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

11 years agortp_engine: fix rtp payloads copy and improve argument names
Scott Griepentrog [Fri, 25 Oct 2013 23:32:19 +0000 (23:32 +0000)] 
rtp_engine: fix rtp payloads copy and improve argument names

In function ast_rtp_instance_early _bridge_make_compatible the
use of instance 0/1 as arguments doesn't clearly communicate a
direction that the copying of payloads from the source channel
to the destination channel will occur, making it more probable
to have the arguments to ast_rtp_codecs_payloads_copy() put in
the reverse order.  This patch renames the arguments with _dst
and _src suffixes and corrects the copy direction.

(closes issue ASTERISK-21464)
Reported by: Kevin Stewart
Review: https://reviewboard.asterisk.org/r/2894/
........

Merged revisions 402000 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Test shows rtpmap:119 being copied per this change, but is not in sip invite

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

11 years agopbx.c: fix confused match caller id that deleted exten still in hash
Scott Griepentrog [Fri, 25 Oct 2013 20:44:40 +0000 (20:44 +0000)] 
pbx.c: fix confused match caller id that deleted exten still in hash

This fixes a bug where a zero length callerid match adjacent to a no
match callerid extension entry would be deleted together, which then
resulted in hashtable references to free'd memory.  A third state of
the matchcid value has been added to indicate match to any extension
which allows enforcing comparison of matchcid on/off without errors.

(closes issue AST-1235)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2930/
........

Merged revisions 401959 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoPut clicompat-r2.patch back in
Jonathan Rose [Fri, 25 Oct 2013 17:29:26 +0000 (17:29 +0000)] 
Put clicompat-r2.patch back in

We've figured out how to resolve the problems this was causing in 12/trunk,
so this can go back in now.

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    clicompat-r2.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401914 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agorevert clicompat-r2.patch from r401704
Jonathan Rose [Fri, 25 Oct 2013 16:43:49 +0000 (16:43 +0000)] 
revert clicompat-r2.patch from r401704

Patch caused the following build errors against testsuite
https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD4-244

(issue ASTERISK-22467)
Reported by: Corey Farrell
........

Merged revisions 401895 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: Allow a sip peer to accept both AVP and AVPF calls
Kevin Harwell [Fri, 25 Oct 2013 16:05:55 +0000 (16:05 +0000)] 
chan_sip: Allow a sip peer to accept both AVP and AVPF calls

Adapts the behaviour of avpf to only impact the format of outgoing calls. For
inbound calls, both AVP and AVPF calls will be accepted regardless of the value
of avpf in the configuration.

(closes issue ASTERISK-22005)
Reported by: Torrey Searle
Patches:
     optional_avpf_trunk.patch uploaded by tsearle (license 5334)

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

11 years agoLogging: Logging types ignored after specifying a verbose level
Kevin Harwell [Thu, 24 Oct 2013 20:44:09 +0000 (20:44 +0000)] 
Logging: Logging types ignored after specifying a verbose level

If one specified a verbose level within a logging facility in
logger.conf then any component after it was ignored.  Fixed so
all values are correctly read.

(closes issue ASTERISK-22456)
Reported by: Kevin Harwell

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

11 years agoutils: Fix memory leaks and missed unregistration of CLI commands on shutdown
Jonathan Rose [Thu, 24 Oct 2013 20:33:37 +0000 (20:33 +0000)] 
utils: Fix memory leaks and missed unregistration of CLI commands  on shutdown

Final set of patches in a series of memory leak/cleanup patches by Corey Farrell

(closes issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    main-utils-1.8.patch uploaded by coreyfarrell (license 5909)
    main-utils-11.patch uploaded by coreyfarrell (license 5909)
    main-utils-12up.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401829 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agotest_linkedlists: Fix memory leak
Jonathan Rose [Thu, 24 Oct 2013 19:55:23 +0000 (19:55 +0000)] 
test_linkedlists: Fix memory leak

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    test_linkedlists-1.8.patch uploaded by coreyfarrell (license 5909)
    test_linkedlists-11up.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401790 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agojitterbuf: Fix memory leak on jitter buffer reset
Jonathan Rose [Thu, 24 Oct 2013 19:41:07 +0000 (19:41 +0000)] 
jitterbuf: Fix memory leak on jitter buffer reset

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    jitterbuf-jb_reset-leak-1.8.patch
    jitterbuf-jb_reset-leak-11up.patch
........

Merged revisions 401786 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoastobj2: Unregister debug CLI commands at exit
Jonathan Rose [Thu, 24 Oct 2013 19:28:10 +0000 (19:28 +0000)] 
astobj2: Unregister debug CLI commands at exit

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    astobj2-clean-debug-cli-1.8-11.patch uploaded by coreyfarrell (license 5909)
    astobj2-clean-debug-cli-12up.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401781 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoapp_voicemail: Memory Leaks against tests
Jonathan Rose [Thu, 24 Oct 2013 18:44:38 +0000 (18:44 +0000)] 
app_voicemail: Memory Leaks against tests

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    app_voicemail-1.8.patch uploaded by coreyfarrell (license 5909)
    app_voicemail-11up.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401743 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agomemory leaks: Memory leak cleanup patch by Corey Farrell (second set)
Jonathan Rose [Thu, 24 Oct 2013 16:40:59 +0000 (16:40 +0000)] 
memory leaks: Memory leak cleanup patch by Corey Farrell (second set)

Also covers ast_app_parse_timelen-fail-zero-length.patch, but the patch was
replaced with one of my own.

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license 5909)
    clicompat-r2.patch uploaded by coreyfarrell (license 5909)
    codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909)
    data-cleanup-test-registration.patch uploaded by coreyfarrell (license 5909)
    main-asterisk-kill-listener.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401704 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agomemory leaks: Memory leak cleanup patch by Corey Farrell (first set)
Jonathan Rose [Wed, 23 Oct 2013 19:55:05 +0000 (19:55 +0000)] 
memory leaks: Memory leak cleanup patch by Corey Farrell (first set)

(issue ASTERSIK-22467)
Reported by: Corey Farrell
Patches:
    chan_sip-parse_contact_header_test-free-contacts.patch uploaded by coreyfarrell (license 5909)
    cli-filename-completion-leak.patch uploaded by coreyfarrell (license 5909)
    func_math.patch uploaded by corefarrell (license 5909)
    main-test-cleanup.patch uploaded by coreyfarrell (license 5909)
    test_dlinklists.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401660 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agores_rtp_asterisk: Address jittery DTMF events in RTP streams
Jonathan Rose [Wed, 23 Oct 2013 17:37:15 +0000 (17:37 +0000)] 
res_rtp_asterisk: Address jittery DTMF events in RTP streams

(closes issue ASTERISK-21170)
Reported by: NITESH BANSAL
Patches:
    dtmf-timestamp.patch uploaded by NITESH BANSAL (license 6418)
Review: https://reviewboard.asterisk.org/r/2938/
........

Merged revisions 401619 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agocdr_adaptive_odbc: Also apply a filter when the CDR value is empty.
Richard Mudgett [Wed, 23 Oct 2013 16:46:26 +0000 (16:46 +0000)] 
cdr_adaptive_odbc: Also apply a filter when the CDR value is empty.

Extra CDR records are written if a filtered CDR value is empty because the
filter is not checked.

(closes issue ASTERISK-22272)
Reported by: Jordi Llull Chavarria
........

Merged revisions 401577 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_mgcp: Properly handle malformed media lines
Kinsey Moore [Wed, 23 Oct 2013 15:22:54 +0000 (15:22 +0000)] 
chan_mgcp: Properly handle malformed media lines

This corrects a situation in which a media line was not parsed properly
and resulted in a crash.

(closes issue ASTERISK-21190)
Reported by: adomjan
Patches:
    chan_mgcp.c-sscnaf_fix uploaded by adomjan (License 5448)
........

Merged revisions 401537 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: Fix an issue where an incompatible audio format may be added to SDP.
Joshua Colp [Wed, 23 Oct 2013 11:11:18 +0000 (11:11 +0000)] 
chan_sip: Fix an issue where an incompatible audio format may be added to SDP.

If preferred codecs included any non-audio format the code would
mistakenly add the audio format, even if it was not a joint capability
with the remote side.

(closes issue ASTERISK-21131)
Reported by: nbougues
Patches:
patch_unsupported_codec_1.8.patch uploaded by nbougues (license 6470)
........

Merged revisions 401497 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agores_rtp_asterisk: Fix crash when RTCP is not available during SSRC change
Matthew Jordan [Tue, 22 Oct 2013 22:42:24 +0000 (22:42 +0000)] 
res_rtp_asterisk: Fix crash when RTCP is not available during SSRC change

In r400089, a patch was put in to correct erroneous RTCP statistic resets.
Unfortunately, ast_rtp_read can be called on an RTP instance that does not
have RTCP information. This patch prevents that crash by only resetting
the statistics if we do actually have an RTCP instance.

(issue AST-1174)

(closes issue ASTERISK-22667)
Reported by: John Bigelow
........

Merged revisions 401445 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoapp_queue: Fix CLI "queue remove member" queue_log entry.
Richard Mudgett [Tue, 22 Oct 2013 19:02:15 +0000 (19:02 +0000)] 
app_queue: Fix CLI "queue remove member" queue_log entry.

The queue_log entry resulting from CLI "queue remove member" when
log_membername_as_agent is enabled is wrong.  It always uses the interface
name instead of the member name in the queue_log entry.

* Get the queue member before removing it from the queue so the member
name is available for the queue_log entry.

(closes issue ASTERISK-21826)
Reported by: Oscar Esteve
Patches:
      fix_membername.diff (license #6505) patch uploaded by Oscar Esteve
         (modified to fix potential ref leak)

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

11 years agochan_dahdi: Fix unable to get index warning when transferring an analog call.
Richard Mudgett [Tue, 22 Oct 2013 00:16:24 +0000 (00:16 +0000)] 
chan_dahdi: Fix unable to get index warning when transferring an analog call.

Transferring an analog call using flashhooks generated an unable to get
index WARNING message when the transfer is completed.

* Removed unnecessary analog subchannel shell games when transferring a
call using flashhooks.

Thanks to Tzafrir Cohen for mentioning this in a comment on issue
ASTERISK-22720.
........

Merged revisions 401378 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoSegfault in LIBEDIT_INTERNAL after tgetstr(), when libncurses5-dev
Kevin Harwell [Mon, 21 Oct 2013 19:46:22 +0000 (19:46 +0000)] 
Segfault in LIBEDIT_INTERNAL after tgetstr(), when libncurses5-dev
isn't installed

Include the appropriate declarations when not using termcap, but term+curses
and [n]curses do not exist.

(closes issue ASTERISK-22351)
Reported by: A. Iglesias
Patches:
    issueA22351_libedit_internal_without_ncurses_dev.patch uploaded by wdoekes (license 5674)
........

Merged revisions 401325 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoRemove Port Restriction When Checking For NAT
Michael L. Young [Fri, 18 Oct 2013 15:11:46 +0000 (15:11 +0000)] 
Remove Port Restriction When Checking For NAT

When trying to determine if a peer is behind NAT, we should not be using the
ports when comparing addresses.

This patch removes the port from being checked and just useds the addresses
now.

(closes issue ASTERISK-22729)
Reported by: Michael L. Young
Tested by: Michael L. Young
Patches:
    asterisk-remove-using-port-for-nat-check.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

11 years agoProperly copy/remove the device state cache flag over a masquerade.
Walter Doekes [Fri, 18 Oct 2013 14:43:26 +0000 (14:43 +0000)] 
Properly copy/remove the device state cache flag over a masquerade.

In r378303 the AST_FLAG_DISABLE_DEVSTATE_CACHE flag was added that tells
the devstate system to not cache states for non-real devices. However,
when optimizing away channels (ast_do_masquerade), that flag wasn't
copied.

In my case, using Local devices as queue members created a situation
where the endpoint was considered in use, but the state change of the
device being available again was ignored (not cached). The endpoint
channel was optimized into the (previously) Local channel, but kept
the do-not-cache flag. The end result being that the queue member
apparently stayed in use forever.

(closes issue ASTERISK-22718)
Reported by: Walter Doekes

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

Merged revisions 401178 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoFix Setting A chan_sip Dialog's SIP_NAT_FORCE_RPORT Flag
Michael L. Young [Thu, 17 Oct 2013 20:32:32 +0000 (20:32 +0000)] 
Fix Setting A chan_sip Dialog's SIP_NAT_FORCE_RPORT Flag

A condition was added in a commit to fix ASTERISK-21374, that, if the
SIP_PAGE3_NAT_AUTO_RPORT flag was set, to then copy a peer's SIP_NAT_FORCE_RPORT
flag to the dialog.  This condition should not have been there since it assumed
that if Asterisk is in an environment where NAT is involved, that the auto_* nat
settings or force_rport setting would be on in the global settings.  If the nat
setting in the global setting is set to 'nat=no' and then turned on for peers
(which is not quite the recommended way, although it is allowed) this flag is
never copied to the dialog resulting in problems like, REGISTER replies going
to the wrong port.

This patch removes this conditional check and will now always use the peer's
flag which by this point in the code the checks on whether the peer is behind
NAT or not (if using auto_force_rport) have already been run.

(closes issue ASTERISK-22236)
Reported by: Filip Frank
Tested by: Michael L. Young
Patches:
    asterisk-2236-always-set-rport.diff uploaded
                                              by Michael L. Young (license 5026)

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

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

11 years agoReduce log level of a non-pubsub error message
Kinsey Moore [Thu, 17 Oct 2013 15:36:50 +0000 (15:36 +0000)] 
Reduce log level of a non-pubsub error message

Drop an error log message to debug level 1 since distributed device
state functions correctly when receiving this message and it spams the
logs.

(closes issue ASTERISK-22410)
Reported by: abelbeck
Patches:
    asterisk-1.8-res_jabber-log-nonpubsub-error-to-debug.patch uploaded by abelbeck (License 5903)
    asterisk-11-res_xmpp-log-nonpubsub-error-to-debug.patch uploaded by abelbeck (License 5903)
........

Merged revisions 401119 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoDon't check all realtime queues when doing "queue show some_queue".
Walter Doekes [Wed, 16 Oct 2013 11:52:24 +0000 (11:52 +0000)] 
Don't check all realtime queues when doing "queue show some_queue".

When using realtime queues, queues have to be fetched from the database
every now and then to see if any info has been changed or to see if the
queue has been removed. When fetching info for an individual queue, the
pruning of other queues is unnecessarily costly.

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

Merged revisions 401049 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_iax2: Fix channel left locked in off nominal code path.
Richard Mudgett [Tue, 15 Oct 2013 19:57:06 +0000 (19:57 +0000)] 
chan_iax2: Fix channel left locked in off nominal code path.

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

11 years agoPrevent chan_sip from sending duplicate BYEs.
Mark Michelson [Tue, 15 Oct 2013 14:58:12 +0000 (14:58 +0000)] 
Prevent chan_sip from sending duplicate BYEs.

When a 200 OK for an initial INVITE is received, we were doing
the right thing by ACKing and sending an immediate BYE. However,
we also were doing the wrong thing and queuing an answer frame,
thus causing the call to be answered. This would cause the call
to be hung up by the channel thread, thus resulting in a second
BYE being sent out.

In this fix, I also have set the hangupcause to be correct since
the initial BYE being sent by Asterisk had an unknown hangup
cause. I have changed to using "Bearer capabilty not available"
since the call was hung up due to an SDP offer/answer error.

(closes issue ASTERISK-22621)
reported by Kinsey Moore
........

Merged revisions 400970 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_dahdi: Reflect the set software gain in the CLI "dahdi show channel" output.
Richard Mudgett [Mon, 14 Oct 2013 21:44:07 +0000 (21:44 +0000)] 
chan_dahdi: Reflect the set software gain in the CLI "dahdi show channel" output.

* Remember the swgain setting from CLI "dahdi set swgain" command so the
CLI "dahdi show channel" output will reflect the current setting.

* Updated CLI "dahdi set hwgain" and "dahdi set swgain" documentation.

(issue ASTERISK-22429)
Reported by: Jaco Kroon
Patches:
      jira_asterisk_22429_v1.8_v2.patch (license #5621) patch uploaded by rmudgett
........

Merged revisions 400907 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: Do not increment the SDP version between 183 and 200 responses.
Mark Michelson [Mon, 14 Oct 2013 21:42:30 +0000 (21:42 +0000)] 
chan_sip: Do not increment the SDP version between 183 and 200 responses.

Bumping the SDP version number can cause interoperability problems
since receivers of the responses will expect that a 200 SDP will
be identical to a previous 183 SDP.

(closes issue ASTERISK-21204)
reported by NITESH BANSAL

Patches:
dont-increment-session-version-in-2xx-after-183.patch uploaded by NITESH BANSAL (License #6418)
........

Merged revisions 400906 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoAdd warning when compiling with iODBC support
Kinsey Moore [Tue, 8 Oct 2013 22:27:59 +0000 (22:27 +0000)] 
Add warning when compiling with iODBC support

When running configure, libiodbc2 development headers will fulfill the
requirement for ODBC development headers, but will not function
properly. This adds a warning when libiodbc2 development headers are
detected instead of unixodbc development headers.

(closes issue ASTERISK-22459)
Reported by: Patrick Maille
Tested by: Walter Doekes
Patches:
    issueA22459_warn_when_using_iodbc.patch uploaded by Walter Doekes (License 5674)
........

Merged revisions 400767 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoapp_confbridge: Can now set the language used for announcements to the conference.
Richard Mudgett [Tue, 8 Oct 2013 20:14:14 +0000 (20:14 +0000)] 
app_confbridge: Can now set the language used for announcements to the conference.

ConfBridge now has the ability to set the language of announcements to the
conference.  The language can be set on a bridge profile in
confbridge.conf or by the dialplan function
CONFBRIDGE(bridge,language)=en.

(closes issue ASTERISK-19983)
Reported by: Jonathan White
Patches:
      M19983_rev2.diff (license #5138) patch uploaded by junky (modified)
Tested by: rmudgett

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

11 years agoapp_confbridge: Fix duplicate default_user profile.
Richard Mudgett [Tue, 8 Oct 2013 19:08:12 +0000 (19:08 +0000)] 
app_confbridge: Fix duplicate default_user profile.

* Fixed looking in the wrong profiles container to see if the default_user
profile is already created in verify_default_profiles().  The bridge
profile container is never going to hold user profiles. :)

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

11 years agoFix func_config list entry allocation
Kinsey Moore [Tue, 8 Oct 2013 18:18:21 +0000 (18:18 +0000)] 
Fix func_config list entry allocation

The AST_CONFIG dialplan function defined in func_config.c allocates its
config file list entries using ast_malloc. List entry allocations
destined for use with Asterisk's linked list API must be ast_calloc()d
or otherwise initialized so that list pointers are set to NULL. These
uses of ast_malloc have been replaced by ast_calloc to prevent
dereferencing of uninitialized pointer values when traversing the list.

(closes issue ASTERISK-22483)
Reported by: Brian Scott
........

Merged revisions 400694 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoFix STUN crash when using IPv6 any address
Kinsey Moore [Tue, 8 Oct 2013 15:42:44 +0000 (15:42 +0000)] 
Fix STUN crash when using IPv6 any address

Ensure that when chan_sip binds to the IPv6 any address ([::]), IPv4
candidates are also added.

(closes issue ASTERISK-21917)
Reported by: Torrey Searle
Patches:
    0023_ipv6_stun_crash.patch uploaded by Torrey Searle (License 5334)

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

11 years agoapp_queue: Fix Queuelog EXITWITHKEY only logging two of four fields
Michael L. Young [Sun, 6 Oct 2013 17:09:13 +0000 (17:09 +0000)] 
app_queue: Fix Queuelog EXITWITHKEY only logging two of four fields

Commit r62462 added two extra fields for logging "the original position the
caller entered the queue at, and the amount of time the caller was waiting in
the queue."  But when r75969 was merged from 1.4 into trunk (r75977), these two
fields disappeared. Those two extra fields were not logged in 1.4 and when the
patch was merged, those fields went away.

Therefore, this is a regression and was caught by the reporter because he was
reading the awesome "Asterisk: The Definitive Guide" book.

(closes issue ASTERISK-22197)
Reported by: Dalius M.
Tested by: Dalius M.
Patches:
    asterisk-22197-q-log-exitwithkey.diff
     uploaded by Michael L. Young (license 5026)

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

Merged revisions 400622 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agochan_sip: Don't ignore expires value in contact header if it lacks semicolon
Jonathan Rose [Thu, 3 Oct 2013 22:59:04 +0000 (22:59 +0000)] 
chan_sip: Don't ignore expires value in contact header if it lacks semicolon

(closes issue ASTERISK-22574)
Reported by: Filip Jenicek
Patches:
    chan_sip_expires.patch uploaded by Filip Jenicek (license 6277)
........

Merged revisions 400469 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoFix security events for AMI invalid password
Kinsey Moore [Thu, 3 Oct 2013 19:22:41 +0000 (19:22 +0000)] 
Fix security events for AMI invalid password

In r337595, additional security events were added for chan_sip
authentication failures. The new IEs added to the existing invalid
password event were defined as required IEs, but existing users of the
event did not set the new IEs and could not since they didn't apply to
existing uses. They are now marked as optional IEs.

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

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

11 years agores_rtp_multicast: Ensure SSRC is set properly
Kinsey Moore [Thu, 3 Oct 2013 18:28:07 +0000 (18:28 +0000)] 
res_rtp_multicast: Ensure SSRC is set properly

This fixes a bug where the SSRC field on multicast RTP can be stuck at
0 which can cause problems for endpoints trying to make sense of
incoming streams.

(closes issue ASTERISK-22567)
Reported by: Simone Camporeale
Patches:
    22567_res_mulitcast_ssrc.patch uploaded by Simone Camporeale (License 6536)
........

Merged revisions 400393 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoCast Integer Argument To Unsigned Char
Michael L. Young [Wed, 2 Oct 2013 21:31:36 +0000 (21:31 +0000)] 
Cast Integer Argument To Unsigned Char

The member reg in the peercnt structure is an unsigned char and peercnt_modify()
is expecting an unsigned char argument which gets assigned to peercnt->reg.

This patch fixes that by casting the integer argument being passed to
peercnt_modify to unsigned char.
........

Merged revisions 400314 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

11 years agoman pages for astdb2bdb and astdb2sqlite3
Tzafrir Cohen [Wed, 2 Oct 2013 17:36:28 +0000 (17:36 +0000)] 
man pages for astdb2bdb and astdb2sqlite3

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

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