Commit Graph

22463 Commits

Author SHA1 Message Date
Rusty Newton
ef5a22c5b0 Modified the list of keys for the driver backends for sake of sample clarity
Added a line showing the mapping of "mysql" to res_config_mysql available in add-ons. We used "mysql" as an example driver key in the sample, but didn't show what module it mapped too. Also added a subtitle above the list of keys for driver backends.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@385047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08 23:34:59 +00:00
Michael L. Young
68ebcb8f9d Fix For Not Overriding The Default Settings In chan_sip
The initial report was that the "nat" setting in the [general] section was not
having any effect in overriding the default setting.  Upon confirming that this
was happening and looking into what was causing this, it was discovered that
other default settings would not be overriden as well.

This patch works similar to what occurs in build_peer().  We create a temporary
ast_flags structure and using a mask, we override the default settings with
whatever is set in the [general] section.

In the bug report, the reporter who helped to test this patch noted that the
directmedia settings were being overriden properly as well as the nat settings.

(closes issue ASTERISK-21225)
Reported by: Alexandre Vezina
Tested by: Alexandre Vezina, Michael L. Young
Patches:
  asterisk-21225-handle-options-default-prob_1.8_v4.diff.diff
						Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@385008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08 19:55:34 +00:00
Michael L. Young
c5d2978944 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/1.8@384779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-04 19:31:40 +00:00
Richard Mudgett
7bdeb23dd2 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


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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-03 17:05:55 +00:00
David M. Lee
0442f6fa95 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-02 17:33:53 +00:00
David M. Lee
03b6927091 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-01 13:18:15 +00:00
Jonathan Rose
86f663d7f4 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-29 16:23:03 +00:00
Kinsey Moore
1bf3009218 Address uninitialized conditional that valgrind found
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 19:50:19 +00:00
Matthew Jordan
85456f605e 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 18:49:17 +00:00
Kinsey Moore
36706e0a93 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 17:02:32 +00:00
Matthew Jordan
c2a168d17c 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/1.8@383981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 14:53:13 +00:00
Matthew Jordan
88784bb120 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/1.8@383976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 14:35:11 +00:00
Matthew Jordan
7079459be4 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.
 * Holding the privat elock 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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 02:23:01 +00:00
Matthew Jordan
21171e1684 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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 01:50:28 +00:00
Russell Bryant
37b7df75d4 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.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 01:32:27 +00:00
Richard Mudgett
4f1021ad64 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 23:19:06 +00:00
Sean Bright
8c4732636f Properly delimit post data in res_config_curl.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 12:35:13 +00:00
Walter Doekes
6bd4feca22 Have func_curl log a warning when a curl request fails.
Review: https://reviewboard.asterisk.org/r/2403/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 20:22:40 +00:00
David M. Lee
5cf67a7ab2 Removed codecs/g722/*.i on make clean
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 15:50:05 +00:00
Kinsey Moore
fd4b11284e 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 12:49:59 +00:00
Matthew Jordan
d0306b2031 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 01:32:06 +00:00
Matthew Jordan
b3f149a880 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 01:21:55 +00:00
Jason Parker
320b4e8bda Fix whitespace in AST_EXT_LIB_CHECK macro.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-14 16:56:22 +00:00
Michael L. Young
7d7e11de51 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 21:15:52 +00:00
Michael L. Young
85f0aadb86 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 20:37:12 +00:00
Matthew Jordan
3f78df26b5 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 16:20:30 +00:00
Kinsey Moore
143ebd5665 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/1.8@382513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-06 18:22:06 +00:00
Igor Goncharovskiy
6008772ca3 Fix several unreleased mutex locks that cause problem with processing calls
(Closes issue ASTERISK-21119)
Reported by: Daniel Bohling
Tested by: Daniel Bohling





git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-05 03:46:33 +00:00
Matthew Jordan
45b88e8f04 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 17:09:25 +00:00
Matthew Jordan
fc5e76b96a 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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 16:40:31 +00:00
Joshua Colp
011b214822 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27 16:16:04 +00:00
Joshua Colp
54ce2c1491 Fix the configure script over here as well.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27 14:11:39 +00:00
Tzafrir Cohen
a6a3a8198a 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:37:33 +00:00
Walter Doekes
68d2599d39 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:30:23 +00:00
Tzafrir Cohen
ee4d92bb6b Remove unneeded linux-gnueabi*
As of r380520 the configure scripts converts the value of linux-gnueabi*
of OSARCH to "linux-gnu". So no point in testing for those values.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:06:51 +00:00
Matthew Jordan
b028e09f9e Clean up use of va_end/va_args in res_config_mysql
There were several problems using variadic argument macros in res_config_mysql.
 * Improper use of va_end. Multiple calls to va_end were possible resulting in
   an unbalanced matching of va_start/va_end.
 * Calls to va_arg after a possible encounter of a SENTINEL value.

This patch corrects those errors.

(closes issue ASTERISK-19451)
Reported by: wdoekes
patches:
  ASTERISK-19451-1.8--2.diff uploaded by wdoekes (License 5674)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-25 12:48:52 +00:00
Matthew Jordan
37f8a4a299 Set the sin_family on the bind address socket during initialization
Somehow, chan_jingle has managed to operate for years without setting the
sin_family on its bindaddr socket. This patch properly sets the field during
initial module load to AF_INET.

Note that the patch on the issue was modified slightly to change the
initialization of the socket from allocation of a chan_jingle private to the
module initialization, as the bindaddr object (which is static) only needs to
have the address set once.

(closes issue ASTERISK-19341)
Reported by: andre valentin
patches:
  0105-chan_jingle.patch uploaded by avalentin (License 6064)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24 22:59:11 +00:00
Matthew Jordan
bd9742163d Don't display the AMI ALL class authorization for users if they don't have it
When converting AMI class authorizations to a string representation, the
method always appends the ALL class authorization. This is especially
important for events, as they should always communicate that class
authorization - even if the event itself does not specify ALL as a class
authorization for itself. (Events have always assumed that the ALL class
authorization is implied when they are raised)

Unfortunately, this did mean that specifying a user with restricted class
authorizations would show up in the 'manager show user' CLI command as
having the ALL class authorization.

Rather then modifying the existing string manipulation function, this patch
adds a function that will only return a string if the field being compared
explicitly matches class authorization field it is being compared against.
This prevents ALL from being returned unless it is actually specified for
the user.

(closes issue ASTERISK-20397)
Reported by: Johan Wilfer



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24 16:25:08 +00:00
Matthew Jordan
726b60ef30 Make ParkAndAnnounce return to priority + 1 when return context is not defined
The ParkAndAnnounce application documentation for the optional return_context
parameter states the following:

return_context
    The goto-style label to jump the call back into after timeout. Default
    'priority+1'.

Unfortunately, the application was sending the channel back into the dialplan
at 'priority', which is the ParkAndAnnounce application call. This causes an
infinite loop of the channel constantly being parked, announced, timed out,
parked, announced, timed out... while fun, especially for those callers you
wish to drive to the end of madness, this was not the intent of the
application.

(closes issue ASTERISK-20113)
Reported by: serginuez
patches:
  app_parkandannounce.diff uploaded by serginuez (License 6405)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24 15:33:32 +00:00
Matthew Jordan
6d295bcabf Properly detect launchd
Asterisk was a little too pro-active in claiming that it found launchd. On
systems without launchd - such as FreeBSD - this resulted in certain items
in Asterisk that conflict with launchd to not be selectable, such as
res_timing_kqueue.

(closes issue ASTERISK-20749)
Reported by: Oleg Baranov



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-21 22:44:59 +00:00
Kevin Harwell
5143f6f85c Write the correct callid to the data1 field in queue_log for transfer events.
The incorrect callid was being written to the "data1" field in queue_log table
for transfer events.  The callid of the queue was being written instead of the
transfer target's callid.  This now gets the correct "transfer to" number and
places that in the "data1" field of the queue_log table when a transfer event
is triggered.

(closes issue ASTERISK-19960)
Reported by: vladimir shmagin


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19 19:16:44 +00:00
Walter Doekes
706235d7ee Remove "registertrying" and add "rtp_engine" from/to sip.conf.sample
The "registertrying" option was removed in r343220. The "rtp_engine"
option was added in r186078 but erroneously named "engine" in the sample.
Note that there is no global sip setting for a different engine.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-18 20:28:39 +00:00
Richard Mudgett
4b674040e2 End stuck DTMF if AST_SOFTHANGUP_ASYNCGOTO because it isn't a real hangup.
It doesn't hurt to check AST_SOFTHANGUP_UNBRIDGE either, but it should not
be set outside of a bridge.

(issue ASTERISK-20492)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14 19:41:17 +00:00
Matthew Jordan
775e80226e Don't throw a spurious error when using DBdeltree
The function call ast_db_deltree returns the number of row deleted, or a
negative number if it failed. DBdeltree was treating any non-zero return
as an error, causing a spurious verbose error message to be displayed.

This patch handles the return code of ast_db_deltree correctly.

(closes issue ASTERISK-21070)
Reported by: ianc
patches:
  dbdeltree.diff uploaded by ianc (License #5955)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14 03:42:06 +00:00
Mark Michelson
5fea5fd630 Do not allow native RTP bridging if packetization of media streams differs.
The RTP engine will no longer allow for local and remote native RTP bridges
if packetization of streams differs. Allowing native bridging in this scenario
has been known to cause FAX failures.

(closes ASTERISK-20650)
Reported by: Maciej Krajewski
Patches:
	ASTERISK-20659.patch uploaded by Mark Michelson (License #5049)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12 20:16:24 +00:00
Kevin Harwell
42b6f880f4 Properly load say.conf upon reload of module app_playback.
If say.conf did not exists prior to originally loading module app_playback it
would not load on subsequent reloads of the module once it had been created.
This occurred because upon reload of the app_playback module it would only
load a new configuration if an old one had previously existed.  This fix simply
removed the association between checking if an old configuration existed and
the loading of the new one.

(closes issue ASTERISK-20800)
Reported by: pgoergler


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11 20:46:37 +00:00
David M. Lee
6c76b18b85 Fixed failing test from r380696.
When I added my extensive suite of session timer unit tests, apparently one of
them was failing and I never noticed. If neither Min-SE nor Session-Expires is
set in the header, it was responding with a Session-Expires of the global
maxmimum instead of the configured max for the endpoint.

(issue ASTERISK-20787)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@380973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06 20:10:14 +00:00
Richard Mudgett
8aa99bc3f8 Separate option_types[] from the struct definition.
Updated the option_types[] doxygen comment.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@380853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05 18:09:05 +00:00
David M. Lee
9ff89704b6 Process session timers, even if Session-Expires header is missing
Previously, Asterisk only processed session timer information if both the
'Supported: timer' and 'Session-Expires' headers were present. However, the
Session-Expires header is optional. If we were to receive a request with a
Min-SE greater than our configured session-expires, we would respond with a
'Session-Expires' header that was too small.

This patch cleans the situation up a bit, always processing timer information
if the 'Supported: timer' header is present.

(closes issue ASTERISK-20787)
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/2299/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@380696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 19:56:16 +00:00