Commit Graph

23407 Commits

Author SHA1 Message Date
Michael L. Young
92419e15e2 Blocked revisions 384779
........
Backport Appropiate NAT Setting Cleanup

In ASTERISK-20904, the focus was around the changes to NAT that took place in
Asterisk 11.  Since the report stated that 1.8 was fine, we didn't take a look
at 1.8 at the time.

While working on ASTERISK-21225, I could see that 1.8 would benefit from having
some of those changes applied to it.

This patch does the following:

* The important part of this patch is that it sets the peer's flags earlier in
  build_peer so that the code properly uses the peer's flags based on the peer's
  configuration.
* constify req parameter in check_via()
* update realtime schemas under the contrib directory to handle properly the NAT
  settings available in 1.8 as well as to handle the changes made in 11 to make
  upgrading easier when installing newer versions of Asterisk

(closes issue ASTERISK-21243)
Reported by: Michael L. Young
Patches:
    asterisk-20904-changes_for_1.8.diff Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-04 19:34:02 +00:00
Richard Mudgett
fe8c92adc8 chan_dahdi: Add inband_on_proceeding compatibility option.
The new inband_on_proceeding option causes Asterisk to assume inband audio
may be present when a PROCEEDING message is received.

Q.931 Section 5.1.2 says the network cannot assume that the CPE side has
attached to the B channel at this time without explicitly sending the
progress indicator ie informing the CPE side to attach to the B channel
for audio.  However, some non-compliant ISDN switches send a PROCEEDING
without the progress indicator ie indicating inband audio is available and
assume that the CPE device has connected the media path for listening to
ringback and other messages.

ASTERISK-17834 which causes this issue was dealing with a non-compliant
network switch.

(closes issue ASTERISK-21151)
Reported by: Gianluca Merlo
Tested by: rmudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-03 20:18:32 +00:00
Matthew Jordan
50cdbaa94d Update documentation for CHANNEL function
Document that you can read/write the 'accountcode' and 'amaflags' on a channel.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-03 17:10:54 +00:00
David M. Lee
042579a9cb Fixed spurious rebuilds of func_version.
func_version.so was being rebuilt every time, because build.h was
changing every build, because of the cleantest dependency that was
added in r384410 to fix parallel make bugs.

Now build.h will only be created if it does not exist, which was the
original behavior of the Makefile.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-02 17:34:50 +00:00
Joshua Colp
eaa02d0f68 Remove silly use of strncmp.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-01 14:07:11 +00:00
David M. Lee
620c0e2762 Fix parallel make problems.
Occasionally, make -j would fail due to missing includes, or other
unusual errors.

This was due to the 'cleantest' target, which was designed to force a
make clean when some change in the code would cause the typical
depedency checking to fail. Several targets in the main Makefile did
not depend upon cleantest, hence would run in parallel to it. By
adding the dependency, make -j runs happily now.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-01 13:28:02 +00:00
Jonathan Rose
429dd44b39 app_voicemail: Add blank argument to externnotify if no context argument
At least one call to run_externnotify provides a NULL context parameter and
because the snprintf statement doesn't account for a NULL context parameter,
it simply writes '(null)' to the arguments string instead. This patch makes
it write two quotes back to back for that argument instead in the event of
a NULL context.

(closes issue ASTERISK-18207)
Reported by: Barry L. Kline
Patches:
	modified from patch-20130306 uploaded by Karsten Wemheuer (License 5930)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-29 16:31:45 +00:00
Kinsey Moore
ef79c00991 Address uninitialized conditional that valgrind found
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 19:51:29 +00:00
Matthew Jordan
66024dbae0 Fix a file descriptor leak in off nominal path
While looking at the security vulnerability in ASTERISK-20967, Walter noticed
a file descriptor leak and some other issues in off nominal code paths. This
patch corrects them.

Note that this patch is not related to the vulnerability in ASTERISK-20967,
but the patch was placed on that issue.

(closes issue ASTERISK-20967)
Reported by: wdoekes
patches:
  issueA20967_file_leak_and_unused_wkspace.patch uploaded by wdoekes (License 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 18:51:11 +00:00
Kinsey Moore
d014e51a18 Fix white noise on SRTP decryption
When res_rtp_asterisk.c was altered to avoid attempting to apply
unprotect algorithms to non-audio RTP packets, the test used was
incorrect. This caused the audio packets to not be decrypted and
resulted in loud white noise on the other endpoint (or both endpoints
depending on the call legs involved). The test now properly checks the
version field in the RTP header to ensure that RTP and RTCP are
decrypted while other types of packets are not.

(closes issue ASTERISK-21323)
Reported by: andrea
Tested by: Kinsey Moore, andrea, John Bigelow
Patches:
    whitenoise_fix.diff uploaded by Kinsey Moore
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 17:06:07 +00:00
Matthew Jordan
b984d78c5c AST-2013-003: Prevent username disclosure in SIP channel driver
When authenticating a SIP request with alwaysauthreject enabled, allowguest
disabled, and autocreatepeer disabled, Asterisk discloses whether a user
exists for INVITE, SUBSCRIBE, and REGISTER transactions in multiple ways. The
information is disclosed when:
 * A "407 Proxy Authentication Required" response is sent instead of a
   "401 Unauthorized" response
 * The presence or absence of additional tags occurs at the end of "403
   Forbidden" (such as "(Bad Auth)")
 * A "401 Unauthorized" response is sent instead of "403 Forbidden" response
   after a retransmission
 * Retransmission are sent when a matching peer did not exist, but not when a
   matching peer did exist.

This patch resolves these various vectors by ensuring that the responses sent
in all scenarios is the same, regardless of the presence of a matching peer.

This issue was reported by Walter Doekes, OSSO B.V. A substantial portion of
the testing and the solution to this problem was done by Walter as well - a
huge thanks to his tireless efforts in finding all the ways in which this
setting didn't work, providing automated tests, and working with Kinsey on
getting this fixed.

(closes issue ASTERISK-21013)
Reported by: wdoekes
Tested by: wdoekes, kmoore
patches:
  AST-2013-003-1.8 uploaded by kmoore, wdoekes (License 6273, 5674)
  AST-2013-003-10 uploaded by kmoore, wdoekes (License 6273, 5674)
  AST-2013-003-11 uploaded by kmoore, wdoekes (License 6273, 5674)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 15:23:08 +00:00
Matthew Jordan
ccbe965e9f AST-2013-002: Prevent denial of service in HTTP server
AST-2012-014, fixed in January of this year, contained a fix for Asterisk's
HTTP server for a remotely-triggered crash. While the fix put in place fixed
the possibility for the crash to be triggered, a denial of service vector still
exists with that solution if an attacker sends one or more HTTP POST requests
with very large Content-Length values. This patch resolves this by capping
the Content-Length at 1024 bytes. Any attempt to send an HTTP POST with
Content-Length greater than this cap will not result in any memory allocation.
The POST will be responded to with an HTTP 413 "Request Entity Too Large"
response.

This issue was reported by Christoph Hebeisen of TELUS Security Labs

(closes issue ASTERISK-20967)
Reported by: Christoph Hebeisen
patches:
  AST-2013-002-1.8.diff uploaded by mmichelson (License 5049)
  AST-2013-002-10.diff uploaded by mmichelson (License 5049)
  AST-2013-002-11.diff uploaded by mmichelson (License 5049)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 14:38:02 +00:00
Matthew Jordan
916a397fc3 AST-2013-001: Prevent buffer overflow through H.264 format negotiation
The format attribute resource for H.264 video performs an unsafe read against a
media attribute when parsing the SDP. The value passed in with the format
attribute is not checked for its length when parsed into a fixed length buffer.
This patch resolves the vulnerability by only reading as many characters from
the SDP value as will fit into the buffer.

(closes issue ASTERISK-20901)
Reported by: Ulf Harnhammar
patches:
  h264_overflow_security_patch.diff uploaded by jrose (License 6182)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 14:26:44 +00:00
Matthew Jordan
1eff40f21d Resolve deadlock between SIP registration and channel based functions
In r373424, several reentrancy problems in chan_sip were addressed. As a
result, the SIP channel driver is now properly locking the channel driver
private information in certain operations that it wasn't previously. This
exposed two latent problems either in register_verify or by functions called
by register_verify. This includes:
 * Holding the private lock while calling sip_send_mwi_to_peer. This can create
   a new sip_pvt via sip_alloc, which will obtain the channel container lock.
   This is a locking inversion, as any channel related lock must be obtained
   prior to obtaining the SIP channel technology private lock.

   Note that this issue was already fixed in Asterisk 11.

 * Holding the private lock while calling sip_poke_peer. In the same vein as
   sip_send_mwi_to_peer, sip_poke_peer can create a new SIP private, causing
   the same locking inversion.

Note that this locking inversion typically occured when CLI commands were run
while a SIP REGISTER request was being processed, as many CLI commands (such
as 'sip show channels', 'core show channels', etc.) have to obtain the channel
container lock.

(issue ASTERISK-21068)
Reported by: Nicolas Bouliane

(issue ASTERISK-20550)
Reported by: David Brillert

(issue ASTERISK-21314)
Reported by: Badalian Vyacheslav

(issue ASTERISK-21296)
Reported by: Gabriel Birke
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 02:28:31 +00:00
Matthew Jordan
b5e32e5871 Resolve deadlock between pending CDR and batch CDR locks
r375757 attempted to resolve a race condition between multiple submissions of
CDRs while in batch mode from attempting to destroy the scheduled batch
submission by extending the batch CDR lock. Unfortunately, this causes a
deadlock between the pending CDR lock and the batch CDR lock. This patch
resolves the intent of r375757 by simply providing a new lock that protects
the scheduling of the batches. The original batch CDR lock is kept to protect
manipulation of the batch CDR settings, but has been placed such that it
is not held when the pending lock is held.

Thanks to Chase Venters for providing lock analysis on the issue.

(issue ASTERISK-21162)
Reported by: Chase Venters
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 01:52:21 +00:00
Russell Bryant
e66ae28960 Fix multi-station answer race condition.
When an SLA trunk is ringing (inbound call on the trunk) Asterisk will
make outbound calls to the stations that have that trunk.  If more than
one station answers the call at the same time, all channels other than
the first one to answer are left in a bad state.  The channel gets
leaked, is not connected to anything, and there's no way to get rid of
it.

We now properly clean up these losing channels by hanging up on them.
Since they lost the race, as we process their answer, there is no
ringing trunk for them to answer.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 01:36:27 +00:00
Richard Mudgett
cf3810a555 Set the CALLERID(dnid-num-plan) for incoming ISDN calls.
The CALLEDTON channel variable is set for incoming ISDN calls to the lower
7 bits of the Q.931 type-of-number/numbering-plan octet.  The
CALLERID(dnid-num-plan) should have the same value.

(closes issue ASTERISK-21248)
Reported by: rmudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 23:24:29 +00:00
Sean Bright
a52a841d8e Properly delimit post data in res_config_curl.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 12:36:33 +00:00
Michael L. Young
e9bf9588f4 Fix StopMixMonitor Hanging Up When Unable To Stop MixMonitor On A Channel
A regression was accidentally introduced when allowing an optional ID to be used
when calling StopMixMonitor.  When we are unable to stop MixMonitor on a
channel, -1 is being returned which triggers the hangup of the channel.

This patch restores the prior behavior by returning 0 whether we were successful
or not.  It also allows the call from the manager to use the return code when
the action fails.

(closes issue ASTERISK-21294)
Reported by: daroz
Tested by: daroz
Patches:
  asterisk-21294-stop_mixmonitor_hangingup.diff Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22 20:41:40 +00:00
Walter Doekes
476659a5ec Have func_curl log a warning when a curl request fails.
Review: https://reviewboard.asterisk.org/r/2403/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 20:25:50 +00:00
Walter Doekes
9e9a75408d Minor cleanup in func_curl near hashcompat code.
Review: https://reviewboard.asterisk.org/r/2402/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 20:17:14 +00:00
David M. Lee
484cef29dd Remove codecs/speex/*.i on make clean
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 15:58:33 +00:00
David M. Lee
42891b9a08 Removed codecs/g722/*.i on make clean
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 15:57:29 +00:00
Joshua Colp
c379172cae Fix a bug where resources were not found due to hashing on the priority itself.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16 15:14:37 +00:00
Kinsey Moore
4a50764715 tcptls: Prevent unsupported options from being set
AMI, HTTP, and chan_sip all support TLS in some way, but none of them
support all the options that Asterisk's TLS core is capable of
interpreting. This prevents consumers of the TLS/SSL layer from setting
TLS/SSL options that they do not support.

This also gets tlsverifyclient closer to a working state by requesting
the client certificate when tlsverifyclient is set. Currently, there is
no consumer of main/tcptls.c in Asterisk that supports this feature and
so it can not be properly tested.

Review: https://reviewboard.asterisk.org/r/2370/
Reported-by: John Bigelow
Patch-by: Kinsey Moore
(closes issue AST-1093)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 12:51:34 +00:00
Matthew Jordan
fb8760d679 When a session timer expires during a T.38 call, re-invite with correct SDP
When a session timer expires during a dialog that has re-negotiated to T.38
and Asterisk is the refresher, Asterisk will send a re-INVITE with an SDP
containing audio media only. This causes some hilarity with the poor fax
session under weigh.

This patch corrects that by sending T.38 parameters if we are in the middle of
a T.38 session.

(closes issue ASTERISK-21232)
Reported by: Nitesh Bansal
patches:
  dont-send-audio-reinvite-for-sess-timer-in-t38-call.patch uploaded by nbansal (License 6418)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 01:34:12 +00:00
Matthew Jordan
e76649b53c Fix processing of call files when using KQueue on OS X
In certain situations, call files are not processed when using KQueue with
pbx_spool. Asterisk was sending an invalid timeout value when the spool
directory is empty, causing the call to kevent to error immediately. This
can create a tight loop, increasing the CPU load on the system.

(closes issue ASTERISK-21176)
Reported by: Carlton O'Riley
patches:
  kqueue_osx.patch uploaded by coriley (License 6473)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 01:23:33 +00:00
Jason Parker
e77ab46721 Fix whitespace in AST_EXT_LIB_CHECK macro.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-14 16:57:09 +00:00
Michael L. Young
d4e02135a3 Fix Sorting Order For Parking Lots Stored In Static Realtime
When retrieving the parking lots from a MySQL database table, the current order
is "filename, cat_metric desc, var_metric asc, category".  If there are multiple
parking lots with the same cat_metric but different categories, everything is
being sorted on cat_metric first resulting in errors when loading the parking
lots.

This patch fixes the problem by sorting on the category field first, then the
cat_metric field.

(closes issue ASTERISK-21035)
Reported by: Alex Epshteyn
Patches:
  asterisk-21035-orderby.diff Michael L. Young (license 5026)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 21:17:17 +00:00
Michael L. Young
4a72692442 Update Contributed Realtime Schema Files - IPv6 Addresses
This commit updates some fields in the contributed realtime schema files to
handle IPv6 addresses.

(closes issue ASTERISK-21173)
Reported by: Torrey Searle
Patches:
  realtime_sql.patch Torrey Searle (license 5334)
  asterisk-21173-update-ip-fields.diff Michael L. Young (license 5026)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 20:39:10 +00:00
Joshua Colp
7031ad62e8 Fix a crash when res_xmpp is configured using a username without a domain.
(closes issue ASTERISK-21156)
Reported by: amsoft2001


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 20:06:28 +00:00
Matthew Jordan
77ca918044 Include the Username field in SIP Registry events when Status is registered
In ASTERISK-17888, the AMI Registry event during SIP registrations was supposed
to include the Username field. Somehow, one of the events was missed. This
patch corrects that - the Username field should be included in all AMI Registry
events involving SIP registrations.

(issue ASTERISK-17888)

(closes issue ASTERISK-21201)
Reported by: Dmitriy Serov
patches:
  chan_sip.c.diff uploaded by Dmitriy Serov (license 6479)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 16:23:16 +00:00
Igor Goncharovskiy
1531ef77a8 Fix core dump on CLI usage
Fix issue with 'unistim show info' CLI command when device connected not configured



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 08:53:09 +00:00
Jonathan Rose
96c231fc18 chan_sip: Update the via header when relaying SMS MESSAGE
Prior to this change, certain conditions for sending the message would
result in an address of '(null)' being used in the via header of the
SIP message because a NULl value of pvt->ourip was used when initially
generating the via header. This is fixed by adding a call to build_via
when the address is set before sending the message.

(closes issue ASTERISK-21148)
Reported by: Zhi Cheng
Patches:
	700-sip_msg_send_via_fix.patch uploaded by Zhi Cheng (license 6475)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-08 20:16:43 +00:00
Matthew Jordan
0b37e777f6 Let vm_mailbox_snapshot combine "Urgent" when no folder is specified
r381835 fixed a bug in vm_mailbox_snapshot where combining INBOX and Old forgot
that Urgent also "counts" as new messages. This fixed the problem when any of
the three folders was specified and the combine option was used.

It missed the case where the folder isn't specified and we build a snapshot of
all folders. This patch corrects that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 17:57:08 +00:00
Kinsey Moore
3a0a627a00 Ensure that logmsgs are freed properly
Messages sent while the logger thread is shutting down will now have
their associated callid freed properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 15:08:26 +00:00
Matthew Jordan
5b1533ca7b Add a 'secret' probation strictrtp mode to handle delayed changes in RTP source
Often, Asterisk may realize that a change in the source of an RTP stream is
about to occur and ask that the RTP engine reset it's lock on the current RTP
source. In certain scenarios, it may take awhile for the new remote system to
send RTP packets, while the old remote system may continue providing RTP during
that time period. This causes Asterisk to re-lock onto the old source, thereby
rejecting the new source when the old source stops sending RTP and the new
source begins.

This patch prevents that by having a constant secondary, 'secret' probation
mode enabled when an RTP source has been chosen. RTP packets from other sources
are always considered, but never chosen unless the current RTP source stops
sending RTP.

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

(closes issue AST-1124)
Reported by: John Bigelow
Tested by: John Bigelow

(closes issue AST-1125)
Reported by: John Bigelow
Tested by: John Bigelow



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 14:58:23 +00:00
Kinsey Moore
dde15421b5 Recorded merge of revisions 382513 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Correct app_page documentation

The 'A' and 'n' options for Page() mention that the announcement will
be played simultaneously. This is not necessarily the case.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-06 18:28:06 +00:00
Igor Goncharovskiy
d4cb37c956 Fix several unreleased mutex locks that cause problem with processing calls
(Closes issue ASTERISK-21119)
Reported by: Daniel Bohling
Tested by: Daniel Bohling

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-05 03:51:48 +00:00
Jason Parker
0667c05261 Fix comparison of presence state in event subsystem.
Several new IEs were not given types (or names), causing the comparison
function to improperly succeed.  This adds those.

(closes issue AST-1128)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-04 21:12:45 +00:00
Kevin Harwell
04100feed7 Confbridge CLI new record file name check.
This fix checks to make sure that if a confbridge record start command is issued
from the CLI it will always use the file name given on the CLI even if it
changes between start/stop records for a conference.  Previously it had been
reusing the same file between start/stops even if a new filename was given.

(issue AST-1088)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-04 20:03:09 +00:00
Michael L. Young
2109e47109 Fix / Clean Up Some Items To Handle The New auto_* NAT Options
The original report had to do with a realtime peer behind NAT being pruned and
the peer's private address being used instead of its external address.  Upon
debugging, it was discovered that this was being caused by the addition of
the auto_force_rport and auto_comedia settings.

This patch does the following:

* Adds a missing note to the CHANGES file indicating that the default global nat
  setting is auto_force_rport

* Constify the 'req' parameter for check_via()

* Add calls to check_via() in a couple of places in order for the auto_*
  settings to do their job in attempting to determine if NAT is involved

* Set the flags SIP_NAT_FORCE_RPORT and SIP_PAGE2_SYMMETRICRTP if the auto_*
  settings are in use where it was needed

* Moves the copying of peer flags up in build_peer() to before they are used;
  this fixes the realtime prune issue

* Update the contrib/realtime schemas to allow the nat column to handle the
  different nat setting combinations we have

This patch received a review and "Ship It!" on the issue itself.

(closes issue ASTERISK-20904)
Reported by: JoshE
Tested by: JoshE, Michael L. Young
Patches:
  asterisk-20904-nat-auto-and-rt-peersv2.diff Michael L. Young (license 5026)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-01 04:28:22 +00:00
Joshua Colp
a78bb96d94 While the ICE negotiation is occurring leave strictrtp in an open state, media can and will come from different places.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 21:58:55 +00:00
Joshua Colp
f6b368216a Fix a bug with ICE and strictrtp where media could get dropped.
If the end result of the ICE negotiation resulted in the path for media
changing it was possible for the strictrtp code to discard the RTP packets.
This change causes strictrtp to enter learning mode once again when the
ICE negotiation has completed successfully.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 21:37:01 +00:00
Matthew Jordan
b056a88e08 Prevent deadlock in chan_iax2 when attempting to set caller ID
A deadlock can occur in chan_iax2 when it attempts to set the caller ID, as it
already holds the iax2 private lock and improperly fails to obtain the channel
lock before calling ast_set_callerid. By not safely obtaining the channel lock,
a locking inversion can take place, causing a deadlock.

This patch solves this by calling the required deadlock avoidance functions
that obtain the channel lock before setting the caller ID.

Thanks to Pavel for fixing my syntax errors and testing this patch out.

(closes issue ASTERISK-21128)
Reported by: Pavel Troller
Tested by: Pavel Troller
patches:
  ASTERISK-21128-1.8.diff uploaded by mjordan (license 6283)
  ASTERISK-21128-modified-1.8.diff uploaded by Pavel Troller (license 6302)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 17:16:31 +00:00
Matthew Jordan
47bd918dad Let channels joining a MeetMe conference opt out of the denoiser
For some channel drivers, specifically those that have a varying rate in the
number of audio samples, the audio quality for a MeetMe conference can be
exceedingly poor. This is due to a unilateral application of the DENOISE
function in func_speex to channels joining the conference.

The denoiser function in the speex library is initialized with the number of
audio samples in each sample that will be provided to it. If the number of
audio samples changes, the denoiser has to be thrown away and re-initialized.

While this could be worked around by removing func_speex, that doesn't help
if you actually use the denoiser with other channels on the system.

This patches does the following:
 * Checks for the presence of func_speex as opposed to codec_speex when
   determining if the DENOISE function is present (which is where the function
   is actually implemented)
 * Adds an option to MeetMe 'n' that causes the denoiser to not be applied
   to a channel when it joins. This keeps the current behavior the default, but
   let's users disable the denoiser if it causes problems on their system.

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

(closes issue AST-1062)
Reported by: Thomas Arimont
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 16:52:34 +00:00
Joshua Colp
e26bd56ff4 Relax dialog checking in get_sip_pvt_byid_locked so it works when the dialog is forked.
(closes issue ASTERISK-20638)
Reported by: eelcob
Patches:
      pedantic-call-pickup-from-tag.patch uploaded by eelcob (license 6442)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27 16:17:50 +00:00
Joshua Colp
2d95e2884e Regenerate the configure script. The one in the tree was not working for me at all.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27 12:22:30 +00:00
Tzafrir Cohen
6d5b04d708 Consider linux-gnuspe as linux-gnu
* The powerpcspe Linux port uses linux-gnuspe as the OS string.
* Our build system shouldn't really care for that, so just call it linux-gnu.
* Original report: Roland Stigge , http://bugs.debian.org/701505

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:45:09 +00:00
Walter Doekes
ce9bc4e9a1 Correct RPID parsing for unquoted display-name.
Parsing Remote-Party-ID will now succeed if display-name is of the
*(token LWS) kind and not just the quoted-string kind.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:34:59 +00:00