asterisk/asterisk.git
7 years agoEnable usage of system-provided NetBSD editline library if available.
Kevin P. Fleming [Wed, 25 Jul 2012 12:21:54 +0000 (12:21 +0000)]
Enable usage of system-provided NetBSD editline library if available.

This patch changes the Asterisk configure script and build system to detect
the presence of the NetBSD editline library (libedit) on the system. If it is
found, it will be used in preference to the version included in the Asterisk
source tree.

(closes issue ASTERISK-18725)
Reported by: Jeffrey C. Ollie
Review: https://reviewboard.asterisk.org/r/1528/
Patches:
  0001-Allow-linking-building-against-an-external-editline.patch uploaded by jcollie (license #5373) (heavily modified by kpfleming)

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

7 years agoRevert a change that broke compilation
Terry Wilson [Wed, 25 Jul 2012 03:51:28 +0000 (03:51 +0000)]
Revert a change that broke compilation

1) There is no such function as ast_ref()
2) The patch was originally credited as the one uploaded by Guenther
   Kelleter (license 6372) via issue AST-921, but the patch committed
   was not the patch referenced on the issue.
3) Guenther Kelleter's patch was actually correct. It moved the
   ast_free above the presencechange_cleanup label. I am not
   committing his change as it is not technically necesary--calling
   ast_free(NULL) is perfectly safe and I worry that moving the
   ast_free outside of the label could lead to future bugs if
   someone ever adds another failure conditional and expects
   'goto presencechange_cleanup;' to clean up after everything.

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

7 years agoDon't attempt free of NULL ptr in pbx.c handle_presencechange
Jonathan Rose [Tue, 24 Jul 2012 21:30:21 +0000 (21:30 +0000)]
Don't attempt free of NULL ptr in pbx.c handle_presencechange

(closes issue AST-921)
Reported by: Guenther Kelleter
Patches:
    nullptr.patch uploaded by Guenther Kelleter (license 6372)

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

7 years agoSilence a warning message from older versions of GCC.
Kevin P. Fleming [Tue, 24 Jul 2012 19:12:09 +0000 (19:12 +0000)]
Silence a warning message from older versions of GCC.

Revision 370426 introduced the use of a nested function in tests/test_acl.c,
but the lack of the 'auto' scope specifier on the function and a forward
declaration resulted in compilation errors on the automated test systems.

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

7 years agochan_oss: fix "sample rate" error message
Tzafrir Cohen [Tue, 24 Jul 2012 17:16:40 +0000 (17:16 +0000)]
chan_oss: fix "sample rate" error message

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

Merged revisions 370432 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoRewrite a comment that didn't adequately explain the code it was documenting.
Kevin P. Fleming [Tue, 24 Jul 2012 16:54:26 +0000 (16:54 +0000)]
Rewrite a comment that didn't adequately explain the code it was documenting.
........

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

Merged revisions 370430 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoUpdate CHANGES for list/negation ACL feature.
Kevin P. Fleming [Tue, 24 Jul 2012 16:48:45 +0000 (16:48 +0000)]
Update CHANGES for list/negation ACL feature.

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

7 years agoAllow permit/deny ACL lines to contain multiple items and negated entries.
Kevin P. Fleming [Tue, 24 Jul 2012 16:47:33 +0000 (16:47 +0000)]
Allow permit/deny ACL lines to contain multiple items and negated entries.

Rules in ACLs (specified using 'permit' and 'deny') can now contain multiple
items (separated by commas), and items in the rule can be negated by prefixing
them with '!'. This simplifies Asterisk Realtime configurations, since it is no
longer necessray to control the order that the 'permit' and 'deny' columns are
returned from queries.

Review: https://reviewboard.asterisk.org/r/1592/
Initial patch contributed by Tilghman Lesher
Unit tests written by Kevin P. Fleming

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

7 years agoBuild is underway so logging can go away.
Joshua Colp [Tue, 24 Jul 2012 16:15:30 +0000 (16:15 +0000)]
Build is underway so logging can go away.

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

7 years agoTemporarily enable pj logging to console for debugging pjnath issue exposed by build...
Joshua Colp [Tue, 24 Jul 2012 16:09:39 +0000 (16:09 +0000)]
Temporarily enable pj logging to console for debugging pjnath issue exposed by build slave.

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

7 years agoRemove code, that operate with cdr in attempt_transfer(). That was removed somewhere...
Igor Goncharovskiy [Tue, 24 Jul 2012 08:53:01 +0000 (08:53 +0000)]
Remove code, that operate with cdr in attempt_transfer(). That was removed somewhere between 1.2 and 1.4 and acidentaly put back in chan_unistim.

(closes issue ASTERISK-19628)
Reported by: Igor Olhovskiy

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

7 years agoEnable usage of system-provided iLBC library.
Kevin P. Fleming [Mon, 23 Jul 2012 21:27:56 +0000 (21:27 +0000)]
Enable usage of system-provided iLBC library.

The WebRTC version of the iLBC codec is now package as a library and is
available on some platforms. This patch allows codec_ilbc to be built against
that library if it is present.

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

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

7 years agoUnit tests for the Jitter Buffer API; remove unnecessary resync
Matthew Jordan [Mon, 23 Jul 2012 21:15:26 +0000 (21:15 +0000)]
Unit tests for the Jitter Buffer API; remove unnecessary resync

This patch includes the following:
* Unit tests for the abstract Jitter Buffer API.  This includes both fixed
  and adaptive flavors, testing nominal creation, frame input, frame retrieval,
  resyncing; off nominal frame input overflow, out of order, and others.
* Tweaks to the abstract_jb API to remove the unnecessary resync_threshold
  parameter from the create function (resync_threshold is already in the
  struct passed into the create function)
* Ensure the fixed jitter buffer is empty before destroying it, to avoid an
  ASSERT
* Don't "resync" the adaptive jitter buffer.  The mechanism that was being
  used actually causes the jitter buffer to think its being overflowed by going
  around the jitterbuf API and attempting to 'resynch' it improperly.  If a
  resync is needed, the jitter buffer will do it properly by itself.  Note that
  this is only an optimization needed for trunk, as the worst that happens is
  the loss of three voice packets before the adaptive jitter buffer will resync
  anyway.

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

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

7 years agoAdd separate configuration options for subscription and registration minexpiry and...
Mark Michelson [Mon, 23 Jul 2012 21:10:54 +0000 (21:10 +0000)]
Add separate configuration options for subscription and registration minexpiry and maxexpiry.

This offers more fine-grained control over how long subscriptions last without negatively
affecting the expiration range for registrations.

Uploaded by:
Guenther Kelleter(license #6372)

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

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

7 years agoImprove documentation for the SHELL() dialplan function.
Kevin P. Fleming [Mon, 23 Jul 2012 21:10:27 +0000 (21:10 +0000)]
Improve documentation for the SHELL() dialplan function.
........

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

Merged revisions 370384 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoAdd notes to UPGRADE.txt about addition of msg_id to VoiceMails.
Mark Michelson [Mon, 23 Jul 2012 21:02:52 +0000 (21:02 +0000)]
Add notes to UPGRADE.txt about addition of msg_id to VoiceMails.

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

7 years agoBlocked revisions 370361
Kevin P. Fleming [Mon, 23 Jul 2012 14:51:45 +0000 (14:51 +0000)]
Blocked revisions 370361

........
Free any datastores attached to dummy channels.

Revision 370205 added the use of a datastore attached to a dummy channel to
resolve a memory leak, but ast_dummy_channel_destructor() in this branch did
not free datastores, resulting in a continued (but slightly smaller) memory
leak. This patch backports the change to free said datastores from the Asterisk
trunk.

(related to issue AST-916)
........

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

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

7 years agoUpdate UPGRADE.txt with notes about ICE support and res_xmpp.
Joshua Colp [Mon, 23 Jul 2012 00:15:39 +0000 (00:15 +0000)]
Update UPGRADE.txt with notes about ICE support and res_xmpp.

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

7 years agoUpdate CHANGES for Asterisk 11
Matthew Jordan [Sun, 22 Jul 2012 23:37:00 +0000 (23:37 +0000)]
Update CHANGES for Asterisk 11

This updates the CHANGES file with things that were committed for
Asterisk 11, but were not noted in that file.

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

7 years agoPrevent multiple local candidates from being added with the same information and...
Joshua Colp [Sun, 22 Jul 2012 17:03:24 +0000 (17:03 +0000)]
Prevent multiple local candidates from being added with the same information and add support for disabling ICE on a per-peer basis.

(closes issue ASTERISK-20088)
Reported by: wimpy

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

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

7 years agoFix segfault introduced by conversion to ACO API
Terry Wilson [Sat, 21 Jul 2012 13:25:26 +0000 (13:25 +0000)]
Fix segfault introduced by conversion to ACO API

The value "none" is specified in the config file as a valid value for
the "video_mode" option. The code prior to the ACO conversion did not
check for "none", but just ignored it and relied on the default zero
value. The parsing with ACO is more strict, so without handling
"none" specifically, parsing would fail.

When parsing failed, but the module loaded anyway, the config info
would never be stored, and one place in the code did not check for
this case and would segfault. It was also possible that the
aco_info struct's internals would be destroyed and used as well.

This patch keeps the module from loading after parse failures, adds
the "none" option to "video_mode", registers CLI functions only
after parsing has completed, checks the config data for NULL before
accessing it, and returns -1 on some allocation failures when
initializing.

(closes issue ASTERISK-20159)
Reported by: Birger "WIMPy" Harzenetter
Tested by: Birger "WIMPy" Harzenetter
Patches:
    confbridge_fix3.txt uploaded by Terry Wilson

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

7 years agochan_iax2: Fix a segfault introduced by call ID logging
Jonathan Rose [Fri, 20 Jul 2012 19:36:05 +0000 (19:36 +0000)]
chan_iax2: Fix a segfault introduced by call ID logging

Didn't previously check that a non NULL IAX channel was stored in the array
at the requested position before attempting iax_pvt_callid_get

(closes issue ASTERISK-20145)
Reported by: Birger "WIMPy" Harzenetter

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

7 years agoClean up ManagerEvent Dial documentation
Matthew Jordan [Fri, 20 Jul 2012 19:08:47 +0000 (19:08 +0000)]
Clean up ManagerEvent Dial documentation

The paragraph describing the SubEvent belongs with the SubEvent parameter
itself, and not with its enum values.  The order of parsing was placing
the description after the last enum, which isn't correct.

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

7 years agoFix build error in chan_misdn from commit 370316
Kinsey Moore [Fri, 20 Jul 2012 18:37:44 +0000 (18:37 +0000)]
Fix build error in chan_misdn from commit 370316

chan_misdn was not updated properly to account for a change in
parameters for HANGUPCAUSE functionality. It now builds properly.

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

7 years agoExport the ast_websocket_set_nonblock function for use by other modules.
Joshua Colp [Fri, 20 Jul 2012 16:25:01 +0000 (16:25 +0000)]
Export the ast_websocket_set_nonblock function for use by other modules.

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

7 years agoAdd hangupcause translation support
Kinsey Moore [Fri, 20 Jul 2012 15:48:55 +0000 (15:48 +0000)]
Add hangupcause translation support

The HANGUPCAUSE hash (trunk only) meant to replace SIP_CAUSE has now
been replaced with the HANGUPCAUSE and HANGUPCAUSE_KEYS dialplan
functions to better facilitate access to the AST_CAUSE translations
for technology-specific cause codes. The HangupCauseClear application
has also been added to remove this data from the channel.

(closes issue SWP-4738)
Review: https://reviewboard.asterisk.org/r/2025/

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

7 years agoUpdate CHANGES about adding the AccountCode header to the AMI Hangup event.
Richard Mudgett [Fri, 20 Jul 2012 15:40:19 +0000 (15:40 +0000)]
Update CHANGES about adding the AccountCode header to the AMI Hangup event.

(issue ASTERISK-19963)

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

7 years agoAdd the AccountCode header to the AMI Hangup event.
Richard Mudgett [Fri, 20 Jul 2012 01:15:55 +0000 (01:15 +0000)]
Add the AccountCode header to the AMI Hangup event.

It's harder to correlate the Newchannel and Hangup AMI events without
specifying "AccountCode" in both.

(closes issue ASTERISK-19963)
Reported by: Oleg A. Arkhangelsky
Patches:
      hangup_acctcode.diff (license #6397) patch uploaded by Oleg A. Arkhangelsky

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

7 years agoConvert app_confbridge to use the config options framework
Terry Wilson [Thu, 19 Jul 2012 23:21:40 +0000 (23:21 +0000)]
Convert app_confbridge to use the config options framework

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

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

7 years agoFix compiler warnings.
Richard Mudgett [Thu, 19 Jul 2012 22:25:00 +0000 (22:25 +0000)]
Fix compiler warnings.

gcc (GCC) 4.2.4 has problems casting away constness.
........

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

Merged revisions 370277 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoAdd the ability to specify technology specific documentation
Matthew Jordan [Thu, 19 Jul 2012 22:17:13 +0000 (22:17 +0000)]
Add the ability to specify technology specific documentation

A number of applications/AMI commands in Asterisk have specific behavioral
differences depending on the resource or channel technology those
applications are executed on.  For example, the MessageSend application/
command is technology agnostic, but how the channel drivers that support
that functionality behave is dependant on the protocols and channel
driver implementation.  Prior to this patch, those details were either
documented in the application/command documentation itself, or were left
undocumented.

This patch adds a new element to the documentation schema, <info/>.  An info
node is essentially a piece of technology specific reference information that
can be included by any top level XML documentation node.  For example, the
MessageSend application can now include XMPP/SIP specific information, where
that technology specific information can be defined in chan_motif/res_xmpp/
chan_sip.  Likewise, that information can also be included in the MessageSend
AMI command.

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

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

7 years agoFix compilation error when MALLOC_DEBUG is enabled
Matthew Jordan [Thu, 19 Jul 2012 22:08:20 +0000 (22:08 +0000)]
Fix compilation error when MALLOC_DEBUG is enabled

To fix a memory leak in CEL, a channel datastore was introduced whose
destruction function pointer was pointed to the ast_free macro.  Without
MALLOC_DEBUG enabled this compiles as fine, as ast_free is defined as free.
With MALLOC_DEBUG enabled, however, ast_free takes on a definition from a
different place then utils.h, and became undefined.  This patch resolves this
by using a reference to ast_free_ptr.  When MALLOC_DEBUG is enabled, this
calls ast_free; when MALLOC_DEBUG is not enabled, this is defined to be
ast_free, which is defined to be free.

(issue AST-916)
Reported by: Thomas Arimont
........

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

Merged revisions 370274 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoHandle extremely out of order RFC 2833 DTMF
Matthew Jordan [Thu, 19 Jul 2012 21:45:20 +0000 (21:45 +0000)]
Handle extremely out of order RFC 2833 DTMF

The current implementation of RFC 2833 DTMF handling in res_rtp_asterisk will,
if a packet arrives out of order, drop the packet.  This is to prevent
duplicate ton generation in the Asterisk core.  Since the RTP layer does not
buffer data itself, this is the only option the RTP layer currently has for
handling packets that arrive out of order.

For the most part, this doesn't matter.  For a particular digit, so long as a
BEGIN packet arrives before the first END packet, the digit will be produced.
If subsequent BEGIN packets arrive interleaved with the ENDs, they will be
dropped; likewise, if the BEGIN or END packets themselves are out of order,
those packets are dropped but sufficient information is conveyed to the
Asterisk core to produce the appropriate digit.

For certain sequences of DTMF packets - most notably when, for a particular
digit, an END packet arrives before any BEGIN packet for that digit - this
is a real problem.  When an END arrives before any BEGINs, the END packet is
dropped - but at the same time, it causes subsequent BEGIN packets for that
digit to be ignored.  When the next in order END packet arrives, it too is
dropped - Asterisk believes that there was no initial BEGIN.

The solution this patch provides is to trust the END packet to convey the
information needed for the Asterisk core to produce the DTMF digit.  If we
receive an END packet, and it:
  * Has a timestamp greater then the last timestamp received from an END
    packet
  * Does not have the same sequence number as the last received sequence
    number (and is thus not an END packet retransmission)
Then we send the END frame up to the Asterisk core.  It contains enough
DTMF information for Asterisk to produce the digit.

On the other hand, if we receive a BEGIN or continuation packet that occurs
with a timestamp equal to or less then the last END timestamp, then we've
received something out of order - but we already have received enough
information to produce the digit.  These packets are dropped.

Much thanks goes to Olle Johansson (oej) for providing the idea for this
solution.

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

(closes issue ASTERISK-18404)
Reported by: Stephane Chazelas
Tested by: Matt Jordan
........

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

Merged revisions 370271 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agonamed_acl: Remove systemname option from acl.conf, use asterisk.conf value
Jonathan Rose [Thu, 19 Jul 2012 20:37:10 +0000 (20:37 +0000)]
named_acl: Remove systemname option from acl.conf, use asterisk.conf value

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

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

7 years agoCallID Logging: Remove new line/carriage return from callID change test event
Jonathan Rose [Thu, 19 Jul 2012 19:07:25 +0000 (19:07 +0000)]
CallID Logging: Remove new line/carriage return from callID change test event

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

7 years agoUse the bruteforce method to get debugging enabled for pjproject.
Joshua Colp [Thu, 19 Jul 2012 12:14:29 +0000 (12:14 +0000)]
Use the bruteforce method to get debugging enabled for pjproject.

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

7 years agoTurn on debugging for pjproject so we can get a better idea of what is causing the...
Joshua Colp [Thu, 19 Jul 2012 10:46:48 +0000 (10:46 +0000)]
Turn on debugging for pjproject so we can get a better idea of what is causing the generic CCSS test crash.

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

7 years agocallid logging: Issue test events when the callid is changed for a channel
Jonathan Rose [Wed, 18 Jul 2012 19:48:09 +0000 (19:48 +0000)]
callid logging: Issue test events when the callid is changed for a channel

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

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

7 years agoResolve severe memory leak in CEL logging modules.
Kevin P. Fleming [Wed, 18 Jul 2012 19:18:40 +0000 (19:18 +0000)]
Resolve severe memory leak in CEL logging modules.

A customer reported a significant memory leak using Asterisk 1.8. They
have tracked it down to ast_cel_fabricate_channel_from_event() in
main/cel.c, which is called by both in-tree CEL logging modules
(cel_custom.c and cel_sqlite3_custom.c) for each and every CEL event
that they log.

The cause was an incorrect assumption about how data attached to an
ast_channel would be handled when the channel is destroyed; the data
is now stored in a datastore attached to the channel, which is
destroyed along with the channel at the proper time.

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

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

Merged revisions 370206 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoEnsure that all ast_datastore_info structures are 'const'.
Kevin P. Fleming [Wed, 18 Jul 2012 17:18:20 +0000 (17:18 +0000)]
Ensure that all ast_datastore_info structures are 'const'.

While addressing a bug, I came across a instance of 'struct ast_datastore_info'
that was not declared 'const'. Since the API already expects them to be
'const', this patch changes the declarations of all existing instances
that were not already declared that way.
........

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

Merged revisions 370184 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoFix a crash in pjnath when starting an ICE connectivity check and immediately destroy...
Joshua Colp [Wed, 18 Jul 2012 15:15:41 +0000 (15:15 +0000)]
Fix a crash in pjnath when starting an ICE connectivity check and immediately destroying the ICE session.

The initial ICE connectivity check is scheduled as a timer item that is to be executed immediately. It is possible for this timer item to start executing while the ICE session it is working on is destroyed. To reduce the chance of this any timer items that need to be immediately executed will be executed within the thread that has started the initial ICE connectivity check.

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

7 years agoFix a crash occurring as a result of excess stack usage.
Joshua Colp [Wed, 18 Jul 2012 11:38:05 +0000 (11:38 +0000)]
Fix a crash occurring as a result of excess stack usage.

This fix involves moving the allocation of some temporary codec structures to the heap and also reduces the number of maximum payloads to something more sane for both regular and low memory builds.

(closes issue ASTERISK-20140)
Reported by: jonnt

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

7 years agoAdded option 'interdigit_timer' to unistim.conf to make able controll hardcoded dial...
Igor Goncharovskiy [Wed, 18 Jul 2012 07:17:00 +0000 (07:17 +0000)]
Added option 'interdigit_timer' to unistim.conf to make able controll hardcoded dial timeout constant.

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

7 years agoAdd pubsub unsubscription support so subscriptions do not linger for MWI and device...
Joshua Colp [Tue, 17 Jul 2012 19:05:36 +0000 (19:05 +0000)]
Add pubsub unsubscription support so subscriptions do not linger for MWI and device state progatation.

The pubsub code did not attempt to remove subscriptions at all. This has now changed so that if a client is being disconnected it will unsubscribe. It will also unsubscribe at connection time so if it unexpectedly disconnected duplicate subscriptions will not occur.

(closes issue ASTERISK-19882)
Reported by: mattvryan

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

7 years agoFix a crash as a result of propagating MWI or device state over XMPP when the client...
Joshua Colp [Tue, 17 Jul 2012 16:32:10 +0000 (16:32 +0000)]
Fix a crash as a result of propagating MWI or device state over XMPP when the client is disconnected.

The MWI and device state propagation code wrongly assumes that an XMPP client connection will remain established at all times. This fix corrects that by making the lifetime of the subscription the same as the lifetime of the connection itself. As the connection is established and disconnected the subscription itself is created and destroyed.

(closes issue ASTERISK-18078)
Reported by: elguero

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

7 years agoCode cleanup and bugfix in chan_sip outboundproxy parsing.
Walter Doekes [Mon, 16 Jul 2012 19:58:00 +0000 (19:58 +0000)]
Code cleanup and bugfix in chan_sip outboundproxy parsing.

The bug was clearing the global outboundproxy when a peer-specific
outboundproxy was bad. The cleanup reduces duplicate code.

Review: https://reviewboard.asterisk.org/r/2034/
Reviewed by: Mark Michelson
........

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

Merged revisions 370132 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoFix an issue where a service discovery request could crash Asterisk.
Joshua Colp [Mon, 16 Jul 2012 19:14:29 +0000 (19:14 +0000)]
Fix an issue where a service discovery request could crash Asterisk.

A server sending a service discovery request to us may or may not put a from attribute in the message. If the from attribute is present use it in the to attribute for the result. If the from attribute is not present do not add a to attribute.

(issue ASTERISK-16203)
Reported by: wubbla

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

7 years agoFix a bug where some XMPP servers would reject authentication. We need to use the...
Joshua Colp [Mon, 16 Jul 2012 17:26:40 +0000 (17:26 +0000)]
Fix a bug where some XMPP servers would reject authentication. We need to use the user portion of the JID and not the full configured username.

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

7 years agoAdd missing namespace for old non-SASL based authentication.
Joshua Colp [Mon, 16 Jul 2012 16:54:55 +0000 (16:54 +0000)]
Add missing namespace for old non-SASL based authentication.

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

7 years agoFix a bug exposed by the testsuite where text streams would no longer be parsed corre...
Joshua Colp [Mon, 16 Jul 2012 15:08:53 +0000 (15:08 +0000)]
Fix a bug exposed by the testsuite where text streams would no longer be parsed correctly.

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

7 years agoAdd comments about the BUILD_NATIVE change
Kinsey Moore [Mon, 16 Jul 2012 14:02:10 +0000 (14:02 +0000)]
Add comments about the BUILD_NATIVE change

This is a significant change and mention of it should have gone into
UPGRADE.txt and CHANGES.
........

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

Merged revisions 370082 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoFix an issue where specifying the resource in the username would cause authentication...
Joshua Colp [Mon, 16 Jul 2012 12:58:18 +0000 (12:58 +0000)]
Fix an issue where specifying the resource in the username would cause authentication to fail.

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

7 years agoAdd support for SIP over WebSocket.
Joshua Colp [Mon, 16 Jul 2012 12:35:04 +0000 (12:35 +0000)]
Add support for SIP over WebSocket.

This allows SIP traffic to be exchanged over a WebSocket connection which is useful for rtcweb.

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

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

7 years agoDeactivate timer for dialing entered number on hook switch hang up.
Igor Goncharovskiy [Mon, 16 Jul 2012 07:38:18 +0000 (07:38 +0000)]
Deactivate timer for dialing entered number on hook switch hang up.

(closes issue ASTERISK-19554)
Reported by: Stefano Villani

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

7 years agoAdd French translation for chan_unistim phones on-screen menus.
Igor Goncharovskiy [Mon, 16 Jul 2012 07:34:12 +0000 (07:34 +0000)]
Add French translation for chan_unistim phones on-screen menus.

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

7 years agoReduce memory consumption and add the H.264 and H.263 modules I shamefully neglected...
Joshua Colp [Fri, 13 Jul 2012 18:41:07 +0000 (18:41 +0000)]
Reduce memory consumption and add the H.264 and H.263 modules I shamefully neglected to add.

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

7 years agoAdd support for parsing SDP attributes, generating SDP attributes, and passing it...
Joshua Colp [Fri, 13 Jul 2012 16:49:40 +0000 (16:49 +0000)]
Add support for parsing SDP attributes, generating SDP attributes, and passing it through.

This support includes codecs such as H.263, H.264, SILK, and CELT. You are able to set up a call and have attribute information pass. This should help considerably with video calls.

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

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

7 years agolive_ast: don't set working directory
Tzafrir Cohen [Fri, 13 Jul 2012 00:05:46 +0000 (00:05 +0000)]
live_ast: don't set working directory

contrib/scripts/live_ast currently assumes that it is being run from the
top-level directory of the source tree. It creates a script that will
also set the working directory.

This fix avoids the need to set the working directory if the caller sets
LIVE_AST_BASE_DIR instead.

It relies on realpath for that. If realpath is not available, it will
fall back to the original behaviour.

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

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

7 years agoHandle deprecated (aliased) option names with the config options api
Terry Wilson [Thu, 12 Jul 2012 21:43:09 +0000 (21:43 +0000)]
Handle deprecated (aliased) option names with the config options api

Add a simple way to register "deprecated" option names that alias to a
different "current" name.

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

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

7 years agoAdd missing ast_hangup() calls on some analog exception paths.
Richard Mudgett [Thu, 12 Jul 2012 20:28:07 +0000 (20:28 +0000)]
Add missing ast_hangup() calls on some analog exception paths.

Make starting analog_ss_thread() or __analog_ss_thread() failure paths
hangup the channel.
........

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

Merged revisions 370025 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoInclude Expires header for SIP PUBLISH requests
Kinsey Moore [Thu, 12 Jul 2012 20:06:23 +0000 (20:06 +0000)]
Include Expires header for SIP PUBLISH requests

RFC3903 requres SIP PUBLISH requests to have Expires headers, so add
them.

Review: https://reviewboard.asterisk.org/r/2003/
Patch-by: gareth
........

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

Merged revisions 370015 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoPrevent double uri_escaping in chan_sip when pedantic is enabled
Kinsey Moore [Thu, 12 Jul 2012 19:05:11 +0000 (19:05 +0000)]
Prevent double uri_escaping in chan_sip when pedantic is enabled

If pedantic mode is enabled, outbound invites will have double-escaped
contacts.  This avoids setting an already-escaped string into a field
where it is expected to be unescaped.

(closes issue ASTERISK-20023)
Reported by: Walter Doekes
........

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

Merged revisions 369994 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoCorrect Documentation For DEC Function
Michael L. Young [Thu, 12 Jul 2012 14:38:44 +0000 (14:38 +0000)]
Correct Documentation For DEC Function

The documentation for DEC in func_math.c was incorrect.  Looks like a copy and
paste error.

(Closes issue ASTERISK-20095)
Reported by: Billy Chia
Tested by: Michael L. Young
Patches:
    func_math.patch uploaded by Billy Chia (license 6381)
........

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

Merged revisions 369971 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoReverting last merge since it wasn't completed properly.
Michael L. Young [Thu, 12 Jul 2012 14:36:44 +0000 (14:36 +0000)]
Reverting last merge since it wasn't completed properly.

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

7 years agoCorrect Documentation For DEC Function
Michael L. Young [Thu, 12 Jul 2012 14:27:56 +0000 (14:27 +0000)]
Correct Documentation For DEC Function

The documentation for DEC in func_math.c was incorrect.  Looks like a copy and
paste error.

(Closes issue ASTERISK-20095)
Reported by: Billy Chia
Tested by: Michael L. Young
Patches:
    func_math.patch uploaded by Billy Chia (license 6381)
........

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

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

7 years agoNamed ACLs: Introduces a system for creating and sharing ACLs
Jonathan Rose [Wed, 11 Jul 2012 18:33:36 +0000 (18:33 +0000)]
Named ACLs: Introduces a system for creating and sharing ACLs

This patch adds Named ACL functionality to Asterisk. This allows system
administrators to define an ACL and refer to it by a unique name. Configurable
items can then refer to that name when specifying access control lists.
It also includes updates to all core supported consumers of ACLs. That includes
manager, chan_sip, and chan_iax2. This feature is based on the deluxepine-trunk
by Olle E. Johansson and provides a subset of the Named ACL functionality
implemented in that branch. For more information on this feature, see acl.conf
and/or the Asterisk wiki.

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

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

7 years agoAllow the REALTIME() function to report errors back to the caller.
Tilghman Lesher [Wed, 11 Jul 2012 17:16:50 +0000 (17:16 +0000)]
Allow the REALTIME() function to report errors back to the caller.

Also, do more error checking on the arguments specified to the REALTIME()
function and clarify the documentation.  While I was editing the file, a
few coding guidelines fixups, as well.

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

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

Merged revisions 369938 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoDon't perform an XInclude to a document node that may not always be present
Matthew Jordan [Wed, 11 Jul 2012 17:14:45 +0000 (17:14 +0000)]
Don't perform an XInclude to a document node that may not always be present

Because some of the manager events are defined in the top of the source, due
to the macro calls not containing all necessary information to have the
documentation colocated with the call itself, several include statements were
failing when built with 'make'.  While this did not cause any problems in
compilation or validation, it did result in a number of warnings being dumped
to stderr.

This patch changes those references such that they always resolve, regardless
of the documentation build options.

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

7 years agoDo not consider failure to read the configuration file in chan_motif to be a show...
Joshua Colp [Wed, 11 Jul 2012 16:42:01 +0000 (16:42 +0000)]
Do not consider failure to read the configuration file in chan_motif to be a show stopper for loading Asterisk by returning decline instead of failure.

(closes issue ASTERISK-20103)
Reported by: Terry Wilson

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

7 years agoFix validation errors when producing documentation using default build script
Matthew Jordan [Wed, 11 Jul 2012 02:06:05 +0000 (02:06 +0000)]
Fix validation errors when producing documentation using default build script

The awk script parses out the first instance of the DOCUMENTATION tag that it
finds within a file.  If a file did not previously have a DOCUMENTATION tag
but received one due to it having an AMI event, then the XML fragment
associated with the AMI event was erroneously placed in the resulting XML
file.  Without the python scripts, these XML fragments will not validate.

This patch adds DOCUMENTATION tags at the top of those files that did
not previously have them to prevent the awk script from pulling AMI event
documentation.

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

7 years agoAdd some additional documentation for core AMI events
Matthew Jordan [Tue, 10 Jul 2012 22:26:27 +0000 (22:26 +0000)]
Add some additional documentation for core AMI events

This patch adds some basic documentation for a number of modules.  This
includes core source files in Asterisk (those in main), as well as
chan_agent, chan_dahdi, chan_local, sig_analog, and sig_pri.  The DTD
has also been updated to allow referencing of AMI commands.

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

7 years agoFix failing SDP_offer_answer test
Kinsey Moore [Tue, 10 Jul 2012 15:36:37 +0000 (15:36 +0000)]
Fix failing SDP_offer_answer test

Asterisk now generates image stream declinations with the same
transport case that it used to before the stream declination
improvements. (udptl vs UDPTL)

(closes issue SWP-4736)

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

7 years agoAdd additional description stanza names from the old Google Talk protocol which is...
Joshua Colp [Tue, 10 Jul 2012 15:25:12 +0000 (15:25 +0000)]
Add additional description stanza names from the old Google Talk protocol which is used with Google Voice.

(closes issue ASTERISK-20114)
Reported by: Malcolm Davenport

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

7 years agoRespect codec preference order when adding codecs to a media description.
Joshua Colp [Tue, 10 Jul 2012 14:00:05 +0000 (14:00 +0000)]
Respect codec preference order when adding codecs to a media description.

This change allows an endpoint in motif.conf to be configured with a preference of G.722 and fallback of ulaw. With Google this allows communication with Google Talk clients to use G.722 while when using Google Voice ulaw will be used.

(closes issue ASTERISK-20114)
Reported by: Malcolm Davenport

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

7 years agoImprove Goto and GotoIf related documentation
Kinsey Moore [Tue, 10 Jul 2012 13:40:32 +0000 (13:40 +0000)]
Improve Goto and GotoIf related documentation

Correct documentation on labeliftrue and labeliffalse parameters of
GotoIf() and update several other locations that use the same syntax.

(closes issue ASTERISK-20007)
Patch-by: Leif Madsen
Reported-by: WIMPy
........

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

Merged revisions 369871 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoFix initial loading problem with res_curl
Matthew Jordan [Tue, 10 Jul 2012 13:34:15 +0000 (13:34 +0000)]
Fix initial loading problem with res_curl

When the OpenSSL duplicate initialization issues were resolved in r351447,
res_curl could fail to load if it checked SSL_library_init after SSL
initialization completed.  This is due to the SSL_library_init stub returning
a value of 0 for success, as opposed to a value of 1.  OpenSSL uses a value of
1 to indicate success - in fact, SSL_library_init is documented to always return
1.  Interestingly, the CURL libraries actually checked the return value - the fact
that nothing else that depends on OpenSSL was having problems loading probably means
they don't check the return value.

(closes issue AST-924)
Reported by: Guenther Kelleter
patches:
  (AST-924.patch license #6372 uploaded by Guenther Kelleter)

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

7 years agoAdd required items for Google video support.
Joshua Colp [Tue, 10 Jul 2012 11:49:18 +0000 (11:49 +0000)]
Add required items for Google video support.

This adds legacy STUN support for RTCP sockets, adds RTCP candidates to the Google transport information, and adds required codec parameters.

(closes issue ASTERISK-20106)
Reported by: Malcolm Davenport

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

7 years agoWhen receiving a STUN binding request send one out as the Google Talk client uses...
Joshua Colp [Mon, 9 Jul 2012 22:38:25 +0000 (22:38 +0000)]
When receiving a STUN binding request send one out as the Google Talk client uses this as a method to determine if the remote party is still reachable or not.

Failure to do this results in the Google Talk client ignoring RTP packets after a specific period of time. This is also done as a result of receiving a STUN binding request so that the username information can be used from the inbound request, thus not requiring it to be stored on a per candidate basis.

(closes issue ASTERISK-20107)
Reported by: Malcolm Davenport

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

7 years agoAdd support for exposing the received contact URI and also for setting the request...
Joshua Colp [Mon, 9 Jul 2012 19:51:37 +0000 (19:51 +0000)]
Add support for exposing the received contact URI and also for setting the request URI in messages.

(closes issue AST-911)

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

7 years agoForce the clock rate of G.722 to be 16000 when using the Google transports as it...
Joshua Colp [Mon, 9 Jul 2012 19:05:25 +0000 (19:05 +0000)]
Force the clock rate of G.722 to be 16000 when using the Google transports as it is 8000 elsewhere.

(closes issue ASTERISK-20105)
Reported by: Malcolm Davenport

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

7 years agoDocument that multiple endpoints using the same connection is not supported.
Joshua Colp [Mon, 9 Jul 2012 18:54:43 +0000 (18:54 +0000)]
Document that multiple endpoints using the same connection is not supported.

(closes issue ASTERISK-20104)
Reported by: Malcolm Davenport

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

7 years agoAdd Digium phones context to sip_notify sample config.
Jason Parker [Mon, 9 Jul 2012 17:07:06 +0000 (17:07 +0000)]
Add Digium phones context to sip_notify sample config.

This makes it so that they can be reconfigured remotely.

(closes issue ASTERISK-19910)
........

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

Merged revisions 369819 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoFix an issue where media would not flow for situations where the legacy STUN code...
Joshua Colp [Mon, 9 Jul 2012 16:44:24 +0000 (16:44 +0000)]
Fix an issue where media would not flow for situations where the legacy STUN code is in use.

The STUN packets should *not* be blocked by strict RTP.

(closes issue ASTERISK-20102)
Reported by: Malcolm Davenport

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

7 years agoAdd additional namespaces for Google Talk which are used for the gmail client.
Joshua Colp [Mon, 9 Jul 2012 16:27:47 +0000 (16:27 +0000)]
Add additional namespaces for Google Talk which are used for the gmail client.

(closes issue ASTERISK-20101)
Reported by: Malcolm Davenport

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

7 years agoFix dependency to be on res_xmpp. Long ago in a galaxy far far away it used to use...
Joshua Colp [Mon, 9 Jul 2012 15:58:36 +0000 (15:58 +0000)]
Fix dependency to be on res_xmpp. Long ago in a galaxy far far away it used to use res_jabber.

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

7 years agochan_sip: Fix small behavioral change accidentally introduced in r369750
Jonathan Rose [Mon, 9 Jul 2012 14:54:22 +0000 (14:54 +0000)]
chan_sip: Fix small behavioral change accidentally introduced in r369750

When removing the warning for AST_CONTROL_FLASH from sip_indicate, I also
inadvertently changed the return value, which would likely make the indication
not be sent in audio. This fixes that while still removing the warning message.
........

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

Merged revisions 369793 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoAdd a new unified Jingle, Google Jingle, and Google Talk channel driver written from...
Joshua Colp [Sat, 7 Jul 2012 17:06:51 +0000 (17:06 +0000)]
Add a new unified Jingle, Google Jingle, and Google Talk channel driver written from scratch called chan_motif.

This channel driver is a replacement for both chan_gtalk and chan_jingle but adds additional features not found in either.
These features include full configuration reload, video, full codec support, bidirectional cause code mapping, hold,
unhold, and ringing indication. It is also compliant with the current published Jingle and Google Jingle specifications.
The original Google Talk protocol is also supported for Google Voice interoperability.

You may ask yourself though where the name motif comes from... and I would say to you... music!

motif: a perceivable or salient recurring fragment or succession of notes

Sorta like a jingle!

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

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

7 years agoRemove unnecessary generation of informational cause frames
Kinsey Moore [Fri, 6 Jul 2012 22:03:44 +0000 (22:03 +0000)]
Remove unnecessary generation of informational cause frames

It is not necessary to generate information cause code frames on every
protocol event that occurs.  This removes all the instances where the
frame was not conveying a cause code and was instead just conveying a
protocol-specific message.  This also corrects the generation of the
message associated with disconnects for MFC/R2 to use the MFC/R2
specific text for the disconnect cause.

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

7 years agochan_sip: Add case for FLASH control frames so that we don't display a warning.
Jonathan Rose [Fri, 6 Jul 2012 21:28:26 +0000 (21:28 +0000)]
chan_sip: Add case for FLASH control frames so that we don't display a warning.

chan_sip channels can receive flash control frames when connected to analog
phones and possibly for other reasons. There really isn't a reason to warn when
these frames are received, we can safely ignore them.

Patches:
    dahdi_sip_flash.diff uploaded by Jonathan Rose (license 6182)
........

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

Merged revisions 369751 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoRemove a superfluous and dangerous freeing of an SSL_CTX.
Mark Michelson [Fri, 6 Jul 2012 18:49:17 +0000 (18:49 +0000)]
Remove a superfluous and dangerous freeing of an SSL_CTX.

The problem here is that multiple server sessions share
a SSL_CTX. When one session ended, the SSL_CTX would be
freed and set NULL, leaving the other sessions unable to
function.

The code being removed is superfluous because the SSL_CTX
structures for servers will be properly freed when ast_ssl_teardown
is called.

(closes issue ASTERISK-20074)
Reported by Trevor Helmsley
Patches:
ASTERISK-20074.diff uploaded by Mark Michelson (license #5049)
Testers:
Trevor Helmsley
........

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

Merged revisions 369732 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoFix bridging thread leak.
Mark Michelson [Fri, 6 Jul 2012 15:31:52 +0000 (15:31 +0000)]
Fix bridging thread leak.

The bridge thread was exiting but was never being
reaped using pthread_join(). This has been fixed now
by calling pthread_join() in ast_bridge_destroy().

(closes issue ASTERISK-19834)
Reported by Marcus Hunger

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

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

Merged revisions 369709 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoImport revision 4196 from pjproject trunk. Fix a crash issue when starting ICE connec...
Joshua Colp [Fri, 6 Jul 2012 14:32:30 +0000 (14:32 +0000)]
Import revision 4196 from pjproject trunk. Fix a crash issue when starting ICE connectivity checks and immediately destroying the ICE session. This was exposed by the SIP CCSS test.

Full fix for this issue will be worked on as a medium to long term roadmap item.

pjroject issue viewable at https://trac.pjsip.org/repos/ticket/1548

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

7 years agoAdd 'stun show status' command
Matthew Jordan [Thu, 5 Jul 2012 21:36:41 +0000 (21:36 +0000)]
Add 'stun show status' command

This patch adds a new CLI command, 'stun show status'.  This command will show
a table describing all known STUN servers and statuses.

(closes issue ASTERISK-18046)
Reported by: Jeremy Kister
Tested by: Jeremy Kister
patches:
  (stun-show-status-v4-trunk.patch license #6232 uploaded by Jeremy Kister)

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

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

7 years agoMake res/pjproject ignore more files.
Richard Mudgett [Thu, 5 Jul 2012 19:36:22 +0000 (19:36 +0000)]
Make res/pjproject ignore more files.

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

7 years agoAST-2012-011: Resolve heap corruption issue with voicemail
Kinsey Moore [Thu, 5 Jul 2012 19:36:21 +0000 (19:36 +0000)]
AST-2012-011: Resolve heap corruption issue with voicemail

The heard and deleted arrays in the voicemail state structure were not
handled properly following the memory leak fix in r354890 and a fix for
an invalid free in r356797.  This could result in accessing and writing
into freed memory.  The allocation for these arrays has been reworked
to avoid the possibility of invalid frees, access of freed memory, and
crashes that were occurring as a result of this.

Locking around accesses and modifications of the voicemail state
structure members dh_arraysize, heard, and deleted has been added to
prevent simultaneous modification and access when IMAP storage is in
use.  If IMAP storage is not in use, this locking is not compiled in.

Review: https://reviewboard.asterisk.org/r/1994/
(closes issue ASTERISK-19923)
Reported by: Dan Delaney
Tested by: Dan Delaney, Julian Yap
Patches:
  vm_alloc_fix.diff uploaded by kmoore (license 6273)

........

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

Merged revisions 369653 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoMake res/pjproject ignore some generated files.
Richard Mudgett [Thu, 5 Jul 2012 19:32:29 +0000 (19:32 +0000)]
Make res/pjproject ignore some generated files.

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

7 years agoTweak some comments and whitespace in utils.h
Richard Mudgett [Thu, 5 Jul 2012 19:22:03 +0000 (19:22 +0000)]
Tweak some comments and whitespace in utils.h

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

7 years agoapp_mixmonitor: Fix a reference leak in manager_mixmonitor function
Jonathan Rose [Thu, 5 Jul 2012 18:11:58 +0000 (18:11 +0000)]
app_mixmonitor: Fix a reference leak in manager_mixmonitor function

Manager_mixmonitor included an early return on failed executions of mixmonitor
that would result in a leaked channel reference.

(closes issue ASTERISK-19943)
Reported by: Mark Murawski
Patches:
mixmonitor-trunk-368394.patch uploaded by Mark Murawski (license 5791)

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

7 years agoDo not send a BYE when a provisional response arrives during a re-INVITE
Matthew Jordan [Thu, 5 Jul 2012 17:03:43 +0000 (17:03 +0000)]
Do not send a BYE when a provisional response arrives during a re-INVITE

Commits r369557 and r369579 were done to improve handling of re-INVITEs
when the UA that was supposed to receive the re-INVITE fails to respond.
A limitation of those patches occurred when a UA sent a provisional
response to the re-INVITE.  This triggered a sending of a BYE in
check_pending.  This patch tweaks the handling of the re-INVITE such that
a BYE is not sent in response to those messages.

(issue ASTERISK-19992)
Reported by: Steve Davies
Tested by: Steve Davies
patches:
  (reinvite_tweak.diff license #5012 by Steve Davies)
........

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

Merged revisions 369627 from http://svn.asterisk.org/svn/asterisk/branches/10

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

7 years agoFix dev mode ooh323 warnings
Alexandr Anikin [Thu, 5 Jul 2012 11:42:23 +0000 (11:42 +0000)]
Fix dev mode ooh323 warnings

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