]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
10 years agoastobj2.c/refcounter.py: Fix to deal with invalid object refs.
Richard Mudgett [Thu, 18 Sep 2014 16:30:10 +0000 (16:30 +0000)] 
astobj2.c/refcounter.py: Fix to deal with invalid object refs.

* Make astob2 REF_DEBUG output an invalid object line when an invalid ao2
object ref/unref is attempted.  This is similar to the
constructor/destructor lines.

* Fixed refcounter.py to handle skewed objects that have
constructor/destructor states.

* Made refcounter.py highlight the invalid ao2 object refs by putting them
in their own section of the processed output file.

* Made refcounter.py highlight unreffing an object by more than one that
results in a negative ref count and the object being destroyed.  The
abnormally destroyed object is reported in the invalid and finalized
object sections of the output.

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

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

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

10 years agores_fax_spandsp: Properly handle cleanup before starting FAXes.
Mark Michelson [Thu, 18 Sep 2014 16:19:51 +0000 (16:19 +0000)] 
res_fax_spandsp: Properly handle cleanup before starting FAXes.

If faxing fails at a very early stage, then it is possible for
us to pass a NULL t30 state pointer to spandsp, which spandsp
is none too pleased with.

This patch ensures that we pass the correct pointer to spandsp
in the situation where we have not yet set our local t30 state
pointer.

ASTERISK-24301 #close
Reported by Matt Jordan
Patches:
ASTERISK-24301-fax.diff Uploaded by Mark Michelson (License #5049)

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

10 years agoconfig: bug: Fix SEGV in ast_category_insert when matching category isn't found
George Joseph [Thu, 18 Sep 2014 14:42:26 +0000 (14:42 +0000)] 
config: bug: Fix SEGV in ast_category_insert when matching category isn't found

If you call ast_category_insert with a match category that doesn't exist, the
list traverse runs out of 'next' categories and you get a SEGV.  This patch
adds check for the end-of-list condition and changes the signature to return
an int for success/failure indication instead of a void.

The only consumer of this function is manager and it was also changed to use
the return value.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3993/
........

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

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

10 years agores_rtp_asterisk: Ensure that the thread terminating pj stuff is registered.
Joshua Colp [Wed, 17 Sep 2014 18:02:21 +0000 (18:02 +0000)] 
res_rtp_asterisk: Ensure that the thread terminating pj stuff is registered.

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

10 years agores_rtp_asterisk: Fix 100% CPU usage due to timer heap thread spinning.
Joshua Colp [Tue, 16 Sep 2014 21:01:38 +0000 (21:01 +0000)] 
res_rtp_asterisk: Fix 100% CPU usage due to timer heap thread spinning.

Side note: I need a vacation.

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

10 years agores_rtp_asterisk: Fix building when pjproject is not used.
Joshua Colp [Tue, 16 Sep 2014 20:30:05 +0000 (20:30 +0000)] 
res_rtp_asterisk: Fix building when pjproject is not used.

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

10 years agores_rtp_asterisk: Fix a myriad of TURN client issues.
Joshua Colp [Tue, 16 Sep 2014 11:08:26 +0000 (11:08 +0000)] 
res_rtp_asterisk: Fix a myriad of TURN client issues.

1. The number of file descriptors an ioqueue instance can handle is fixed, so we
now spawn the required number to handle the load.
2. Our transport identifiers were exceeding the range supported by pjnath.
3. The TURN client did not set up client binding causing needless bandwidth usage.
4. The code no longer updates address information on each packet.
5. STUN traffic was getting looped back to Asterisk instead of going through the
TURN server.
6. Synchronization now ensures things are completely setup or destroyed.
7. Logging now reflects the target the TURN server is sending to/receiving from
on our behalf.

ASTERISK-23577 #close
Reported by: Jay Jideliov

ASTERISK-23634 #close
Reported by: Roman Skvirsky

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

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

10 years agochan_sip: Clarify that sipdebug=yes cannot be undone by the CLI.
Walter Doekes [Sun, 14 Sep 2014 15:49:24 +0000 (15:49 +0000)] 
chan_sip: Clarify that sipdebug=yes cannot be undone by the CLI.

Document it in sip.conf.

ASTERISK-24249 #close
Reported by: Avinash Mohod

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

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

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

10 years agoBridging: Fix bouncing native bridge
Kinsey Moore [Fri, 12 Sep 2014 18:18:44 +0000 (18:18 +0000)] 
Bridging: Fix bouncing native bridge

This fixes a situation in Asterisk 1.8 and 11 where ast_channel_bridge
could cause a bouncing native bridge. In the case of the
dial_LS_options test, this was a remote RTP bridge which caused the
audio path to continually cycle between Asterisk and the remote
endpoints generating a large number of SIP messages and delaying the
test long enough to cause it to fail (checking timing was part of the
test). The root cause was that the code to decide whether to use native
bridging was expecting a time-remaining value of 0 to be the default
instead of the actual default value of -1. A value of 0 or negative
numbers could also be generated by preceding code in some
circumstances. Both issues are addressed in this patch.

ASTERISK-24211 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3987/
........

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

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

10 years agoconfig: bug: fix truncation of included config files on permissions error
George Joseph [Wed, 10 Sep 2014 16:01:44 +0000 (16:01 +0000)] 
config: bug: fix truncation of included config files on permissions error

ast_config_text_file_save() currently truncates include files as they
are processed.  If a subsequent include file or the main config file has
a permissions error that prevents writing, earlier include files are left
truncated resulting in a frantic search for backups.

This patch causes ast_config_text_file_save to check for write access
on all files before it truncates any of them.

Will be applied 1.8 > trunk.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3986/
........

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

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

10 years agoSounds/BuildSystem: Modifications to include new releases and Japanese language.
Rusty Newton [Sun, 7 Sep 2014 00:08:48 +0000 (00:08 +0000)] 
Sounds/BuildSystem: Modifications to include new releases and Japanese language.

Modifying Makefile and sounds.xml to include new core 1.4.26 and extra 1.4.15
sound prompt releases, plus the new Japanese core sound prompts contributed
by QLOOG.

ASTERISK-23324
Reported by: Kevin McCoy
Tested by: Rusty Newton
........

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

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

10 years agoManager: Require read permission for SYSTEM in order to send FullyBooted
Jonathan Rose [Thu, 4 Sep 2014 20:39:34 +0000 (20:39 +0000)] 
Manager: Require read permission for SYSTEM in order to send FullyBooted

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

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

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

10 years agomanager: Make WaitEvent action respect eventfilters
George Joseph [Sat, 30 Aug 2014 17:22:00 +0000 (17:22 +0000)] 
manager: Make WaitEvent action respect eventfilters

A WaitEvent issued via an http session isn't respecting eventfilters defined
for the user. I just added a match_filter to the predicate that controls
astman_append.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3958/
........

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

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

10 years agodoc: Add a manpage for the smsq utility
Matthew Jordan [Fri, 29 Aug 2014 19:39:14 +0000 (19:39 +0000)] 
doc: Add a manpage for the smsq utility

This patch adds a manpage for the smsq utility. Note that this is one of
the patches the Debian distro applies for the Asterisk project, as per
ASTERISK-24191.

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

ASTERISK-24171 #close
Reported by: Jeremy Laine
patches:
  smsq.8 uploaded by Jeremy Laine (License 6561)
........

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

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

10 years agodoc: Add a manpage for the aelparse utility
Matthew Jordan [Fri, 29 Aug 2014 19:32:04 +0000 (19:32 +0000)] 
doc: Add a manpage for the aelparse utility

This patch adds a manpage for the aelparse utility. Note that this is one of
the patches the Debian distro applies for the Asterisk project, as per
ASTERISK-24191.

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

ASTERISK-24171 #close
Reported by: Jeremy Laine
patches:
  aelparse.8 uploaded by Jeremy Laine (License 6561)
........

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

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

10 years agoLICENSE: Clarify language in Asterisk's LICENSE to allow for linking to UniMRCP
Matthew Jordan [Thu, 28 Aug 2014 21:53:11 +0000 (21:53 +0000)] 
LICENSE: Clarify language in Asterisk's LICENSE to allow for linking to UniMRCP

The UniMRCP project distributes Asterisk modules that integrate Asterisk with
UniMRCP, and other Asterisk users use the UniMRCP library as well.
Unfortunately, the UniMRCP license is Apache 2.0, which per the Free Software
Foundation, is not a compatible license with the GPLv2.

"Please note that this license is not compatible with GPL version 2, because it
has some requirements that are not in that GPL version. These include certain
patent termination and indemnification provisions. The patent termination
provision is a good thing, which is why we recommend the Apache 2.0 license for
substantial programs over other lax permissive licenses."

On the other hand, UniMRCP is a great project and we'd like to let people use
it with Asterisk.

This patch updates the LICENSE text to allow users to link Asterisk with
UniMRCP and distribute the resulting binaries.
........

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

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

10 years agochan_iax2: Fix Dynamic IAX2 Registrations After Temporary DNS Failure
Michael L. Young [Thu, 28 Aug 2014 20:26:58 +0000 (20:26 +0000)] 
chan_iax2: Fix Dynamic IAX2 Registrations After Temporary DNS Failure

The reporter on the issue found some issues when upgrading from version 10 to 11
on 55 hosts.

Two situations that can occur with dynamic registrations.

1.  With dnsmgr disabled, if the host is not resolvable we are not trying to
    resolve the host again when it is time to attempt to register again.  This
    results in never registering to the host.
2.  With dnsmgr enabled, when the host is temporarily not resolvable the
    address is set to 0.0.0.0:0 and then when the host is resolvable the port
    is not being restored and stays set to 0.

This patch resolves these two issues by:

* Storing the hostname so that it can be used for resolving with DNS.
* Resolve the hostname on the next scheduled attempt to register.
* Storing the port used to reach the host so that when the hostname is
  resolvable again, we can set the port again if the port is still unset after
  looking up the host.

ASTERISK-23767 #close
Reported by: David Herselman
Tested by: David Herselman, Michael L. Young
Patches:
    asterisk-23767-dns_reg_retry_and_set_port_11_v3.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

10 years agoCallerID: Fix parsing of malformed callerid
Kinsey Moore [Wed, 27 Aug 2014 15:01:33 +0000 (15:01 +0000)] 
CallerID: Fix parsing of malformed callerid

This allows the callerid parsing function to handle malformed input
strings and strings containing escaped and unescaped double quotes.
This also adds a unittest to cover many of the cases where the parsing
algorithm previously failed.

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

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

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

10 years agores_musiconhold: Fix MOH restarting where it left off from the last hold.
Richard Mudgett [Mon, 25 Aug 2014 16:07:28 +0000 (16:07 +0000)] 
res_musiconhold: Fix MOH restarting where it left off from the last hold.

Restore code removed by https://reviewboard.asterisk.org/r/3536/ that
introduced a regression that prevents MOH from restarting were it left off
the last time.

ASTERISK-24019 #close
Reported by: Jason Richards
Patches:
      jira_asterisk_24019_v1.8.patch (license #5621) patch uploaded by rmudgett

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

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

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

10 years agochan_sip: Use the server reflexive ICE candidate RTCP port as provided.
Joshua Colp [Sun, 24 Aug 2014 17:19:23 +0000 (17:19 +0000)] 
chan_sip: Use the server reflexive ICE candidate RTCP port as provided.

This code originally worked around an issue within res_rtp_asterisk itself.
The wrong socket was being used for the STUN check for RTCP, causing the
port to be the same as RTP. This was subsequently fixed and the RTCP port
provided for the ICE candidate is correct and does not need to be incremented.

ASTERISK-23997 #close
Reported by: Badalian Vyacheslav
Patches:
 plus1.diff submitted by Badalian Vyacheslav (license 5249)

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

10 years agores_musiconhold.c: Remove obsolete REF_DEBUG code.
Richard Mudgett [Thu, 21 Aug 2014 22:03:22 +0000 (22:03 +0000)] 
res_musiconhold.c: Remove obsolete REF_DEBUG code.

Remove unneeded code that writes to the wrong file location in an obsolete
format.
........

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

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

10 years agores_musiconhold: Fix reference leaks caused when reloading with REF_DEBUG set
Jonathan Rose [Thu, 21 Aug 2014 21:00:31 +0000 (21:00 +0000)] 
res_musiconhold: Fix reference leaks caused when reloading with REF_DEBUG set

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

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

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

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

10 years agochan_sip: Don't use port derived from fromdomain if it isn't set
Matthew Jordan [Thu, 21 Aug 2014 17:32:52 +0000 (17:32 +0000)] 
chan_sip: Don't use port derived from fromdomain if it isn't set

If a user does not provide a port in the fromdomain setting, chan_sip will set
the fromdomainport to STANDARD_SIP_PORT (5060). The fromdomainport value will
then get used unilaterally in certain places. This causes issues with TLS,
where the default port is expected to be 5061.

This patch modifies chan_sip such that fromdomainport is only used if it is
not the standard SIP port; otherwise, the port from the SIP pvt's recorded
self IP address is used.

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

ASTERISK-24178 #close
Reported by: Elazar Broad
patches:
  fromdomainport_fix.diff uploaded by Elazar Broad (License 5835)
........

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

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

10 years agocli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled.
Richard Mudgett [Wed, 20 Aug 2014 22:17:44 +0000 (22:17 +0000)] 
cli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled.

filename_completion_function() returns memory that was not allocated by
the MALLOC_DEBUG allocation tracker so the memory must be freed by
ast_std_free().
........

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

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

10 years agoAMI Docs: Fix Status channel parameter optionality
Kinsey Moore [Tue, 19 Aug 2014 19:41:14 +0000 (19:41 +0000)] 
AMI Docs: Fix Status channel parameter optionality
........

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

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

10 years agofunc_config: Change 'Not Found' message from ERROR to DEBUG
George Joseph [Mon, 18 Aug 2014 20:16:08 +0000 (20:16 +0000)] 
func_config: Change 'Not Found' message from ERROR to DEBUG

When you call the CONFIG dialplan function with the name of a variable that
doesn't exist in the target context you get an ERROR.  This does nothing but
clutter up the logs with messages that may be perfectly acceptable.  Just
because a variable wasn't in the context doesn't mean it's an error.  Maybei
t's optional or just needs to be defaulted or ignored.

This patch changes the log level from ERROR to DEBUG.  If a dialplan developer
wants to debug their dialplan they still canby setting the console debug level
as needed.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3919/
........

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

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

10 years agoapps/app_dial: Fix Dial 'z' option
Matthew Jordan [Sun, 17 Aug 2014 23:07:06 +0000 (23:07 +0000)] 
apps/app_dial: Fix Dial 'z' option

The 'z' option is supposed to disable the dial timeout in the case of a call
forward. Unfortunately, the wrong timeout timer was passed to the do_forward
function, resulting in the option not working.

ASTERISK-24225 #close
Reported by: dimitripietro
Tested by: dimitripietro
patches:
  jira_asterisk_24225_v1.8.patch uploaded by rmudgett (License 5621)
  jira_asterisk_24225_v11.patch uploaded by rmudgett (License 5621)
........

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

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

10 years agoconfigure: Undefine FORTIFY_SOURCE prior to defining it for patched gcc
Matthew Jordan [Sun, 17 Aug 2014 22:32:25 +0000 (22:32 +0000)] 
configure: Undefine FORTIFY_SOURCE prior to defining it for patched gcc

Some distributions of Linux patch gcc to define FORTIFY_SOURCE when gcc is
executed with optimization. This "help" unfortunately results in re-definition
warnings when FORTIFY_SOURCE is later defined in Asterisk's build system. This
patch undefines FORTIFY_SOURCE prior to defining it to prevent this warning.

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

ASTERISK-24032 #close
Reported by: Kilburn
Tested by: Kilburn, wdoekes
patches:
  1.8.diff uploaded by cloos (License 5956)
  10.diff uploaded by cloos (License 5956)
  11.diff uploaded by cloos (License 5956)
  12.diff uploaded by cloos (License 5956)
  13.diff uploaded by cloos (License 5956)
........

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

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

10 years agoapp_voicemail/app: Remove test events that were duplicated by r421059
Matthew Jordan [Fri, 15 Aug 2014 15:36:44 +0000 (15:36 +0000)] 
app_voicemail/app: Remove test events that were duplicated by r421059

Moving the test event raised when a file is played back (which occurred in
r421059) broke the ever loving snot out of the voicemail tests. This caused
duplicate test events to get raised, as app_voicemail and main/app were raising
events prior to call ast_streamfile. The voicemail tests did not enjoy getting
multiple events.

Since raising the playback event in ast_streamfile is far more useful to the
vast majority of tests, this patch keeps the call there and simply removes the
extraneous calls that duplicated the event.
........

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

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

10 years agomain/file: Move test event to emit PLAYBACK event more consistently
Matthew Jordan [Thu, 14 Aug 2014 20:56:40 +0000 (20:56 +0000)] 
main/file: Move test event to emit PLAYBACK event more consistently

This is being done in advance of the test for ASTERISK-23953
........

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

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

10 years agologger: Don't store verbose-magic in the log files.
Walter Doekes [Wed, 13 Aug 2014 07:47:32 +0000 (07:47 +0000)] 
logger: Don't store verbose-magic in the log files.

In r399267, the verbose2magic stuff was edited. This time it results
in magic characters in the log files for multiline messages.

In trunk (and 13) this was fixed by the "stripping" of those
characters from multiline messages (in r414798).

This is a backport of that fix to 11. That fix is altered to actually
strip the characters and not replace them with blanks.

Review: https://reviewboard.asterisk.org/r/3901/
Review: https://reviewboard.asterisk.org/r/3902/

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

10 years agogeneral: Fix memory Corruption in __ast_string_field_ptr_build_va.
Walter Doekes [Mon, 11 Aug 2014 10:36:38 +0000 (10:36 +0000)] 
general: Fix memory Corruption in __ast_string_field_ptr_build_va.

If the space left in a stringfield is between 0 and
(alignof(ast_string_field_allocation)-1) adding new data would cause
memory corruption, because we would assume enough space (unsigned
underrun).

Thanks Arnd Schmitter for reporting and finding out the cause!

ASTERISK-23508 #close
Reported by: Arnd Schmitter
Tested by: Arnd Schmitter, JoshE

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

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

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

10 years agotcptls: Avoid compiler warning on non-dev-mode.
Walter Doekes [Mon, 11 Aug 2014 09:52:36 +0000 (09:52 +0000)] 
tcptls: Avoid compiler warning on non-dev-mode.
........

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

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

11 years agochan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.
Richard Mudgett [Thu, 7 Aug 2014 21:37:04 +0000 (21:37 +0000)] 
chan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.

Replace sip_tls_read() and sip_tcp_read() with a single function and
resolve the poll/wait issue with large SDP payloads.

ASTERISK-18345 #close
Reported by: Stephane Chazelas
Patches:
      tcptls_pollv4.diff (license #5835) patch uploaded by Elazar Broad

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

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

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

11 years agopbx_lua: fix regression with global sym export and context clash by pbx_config.
George Joseph [Wed, 6 Aug 2014 16:08:07 +0000 (16:08 +0000)] 
pbx_lua: fix regression with global sym export and context clash by pbx_config.

ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
set, was always force loaded before pbx_config.  Since I couldn't find any
reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
realize was that the symbols need to be exported not because Asterisk needs
them but because any external Lua modules like luasql.mysql need the base
Lua language APIs exported (ASTERISK-17279).

Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
context_merge was only merging includes, switches and ignore patterns if
the context was already existing AND has extensions, or if the context was
brand new.  If pbx_lua is loaded before pbx_config, the context will exist
BUT pbx_lua, being implemented as a switch, will never place extensions in
it, just the switch statement.  The result is that when pbx_config loads,
it never merges the switch statement created by pbx_lua into the final
context.

This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
an "else if" in context_merge that catches the case where an existing context
has includes, switchs or ingore patterns but no actual extensions.

ASTERISK-23818 #close
Reported by: Dennis Guse
Reported by: Timo Teräs
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3891/
........

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

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

11 years agoformat.c: Add reason comments for the format_list ordering.
Richard Mudgett [Tue, 5 Aug 2014 18:23:59 +0000 (18:23 +0000)] 
format.c: Add reason comments for the format_list ordering.

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

11 years agoManager - Improve documentation for manager commands Getvar and Setvar.
Rusty Newton [Mon, 4 Aug 2014 19:44:08 +0000 (19:44 +0000)] 
Manager - Improve documentation for manager commands Getvar and Setvar.

The documentation for these commands did not make it clear that they could
accept expressions and functions. Modified to make this clear, but tried
not to be overly explicit.

ASTERISK-21178 #close
Reported by: Rusty Newton
Tested by: Rusty Newton

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

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

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

11 years agodatastores: Audit ast_channel_datastore_remove usage.
Richard Mudgett [Mon, 28 Jul 2014 18:34:18 +0000 (18:34 +0000)] 
datastores: Audit ast_channel_datastore_remove usage.

Audit of v1.8 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leaks in app_speech_utils and func_frame_trace.

* Fixed app_speech_utils not locking the channel when accessing the
channel datastore list.

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

Audit of v11 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leak in func_jitterbuffer.

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

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

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

11 years agofeatures.c: Allow appliationmap to use Gosub.
Richard Mudgett [Fri, 25 Jul 2014 23:13:48 +0000 (23:13 +0000)] 
features.c: Allow appliationmap to use Gosub.

Using DYNAMIC_FEATURES with a Gosub application as the mapped application
does not work.  It does not work because Gosub just pushes the current
dialplan context, exten, and priority onto a stack and sets the specified
Gosub location.  Gosub does not have a dialplan execution loop to run
dialplan like Macro.

* Made the DYNAMIC_FEATURES application mapping feature call
ast_app_exec_macro() and ast_app_exec_sub() for the Macro and Gosub
applications respectively.

* Backported ast_app_exec_macro() and ast_app_exec_sub() from v11 to
execute dialplan routines from the DYNAMIC_FEATURES application mapping
feature.

NOTE: This issue does not affect v12+ because it already does what this
patch implements.

AST-1391 #close
Reported by: Guenther Kelleter

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

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

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

11 years agochan_sip: sip_subscribe_mwi_destroy should not call sip_destroy
Corey Farrell [Thu, 24 Jul 2014 17:56:51 +0000 (17:56 +0000)] 
chan_sip: sip_subscribe_mwi_destroy should not call sip_destroy

sip_subscribe_mwi_destroy calls sip_destroy on the reference counted
mwi->call.  This results in the fields of mwi->call being freed, but
mwi->call itself it leaked.  If other code is still using mwi->call
it can cause problems.  This change uses dialog_unref instead, to
balance the ref provided by sip_alloc().

ASTERISK-24087 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3834/
........

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

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

11 years agoDon't cause Asterisk to exit if ooh323.conf not found.
Jason Parker [Thu, 24 Jul 2014 16:49:35 +0000 (16:49 +0000)] 
Don't cause Asterisk to exit if ooh323.conf not found.

(closes issue ASTERISK-23814)
........

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

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

11 years agoapp_voicemail: use a consistent generator string
Scott Griepentrog [Wed, 23 Jul 2014 13:21:40 +0000 (13:21 +0000)] 
app_voicemail: use a consistent generator string

When updating voicemail.conf when a user changes
their pin, change the generator string to be the
same as the module name when reading so that the
same config_hook will be called.

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

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

11 years agoFix more dev-mode build issues
Kinsey Moore [Tue, 22 Jul 2014 14:00:33 +0000 (14:00 +0000)] 
Fix more dev-mode build issues
........

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

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

11 years agomanager: Return ActionID on nominal responses to PresenceState action
Matthew Jordan [Tue, 15 Jul 2014 22:05:16 +0000 (22:05 +0000)] 
manager: Return ActionID on nominal responses to PresenceState action

When the PresenceState action is executed, the nominal path fails to include
the ActionID in the successful response. This patch adds a call to
astman_start_ack, which guarantees that an ActionID (if provided) will be
sent back to the AMI client.

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

ASTERISK-23985 #close

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

11 years agofunc_uri: URIENCODE/URIDECODE - allow empty strings as argument
Jonathan Rose [Tue, 15 Jul 2014 17:32:15 +0000 (17:32 +0000)] 
func_uri: URIENCODE/URIDECODE - allow empty strings as argument

Previously these two dialplan functions would issue warnings and
return failure when an empty string is used as the argument. Now
they will not issue a warning and will successfully return an
empty string.

ASTERISK-23911 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3745/
........

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

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

11 years agoastobj2: work around REF_DEBUG race which causes out of order log entries
Corey Farrell [Sun, 13 Jul 2014 21:51:19 +0000 (21:51 +0000)] 
astobj2: work around REF_DEBUG race which causes out of order log entries

* Update refcounter.py to use delta's to track the current reference count.
* Use result from internal_ao2_ref to write old_refcount to refs_log.

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

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

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

11 years agoFix minor reference leaks in app_skel and TEST_FRAMEWORK
Corey Farrell [Sun, 13 Jul 2014 16:43:37 +0000 (16:43 +0000)] 
Fix minor reference leaks in app_skel and TEST_FRAMEWORK

* Cleanup games object in app_skel.
* Cleanup stasis subscription to TEST_FRAMEWORK in manager.c (12+).

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

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

11 years agoconfig: inform config hook of change when writing file
Scott Griepentrog [Fri, 11 Jul 2014 14:23:18 +0000 (14:23 +0000)] 
config: inform config hook of change when writing file

When updated configuration is written back to the conf
file - for example when a user changes their voicemail
pin, make sure that any config hook that wants to know
of changes is informed.

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

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

11 years agoinclude/asterisk/xmpp.h: Convert indentation to tabs
Matthew Jordan [Thu, 10 Jul 2014 15:35:21 +0000 (15:35 +0000)] 
include/asterisk/xmpp.h: Convert indentation to tabs

This is a whitespace only change.

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

11 years agochan_dahdi/sig_pri: Fix type mismatch in the idledial feature's channel creation.
Richard Mudgett [Thu, 10 Jul 2014 01:42:26 +0000 (01:42 +0000)] 
chan_dahdi/sig_pri: Fix type mismatch in the idledial feature's channel creation.

Square pegs in round holes don't work very well.
........

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

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

11 years agochan_dahdi: Add inband_on_setup_ack compatibility option.
Richard Mudgett [Thu, 3 Jul 2014 21:48:03 +0000 (21:48 +0000)] 
chan_dahdi: Add inband_on_setup_ack compatibility option.

The new inband_on_setup_ack option causes Asterisk to assume inband audio
may be present when a SETUP_ACKNOWLEDGE message is received.

Q.931 Section 5.1.3 says that in scenarios with overlap dialing, when a
dialtone is sent from the network side, progress indicator 8 "Inband info
now available" MAY be sent to the CPE if no digits were received with the
SETUP.  It is thus implied that the ie is mandatory if digits came with
the SETUP and dialtone is needed.  This option should be enabled, when the
network sends dialtone and you want to hear it, but the network doesn't
send the progress indicator when needed.

NOTE: For Q.SIG setups this option should be enabled when outgoing overlap
dialing is also enabled because Q.SIG does not send the progress indicator
with the SETUP ACK.

The commit -r413714 (AST-1338) which causes this issue was dealing with a
SIP-to-ISDN interoperability issue.

This commit is a merge of the two patches indicated below.

ASTERISK-23897 #close
Reported by: Pavel Troller
Patches:
      pri-4.diff (license #6302) patch uploaded by Pavel Troller
      jira_asterisk_23897_v11.patch (license #5621) patch uploaded by rmudgett

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

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

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

11 years agomain/untils: Prevent potential infinite loop in ast_careful_fwrite
Matthew Jordan [Thu, 3 Jul 2014 11:24:50 +0000 (11:24 +0000)] 
main/untils: Prevent potential infinite loop in ast_careful_fwrite

A loop in ast_careful_fwrite exists that will continually attempt to write to
a file stream, even in the presence of EAGAIN/EINTR errors. However, if a
connection that uses ast_careful_fwrite closes suddenly, ast_careful_fwrite's
call to fflush may return EAGAIN/EINTER along with EOF. A subsequent call to
fflush will return EOF but not clear errno, resulting in an infinite loop.

This patch clears errno after it is detected and handled the loop, such that
any subsequent call to fflush will not get erroneously stuck.

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

#ASTERISK-23984 #close
Reported by: Steve Davies
patches:
  fflush_loop_fix uploaded by one47 (License 5012)
........

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

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

11 years agores_rtp_asterisk: Add SHA-256 support for DTLS and perform DTLS negotiation on RTCP.
Joshua Colp [Mon, 30 Jun 2014 19:42:18 +0000 (19:42 +0000)] 
res_rtp_asterisk: Add SHA-256 support for DTLS and perform DTLS negotiation on RTCP.

This change fixes up DTLS support in res_rtp_asterisk so it can accept and provide
a SHA-256 fingerprint, so it occurs on RTCP, and so it occurs after ICE negotiation
completes. Configuration options to chan_sip have also been added to allow behavior
to be tweaked (such as forcing the AVP type media transports in SDP).

ASTERISK-22961 #close
Reported by: Jay Jideliov

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

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

11 years agochan_sip: be more tolerant of whitespace between attributes in SDP fmtp line
Matthew Jordan [Mon, 30 Jun 2014 03:23:20 +0000 (03:23 +0000)] 
chan_sip: be more tolerant of whitespace between attributes in SDP fmtp line

This patch is essentially a backport of a small portion of r397526 from
ASTERISK-21981. In that patch, pass through support and format attribute
negotiation was added for Opus. Part of that included being more tolerant to
whitespace in the fmtp line of an SDP; that part of the patch is being
applied here.

As the author of the backport pointed out, in SDP, the fmtp line is allowed to
include whitespace between attributes. RFC 3267 chapter 8.3 (from 2001)
includes an example for this. This was not removed in the updated RFC 4867 in
2007.

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

ASTERISK-23916 #close
Reported by: Alexander Traud
patches:
  sdpFMTPspace_Asterisk11.patch uploaded by Alexander Traud (License 6520)
........

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

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

11 years agoEnsure REF_DEBUG records entrys for attempts to ao2_ref an invalid object
Corey Farrell [Fri, 27 Jun 2014 19:26:07 +0000 (19:26 +0000)] 
Ensure REF_DEBUG records entrys for attempts to ao2_ref an invalid object

This change ensures that __ao2_ref_debug writes to ref_log when given a
non-NULL pointer to an invalid ao2 object.  This is to ensure that we
record any attempt manipulate references of already freed objects.

ASTERISK-23948 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3677/
........

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

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

11 years agorefcounter.py: prevent use of excessive RAM with large refs logs
Corey Farrell [Fri, 27 Jun 2014 19:16:00 +0000 (19:16 +0000)] 
refcounter.py: prevent use of excessive RAM with large refs logs

When processing a 212MB refs file, refcounter.py used over 3GB of RAM.
This change greatly reduces memory usage in two ways:

* Saving object history in whole lines instead of separated values.
* Not saving normal/skewed/leaked object lists unless they are requested.

ASTERISK-23921 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3668/
........

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

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

11 years agores_http_websocket: Export symbol for ast_websocket_set_timeout
Matthew Jordan [Thu, 26 Jun 2014 18:25:19 +0000 (18:25 +0000)] 
res_http_websocket: Export symbol for ast_websocket_set_timeout

Thanks to Sean Bright for pointing out that this was missed in #asterisk-dev.

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

11 years agoudptl: Correct FEC to not consider negative sequence numbers as missing
Matthew Jordan [Thu, 26 Jun 2014 12:22:22 +0000 (12:22 +0000)] 
udptl: Correct FEC to not consider negative sequence numbers as missing

When using FEC, with span=3 and entries=4 Asterisk will attempt to repair
the packet with sequence number 5, as it will see that packet -4 is
missing. The result is Asterisk sending garbage packets that can kill a
fax.

This patch adds a check to see if the sequence number is valid before
checking if the packet is missing.

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

#ASTERISK-23908 #close
Reported by: Torrey Searle
patches:
  udptl_fec.patch uploaded by Torrey Searle (License 5334)
........

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

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

11 years agores_http_websocket: Close websocket correctly and use careful fwrite
Matthew Jordan [Thu, 26 Jun 2014 12:06:22 +0000 (12:06 +0000)] 
res_http_websocket: Close websocket correctly and use careful fwrite

When a client takes a long time to process information received from Asterisk,
a write operation using fwrite may fail to write all information. This causes
the underlying file stream to be in an unknown state, such that the socket
must be disconnected. Unfortunately, there are two problems with this in
Asterisk's existing websocket code:
1. Periodically, during the read loop, Asterisk must write to the connected
   websocket to respond to pings. As such, Asterisk maintains a reference to
   the session during the loop. When ast_http_websocket_write fails, it may
   cause the session to decrement its ref count, but this in and of itself
   does not break the read loop. The read loop's write, on the other hand,
   does not break the loop if it fails. This causes the socket to get in a
   'stuck' state, preventing the client from reconnecting to the server.
2. More importantly, however, is that the fwrite in ast_http_websocket_write
   fails with a large volume of data when the client takes awhile to process
   the information. When it does fail, it fails writing only a portion of
   the bytes. With some debugging, it was shown that this was failing in a
   similar fashion to ASTERISK-12767. Switching this over to ast_careful_fwrite
   with a long enough timeout solved the problem.

ASTERISK-23917 #close
Reported by: Matt Jordan

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

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

11 years agochan_sip: Fix handling of "From" headers longer than 256 characters
Corey Farrell [Thu, 26 Jun 2014 10:04:01 +0000 (10:04 +0000)] 
chan_sip: Fix handling of "From" headers longer than 256 characters

From headers were processed using a 256 character buffer on the stack.
This change replaces that with a heap allocation by ast_strdup.

ASTERISK-23790 #close
Reported by: uniken1
Tested by: uniken1
Review: https://reviewboard.asterisk.org/r/3669/
Patches:
    chan_sip-large-from-header-1.8-r3.patch uploaded by wdoekes (license 5674)
........

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

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

11 years agores_rtp_asterisk: Return the length of data written when sending via ICE instead...
Joshua Colp [Mon, 23 Jun 2014 18:49:14 +0000 (18:49 +0000)] 
res_rtp_asterisk: Return the length of data written when sending via ICE instead of 0.

ASTERISK-23834 #close
Reported by: Richard Kenner

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

11 years agomain/features - documentation - reformat examples and options in features.conf.sample...
Rusty Newton [Mon, 23 Jun 2014 14:35:53 +0000 (14:35 +0000)] 
main/features - documentation - reformat examples and options in features.conf.sample to show clearly which options apply in which section

The features.conf sample can be a bit confusing about what parking options can be set only in the general context, or both in the general context (for the default parking lot) and in other parking lot contexts. A bug was filed due to confusion and a little googling will show lots of other confused users.

Despite some comments on the individual options, it still reads in a confusing way. In this patch I separate out those options with some headings in to attempt a better layout. I went ahead and modified other headings in the file, or added them to facilitate better visual scanning.

ASTERISK-23667
Review: https://reviewboard.asterisk.org/r/3622/

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

11 years agobuild: Turn FORTIFY_SOURCE off if DONT_OPTIMIZE is set.
George Joseph [Sun, 22 Jun 2014 20:52:19 +0000 (20:52 +0000)] 
build:  Turn FORTIFY_SOURCE off if DONT_OPTIMIZE is set.

AST_FORTIFY_SOURCE is automatically set in ./Makefile even if DONT_OPTIMIZE
is set in menuselect.  This causes gcc to complain that _FORTIFY_SOURCE
requires optimization and the build will fail.  You can specify
"make AST_FORTIFY_SOURCE=''" but I always forget.

This patch moves the set of AST_FORTIFY_SOURCE to Makefile.rules and only
sets it if DONT_OPTIMIZE is "no".  The move is necessary because the
top-level Makefile doesn't include menuselect.makeopts.

This doesn't solve the entire problem however because res_config_mysql
seems to force _FORTIFY_SOURCE so res_config_mysql has to be disabled
for now if DONT_OPTIMIZE is set.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3664/
........

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

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

11 years agobuild: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
George Joseph [Fri, 20 Jun 2014 23:14:52 +0000 (23:14 +0000)] 
build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.

ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes.  They're in
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.

A regenerated ./configure and include/asterisk/autoconfig.h.in are included
but can be regenerated by running ./bootstrap.sh at any time.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/
........

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

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

11 years agobuild: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
George Joseph [Fri, 20 Jun 2014 21:57:00 +0000 (21:57 +0000)] 
build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.

ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes.  They're in
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/

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

11 years agoFix build warnings with TEST_FRAMEWORK enabled
Kinsey Moore [Thu, 19 Jun 2014 19:34:37 +0000 (19:34 +0000)] 
Fix build warnings with TEST_FRAMEWORK enabled
........

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

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

11 years agoRemove the problematic and unneeded AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
George Joseph [Thu, 19 Jun 2014 16:02:12 +0000 (16:02 +0000)] 
Remove the problematic and unneeded AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c

AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be incorrectly loaded
before pbx_config.  pbx_config was therefore blowing away contexts that were
created by pbx_lua.  With AST_MODFLAG_DEFAULT the load order is now correct
and contexs are being properly merged.  AST_MODFLAG_GLOBAL_SYMBOLS was not
needed anyway since no other modules needed its global symbols that early.

ASTERISK-23818 #close
Reported by: Dennis Guse
Tested by: Dennis Guse
Tested by: George Joseph

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

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

11 years agoUpdate extensions.lua.sample with naming conflict guidance.
George Joseph [Wed, 18 Jun 2014 17:06:39 +0000 (17:06 +0000)] 
Update extensions.lua.sample with naming conflict guidance.

The sample extensions.lua was causing pbx_lua to fail to load when parsing
'app.goto("default", "s", 1)' because in Lua 5.2, 'goto' is now a reserved
word.  This patch adds guidance to extensions.lua.sample and changed
'app.goto("default", "s", 1)' to 'app.['goto']("default", "s", 1)'.

ASTERISK-23844 #close
Reported by: rnewton
Tested by: gtjoseph
Review: https://reviewboard.asterisk.org/r/3627/

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

11 years agoAllow the PUSH and UNSHIFT functions to set inheritable channel variables.
Mark Michelson [Tue, 17 Jun 2014 18:40:35 +0000 (18:40 +0000)] 
Allow the PUSH and UNSHIFT functions to set inheritable channel variables.
........

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

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

11 years agoMoH: Don't restart stream on repeated start calls
Kinsey Moore [Tue, 17 Jun 2014 16:21:00 +0000 (16:21 +0000)] 
MoH: Don't restart stream on repeated start calls

Currently, music on hold will stop and then start again from the
beginning if ast_moh_start() is called multiple times. This can happen
if a call is put on hold repeatedly (the channel receives multiple
HOLD control frames) and can be triggered from ARI by starting MoH on a
channel multiple times. This is fairly jarring/annoying to users.

This change prevents MoH from being restarted if the requested music
class is the same as the one currently playing.

This includes an extra check to prevent the errors previously
experienced in the testsuite and has 100+ test runs behind it.

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

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

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

11 years agoWe have faced situation when using CDR and CEL by sqlite3 modules. With system having...
Igor Goncharovskiy [Mon, 16 Jun 2014 09:00:18 +0000 (09:00 +0000)] 
We have faced situation when using CDR and CEL by sqlite3 modules. With system having high load (~100 concurrent calls created by sipp) we found many cdr and cel records missed. There is special finction in sqlite3, that make able to fix this situation - sqlite3_wait_timeout, that also can replace awful code cdr_sqlite3 ad cel_sqlite3 modules. Also this function can be used for aastdb and res_config_sqlite3 to avoid missed writes to sqlite db.

#ASTERISK-23766 #close
Reported by: Igor Goncharovsky

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

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

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

11 years agoMoH: Undo commit r416150 (1.8)
Matthew Jordan [Sun, 15 Jun 2014 21:17:02 +0000 (21:17 +0000)] 
MoH: Undo commit r416150 (1.8)

This patch reverts r416150. When the comparison between mohclass->name and
state->class->name is made, you are not guaranteed that (a) state->class is
non-NULL or that state or state->class are in a safe state.

Crashes caught by the bridges/transfer_capabilities test.
........

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

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

11 years agoMoH: Don't restart stream on repeated start calls
Kinsey Moore [Fri, 13 Jun 2014 13:08:32 +0000 (13:08 +0000)] 
MoH: Don't restart stream on repeated start calls

Currently, music on hold will stop and then start again from the
beginning if ast_moh_start() is called multiple times. This can happen
if a call is put on hold repeatedly (the channel receives multiple
HOLD control frames) and can be triggered from ARI by starting MoH on a
channel multiple times. This is fairly jarring/annoying to users.

This change prevents MoH from being restarted if the requested music
class is the same as the one currently playing.

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

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

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

11 years agoAST-2014-007: Fix of fix to allow AMI and SIP TCP to send messages.
Richard Mudgett [Fri, 13 Jun 2014 05:06:02 +0000 (05:06 +0000)] 
AST-2014-007: Fix of fix to allow AMI and SIP TCP to send messages.

ASTERISK-23673 #close
Reported by: Richard Mudgett

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

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

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

11 years agomain/pbx - documentation - enhance 'core show hints' and 'core show hint' help text
Rusty Newton [Thu, 12 Jun 2014 21:16:15 +0000 (21:16 +0000)] 
main/pbx - documentation - enhance 'core show hints' and 'core show hint' help text

Adds descriptive help text to 'core show hints' and 'core show hint'. The text describes the various columns for the sake of clarity.

ASTERISK-23764
Review: https://reviewboard.asterisk.org/r/3610/
........

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

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

11 years agochan_sip: DEBUG messages in sdp_crypto.c display despite a DEBUG level of zero
Corey Farrell [Thu, 12 Jun 2014 17:20:05 +0000 (17:20 +0000)] 
chan_sip: DEBUG messages in sdp_crypto.c display despite a DEBUG level of zero

Change debug level for messages in sdp_crypto.c from zero to one.  This
ensures the messages are not displayed when debugging is disabled.  Change
does not apply to 12+ as it was already fixed in those versions.

ASTERISK-23246 #close
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/3605/
........

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

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

11 years agoAST-2014-007: Fix DOS by consuming the number of allowed HTTP connections.
Richard Mudgett [Thu, 12 Jun 2014 16:22:19 +0000 (16:22 +0000)] 
AST-2014-007: Fix DOS by consuming the number of allowed HTTP connections.

Simply establishing a TCP connection and never sending anything to the
configured HTTP port in http.conf will tie up a HTTP connection.  Since
there is a maximum number of open HTTP sessions allowed at a time you can
block legitimate connections.

A similar problem exists if a HTTP request is started but never finished.

* Added http.conf session_inactivity timer option to close HTTP
connections that aren't doing anything.  Defaults to 30000 ms.

* Removed the undocumented manager.conf block-sockets option.  It
interferes with TCP/TLS inactivity timeouts.

* AMI and SIP TLS connections now have better authentication timeout
protection.  Though I didn't remove the bizzare TLS timeout polling code
from chan_sip.

* chan_sip can now handle SSL certificate renegotiations in the middle of
a session.  It couldn't do that before because the socket was non-blocking
and the SSL calls were not restarted as documented by the OpenSSL
documentation.

* Fixed an off nominal leak of the ssl struct in
handle_tcptls_connection() if the FILE stream failed to open and the SSL
certificate negotiations failed.

The patch creates a custom FILE stream handler to give the created FILE
streams inactivity timeout and timeout after a specific moment in time
capability.  This approach eliminates the need for code using the FILE
stream to be redesigned to deal with the timeouts.

This patch indirectly fixes most of ASTERISK-18345 by fixing the usage of
the SSL_read/SSL_write operations.

ASTERISK-23673 #close
Reported by: Richard Mudgett
........

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

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

11 years agoCorrect UPGRADE.txt notes in r415825
Jonathan Rose [Thu, 12 Jun 2014 15:42:10 +0000 (15:42 +0000)] 
Correct UPGRADE.txt notes in r415825

The change was marked against the wrong version of Asterisk. My apologies.

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

11 years agoapp_queue: delayed state can cause early leavewhenempty ringing
Scott Griepentrog [Thu, 12 Jun 2014 15:40:41 +0000 (15:40 +0000)] 
app_queue: delayed state can cause early leavewhenempty ringing

In app_queue, device state changes arrive in event messages and
update the queue member status value.  That value is checked in
get_member_status() to decide that the caller should leave when
there are no available members.  Although event messages can be
delayed by other activity, there is no adverse affect by lagged
status except in one specific case: there is only one available
member, it was just rung, and leavewhenempty is enabled set for
ringing members.  This change adds a direct check of the device
state only under this condition where the caller may be dropped
incorrectly, resolving this issue without affecting performance
of app_queue normally.

AST-1248 #close
Review: https://reviewboard.asterisk.org/r/3595/
Reported by: Thomas Arimont
........

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

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

11 years agoMixMonitor: Add class authorization requirements to MixMonitor AMI commands
Jonathan Rose [Thu, 12 Jun 2014 15:22:02 +0000 (15:22 +0000)] 
MixMonitor: Add class authorization requirements to MixMonitor AMI commands

MixMonitor AMI commands StartMixMonitor and StopMixMonitor lacked class
authorization. StopMixMonitor now requires that the manager user either have
the call or system class authorization. StartMixMonitor is a slightly larger
issue since it can execute shell commands if the right arguments are passed
into it, and we consider this a permission escalation. A security release
will be issued for problem this shortly.

ASTERISK-23609 #close
Reported by: Corey Farrell

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

11 years agoformat.c: Fix misuse of hash container function.
Richard Mudgett [Wed, 11 Jun 2014 22:44:30 +0000 (22:44 +0000)] 
format.c: Fix misuse of hash container function.

The supplied hash function to a container must be idempotent given the
object's key value to figure out which container bucket the object belongs
in.  Returning a random number or the current container count is not
idempotent.  The "computed hash" value doesn't help find the object later
in those cases.

* Fixed the format_list container to actually be a list since that is how
the container is used.  Conceptually, if more than 283 formats were added
to the format_list then odd things may have happened before the fix.

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

11 years agochan_ooh323: fix loading module failure if there no accessible h323_log or ooh323...
Alexandr Anikin [Tue, 10 Jun 2014 09:13:43 +0000 (09:13 +0000)] 
chan_ooh323: fix loading module failure if there no accessible h323_log or ooh323 config file

change return 1 to return AST_MODULE_LOAD_FAILURE on module load routine
few cosmetic changes

ASTERISK-23814 #close

(closes issue ASTERISK-23814)

Reported by: Igor Goncharovsky
Patches:
ASTERISK-23814-ast11.patch

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

11 years agosafe_asterisk: Cleanup additions to r415132.
Walter Doekes [Mon, 9 Jun 2014 11:57:09 +0000 (11:57 +0000)] 
safe_asterisk: Cleanup additions to r415132.

Replaced a stray echo that should've been a message call in
safe_asterisk. I'm using the contents of the old message inside the
if $NOTIFY so peoples log parsing scripts won't get confused by new
messages. I'll clean that up in trunk.

(Note that a 'make install' still won't overwrite your old safe_asterisk
if it exists. See ASTERISK-21965.)

ASTERISK-23492 #close
........

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

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

11 years agoautoservice: stop thread on graceful shutdown
Corey Farrell [Mon, 9 Jun 2014 03:47:11 +0000 (03:47 +0000)] 
autoservice: stop thread on graceful shutdown

This change adds thread shutdown to autoservice for graceful shutdowns only.
ast_register_cleanup is backported to 1.8 to allow this.  The logger callid
is also released on shutdown in 11+.

ASTERISK-23827 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3594/
........

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

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

11 years agochan_sip: Fix order of variables specified in SIPNotify action
Jonathan Rose [Fri, 6 Jun 2014 21:27:41 +0000 (21:27 +0000)] 
chan_sip: Fix order of variables specified in SIPNotify action

Prior to this patch, sequential variables would be ordered in reverse
from the order specified in the manager action.

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

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

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

11 years agoconfig: Fix config files not reloading when only an included file changes.
Richard Mudgett [Thu, 5 Jun 2014 17:45:24 +0000 (17:45 +0000)] 
config: Fix config files not reloading when only an included file changes.

The twisted logic determining if a config file should be reloaded was
mostly broken and disabled.  The incorrect test that ASTERISK-23383 fixed
actually reenabled the broken logic.  The incorrect test was causing the
timestamp to always be cleared which caused config files with includes to
always be reloaded.

* Made wildcard includes always cause a reload.  Determining if a file was
deleted cannot be determined without restructuring the cache to determine
if any files are missing from the last files actually loaded.  Also
without refactoring config_text_file_load(), the glob loop couldn't check
more than one file for changes anyway.

* Made remove the cache entry if the file no longer exists when trying to
get its timestamp or it is no longer a regular file.  This fixes the
corner case where the file was loaded, then deleted, then the config
reloaded, then the file restored with the same timestamp, and then the
config reloaded again.

* Made remove the cache entry include list when actually loading the file.
This gets rid of any stale includes the file had from the last time the
file was loaded.

ASTERISK-23683 #close
Reported by: tootai

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

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

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

11 years agoapp_confbridge: Allow muting of users waiting to enter a ConfBridge
Matthew Jordan [Thu, 5 Jun 2014 14:32:38 +0000 (14:32 +0000)] 
app_confbridge: Allow muting of users waiting to enter a ConfBridge

Prior to this patch, users waiting to enter a ConfBridge were not considered
when muted via the CLI or via AMI. Instead, a confusing message would be
emitted stating that the channel did not exist.

This patch allows a user to be muted when waiting to enter a ConfBridge
conference. This is equivalent to start when muted, only toggled via the CLI
or AMI.

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

ASTERISK-23824 #close
patches:
  rb3582.patch uploaded by tm1000 (License 6524)

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

11 years agosafe_asterisk: Cleanup and debian compatibility.
Walter Doekes [Wed, 4 Jun 2014 20:12:36 +0000 (20:12 +0000)] 
safe_asterisk: Cleanup and debian compatibility.

Cleans up the safe_asterisk script and adds the ASTSAFE_FOREGROUND
option that allows the debian asterisk init script to capture the
right pid.

* Drop the vim #modeline which wasn't used. Use test consistently
  without the odd configure xno syntax. Double quote all paths.
  General cleanup.
* Don't output message()s to the console but only to TTY if set.
* Allow TTY to be "no" as well as empty (debian compatibility with
  debian/patches/safe_asterisk-config).
* Add option to export ASTSAFE_FOREGROUND=1 from the init script
  that calls this to disable backgrounding. Debian uses a similar
  method in debian/patches/safe_asterisk-nobg).

ASTERISK-23492 #close
Review: https://reviewboard.asterisk.org/r/3574/
........

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

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

11 years agoapp_confbridge: Correct verification of conference name length
Corey Farrell [Wed, 4 Jun 2014 07:20:22 +0000 (07:20 +0000)] 
app_confbridge: Correct verification of conference name length

Conference names were not checked for maximum length, allowing unexpected
behaviour.  This change adds checking to ensure the maximum length is not
exceeded.  The maximum length is also changed from 32 to AST_MAX_EXTENSION.

ASTERISK-23035 #close
Reported by: Iñaki Cívico
Tested by: Iñaki Cívico
Patches:
    confbridge-enforce_max-1.8.patch uploaded by coreyfarrell (license 5909)
    confbridge-enforce_max-11up.patch uploaded by coreyfarrell (license 5909)
........

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

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

11 years agofunc_odbc: Fix fixed size buffers fix (r414968).
Walter Doekes [Tue, 3 Jun 2014 07:32:30 +0000 (07:32 +0000)] 
func_odbc: Fix fixed size buffers fix (r414968).

The change that removed the fixed size buffers in odbc-related code --
removing arbitrary column width limits -- was incomplete. This change
adds: no segfault on writesql without insertsql and return value checks
after strdup.

While I was in the vicinity I cleaned up the linefeeds in the odbc
function descriptions, moved some code for clarity, removed some blobs
and noted (but didn't fix) that the 'odbc write ... exec' CLI command
doesn't behave as the dialplan equivalent when insertsql= is used.

#ASTERISK-23582 #close
Review: https://reviewboard.asterisk.org/r/3579/
........

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

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

11 years agomain/config.c: AMI action UpdateConfig EmptyCat clears all categories
Matthew Jordan [Fri, 30 May 2014 11:59:02 +0000 (11:59 +0000)] 
main/config.c: AMI action UpdateConfig EmptyCat clears all categories

When invoking UpdateConfig AMI action with Action set to EmptyCat, Asterisk
will make all categories empty in the config but the one requested with a
Cat variable. This is due to a bug in ast_category_empty (main/config.c)
that makes an incorrect comparison for a category name.

This patch corrects the comparison such that only the requested category
is cleared.

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

ASTERISK-23803 #close
Reported by: zvision
patches:
  manager.c.diff uploaded by zvision (License 5755)
........

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

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

11 years agoPBX: Prevent incorrect hint parsing
Kinsey Moore [Thu, 29 May 2014 18:33:34 +0000 (18:33 +0000)] 
PBX: Prevent incorrect hint parsing

Dynamic and pattern matching hints should not be checked for their last
known state until they are instantiated by subscribers.

(closes issue AFS-56)
Reported by: John Hardin
Patch AFS-56-pbx.diff submitted by Matt Jordan (license 6283)
........

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

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

11 years agores_config_odbc: Use dynamically sized buffers to store row data so values do not...
Joshua Colp [Wed, 28 May 2014 11:36:01 +0000 (11:36 +0000)] 
res_config_odbc: Use dynamically sized buffers to store row data so values do not get truncated.

ASTERISK-23582 #close
ASTERISk-23582 #comment Reported by: Walter Doekes

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

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

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

11 years agochan_unistim: Unlock mutex in rare OOM condition.
Walter Doekes [Wed, 28 May 2014 09:41:53 +0000 (09:41 +0000)] 
chan_unistim: Unlock mutex in rare OOM condition.

ASTERISK-23792 #close
Reported by: Peter Whisker

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

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

11 years agochan_sip: Start session timer at 200, not at INVITE.
Walter Doekes [Tue, 27 May 2014 21:19:26 +0000 (21:19 +0000)] 
chan_sip: Start session timer at 200, not at INVITE.

Asterisk started counting the session timer at INVITE while the other
end correctly started at 200. This meant that for short session-expiries
(90 seconds) combined with long ringing times (e.g. 30 seconds), asterisk
would wrongly assume that the timer was hit before the other end thought
it was time to send a session refresh. This resulted in prematurely
ended calls.

This changes the session timer to start counting first at 200 like RFC
says it should.

(Also removed a few excess NULL checks that would never hit, because if
they did, asterisk would have crashed already.)

ASTERISK-22551 #close
Reported by: i2045

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

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

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

11 years agores_config_odbc: Fix old and new ast_string_field memory leaks.
Walter Doekes [Tue, 27 May 2014 19:46:48 +0000 (19:46 +0000)] 
res_config_odbc: Fix old and new ast_string_field memory leaks.

The ODBC realtime driver uses ^NN parameter encoding to cope with the
special meaning of the semi-colon. A semi-colon in a field is
interpreted as if the key was supplied twice, something which isn't
otherwise possible with fixed database columns. E.g. allow=alaw;ulaw
is parsed as allow=alaw and allow=ulaw. A literal semi-colon is
rewritten to ^3B when stored in the database.

The module uses a stringfield to efficiently store the encoded
parameters. However, this stringfield wasn't always freed in some
off-nominal cases.

Commit r413241 fixed initialization so the encoding for INSERT and
DELETE queries wouldn't crash. (Only SELECTs and UPDATEs worked
apparently.) But that commit forgot the frees. This change cleans
that up.

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

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

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

11 years agoBlocked revisions 414488
Jonathan Rose [Fri, 23 May 2014 16:07:57 +0000 (16:07 +0000)] 
Blocked revisions 414488

........
Backport Asterisk 11 r413876 to 1.8
........
r413876 | jrose | 2014-05-13 12:40:00 -0500 (Tue, 13 May 2014) | 6 lines

chan_sip: Add TLS and SRTP status to CLI command 'sip show channel'

ASTERISK-23564 #close
Reported by: Patrick Laimbock
Review: https://reviewboard.asterisk.org/r/3474/

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

11 years agoapp_meetme: Don't interrupt MOH for waitmarked users.
Richard Mudgett [Thu, 22 May 2014 15:50:38 +0000 (15:50 +0000)] 
app_meetme: Don't interrupt MOH for waitmarked users.

Occasionally, when the last marked user leaves the conference, waitmarked
users don't get MOH if MOH is supposed to be played while a waitmarked
user is waiting for another marked user.

* Made not interrupt MOH when the user is a waitmarked user.  The
waitmarked user doesn't need to hear any leave announcements from the
conference as the user would have already heard different leave
announcements if they were enabled.  Apparently DAHDI occasionally sends
unending non-silent streams to these users or a normal user still in the
conference has continuous high background noise.  These non-silent streams
cause MOH to be suspended while the never ending "announcement" is played.

Issue caused by ASTERISK-13680.

AST-1349 #close
Reported by: Tyler Stewart

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

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

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

11 years agoUPGRADE: Add note for REF_DEBUG flag
Matthew Jordan [Thu, 22 May 2014 13:59:32 +0000 (13:59 +0000)] 
UPGRADE: Add note for REF_DEBUG flag
........

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

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

11 years agochan_local: Only block media frames when a generator is on both ends of a local channel.
Richard Mudgett [Wed, 21 May 2014 22:05:53 +0000 (22:05 +0000)] 
chan_local: Only block media frames when a generator is on both ends of a local channel.

The fix for ASTERISK-12292 was a bit too aggressive.  You could have
generators pointed at each other on local channels but need to get other
kinds of frames such as DTMF or CONNECTED_LINE frames accross.
........

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

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