]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
10 years agoMore .gitignore updates 04/204/1 certified/1.8.28
George Joseph [Wed, 15 Apr 2015 21:08:09 +0000 (15:08 -0600)] 
More .gitignore updates

Added .pyc and .sha1 to the top-level .gitignore.

Change-Id: I7dfc4f554d54d22947b38140d3305007503cc16a
Tested-by: George Joseph <george.joseph@fairview5.com>
10 years agoBackport menuselect to 12,11,1.8 03/203/1
George Joseph [Tue, 14 Apr 2015 00:34:55 +0000 (18:34 -0600)] 
Backport menuselect to 12,11,1.8

Backport menuselect from 13->12->11->1.8

Change-Id: I54c4dd2bdacd3c9d858be3acab08706941f2e585

10 years ago.gitignore updates for 1.8 02/202/1
George Joseph [Tue, 14 Apr 2015 01:17:29 +0000 (19:17 -0600)] 
.gitignore updates for 1.8

Added bootstrap products
Added channels/h323/Makefile

Change-Id: I6b3bc56bf7bdaee0554f36fc2ce3a77e9eaf8aa3

10 years ago.gitignore: Ignore tarballs (*.gz) 01/201/1
Matt Jordan [Sun, 12 Apr 2015 04:22:59 +0000 (23:22 -0500)] 
.gitignore: Ignore tarballs (*.gz)

This patch updates the root .gitignore file to ignore files with a .gz
extension. This will cause git to ignore downloaded sound tarballs in
the the sounds/ directory.

Change-Id: Ie84f085cc0fa51262209e7bfc1b1ba8c04a1ef59

10 years agomain/editline: Add .gitignore. 00/200/1
Corey Farrell [Sun, 12 Apr 2015 11:12:45 +0000 (07:12 -0400)] 
main/editline: Add .gitignore.

This patch adds a .gitignore for main/editline to ignore all build results.

Change-Id: I68c7bf375ea46282689e5a706534b69fca233b5d
(cherry picked from commit 5d34bce635ad7f225d557fa226e6b79c6293dbe1)

10 years agoAdd .gitignore and .gitreview files 99/199/1
George Joseph [Sat, 11 Apr 2015 18:20:07 +0000 (12:20 -0600)] 
Add .gitignore and .gitreview files

Add the .gitignore and .gitreview files to the asterisk repo.

NB:  You can add local ignores to the .git/info/exclude file
without having to do a commit.

Common ignore patterns are in the top-level .gitignore file.
Subdirectory-specific ignore patterns are in their own .gitignore
files.

Change-Id: I842a1588ff27d8a0189f12d597f0a7af033d6c69
Tested-by: George Joseph
(cherry picked from commit b35e184d41c4e61e98b455d70321ba90118600a1)

10 years agobuild_tools/make_version: Update version parsing for Git migration 98/198/1
Matt Jordan [Mon, 13 Apr 2015 14:54:18 +0000 (09:54 -0500)] 
build_tools/make_version: Update version parsing for Git migration

External systems - such as the Asterisk Test Suite - require knowledge of the
upstream branch. Unfortunately, after moving to Git, the Asterisk version
currently consists of only a 'GIT" prefix followed by an object blob,
e.g., GIT-as08d7. This makes it difficult for such systems to know what
features are available in a particular check out of Asterisk.

This patch fixes this by hardcoding the branch in a variable in the
make_version script. Since the mainline branches are not changed often -
typically only once a year - this is a reasonable approach to solving
the problem, and is more reliable than parsing the output of 'git branch
-vv'. Branches that track off of an upstream primary branch will then get the
benefit of knowing which mainline branch they are currently based off
of.

ASTERISK-24954 #close

Change-Id: I8090d5d548b6d19e917157ed530b914b7eaf9799

10 years agoSecurity/tcptls: MitM Attack potential from certificate with NULL byte in CN.
Jonathan Rose [Wed, 8 Apr 2015 17:06:36 +0000 (17:06 +0000)] 
Security/tcptls: MitM Attack potential from certificate with NULL byte in CN.

When registering to a SIP server with TLS, Asterisk will accept CA signed
certificates with a common name that was signed for a domain other than the
one requested if it contains a null character in the common name portion of
the cert. This patch fixes that by checking that the common name length
matches the the length of the content we actually read from the common name
segment. Some certificate authorities automatically sign CA requests when
the requesting CN isn't already taken, so an attacker could potentially
register a CN with something like www.google.com\x00www.secretlyevil.net
and have their certificate signed and Asterisk would accept that certificate
as though it had been for www.google.com - this is a security fix and is
noted in AST-2015-003.

ASTERISK-24847 #close
Reported by: Maciej Szmigiero
Patches:
 asterisk-null-in-cn.patch submitted by mhej (license 6085)
........

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

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

10 years agoBackport AST-2015-002 fix to 1.8.
Mark Michelson [Wed, 28 Jan 2015 21:29:52 +0000 (21:29 +0000)] 
Backport AST-2015-002 fix to 1.8.

This helps to prevent Asterisk from being an attack vector for
HTTP request injection attacks based on CVE-2014-8150.
........

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

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

10 years agoFix error with mixed address family ACLs.
Mark Michelson [Thu, 20 Nov 2014 16:42:31 +0000 (16:42 +0000)] 
Fix error with mixed address family ACLs.

Prior to this commit, the address family of the first item in an ACL
was used to compare all incoming traffic. This could lead to traffic
of other IP address families bypassing ACLs.

ASTERISK-24469 #close

Reported by Matt Jordan
Patches:
ASTERISK-24469-11.diff uploaded by Matt Jordan (License #6283)

AST-2014-012
........

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

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

10 years agoAST-2014-018 - func_db: DB Dialplan function permission escalation via AMI.
Kevin Harwell [Thu, 20 Nov 2014 16:29:12 +0000 (16:29 +0000)] 
AST-2014-018 - func_db: DB Dialplan function permission escalation via AMI.

The DB dialplan function when executed from an external protocol (for instance
AMI), could result in a privilege escalation.

Asterisk now inhibits the DB function from being executed from an external
interface if the live_dangerously option is set to no.

ASTERISK-24534
Reported by: Gareth Palmer
patches: submitted by Gareth Palmer (license 5169)
........

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

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

10 years agoASTERISK-23512, correct inaccurate comment in manager.conf.sample
Malcolm Davenport [Tue, 28 Oct 2014 18:09:22 +0000 (18:09 +0000)] 
ASTERISK-23512, correct inaccurate comment in manager.conf.sample

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

10 years agoASTERISK-24323, fix bug in documentation of AGI STREAM FILE CONTROL
Malcolm Davenport [Tue, 28 Oct 2014 14:56:52 +0000 (14:56 +0000)] 
ASTERISK-24323, fix bug in documentation of AGI STREAM FILE CONTROL

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

10 years agoASTERISK-24419, fix incorrect syntax for setting language in extensions.conf.sample
Malcolm Davenport [Tue, 28 Oct 2014 13:13:07 +0000 (13:13 +0000)] 
ASTERISK-24419, fix incorrect syntax for setting language in extensions.conf.sample

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

10 years agoAST-2014-011: Fix POODLE security issues
Matthew Jordan [Mon, 20 Oct 2014 14:35:32 +0000 (14:35 +0000)] 
AST-2014-011: Fix POODLE security issues

There are two aspects to the vulnerability:
(1) res_jabber/res_xmpp use SSLv3 only. This patch updates the module to use
    TLSv1+. At this time, it does not refactor res_jabber/res_xmpp to use the
    TCP/TLS core, which should be done as an improvement at a latter date.
(2) The TCP/TLS core, when tlsclientmethod/sslclientmethod is left unspecified,
    will default to the OpenSSL SSLv23_method. This method allows for all
    encryption methods, including SSLv2/SSLv3. A MITM can exploit this by
    forcing a fallback to SSLv3, which leaves the server vulnerable to POODLE.
    This patch adds WARNINGS if a user uses SSLv2/SSLv3 in their configuration,
    and explicitly disables SSLv2/SSLv3 if using SSLv23_method.

For TLS clients, Asterisk will default to TLSv1+ and WARN if SSLv2 or SSLv3 is
explicitly chosen. For TLS servers, Asterisk will no longer support SSLv2 or
SSLv3.

Much thanks to abelbeck for reporting the vulnerability and providing a patch
for the res_jabber/res_xmpp modules.

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

ASTERISK-24425 #close
Reported by: abelbeck
Tested by: abelbeck, opsmonitor, gtjoseph
patches:
  asterisk-1.8-jabber-tls.patch uploaded by abelbeck (License 5903)
  asterisk-11-jabber-xmpp-tls.patch uploaded by abelbeck (License 5903)
  AST-2014-011-1.8.diff uploaded by mjordan (License 6283)
  AST-2014-011-11.diff uploaded by mjordan (License 6283)
  AST-2014-011-12.diff uploaded by mjordan (License 6283)
........

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

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

10 years agoAdd missing support level to func_presence_state
Kinsey Moore [Fri, 5 Sep 2014 17:37:15 +0000 (17:37 +0000)] 
Add missing support level to func_presence_state

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

10 years agoSet chan_vpb to be disabled by default
Kinsey Moore [Thu, 4 Sep 2014 14:41:50 +0000 (14:41 +0000)] 
Set chan_vpb to be disabled by default

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

11 years agoFix build in dev/TEST_FRAMEWORK mode
Kinsey Moore [Fri, 15 Aug 2014 19:39:53 +0000 (19:39 +0000)] 
Fix build in dev/TEST_FRAMEWORK mode

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

11 years agoconfig: inform config hook of change when writing file
Scott Griepentrog [Thu, 14 Aug 2014 17:29:54 +0000 (17:29 +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/certified/branches/1.8.28@421033 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_voicemail: use a consistent generator string
Scott Griepentrog [Thu, 14 Aug 2014 17:25:52 +0000 (17:25 +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/certified/branches/1.8.28@421032 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.
Richard Mudgett [Fri, 8 Aug 2014 17:29:14 +0000 (17:29 +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/certified/branches/1.8.28@420560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agofeatures.c: Allow appliationmap to use Gosub.
Richard Mudgett [Fri, 25 Jul 2014 23:47:09 +0000 (23:47 +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/certified/branches/1.8.28@419678 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:25:45 +0000 (05:25 +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/certified/branches/1.8.28@416095 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 19:03:20 +0000 (19:03 +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/certified/branches/1.8.28@415975 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerge changes for Digium phone support, and default module building.
Matthew Jordan [Thu, 5 Jun 2014 19:17:50 +0000 (19:17 +0000)] 
Merge changes for Digium phone support, and default module building.

All of these changes were merged from certified/branches/1.8.15/

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

11 years agoCreate branch for Certified Asterisk 1.8.28
Matthew Jordan [Thu, 5 Jun 2014 18:21:53 +0000 (18:21 +0000)] 
Create branch for Certified Asterisk 1.8.28

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

11 years agoImporting release summary for 1.8.28.0 release. 1.8.28.0
Asterisk Autobuilder [Thu, 29 May 2014 17:57:56 +0000 (17:57 +0000)] 
Importing release summary for 1.8.28.0 release.

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

11 years agoUpdate .version, remove old summaries, update ChangeLog
Asterisk Autobuilder [Thu, 29 May 2014 14:30:27 +0000 (14:30 +0000)] 
Update .version, remove old summaries, update ChangeLog

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

11 years agoCreate 1.8.28.0 tag
Asterisk Autobuilder [Thu, 29 May 2014 14:26:37 +0000 (14:26 +0000)] 
Create 1.8.28.0 tag

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

11 years agoUse autotagged externals 1.8.28.0-rc1
Asterisk Autobuilder [Thu, 22 May 2014 16:15:50 +0000 (16:15 +0000)] 
Use autotagged externals

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

11 years agoImporting release summary for 1.8.28.0-rc1 release.
Asterisk Autobuilder [Thu, 22 May 2014 16:15:36 +0000 (16:15 +0000)] 
Importing release summary for 1.8.28.0-rc1 release.

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

11 years agoImporting files for 1.8.28.0-rc1 release.
Asterisk Autobuilder [Thu, 22 May 2014 16:15:27 +0000 (16:15 +0000)] 
Importing files for 1.8.28.0-rc1 release.

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

11 years agoCreating tag for the release of asterisk-1.8.28.0-rc1
Asterisk Autobuilder [Thu, 22 May 2014 16:13:42 +0000 (16:13 +0000)] 
Creating tag for the release of asterisk-1.8.28.0-rc1

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

11 years agoapp_meetme: Don't interrupt MOH for waitmarked users.
Richard Mudgett [Thu, 22 May 2014 15:47:51 +0000 (15:47 +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/

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@414345 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:01:26 +0000 (22:01 +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.

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

11 years agopbx.c: prevent potential crash from recursive replace()
Scott Griepentrog [Wed, 21 May 2014 18:58:47 +0000 (18:58 +0000)] 
pbx.c: prevent potential crash from recursive replace()

Recurisve usage of replace() resulted in corruption of the
temporary string storage and potential crash.  By changing
the string to be allocated separtely per instance, this is
eliminated.

ASTERISK-23650 #comment Reported by: Roel van Meer
ASTERISK-23650 #close

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

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

11 years agochan_ooh323: fix h323_log full path name
Alexandr Anikin [Mon, 19 May 2014 13:31:43 +0000 (13:31 +0000)] 
chan_ooh323: fix h323_log full path name

* fix to use astlogdir option for h323_log file instead of hardcoded

ASTERISK-23754 #close

Reported by: Igor Goncharovsky
Patches:
ooh323_logger_patch.diff

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

11 years agochan_dahdi: Fix analog dialtone detection.
Richard Mudgett [Fri, 16 May 2014 20:00:55 +0000 (20:00 +0000)] 
chan_dahdi: Fix analog dialtone detection.

* Check if waitingfordt (waitfordialtone) is enabled in dahdi_read() to
allow the DSP to operate early enough to detect dialtone.

* Made use the correct variable in my_check_waitingfordt().

ASTERISK-23709 #close
Reported by: Steve Davies
Patches:
      dialtone_detect_fix (license #5012) patch uploaded by Steve Davies

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

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

11 years agoapp_meetme: Fix overwrite of DAHDI conference data structure.
Richard Mudgett [Thu, 15 May 2014 21:27:58 +0000 (21:27 +0000)] 
app_meetme: Fix overwrite of DAHDI conference data structure.

Starting a conference recording using the admin menu overwrites the DAHDI
conference data structure used to modify the admin user's conference mute
mode.

* Made no longer pass the user's DAHDI conference data structure into the
menu functions.  The menu now uses its own DAHDI conference data
structure to start the recording channel.

* Moved the unlock conf->playlock to before playing the conf-full message.
No sense keeping the lock while that prompt is playing.  The user is never
going to get into the conference at that point.

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

11 years agochan_local+app_dial: Propagagate call answered elsewhere over local channels.
Walter Doekes [Thu, 15 May 2014 15:32:35 +0000 (15:32 +0000)] 
chan_local+app_dial: Propagagate call answered elsewhere over local channels.

AST_FLAG_ANSWERED_ELSEWHERE was not propagated back from local channels.
It is now. That means that when a call is picked up from a callgroup of
local channels, the other channels will now properly see it as "picked up".

This occurs when you use a construct like Dial(Local/a@context&Local/b@context)
where a@context and b@context dial two chan_sip devices respectively. If one
device picks up, the other will not see "1 missed call" anymore. In this
respect, it now behaves the same as when doing Dial(SIP/a&SIP/b).

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

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

11 years agores_musiconhold: Minor cleanup.
Walter Doekes [Wed, 14 May 2014 15:27:44 +0000 (15:27 +0000)] 
res_musiconhold: Minor cleanup.

Fix a few free()'s that should be ast_free()'s. Reverted an old
workaround that isn't necessary. Reorder a tiny bit of code.
Remove a bit of commented-out code.

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

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

11 years agochan_sip+CEL: Add missing ANSWER and PICKUP events to INVITE/w/replaces pickup.
Walter Doekes [Tue, 13 May 2014 14:32:25 +0000 (14:32 +0000)] 
chan_sip+CEL: Add missing ANSWER and PICKUP events to INVITE/w/replaces pickup.

When doing a "BLF-style call pickup" -- an INVITE with Replaces: header -- the
CEL log would lack the ANSWER and PICKUP events.

This patch adds the two missing events to the handle_invite_replaces() function.

ASTERISK-22977 #close
Review: https://reviewboard.asterisk.org/r/3073/

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

11 years agortp: Fix case typo in H263+ mime.
Walter Doekes [Tue, 13 May 2014 13:28:05 +0000 (13:28 +0000)] 
rtp: Fix case typo in H263+ mime.

http://tools.ietf.org/html/rfc3555#section-4.2.6 says the canonical
mime subtype is "H263-1998", not "h263-1998". Original code was added
in r183101 on 2009-03-19 02:26:50 +0100.

This fixes issues with Polycom phones.

ASTERISK-23665 #close
ASTERISK-23665 #comment Patch r3529.patch uploaded by Guillaume Maudoux, backported by me.
Review: https://reviewboard.asterisk.org/r/3529/

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

11 years agochan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled.
Richard Mudgett [Mon, 12 May 2014 23:08:09 +0000 (23:08 +0000)] 
chan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled.

When overlap dialing is enabled, the lack of inband audio available
information in the SETUP_ACKNOWLEDGE events causes an interoperability
problem with SIP.  sig_pri doesn't know if there is dialtone present when
a SETUP_ACKNOWLEDGE is received so it assumes it is there and posts an
AST_CONTROL_PROGRESS frame.  The SIP channel driver then sends out a 183
Session Progress and blocks the desired 180 Ringing message when the
ALERTING message comes in.

* Made the configure script detect if the installed version of libpri
supports the SETUP_ACKNOWLEDGE enhancements.

* Using the new API, made generate an AST_CONTROL_PROGRESS frame on an
incoming SETUP_ACKNOWLEDGE message when the message indicates inband audio
is present instead of assuming that dialtone is present.

* Using the new API, made SETUP_ACKNOWLEDGE send out an inband audio
available indication only if dialtone is expected.  The change also makes
the fallback behaviour of sending the PROGRESS message better by sending
it only if dialtone is expected.

* Changed receiving a PROCEEDING message to not generate an
AST_CONTROL_PROGRESS frame if the progress indication ie indicates
non-end-to-end-ISDN.  This helps interoperability with SIP.

* Changed sending a PROCEEDING message in response to an
AST_CONTROL_PROCEEDING frame to not indicate inband audio available.  It
was silly to do so anyway because the channel driver doesn't know if
inband audio is even available.  This helps interoperability with SIP.

This patch and a corresponding change in libpri work together to allow
Asterisk to control the inband audio available progress indication ie on
the SETUP_ACKNOWLEDGE message when dialtone is present.

AST-1338 #close
Reported by: Tyler Stewart

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

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

11 years agoFix 32bit build for func_env
Kinsey Moore [Fri, 9 May 2014 23:02:22 +0000 (23:02 +0000)] 
Fix 32bit build for func_env

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

11 years agoFix 32bit build for chan_sip
Kinsey Moore [Fri, 9 May 2014 22:56:14 +0000 (22:56 +0000)] 
Fix 32bit build for chan_sip

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

11 years agoAllow Asterisk to compile under GCC 4.10
Kinsey Moore [Fri, 9 May 2014 22:18:59 +0000 (22:18 +0000)] 
Allow Asterisk to compile under GCC 4.10

This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.

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

11 years agoapp_queue: Extend documentation for various Manager actions and events.
Joshua Colp [Thu, 8 May 2014 00:33:08 +0000 (00:33 +0000)] 
app_queue: Extend documentation for various Manager actions and events.

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

11 years agoFix encoding of custom prepare extra data.
Mark Michelson [Wed, 7 May 2014 17:46:45 +0000 (17:46 +0000)] 
Fix encoding of custom prepare extra data.

Patches:
res_config_odbc-take2.patch by John Hardin (License #6512)

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

11 years agoEnsure that all parts of SQL UPDATEs and DELETEs are encoded.
Mark Michelson [Tue, 6 May 2014 16:57:17 +0000 (16:57 +0000)] 
Ensure that all parts of SQL UPDATEs and DELETEs are encoded.

Patches:
res_config_odbc.patch by John Hardin (License #6512)

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

11 years agoPrevent crashes in res_config_odbc due to uninitialized string fields.
Mark Michelson [Fri, 2 May 2014 20:21:34 +0000 (20:21 +0000)] 
Prevent crashes in res_config_odbc due to uninitialized string fields.

Patches:
    odbc-crash.patch by John Hardin (License #6512)

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

11 years agoReturn the number of rows affected by a SQL insert, rather than an object ID.
Mark Michelson [Fri, 2 May 2014 19:47:50 +0000 (19:47 +0000)] 
Return the number of rows affected by a SQL insert, rather than an object ID.

The realtime API specifies that the store callback is supposed to return the number
of rows affected. res_config_pgsql was instead returning an Oid cast as an int, which
during any nominal execution would be cast to 0. Returning 0 when more than 0 rows were
inserted causes problems to the function's callers.

To give an idea of how strange code can be, this is the necessary code change to fix
a device state issue reported against chan_pjsip in Asterisk 12+. The issue was that
the registrar would attempt to insert contacts into the database. Because of the 0
return from res_config_pgsql, the registrar would think that the contact was not successfully
inserted, even though it actually was. As such, even though the contact was query-able
and it was possible to call the endpoint, Asterisk would "think" the endpoint was unregistered,
meaning it would report the device state as UNAVAILABLE instead of NOT_INUSE.

The necessary fix applies to all versions of Asterisk, so even though the bug reported
only applies to Asterisk 12+, the code correction is being inserted into 1.8+.

Closes issue ASTERISK-23707
Reported by Mark Michelson

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

11 years agohttp: Fix spurious ERROR message in responses with no content.
Richard Mudgett [Wed, 23 Apr 2014 17:47:07 +0000 (17:47 +0000)] 
http: Fix spurious ERROR message in responses with no content.

Backport -r411687 and fix the fix because content_length is the length of
out plus the length of the file controlled by fd.

When a response has an out content length of 0, fwrite would be called to
write a buffer with no data in it.  This resulted in the following classic
error message:

  [Apr  3 11:49:17] ERROR[26421] http.c: fwrite() failed: Success

This patch makes it so that we only attempt to write the content of out if
the out string is non-zero.

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

11 years agochan_sip: trust_id_outbound CHANGES message improvement
Jonathan Rose [Mon, 21 Apr 2014 17:51:49 +0000 (17:51 +0000)] 
chan_sip: trust_id_outbound CHANGES message improvement

(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski

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

11 years agoTypo in CHANGES
Jonathan Rose [Mon, 21 Apr 2014 16:21:49 +0000 (16:21 +0000)] 
Typo in CHANGES

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

11 years agoHTTP: Add TCP_NODELAY to accepted connections
Kinsey Moore [Mon, 21 Apr 2014 15:50:57 +0000 (15:50 +0000)] 
HTTP: Add TCP_NODELAY to accepted connections

This adds the TCP_NODELAY option to accepted connections on the HTTP
server built into Asterisk. This option disables the Nagle algorithm
which controls queueing of outbound data and in some cases can cause
delays on receipt of response by the client due to how the Nagle
algorithm interacts with TCP delayed ACK. This option is already set on
all non-HTTP AMI connections and this change would cover standard HTTP
requests, manager HTTP connections, and ARI HTTP requests and
websockets in Asterisk 12+ along with any future use of the HTTP
server.

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

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

11 years agochan_sip: Add sendrpid trust options
Jonathan Rose [Mon, 21 Apr 2014 15:25:18 +0000 (15:25 +0000)] 
chan_sip: Add sendrpid trust options

In r411189, some behavior was changed which made sendrpid behavior
act in a more trusting manner by sending full user data for peers
set with private caller presence in P-Asserted-Identity headers.
Since this changed long time expected behaviors, we decided to pull
that patch when that was pointed out by the community. Instead, this
patch provides a trust_id_outbound setting which will expose the data
per RFC-3325 if set to 'yes' and simply not send the PAI/RPID headers
at all if set to 'no'. By default trust_id_outbound will be set to
'legacy' which will preserve the behavior prior to these patches.
Extra special thanks to Walter Doekes for providing advice and
feedback.

(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski

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

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

11 years agoapp_sms: Fix uninitialized values; hangup channel when REL is sent successfully
Matthew Jordan [Sat, 19 Apr 2014 01:01:18 +0000 (01:01 +0000)] 
app_sms: Fix uninitialized values; hangup channel when REL is sent successfully

This patch fixes two issues in app_sms:
(1) Firstly, the 'flags' field on the stack in sms_exec() is uninitialised,
    causing it to use the wrong protocol in some cases. This patch correctly
    initializes the flags fields.

(2) Secondly, when disconnect supervision is not working or
    inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was failing to
    terminate the call after it sent the REL(ease) message and the peer stopped
    talking to it. This patch fixes the code to handle the 'bad stop bit'
    message more gracefully in that case, and hang up the call.

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

ASTERISK-18331 #close
Reported by: David Woodhouse
patches:
  asterisk-fix-sms.patch uploaded by David Woodhouse (License 5754)

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

11 years agosounds: Fix Sounds Makefile and XML that didn't support new sound prompt sets
Rusty Newton [Fri, 18 Apr 2014 17:12:17 +0000 (17:12 +0000)] 
sounds: Fix Sounds Makefile and XML that didn't support new sound prompt sets

In sounds/Makefile

 1 Adds and moves some lines necessary for the en_GB core set. I'm just following how the other sets are defined here.
 2 removes the ES extra sounds related lines as we don't have ES extra sound sets.

In sounds/sounds.xml

 3 Adds <support_level> definitions to all the sound sets as we have these defined in 11,12,Trunk, but not in 1.8
 4 Adds member definitons for EN_AU, EN_GB, IT for core sound sets, and EN_GB in extra sound sets

ASTERISK-23550
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/3464/

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

11 years agochannels/chan_oss: Fix compilation problem on SmartOS/Illumos/SunOS
Matthew Jordan [Thu, 17 Apr 2014 20:23:01 +0000 (20:23 +0000)] 
channels/chan_oss: Fix compilation problem on SmartOS/Illumos/SunOS

THis patch fixes an issue in chan_oss when building on certain platforms. It
ensures that soundcard.h is found.

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

Note that this patch is a part of the patch on ASTERISK-23576; the Makefile
portion only applies to Asterisk 11+.

(issue ASTERISK-23576)
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)

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

11 years agoReverting r411189 so that it can be put up for public review
Jonathan Rose [Tue, 15 Apr 2014 15:21:27 +0000 (15:21 +0000)] 
Reverting r411189 so that it can be put up for public review

---
  r411189 | jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines

  chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

  Prior to this patch, the P-Asserted-Identity header would include anonymous
  caller id information which seems to go against the point of the
  P-Asserted-Identity header. Now the real caller ID information will be
  included in this header. Also, no privacy header would be included.
  This patch adds 'Privacy: id' to outgoing SIP messages that include the
  P-Asserted-Identity header.

  (closes issue AST-1301)
---

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

11 years agoapp_stack: Add missing unlock in off-nominal path of STACK_PEEK function.
Richard Mudgett [Fri, 11 Apr 2014 21:37:42 +0000 (21:37 +0000)] 
app_stack: Add missing unlock in off-nominal path of STACK_PEEK function.

ASTERISK-23620 #close
Reported by: Bradley Watkins
Patches:
      ASTERISK-23620_unlock_oldlist.patch (license #5021) patch uploaded by Bradley Watkins

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

11 years agomain/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output
Matthew Jordan [Fri, 11 Apr 2014 01:33:03 +0000 (01:33 +0000)] 
main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output

This patch does the following:
(1) It makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables
    REF_DEBUG globally throughout Asterisk.
(2) The ref debug log file is now created in the AST_LOG_DIR directory.
    Every run will now blow away the previous run (as large ref files
    sometimes caused issues). We now also no longer open/close the file
    on each write, instead relying on fflush to make sure data gets written
    to the file (in case the ao2 call being performed is about to cause a
    crash)
(3) It goes with a comma delineated format for the ref debug file. This
    makes parsing much easier. This also now includes the thread ID of the
    thread that caused ref change.
(4) A new python script instead for refcounting has been added in the
    contrib/scripts folder.

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

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

11 years agoInternal timing: Add notice that the -I and internal_timing option are no longer...
Richard Mudgett [Tue, 8 Apr 2014 21:15:39 +0000 (21:15 +0000)] 
Internal timing: Add notice that the -I and internal_timing option are no longer needed.

Add notice messages during execution that the -I command line option and
the astersik.conf internal_timing option are no longer needed.  The
internal timing functionality is now always enabled if there is a timing
module loaded.

NOTE: Since the command line options and the asterisk.conf config file are
processed before the logging system is initialized, the messages are
output to stderr.

Change requested as a result of asterisk-dev list comments about the
commit for ASTERISK-22846 that removed the -I and internal_timing options.

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

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

11 years agoconfig: Fix CB_ADD_LEN() to work as originally intended.
Richard Mudgett [Tue, 8 Apr 2014 20:49:11 +0000 (20:49 +0000)] 
config: Fix CB_ADD_LEN() to work as originally intended.

Fix a long standing bug in CB_ADD_LEN() behaving like CB_ADD().

ASTERISK-23546 #close
Reported by: Walter Doekes

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

11 years agoconfigs: Clean up long line and typo in res_odbc.conf.sample.
Walter Doekes [Mon, 7 Apr 2014 14:45:10 +0000 (14:45 +0000)] 
configs: Clean up long line and typo in res_odbc.conf.sample.

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

11 years agointernal_timing: Remove the option and always make it enabled if a timing module...
Richard Mudgett [Fri, 4 Apr 2014 18:32:46 +0000 (18:32 +0000)] 
internal_timing: Remove the option and always make it enabled if a timing module is loaded.

The masquerade supertest frequently fails because either the local channel
chain doesn't completely optimize out or the DTMF handshake doesn't
completely get accross.  Local channel optimization requires frames
flowing to trigger when optimization can happen.  When optimization
happens the media frame that triggered the optimization is dropped.
Sending DTMF requires frames to flow in the other direction for timing
purposes while sending nothing.  If internal timing is not enabled when
MOH is playing, Asterisk switches to received timing when an audio frame
is received.  With optimization dropping media frames and MOH not sending
frames unless it receives frames, occasionaly there are no more frames
being passed and the test fails.

* The asterisk command line -I option and the asterisk.conf
internal_timing option are removed.  Asterisk now always uses internal
timing when needed if any timing module is loaded.  The issue
ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken
if other internal timing modules besides DAHDI are used.  The
ast_read_generator_actions() now only does received timing if it has no
choice for frame generators like MOH, silence, and playback streaming.

* Cleaned up some code dealing with frame generators in
ast_deactivate_generator(), generator_write_format_change(),
ast_activate_generator(), and ast_channel_stop_silence_generator().

ASTERISK-22846 #close
Reported by: Matt Jordan

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

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

11 years agoapp_queue: Fix a bug where realtime members would be deleted during reload causing...
Joshua Colp [Tue, 1 Apr 2014 16:48:55 +0000 (16:48 +0000)] 
app_queue: Fix a bug where realtime members would be deleted during reload causing waiting callers to get ejected.

This patch causes realtime queue members to remain in queues during the reload process. Previously these
members would be removed causing any waiting callers to be ejected from the queue with a reason of "EXITEMPTY".

ASTERISK-23547 #close
ASTERISK-23547 #comment Patch app_queue_fix_realtime_reload_1.8_trunk.patch submitted by Italo Rossi (license 6409)

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

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

11 years agohttp: response body often missing after specific request
Scott Griepentrog [Fri, 28 Mar 2014 16:16:02 +0000 (16:16 +0000)] 
http: response body often missing after specific request

This patch works around a problem with the HTTP body
being dropped from the response to a specific client
and under specific circumstances:

a) Client request comes from node.js user agent
   "Shred" via use of swagger-client library.

b) Asterisk and Client are *not* on the same
   host or TCP/IP stack

In testing this problem, it has been determined that
the write of the HTTP body is lost, even if the data
is written using low level write function.  The only
solution found is to instruct the TCP stack with the
shutdown function to flush the last write and finish
the transmission.  See review for more details.

ASTERISK-23548 #close
(closes issue ASTERISK-23548)
Reported by: Sam Galarneau
Review: https://reviewboard.asterisk.org/r/3402/

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

11 years agoUPGRADE: Note IAX2 compatibility issue between 1.4 and 1.8+ systems.
Matthew Jordan [Fri, 28 Mar 2014 15:42:36 +0000 (15:42 +0000)] 
UPGRADE: Note IAX2 compatibility issue between 1.4 and 1.8+ systems.

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

11 years agores_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.
Matthew Jordan [Fri, 28 Mar 2014 04:24:07 +0000 (04:24 +0000)] 
res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.

This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.

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

(issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)

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

11 years agochan_sip: Add MESSAGE request to allowed methods
Matthew Jordan [Fri, 28 Mar 2014 03:49:33 +0000 (03:49 +0000)] 
chan_sip: Add MESSAGE request to allowed methods

The allowed methods advertised by chan_sip did not previously note the MESSAGE
request. Even in Asterisk 1.8, we do accept in-dialog MESSAGE requests; we
should advertise that we support MESSAGE requests.

ASTERISK-23504 #close
ASTERISK-23504 #comment Reported by: Martin Kontsek
ASTERISK-23504 #comment Patch sip.h_patch.diff uploaded by Martin Kontsek (license 6587)

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

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

11 years agoFix dialplan function NULL channel safety issues
Corey Farrell [Thu, 27 Mar 2014 19:06:13 +0000 (19:06 +0000)] 
Fix dialplan function NULL channel safety issues

(closes issue ASTERISK-23391)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3386/

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

11 years agosay: Fix a bug where SayNumber in Polish tries to play incorrect sound.
Joshua Colp [Wed, 26 Mar 2014 22:43:25 +0000 (22:43 +0000)] 
say: Fix a bug where SayNumber in Polish tries to play incorrect sound.

This change fixes a bug where calling SayNumber with a number divisible by
100 using the Polish language would cause the code to attempt to play a
sound file with an empty name.

(closes issue ASTERISK-23509)
Reported by: zvision

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

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

11 years agochan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Jonathan Rose [Wed, 26 Mar 2014 15:50:48 +0000 (15:50 +0000)] 
chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.

(closes issue AST-1301)

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

11 years agochan_sip: Fix incorrect use of timers
Kinsey Moore [Tue, 25 Mar 2014 15:50:39 +0000 (15:50 +0000)] 
chan_sip: Fix incorrect use of timers

If update_provisional_keepalive() is called while
send_provisional_keepalive_full() is waiting on the PVT lock, then
pvt->provisional_keepalive_sched_id will be changed to a new sched_id
value by update_provisional_keepalive(), but that new sched_id then may
be overwritten with -1 by send_provisional_keepalive_full(), killing
the pvt's reference to a schedule and "leaking" the reference.

(closes issue ASTERISK-22079)
Review: https://reviewboard.asterisk.org/r/3368/
Reported by: Jamuel Starkey, Matteo, Leif Madsen, Steve Davies
Patches:
    provisional_keepalive_fix.diff uploaded by Steve Davies (license 5012)

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

11 years agochan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.
Joshua Colp [Mon, 24 Mar 2014 21:36:27 +0000 (21:36 +0000)] 
chan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.

(closes issue ASTERISK-20841)
Reported by: Kelly Goedert

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

11 years ago!fixup: callerid: Logic error in checksum processing
Russ Meyerriecks [Mon, 17 Mar 2014 21:54:18 +0000 (21:54 +0000)] 
!fixup: callerid: Logic error in checksum processing

Fixes syntax error in previous commit :-(

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

11 years agocallerid: Logic error in checksum processing
Russ Meyerriecks [Mon, 17 Mar 2014 21:14:21 +0000 (21:14 +0000)] 
callerid: Logic error in checksum processing

Callerid checksum-ing was being handled incorrectly here. When the checksum is
calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This
value will then fail the otherwise correct callerid message.

This patch changes the logic to simply add the calculated checksum to the
transmitted 2's compliment checksum.

Review: https://reviewboard.asterisk.org/r/3356/
(closes issue ASTERISK-23488)

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

11 years agoAST-2014-001: Stack overflow in HTTP processing of Cookie headers.
Richard Mudgett [Mon, 10 Mar 2014 17:00:32 +0000 (17:00 +0000)] 
AST-2014-001: Stack overflow in HTTP processing of Cookie headers.

Sending a HTTP request that is handled by Asterisk with a large number of
Cookie headers could overflow the stack.

Another vulnerability along similar lines is any HTTP request with a
ridiculous number of headers in the request could exhaust system memory.

(closes issue ASTERISK-23340)
Reported by: Lucas Molas, researcher at Programa STIC, Fundacion; and Dr. Manuel Sadosky, Buenos Aires, Argentina

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

11 years agoAST-2014-002: chan_sip: Exit early on bad session timers request
Kinsey Moore [Mon, 10 Mar 2014 13:15:18 +0000 (13:15 +0000)] 
AST-2014-002: chan_sip: Exit early on bad session timers request

This change allows chan_sip to avoid creation of the channel and
consumption of associated file descriptors altogether if the inbound
request is going to be rejected anyway.

(closes issue ASTERISK-23373)
Reported by: Corey Farrell
Patches:
     chan_sip-earlier-st-1.8.patch uploaded by Corey Farrell (license 5909)
     chan_sip-earlier-st-11.patch uploaded by Corey Farrell (license 5909)

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

11 years agochan_sip: Fix deadlock of monlock between unload_module and do_monitor
Corey Farrell [Fri, 7 Mar 2014 22:50:40 +0000 (22:50 +0000)] 
chan_sip: Fix deadlock of monlock between unload_module and do_monitor

Release monlock before calling pthread_join.  This ensures do_monitor
cannot freeze by locking monlock during module unload.

(closes issue ASTERISK-21406)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3284/

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

11 years agochan_sip: Allow static realtime members to be qualified during module load.
Matthew Jordan [Fri, 7 Mar 2014 04:35:43 +0000 (04:35 +0000)] 
chan_sip: Allow static realtime members to be qualified during module load.

When a static realtime peer with qualify=yes is loaded, Asterisk will fail to
send an OPTIONS request due to the lastms being equal to 0. This results in
the peer being unable to receive calls from Asterisk because the status is
permanently UNKNOWN.

This patch allows an OPTIONS request to be sent during module load by
ignoring the lastms value on startup only.

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

(closes issue ASTERISK-17523)
Reported by: Maciej Krajewski
Tested by: wushumasters
patches:
  realtime_fix_11.7.0.txt uploaded by Trevor Peirce (license 6112)

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

11 years agomoh: fix a refcount error with realtime MOH
Russell Bryant [Thu, 6 Mar 2014 23:01:26 +0000 (23:01 +0000)] 
moh: fix a refcount error with realtime MOH

I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH.  Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to.  I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.

1) Remove a usless block of code that was impossible to reach.  There was even
a comment indicating that it was impossible to reach.  The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)".  There's no good reason to keep it around.

2) A similar block to #1 contained a reference counting error.  It stores
state->class in the local variable mohclass without increasing its reference
count.  The reference count on mohclass is decremented at the end of the
function.  This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.

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

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

11 years agoconfig: Fix inverted test
Kinsey Moore [Wed, 5 Mar 2014 20:31:09 +0000 (20:31 +0000)] 
config: Fix inverted test

The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.

(closes issue ASTERISK-23383)
Reported by: David Woolley

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

11 years agoCorrected cross-platform stat nanosecond code
David M. Lee [Wed, 5 Mar 2014 16:50:48 +0000 (16:50 +0000)] 
Corrected cross-platform stat nanosecond code

When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.

Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.

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

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

11 years agoFix references to 'keys' CLI commands in astgenkey
Sean Bright [Wed, 5 Mar 2014 12:04:05 +0000 (12:04 +0000)] 
Fix references to 'keys' CLI commands in astgenkey

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

11 years agoAdd update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue function...
Igor Goncharovskiy [Wed, 5 Mar 2014 05:10:50 +0000 (05:10 +0000)] 
Add update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue functions conforming to other channel drivers. Do not forget auto-detected and user-selected phone settings on 'unistim reload'

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

11 years agofunc_audiohookinheritance: Check If A Channel Was Specified
Michael L. Young [Tue, 4 Mar 2014 19:32:21 +0000 (19:32 +0000)] 
func_audiohookinheritance: Check If A Channel Was Specified

This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

(closes issue ASTERISK-23104)
Reported by: Joel Vandal
Tested by: Joel Vandal
Patches:
    asterisk-23104_audiohook_inherit_no_channel-11.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

11 years agoAO2: Add an assert for bad objects
Kinsey Moore [Tue, 4 Mar 2014 16:50:24 +0000 (16:50 +0000)] 
AO2: Add an assert for bad objects

This adds an assert that will only be active if Asterisk is compiled
with DO_CRASH and allows the testsuite to fail tests that would
otherwise require log file parsing.

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

11 years agortp_engine: Clean up after a failed remote bridge
Kinsey Moore [Tue, 4 Mar 2014 15:31:05 +0000 (15:31 +0000)] 
rtp_engine: Clean up after a failed remote bridge

Upon failure of an INVITE transaction meant to initiate a remote native
bridge, rtp_engine.c would not clean up non-reference-counted bridge
instance pointers leaving a dangling pointer which was being used to
perform a local native bridge after the other channel had hung up. This
lead to dereferencing into freed memory and plenty of AO2 errors. This
change allows the remote native bridge loop to clean up properly when
the bridge fails.

(closes issue ASTERISK-23310)
Reported by: Jeremy Laine

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

11 years agoMinor whitespace change to 'sip show peers' output.
Sean Bright [Tue, 4 Mar 2014 14:50:55 +0000 (14:50 +0000)] 
Minor whitespace change to 'sip show peers' output.

(closes issue ASTERISK-23406)
Reported by: ibercom
Tested by: ibercom
Patches:
    asterisk-11.patch uploaded by ibercom

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

11 years agobuildsystem: Unbreak 'make -qp' on 1.8.
Walter Doekes [Tue, 4 Mar 2014 13:39:13 +0000 (13:39 +0000)] 
buildsystem: Unbreak 'make -qp' on 1.8.

r408083 caused trouble with make -qp. Backport r408193 to 1.8 as well.

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

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

11 years agodoxygen: Tweak the link back to ye olde Digium website
Matthew Jordan [Mon, 3 Mar 2014 02:06:24 +0000 (02:06 +0000)] 
doxygen: Tweak the link back to ye olde Digium website

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

11 years agoMakefile: replace -O6 with -O3
Tzafrir Cohen [Sun, 2 Mar 2014 10:58:13 +0000 (10:58 +0000)] 
Makefile: replace -O6 with -O3

-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the
default optimization flag to be -O3, like gcc actually considered it.

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

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

11 years agochan_sip: Add precautionary p->owner checks.
Richard Mudgett [Fri, 28 Feb 2014 21:00:43 +0000 (21:00 +0000)] 
chan_sip: Add precautionary p->owner checks.

* Add precautionary p->owner checks in sip_hangup(), get_refer_info(),
get_also_info(), and interpret_t38_parameters().

* Simplify some tangled logic in get_refer_info(), get_also_info(), and
add_rpid().

* Removed some dead code in handle_request_invite().

(closes issue ASTERISK-23323)
Reported by: Walter Doekes
Patches:
      issueA23323-more_p_owner_checks-1.8.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-11.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-12.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-trunk.patch (license #5674) uploaded by wdoekes (modified)

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

11 years agochan_sip: Fix crash in ast_channel_hangupcause_set().
Richard Mudgett [Fri, 28 Feb 2014 17:57:45 +0000 (17:57 +0000)] 
chan_sip: Fix crash in ast_channel_hangupcause_set().

* Fix crash in ast_channel_hangupcause_set() because p->owner not checked
before calling.  Regression introduced by the fix for ASTERISK-22621.

(closes issue ASTERISK-23135)
Reported by: OK

(issue ASTERISK-23323)
Reported by: Walter Doekes

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

11 years agoFix memory stomping bug in astman.
David M. Lee [Thu, 27 Feb 2014 16:23:11 +0000 (16:23 +0000)] 
Fix memory stomping bug in astman.

This memset complained in dev mod on my Ubuntu box. The memset is both
unnecessary and dangerous. At this point, m hasn't been initialized
yet, so the memset will write off to whatever address happens to be
on the stack at the time.

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

11 years agores_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.
Corey Farrell [Thu, 27 Feb 2014 15:59:15 +0000 (15:59 +0000)] 
res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.

Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/

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