]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agoRemove extra defines of AST_PBX_MAX_STACK.
Corey Farrell [Sat, 22 Feb 2014 02:28:07 +0000 (02:28 +0000)] 
Remove extra defines of AST_PBX_MAX_STACK.

* Ensure AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h.
* Fix incorrect function parameters in utils/extconf.c.

(closes issue ASTERISK-23141)
Reported by: Maxim
Review: https://reviewboard.asterisk.org/r/3241/
........

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

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

11 years agoapp_forkcdr: ForkCDR v option does not keep CDR variables for subsequent records
Kevin Harwell [Fri, 21 Feb 2014 20:21:46 +0000 (20:21 +0000)] 
app_forkcdr: ForkCDR v option does not keep CDR variables for subsequent records

When the 'v' option is specified to ForkCDR application, AST_CDR_FLAG_KEEP_VARS
flag is set only for the first CDR in the chain. So ForkCDR works fine with this
option only once. After the second and further calls to ForkCDR, CDR variables
get cleared on all CDRs besides the first one and moved to the newly forked CDR.
It always sets the KEEP_VARS flag on the first CDR in the chain, instead of the
most recent CDR which is used as a base to fork a new CDR.

This patch sets KEEP_VARS flag on the most recent CDR on the stack (the CDR used
for forking).

(closes issue ASTERISK-23260)
Reported by: zvision
Patches:
     app_forkcdr.diff uploaded by zvision (license 5755)
........

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

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

11 years agoinstall_prereq: Missing uuid[-dev] for debian distros
Kevin Harwell [Fri, 21 Feb 2014 19:04:21 +0000 (19:04 +0000)] 
install_prereq: Missing uuid[-dev] for debian distros

Added uuid and uuid-dev to install prereq script.

(closes issue ASTERISK-23255)
Reported by: Rusty Newton

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

11 years agortp_engine: Dynamic payload change in rtp mapping not supported
Kevin Harwell [Fri, 21 Feb 2014 18:25:51 +0000 (18:25 +0000)] 
rtp_engine: Dynamic payload change in rtp mapping not supported

Asterisk didn't support the dynamic payload change in rtp mapping in the 200
OK response.

Scenario:
Asterisk sends the INVITE proposing alaw and telephone-event, it proposes
rtpmap:101 for telephone-event.  Peer responds with 2xx, it answers with
alaw and telephone-event also, but it proposes a different rtpmap number
(rtpmap:103) for telephone-event.

Expected Behaviour:
Asterisk should honour the rtpmapping in the response and send DTMF packets
using 103 as payload type for DTMF.

Actual Behaviour: Asterisk sends DTMF packets using payload type 101.

With this patch asterisk now supports changes that can occur in the rtp mapping
in the response.

(closes issue ASTERISK-23279)
Reported by: NITESH BANSAL
Review: https://reviewboard.asterisk.org/r/3225/
Patches:
     dynamic_payload_change.patch uploaded by nbansal (license 6418)

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

11 years agortp_engine: Output mixup in ${CHANNEL(rtpqos,audio,all)}
Kevin Harwell [Fri, 21 Feb 2014 15:58:11 +0000 (15:58 +0000)] 
rtp_engine: Output mixup in ${CHANNEL(rtpqos,audio,all)}

Fixed the output of CHANNEL(rtpqos,audio,all) to use txjitter instead
of rxjitter.

(closes issue ASTERISK-23261)
Reported by: rsw686
Patches:
     rtpqos.patch uploaded by rsw686 (license 5887)
........

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

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

11 years agochannel.c: MOH is not working for transferee after attended transfer
Kevin Harwell [Fri, 21 Feb 2014 15:27:53 +0000 (15:27 +0000)] 
channel.c: MOH is not working for transferee after attended transfer

Updated the code to check to see if MOH is playing on the transferor and if
so then start it on the channel that replaces it during a masquerade.

Example scenario of the problem:
Alice calls Bob and then Bob begins the attended transfer process into a queue.
Upon going on hold Alice hears music and so does Bob once he is in the queue.
Bob then transfers Alice into the queue and then music for Alice stops even
though she should be hearing it since has now replaced Bob in the queue.

The problem that was occurring is that once the channel was masqueraded the app
(queues, confbridge, etc...) had no way of knowing that the channel had just
been swapped out thus it did not start music for the present channel.

Credit to Olle Johansson for pointing me in the right direction on this issue.

(closes issue ASTERISK-19499)
Reported by: Timo Teräs
Review: https://reviewboard.asterisk.org/r/3226/
........

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

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

11 years agoFix type of roundTripDelay variables
Alexandr Anikin [Fri, 21 Feb 2014 10:40:07 +0000 (10:40 +0000)] 
Fix type of roundTripDelay variables
........

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

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

11 years agoapp_chanspy: Documentation Update To Clarify "x" Option
Michael L. Young [Fri, 21 Feb 2014 00:47:47 +0000 (00:47 +0000)] 
app_chanspy: Documentation Update To Clarify "x" Option

When using the "x" option (specify a DTMF digit to exit the application), it is
not obvious in the documentation that this only works when spying on a channel.
If a channel being used to spy on other channels is waiting to connect to a
channel or is no longer attached to a channel, the DTMF is ignored.

As noted on the issue tracker, since there are workarounds available and this is
a rarely used option we are opting for a documentation change here.

(closes issue ASTERISK-22661)
Reported by: Chris Hillman
Patches:
    asterisk-22661-doc-clarify-chan_spy.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

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

11 years agoapps/app_queue - Fix incorrect Macro parameter documentation
Rusty Newton [Thu, 20 Feb 2014 02:41:16 +0000 (02:41 +0000)] 
apps/app_queue - Fix incorrect Macro parameter documentation

Macro is executed on the called channel, not the calling channel.

(closes issue ASTERISK-23069)
Reported By: Bryan Anderson
........

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

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

11 years agoconfig: Add file size and nanosecond resolution fields to the cached modified config...
Richard Mudgett [Wed, 19 Feb 2014 19:05:00 +0000 (19:05 +0000)] 
config: Add file size and nanosecond resolution fields to the cached modified config file information.

Repeatedly modifying config files and reloading too fast sometimes fails
to reload the configuration because the cached modification timestamp has
one second resolution.

* Added file size and nanosecond resolution fields to the cached config
file modification timestamp information.  Now if the file size changes or
the file system supports nanosecond resolution the modified file has a
better chance of being detected for reload.

* Added a missing unlock in an off-nominal code path.

(closes issue AST-1303)

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

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

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

11 years agoprocess receiveAndTransmit user input remote caps instead of receive only
Alexandr Anikin [Wed, 19 Feb 2014 11:45:31 +0000 (11:45 +0000)] 
process receiveAndTransmit user input remote caps instead of receive only
send receiveAndTransmit user input our caps instead of receive only
........

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

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

11 years agoAllow different socket and signalling ip on h.323 connection if gk mode is active
Alexandr Anikin [Wed, 19 Feb 2014 10:15:46 +0000 (10:15 +0000)] 
Allow different socket and signalling ip on h.323 connection if gk mode is active
Reported by: Gabriele Odone
Patches:
ASTERISK-22738-1.patch
Tested by: Gabriele Odone

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

11 years agopbx: Handle a completely empty dialplan during a context merge
Matthew Jordan [Sun, 16 Feb 2014 03:15:49 +0000 (03:15 +0000)] 
pbx: Handle a completely empty dialplan during a context merge

It is highly unlikely, but - at least in Asterisk 12 - theoretically possible
to load Asterisk with no dialplan whatsoever. If that occurs, and some other
module (that is not a pbx module) attempts to merge its contexts into the
dialplan, the existing merge routine will crash. This is because it is not
insane, and rightly believes that you provided some sort of dialplan,
somewhere.

This patch will gracefully merge the contexts in such a case. Note that this
is highly unlikely to occur in 1.8/11, as features will most likely provide
some dialplan via parking. However, in Asterisk 12, parking is now provided
by res_parking, and hence may create its dialplan later.

(closes issue ASTERISK-23297)
Reported by: CJ Oster

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

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

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

11 years agobuildsystem: Unbreak the build (infloop) on Asterisk 11+
Matthew Jordan [Sun, 16 Feb 2014 01:47:45 +0000 (01:47 +0000)] 
buildsystem: Unbreak the build (infloop) on Asterisk 11+

Apparently r408084 ( https://reviewboard.asterisk.org/r/3212/ ) broke the
build. This patch fixes it by ignoring the .lastclean dependencies if the
MENUSELECT_EMBED variable is not defined.

patches:
  tmp.diff uploaded by wdoekes (License 5674)

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

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

11 years agopbx: ast_custom_function_unregister resource leak
Scott Griepentrog [Fri, 14 Feb 2014 21:53:38 +0000 (21:53 +0000)] 
pbx: ast_custom_function_unregister resource leak

In pbx.c ast_custom_function_unregister(), a list
of escalations being removed from the list wasn't
being free'd creating a leak. This patch corrects
that by freeing the records.

Review: https://reviewboard.asterisk.org/r/3213/
Reported by: Corey Farrell
Patches:
     acf_escalating_leak.patch uploaded by coreyfarrell (license 5909)
........

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

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

11 years agoformat.c: correct possible null pointer dereference
Scott Griepentrog [Fri, 14 Feb 2014 21:27:09 +0000 (21:27 +0000)] 
format.c: correct possible null pointer dereference

In ast_format_sdp_parse and ast_format_sdp_generate
the check checks for a valid interface and function
were potentially confusing, and hid an error in the
test of the presence of the function that is called
later.  This patch clears up and corrects the test.

Review: https://reviewboard.asterisk.org/r/3208/
(closes issue ASTERISK-23098)
Reported by: marcelloceschia
Patches:
     main_format.patch uploaded by marcelloceschia (license 6036)
 ASTERISK-23098.patch uploaded by coreyfarrell (license 5909)

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

11 years agobuildsystem: Don't force main to depend on everything else.
Walter Doekes [Fri, 14 Feb 2014 13:27:34 +0000 (13:27 +0000)] 
buildsystem: Don't force main to depend on everything else.

Directory 'main' only needs to depend on embedded modules. If no
module embedding is selected, the dependency is dropped.

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

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

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

11 years agoconfigs/agents.conf.sample - Remove example for non-functional "goodbye" parameter
Rusty Newton [Fri, 14 Feb 2014 01:24:22 +0000 (01:24 +0000)] 
configs/agents.conf.sample - Remove example for non-functional "goodbye" parameter

The "goodbye" parameter is not implemented in the source code, it does nothing.

(closes issue SWP-6518)
Reported By: Steve Pitts
........

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

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

11 years agores_config_pgsql: Fix ast_update2_realtime calls.
Walter Doekes [Mon, 10 Feb 2014 16:34:27 +0000 (16:34 +0000)] 
res_config_pgsql: Fix ast_update2_realtime calls.

Fix so multiple updates from a single call works (add missing ',').
Remove bogus ast_free's that weren't supposed to be there.
Moved a few spaces for readability.

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

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

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

11 years agoConfBridge: Correct prompt playback target
Kinsey Moore [Mon, 10 Feb 2014 15:28:16 +0000 (15:28 +0000)] 
ConfBridge: Correct prompt playback target

Currently, when the first marked user enters the conference that
contains waitmarked users, a prompt is played indicating that the user
is being placed into the conference. Unfortunately, this prompt is
played to the marked user and not the waitmarked users which is not
very helpful.

This patch changes that behavior to play a prompt stating
"The conference will now begin" to the entire conference after adding
and unmuting the waitmarked users since the design of confbridge is not
conducive to playing a prompt to a subset of users in a conference in
an asynchronous manner.

(closes issue PQ-1396)
Review: https://reviewboard.asterisk.org/r/3155/
Reported by: Steve Pitts

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

11 years agochan_dahdi: handle DAHDI_EVENT_REMOVED on a pri D-Channel
Tzafrir Cohen [Sun, 9 Feb 2014 15:52:58 +0000 (15:52 +0000)] 
chan_dahdi: handle DAHDI_EVENT_REMOVED on a pri D-Channel

When a DAHDI device is removed at run-time it sends the event
DAHDI_EVENT_REMOVED on each channel. This is intended to signal the
userspace program to close the respective file handle, as the driver of
the device will need all of them closed to properly clean-up.

This event has long since been handled in chan_dahdi (chan_zap at the
time). However the event that is sent on a D-Channel of a "PRI" (ISDN)
span simply gets ignored.

This commit adds handling for closing the file descriptor (and shutting
down the span, while we're at it).

It also adds a CLI command 'pri destroy span <N>' to destroy the span
and its DAHDI channels.

Backported from trunk/12.

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

Merged revisions 394552 394567 from http://svn.asterisk.org/svn/asterisk/trunk
........

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

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

11 years agochan_iax2: Add some more iaxs[] NULL checks to a routine already full of them.
Richard Mudgett [Fri, 7 Feb 2014 20:46:04 +0000 (20:46 +0000)] 
chan_iax2: Add some more iaxs[] NULL checks to a routine already full of them.
........

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

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

11 years agochan_iax2: Block unnecessary control frames to/from the wire.
Richard Mudgett [Fri, 7 Feb 2014 17:56:57 +0000 (17:56 +0000)] 
chan_iax2: Block unnecessary control frames to/from the wire.

Establishing an IAX2 call between Asterisk v1.4 and v1.8 (or later)
results in an unexpected call disconnect.  The problem happens because
newer values in the enum ast_control_frame_type are not consistent between
the branch versions of Asterisk.

For example:
1) v1.4 calls v1.8 (or later) using IAX2

2) v1.8 answers and sends a connected line update control frame.  (on v1.8
AST_CONTROL_CONNECTED_LINE = 22)

3) v1.4 receives the control frame as an end-of-q (on v1.4
AST_CONTROL_END_OF_Q = 22)

4) v1.4 disconnects the call once the receive queue becomes empty.

Several things are done by this patch to fix the problem and attempt to
prevent it from happening again in the future:

* Added a warning at the definition of enum ast_control_frame_type about
how to add new control frame values.

* Made block sending and receiving control frames that have no reason to
go over the wire.

* Extended the connectedline iax.conf parameter to also include the
redirecting information updates.

* Updated the connectedline iax.conf parameter documentation to include a
notice that the parameter must be "no" when the peer is an Asterisk v1.4
instance.

(closes issue AST-1302)

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

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

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

11 years agoindications.conf: add stutter tone; end properly
Tzafrir Cohen [Fri, 7 Feb 2014 13:06:35 +0000 (13:06 +0000)] 
indications.conf: add stutter tone; end properly

* If the "stutter" (voicemail indication) tone is indeed a stutter tone,
  and it ends with a constant tone, make sure that it is the dial tone.
  This was done for India (in), Mexico (mx) and the Philippines (ph).
* If no "stutter" tone exists for a country, provide one. This was done for
  Spain (es), Malaysia (my) and Venezuela (ve).

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

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

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

11 years agoformats/format_wav: enhancing log message "Not a wav file" to be clear on what is...
Rusty Newton [Wed, 5 Feb 2014 22:59:39 +0000 (22:59 +0000)] 
formats/format_wav: enhancing log message "Not a wav file" to be clear on what is supported

Modifying the log message to be more specific as to what is supported. Specifically it seems format_wav supports only PCM encoded versions with a lower-case '.wav' extension.

(closes issues ASTERISK-22310)
Reported by: Jim Credland
Review: https://reviewboard.asterisk.org/r/3188/
........

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

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

11 years agochan_local: Fix reversed LocalOptimization field in LocalBridge event
Jonathan Rose [Wed, 5 Feb 2014 20:37:14 +0000 (20:37 +0000)] 
chan_local: Fix reversed LocalOptimization field in LocalBridge event

(closes issue ASTERISK-23232)
Reported by: Leon Roy

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

11 years agoLogger: Fix handling of absolute paths
Kinsey Moore [Wed, 5 Feb 2014 20:37:12 +0000 (20:37 +0000)] 
Logger: Fix handling of absolute paths

This fixes path handling for log files so that an extra / is not
appended to the file path when the path is absolute (begins with /).
This would previously result in different but functionally equivalent
paths in the output of 'logger show channels'.
........

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

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

11 years agodevicestate: Make ast_devstate_changed_literal() return value and doxygen consistent.
Richard Mudgett [Tue, 4 Feb 2014 19:56:05 +0000 (19:56 +0000)] 
devicestate: Make ast_devstate_changed_literal() return value and doxygen consistent.

Nothing actually cares about the value anyway.

(closes issue ASTERISK-23178)
Reported by: Jonathan Rose
........

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

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

11 years agotcptls.c: Made TLS handle a certificate chain file.
Richard Mudgett [Tue, 4 Feb 2014 17:58:17 +0000 (17:58 +0000)] 
tcptls.c: Made TLS handle a certificate chain file.

Thanks to Guillaume Martres for doing the necessary research to validate
the change.

(closes issue ASTERISK-17727)
Reported by: LN
Patches:
      use_certificate_chain.patch (license #5864) patch uploaded by st
      documente_certificate_chain.patch (license #6576) patch uploaded by Guillaume Martres
........

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

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

11 years agores_clialiases: Fix crash when reloading and re-aliasing an alias that is in use.
Joshua Colp [Tue, 4 Feb 2014 02:20:52 +0000 (02:20 +0000)] 
res_clialiases: Fix crash when reloading and re-aliasing an alias that is in use.

The code assumed that unregistering the alias would always succeed while in
practice this is not actually true. A common case is the "reload" command itself.
If the cli_aliases.conf configuration file was changed and reload executed the
command would fail to unregister and ultimately point to freed memory.

The reload process now checks whether unregistering succeeded or not and if not
the old CLI alias is retained.

(closes issue ASTERISK-19773)
Reported by: Joel Vandal

(closes issue ASTERISK-22757)
Reported by: Gareth Blades
........

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

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

11 years agoapp_stack: protect against missing parameters to STACK_PEEK and LOCAL_PEEK
Corey Farrell [Sat, 1 Feb 2014 00:23:42 +0000 (00:23 +0000)] 
app_stack: protect against missing parameters to STACK_PEEK and LOCAL_PEEK

STACK_PEEK requires 2 parameters and LOCAL_PEEK requires 1 parameter.  This
protects against situations where those parameters are blank or missing by
logging an error and returning.

(closes issue ASTERISK-23220)
Reported by: James Sharp
........

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

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

11 years agoapp_dial: Allow macro/gosub pre-bridge execution to occur on priorities
Matthew Jordan [Fri, 31 Jan 2014 23:28:30 +0000 (23:28 +0000)] 
app_dial: Allow macro/gosub pre-bridge execution to occur on priorities

The parsing for the destination of the macro/gosub uses the '^' character to
separate out context, extension, and priority. However, the logic for the
macro/gosub execution was written such that it would only do the actual
macro/gosub jump if a '^' character existed. This doesn't apply when the
macro/gosub jump occurs in a priority/priority label. This patch changes
the logic so that the parsing still occurs, but the jump will occur even
for priorities/priority labels.

(issue ASTERISK-23164)

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

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

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

11 years agores_rtp_asterisk & udptl: fix port selection to work with SELinux restrictions
Corey Farrell [Thu, 30 Jan 2014 20:28:40 +0000 (20:28 +0000)] 
res_rtp_asterisk & udptl: fix port selection to work with SELinux restrictions

ast_bind to a port reserved for another program by SELinux causes
errno == EACCES.  This caused random failures when binding rtp or
udptl sockets.  Treat EACCES as a non-fatal error, try next port.

(closes issue ASTERISK-23134)
Reported by: Corey Farrell
........

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

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

11 years agoMake a NOTICE about an invalid channel name more useful.
Sean Bright [Thu, 30 Jan 2014 17:32:35 +0000 (17:32 +0000)] 
Make a NOTICE about an invalid channel name more useful.

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

11 years agoqueues.conf.sample Fix documented default for persistentmembers
Russell Bryant [Wed, 29 Jan 2014 00:39:19 +0000 (00:39 +0000)] 
queues.conf.sample Fix documented default for persistentmembers

Closes issue ASTERISK-22662
........

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

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

11 years agocdr_radius, cel_radius: build agains libfreeradius-client
Kevin Harwell [Tue, 28 Jan 2014 23:10:47 +0000 (23:10 +0000)] 
cdr_radius, cel_radius: build agains libfreeradius-client

Asterisk's RADIUS module currently build against libradiusclient-ng, but this
project has been superseeded by libfreeradius-client. The API is 99% compatible
except that the header name has changed, the library name has changed, and
the configuration file location has changed.

(closes issue ASTERISK-22980)
Reported by: Jeremy Lainé
Patches:
     freeradius-client.patch uploaded by sharky (license 6561)
........

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

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

11 years agortp_engine: improved handling of get_rtp_info failure
Scott Griepentrog [Tue, 28 Jan 2014 16:40:28 +0000 (16:40 +0000)] 
rtp_engine: improved handling of get_rtp_info failure

In ast_rtp_instance_make_compatible(), after a failure of
channel tech call get_rtp_info() to return peer_instance,
the null pointer would be passed to ao2_ref, producing an
error that looked like a refernce counting problem but is
not.  This patch corrects that and adds helpful LOG_ERROR
messages to indicate which failure path occurred.

(issue AST-1276)
Review: https://reviewboard.asterisk.org/r/3156/
........

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

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

11 years agoAllow nested #includes in extconfig.conf
Russell Bryant [Mon, 27 Jan 2014 20:35:25 +0000 (20:35 +0000)] 
Allow nested #includes in extconfig.conf

extconfig.conf was hard-coded to not allow nested includes for some reason.
The code has been this way since a patch was merged for ASTERISK-3333 (revision
4889), which was a significant update to this code ("Merge config updates").

I can't figure out any good reason why this should be limited.  This patch just
removes the limit and uses the default nesting depth limit.

Closes issue ASTERISK-17837

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

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

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

11 years agoProtect ast_filestream object when on a channel
Russell Bryant [Mon, 27 Jan 2014 01:14:19 +0000 (01:14 +0000)] 
Protect ast_filestream object when on a channel

The ast_filestream object gets tacked on to a channel via
chan->timingdata.  It's a reference counted object, but the reference
count isn't used when putting it on a channel.  It's theoretically
possible for another thread to interfere with the channel while it's
unlocked and cause the filestream to get destroyed.

Use the astobj2 reference count to make sure that as long as this code
path is holding on the ast_filestream and passing it into the file.c
playback code, that it knows it's valid.

Bug reported by Leif Madsen.

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

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

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

11 years agotcptls.c: Add missing cleanup on off nominal path.
Richard Mudgett [Sun, 26 Jan 2014 23:01:31 +0000 (23:01 +0000)] 
tcptls.c: Add missing cleanup on off nominal path.
........

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

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

11 years agoCEL: Protect data structures during reload and shutdown.
Richard Mudgett [Fri, 24 Jan 2014 23:07:08 +0000 (23:07 +0000)] 
CEL: Protect data structures during reload and shutdown.

The CEL data structures need to be protected during a configuration reload
and shutdown.  Asterisk crashed during a shutdown because CEL events were
still in flight and the CEL data structures were already destroyed.

* Protected the appset and linkedids ao2 containers using the reload_lock.
As a result appset, linkedids, and held objects don't need a lock.

* Added NULL checks before use of the appset and linkedids ao2 containers
in case the CEL module is already shutdown.

* Fixed overloading of the linkedids held objects reference count.  During
shutdown any held objects would be leaked.

* Fixed memory leak of linkedids held objects if the LINKEDID_END is not
being tracked.  The objects in the linkedids container were not removed if
the LINKEDID_END event is not used.

* Added access protection to the appset container during the CLI "cel show
status" command.

* Made CEL config reload not set defaults if the cel.conf file is invalid.

(closes issue AST-1253)
Reported by: Guenther Kelleter

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

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

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

11 years agomanager: Register atexit shutdown routine only once.
Richard Mudgett [Fri, 24 Jan 2014 21:53:43 +0000 (21:53 +0000)] 
manager: Register atexit shutdown routine only once.

* Made register atexit shutdown routine only once in __init_manager().

* Fixed some initial load failure conditions in __init_manager().

* Made reset options to defaults on reload when the reload will actually
happen.

* Removed unnecessary container traversals of the white/black filters
during manager_free_user().

* ast_free() does not need a NULL check before calling.
........

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

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

11 years agores_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practical
Jonathan Rose [Fri, 24 Jan 2014 21:14:09 +0000 (21:14 +0000)] 
res_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practical

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

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

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

11 years agomanager: Protect data structures during shutdown.
Richard Mudgett [Fri, 24 Jan 2014 17:54:18 +0000 (17:54 +0000)] 
manager: Protect data structures during shutdown.

Occasionally, the manager module would get an "INTERNAL_OBJ: bad magic
number" error on a "core restart gracefully" command if an AMI connection
is established.

* Added ao2_global_obj protection to the sessions global container.

* Fixed the order of unreferencing a session object in session_destroy().

* Removed unnecessary container traversals of the white/black filters
during session_destructor().

(closes issue AST-1242)
Reported by: Guenther Kelleter

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

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

11 years agopbx.c: Pre-initialize timezone to avoid crash on destroy
Scott Griepentrog [Wed, 22 Jan 2014 22:18:03 +0000 (22:18 +0000)] 
pbx.c: Pre-initialize timezone to avoid crash on destroy

In ast_build_timing, initialize the timezone value to NULL
in order to avoid deferencing an uninitialized value later
when calling ast_destroy_timing.  The timezone value could
be uninitialized if ast_build_timing were to fail due to a
zero length time string.

(closes issue ASTERISK-22861)
Reported by: Sebastian Murray-Roberts
Review: https://reviewboard.asterisk.org/r/3134/
Patches:
     ast_build_timing-initialize-timezone.patch uploaded by coreyfarrell (license 5909)
........

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

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

11 years agoConfBridge: Fix channel parameter documentation
Kinsey Moore [Wed, 22 Jan 2014 19:31:12 +0000 (19:31 +0000)] 
ConfBridge: Fix channel parameter documentation

Confbridge AMI and CLI commands for mute, unmute, and setting the
single video source can accept channel prefixes in lieu of a full
channel name, but documentation states only that it is required and is
a channel name. This corrects the documentation.

(closes issue PQ-1397)
Reported by: Steve Pitts

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

11 years agochan_sip: Decline image streams on unsupported transports
Kinsey Moore [Wed, 22 Jan 2014 18:30:18 +0000 (18:30 +0000)] 
chan_sip: Decline image streams on unsupported transports

This change allows chan_sip to decline individual image streams over
unsupported transports in the SDP of the 200 response. Previously,
an image stream offer with RTP/AVP as the transport would cause
chan_sip to respond with a 488.

(closes issue ASTERISK-22988)
Reported by: adomjan
Original patch by: adomjan
........

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

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

11 years agomanager: Clarify eventfilter documentation. Textual changes only.
Walter Doekes [Tue, 21 Jan 2014 21:05:11 +0000 (21:05 +0000)] 
manager: Clarify eventfilter documentation. Textual changes only.

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

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

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

11 years agochan_mgcp: Enforce locking for oseq
Kinsey Moore [Tue, 21 Jan 2014 19:59:34 +0000 (19:59 +0000)] 
chan_mgcp: Enforce locking for oseq

This restricts direct usage of global oseq so that all accesses are
locked and threads are not racing to get oseq values that they did not
claim.

This also fixes a build error in res_pktccops under dev mode.

(closes issue ASTERISK-23100)
Reported by: adomjan
Patch by: adomjan
........

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

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

11 years agochan_dahdi/PRI: Suppress CONNECTED_LINE updates when nothing in the udpate is valid.
Richard Mudgett [Mon, 20 Jan 2014 22:04:50 +0000 (22:04 +0000)] 
chan_dahdi/PRI: Suppress CONNECTED_LINE updates when nothing in the udpate is valid.

* Also simplified some subddress handling code.

(closes issue ASTERISK-23008)
Reported by: Michael Cargile
........

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

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

11 years agoDocumentation: doc fixes across various parts of the code for ASTERISK issues 23061...
Rusty Newton [Fri, 17 Jan 2014 15:40:37 +0000 (15:40 +0000)] 
Documentation: doc fixes across various parts of the code for ASTERISK issues 23061,23028,23046,23027

Fixes typos of "transfered" instead of "transferred" in various code. Fixes incorrect gosub param help text for app_queue.
Fixes Asterisk man pages containing unquoted minus signs. Adds note about the "textsupport" option in sip.conf.sample.

(issue ASTERISK-23061)
(issue ASTERISK-23028)
(issue ASTERISK-23046)
(issue ASTERISK-23027)
(closes issue ASTERISK-23061)
(closes issue ASTERISK-23028)
(closes issue ASTERISK-23046)
(closes issue ASTERISK-23027)
Reported by: Eugene, Jeremy Laine, Denis Pantsyrev
Patches:
 transferred.patch uploaded by Jeremy Laine (license 6561)
 hyphen.patch uploaded by Jeremy Laine (license 6561)
 sip.conf.sample.patch uploaded by Eugene (license 6360)
........

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

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

11 years agomanager: Originate doesn't abort on failed format_cap allocation
Kevin Harwell [Thu, 16 Jan 2014 19:51:17 +0000 (19:51 +0000)] 
manager: Originate doesn't abort on failed format_cap allocation

action_originate responds to the remote system with an error when cap==NULL,
but doesn't return (abort the originate).  Patched to return.

(closes issue ASTERISK-23034)
Reported by: Corey Farrell
Patches:
     ASTERISK-23034.patch uploaded by coreyfarrell (license 5909)

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

11 years agores_fax: check_modem_rate() returned incorrect rate for V.27
Kevin Harwell [Thu, 16 Jan 2014 18:57:43 +0000 (18:57 +0000)] 
res_fax: check_modem_rate() returned incorrect rate for V.27

According to the new standard for V.27 and V.32 they are able to transmit
at a bit rate of 4,800 or 9,600.  The check_mode_rate function needed to be
updated to reflect this.  Also, because of this change the default 'minrate'
value was updated to be 4800.

(closes issue ASTERISK-22790)
Reported by: Paolo Compagnini
Patches:
     res_fax.txt uploaded by looserouting (license 6548)
........

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

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

11 years agocel_manager: Don't crash if configuration file is invalid.
Joshua Colp [Wed, 15 Jan 2014 16:35:30 +0000 (16:35 +0000)] 
cel_manager: Don't crash if configuration file is invalid.

The cel_manager module did not properly handle the case where the
configuration file was invalid. The module will now output a warning
message and disable itself if this occurs.

Reported by: Bryan Walters
........

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

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

11 years agochan_sip: No BYE message sent after INVITE with Replaces
Scott Griepentrog [Tue, 14 Jan 2014 18:43:56 +0000 (18:43 +0000)] 
chan_sip: No BYE message sent after INVITE with Replaces

Setting channel state DOWN is an unnecessary step that was
only being done in handle_invite_replaces().  This changes
that by removing the call and reducing locking.

(closes issue ASTERISK-23010)
Reported by: Ryan Tilton
Review: https://reviewboard.asterisk.org/r/3116/
........

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

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

11 years agochan_sip: fix Local From tag on outbound register regression
Scott Griepentrog [Tue, 14 Jan 2014 18:12:52 +0000 (18:12 +0000)] 
chan_sip: fix Local From tag on outbound register regression

In ASTERISK-12117, an improvement to insure consistant local from tags
on outbound registrations resulted in an undesirable behavior - caused
by leftover unexpired sip_pvt dialogs (with the previous cseq number),
resulting in many uncessary REGISTER requests.  Instead of significant
rework of transmit_register(), this change deletes the dialogs after a
200 OK response indiciating a successful registration, keeping the old
dialogs from interfering with normal operation.

(closes issue ASTERISK-22946)
Reported by: Stephan Eisvogel
Review: https://reviewboard.asterisk.org/r/3109/
........

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

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

11 years agoverbosity: Fix performance of console verbose messages.
Richard Mudgett [Tue, 14 Jan 2014 17:26:35 +0000 (17:26 +0000)] 
verbosity: Fix performance of console verbose messages.

The per console verbose level feature as previously implemented caused a
large performance penalty.  The fix required some minor incompatibilities
if the new rasterisk is used to connect to an earlier version.  If the new
rasterisk connects to an older Asterisk version then the root console
verbose level is always affected by the "core set verbose" command of the
remote console even though it may appear to only affect the current
console.  If an older version of rasterisk connects to the new version
then the "core set verbose" command will have no effect.

* Fixed the verbose performance by not generating a verbose message if
nothing is going to use it and then filtered any generated verbose
messages before actually sending them to the remote consoles.

* Split the "core set debug" and "core set verbose" CLI commands to remove
the per module verbose support that cannot work with the per console
verbose level.

* Added a silent option to the "core set verbose" command.

* Fixed "core set debug off" tab completion.

* Made "core show settings" list the current console verbosity in addition
to the root console verbosity.

* Changed the default verbose level of the 'verbose' setting in the
logger.conf [logfiles] section.  The default is now to once again follow
the current root console level.  As a result, using the AMI Command action
with "core set verbose" could again set the root console verbose level and
affect the verbose level logged.

(closes issue AST-1252)
Reported by: Guenther Kelleter

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

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

11 years agochan_sip: Hangup transferer/transferee when transfer to Parking fails
Matthew Jordan [Tue, 14 Jan 2014 15:32:16 +0000 (15:32 +0000)] 
chan_sip: Hangup transferer/transferee when transfer to Parking fails

When performing a SIP transfer to a Park extension, if the Park fails, chan_sip
will currently not hang up either the transferer or the transfer target. This
results in the channels being orphaned with no thread to service frames,
resulting in stuck channels.

This patch immediately hangs up the two channels if a Park fails.

(closes issue ASTERISK-22834)
Reported by: rsw686
Tested by: rsw686

(closes issue ASTERISK-23047)
Reported by: Tommy Thompson
Tested by: Tommy Thomspon

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

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

11 years agores/Makefile: alias dist-clean to distclean
Matthew Jordan [Mon, 13 Jan 2014 21:45:35 +0000 (21:45 +0000)] 
res/Makefile: alias dist-clean to distclean

A 'make distclean' is equivalent to 'make dist-clean' in the top most Makefile.
This patch updates the res/Makefile to recognize both distclean and dist-clean.
Note that this is needed for removing build.mak, which can run into problems
if the source file of Asterisk or its path is changed after build.mak is
generated.

(issue ASTERISK-22480)
Reported by: Matt Jordan

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

11 years agoLogging callid: Fix some sizeof() references per coding guidelines.
Richard Mudgett [Fri, 10 Jan 2014 17:50:40 +0000 (17:50 +0000)] 
Logging callid: Fix some sizeof() references per coding guidelines.

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

11 years agores_rtp_asterisk: Fails to resume WebRTC call from hold
Kevin Harwell [Thu, 9 Jan 2014 16:49:55 +0000 (16:49 +0000)] 
res_rtp_asterisk: Fails to resume WebRTC call from hold

In ast_rtp_ice_start if the ice session create check list failed, start check
was never initiated and ice_started was never set to true.  Upon re-entering
the function (for instance, [un]hold) it would try to create the check list
again with duplicate remote candidates.

Fixed so that if the create check list fails the necessary data structures
are properly re-initialized for any subsequent retries.

Note, it was decided to not stop ice support (by calling ast_rtp_ice_stop) on a
check list failure because it possible things might still work.  However, a
debug message was added to help with any future troubleshooting.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Patches:
     works_on_my_machine.patch uploaded by xytis (license 6558)

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

11 years agoapp_confbridge: Fix crash caused when waitmarked/marked users leave together
Matthew Jordan [Thu, 9 Jan 2014 15:41:31 +0000 (15:41 +0000)] 
app_confbridge: Fix crash caused when waitmarked/marked users leave together

When waitmarked users join a ConfBridge, the conference state is transitioned
from EMPTY -> INACTIVE. In this state, the users are maintined in a waiting
users list. When a marked user joins, the ConfBridge conference transitions
from INACTIVE -> MULTI_MARKED, and all users are put onto the active list of
users. This process works correctly.

When the marked user leaves, if they are the last marked user, the MULTI_MARKED
state does the following:
(1) It plays back a message to the bridge stating that the leader has left the
    conference. This requires an unlocking of the bridge.
(2) It moves waitmarked users back to the waiting list
(3) It transitions to the appropriate state: in this case, INACTIVE

However, because it plays the prompt back to the bridge before moving the users
and before finishing the state transition, this creates a race condition: with
the bridge unlocked, waitmarked users who leave the conference (or are kicked
from it) can cause a state transition of the bridge to another state before
the conference is transitioned to the INACTIVE state. This causes the state
machine to get a bit wonky, often leading to a crash when the MULTI_MARKED state
attempts to conclude its processing.

This patch fixes this problem:
(1) It prevents kicked users from being kicked again. That's just a nicety.
(2) More importantly, it fixes the race condition by only playing the prompt
    once the state has transitioned correctly to INACTIVE. If waitmarked users
    sneak out during the prompt being played, no harm no foul.

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

Note that the patch committed here is essentially the same as uploaded by
Simon Moxon on ASTERISK-22740, with the addition of the double kick prevention.

(closes issue AST-1258)
Reported by: Steve Pitts

(closes issue ASTERISK-22740)
Reported by: Simon Moxon
patches:
  ASTERISK-22740.diff uploaded by Simon Moxon (license 6546)

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

11 years ago"Minimun" typo.
Walter Doekes [Thu, 9 Jan 2014 14:12:40 +0000 (14:12 +0000)] 
"Minimun" typo.
........

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

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

11 years agopbx_lua: Add support for Lua 5.2
Kinsey Moore [Wed, 8 Jan 2014 16:17:32 +0000 (16:17 +0000)] 
pbx_lua: Add support for Lua 5.2

This adds support for Lua 5.2 in pbx_lua which is available on newer
operating systems.

(closes issue ASTERISK-23011)
Review: https://reviewboard.asterisk.org/r/3075/
Reported by: George Joseph
Patch by: George Joseph
........

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

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

11 years agoUPGRADE: Add a note about non-functionality
Kinsey Moore [Wed, 8 Jan 2014 15:43:45 +0000 (15:43 +0000)] 
UPGRADE: Add a note about non-functionality

Add a note that the "retry on 403 response to REGISTER" for chan_sip is
non-functional in the versions in which it was first introduced.
........

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

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

11 years agoAdd the missing part of r400140
Kinsey Moore [Tue, 7 Jan 2014 20:45:15 +0000 (20:45 +0000)] 
Add the missing part of r400140

When the patch to add retry-on-forbidden-response was committed, part
of the patch for chan_sip was not committed which caused the feature to
be entirely nonfunctional. This corrects the code in question.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874
........

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

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

11 years agoasterisk.c: suppress live_dangerously warning on rasterisk
Tzafrir Cohen [Fri, 3 Jan 2014 22:24:18 +0000 (22:24 +0000)] 
asterisk.c: suppress live_dangerously warning on rasterisk

Even since the fixes of AST-2013-007, Asterisk prints the following
warning on startup if the user decided to live dangerously:

  Privilege escalation protection disabled!
  See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.

This message is intended for the logs and interactive startup. No need
for it to appear on a remote console. This commit removes it from there.

(closes issue ASTERISK-23084)
Review: https://reviewboard.asterisk.org/r/3101/
........

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

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

11 years agocel_pgsql: module not correctly reloading
Kevin Harwell [Fri, 3 Jan 2014 21:58:17 +0000 (21:58 +0000)] 
cel_pgsql: module not correctly reloading

Upon reload the module unconditionally "unloaded" the module (freeing memory
and setting pointers to NULL) and then when attempting a "load" if the config
file had not changed then nothing would be reinitialized.

By moving the "unload" to occur conditionally (reload only) after an attempted
configuration load, but before module "loading" alleviates the issue. The module
now loads/unloads/reloads correctly.

(closes issue ASTERISK-22871)
Reported by: Matteo
........

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

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

11 years agochan_dahdi: dahdi show channels slices PRI channel dnid on output
Kevin Harwell [Fri, 3 Jan 2014 18:57:59 +0000 (18:57 +0000)] 
chan_dahdi: dahdi show channels slices PRI channel dnid on output

dahdi show channels output slices the callerid (which is dnid copied over on
PRI channels). If the channel naming structures look like:

 'DAHDI/i1/1408409XXXX-6'

then the output slices 1408409XXXX down to 1408409XXX. This patch just opens
it up to 15 chars so you can see the whole thing.

(closes issue ASTERISK-22918)
Reported by: outtolunc
Patches:
     svn_chan_dahdi.c.format12_15.diff.txt uploaded by outtolunc (license 5198)
........

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

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

11 years agoapp_meetme: compiler warning
Kevin Harwell [Fri, 3 Jan 2014 18:27:25 +0000 (18:27 +0000)] 
app_meetme: compiler warning

Fixed a compiler warning (errors in 'dev-mode') given by gcc version 4.8.1.
The one in app_meetme involved the 'sizeof-pointer-memaccess'
(see: http://gcc.gnu.org/gcc-4.8/porting_to.html) warning. Fixed so
it would no longer issue a warning and can compile again in 'dev-mode'.

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

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

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

11 years agofunc_strings: use memmove to prevent overlapping memory on strcpy
Scott Griepentrog [Thu, 2 Jan 2014 19:35:54 +0000 (19:35 +0000)] 
func_strings: use memmove to prevent overlapping memory on strcpy

When calling REPLACE() with an empty replace-char argument, strcpy
is used to overwrite the the matching <find-char>.  However as the
src and dest arguments to strcpy must not overlap, it causes other
parts of the string to be overwritten with adjacent characters and
the result is mangled.  Patch replaces call to strcpy with memmove
and adds a test suite case for REPLACE.

(closes issue ASTERISK-22910)
Reported by: Gareth Palmer
Review: https://reviewboard.asterisk.org/r/3083/
Patches:
    func_strings.patch uploaded by Gareth Palmer (license 5169)
........

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

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

11 years agocel_pgsql: deadlock on unload and core_event_dispatcher
Kevin Harwell [Tue, 31 Dec 2013 21:26:00 +0000 (21:26 +0000)] 
cel_pgsql: deadlock on unload and core_event_dispatcher

A deadlock can happen between a thread unloading or reloading the cel_pgsql
module and the core_event_dispatcher taskprocessor thread. Description of
what is happening:

Thread 1 (for example, a netconsole thread):

    a "module reload cel_pgsql" is launched
    the thread enter the "my_unload_module" function (cel_pgsql.c)
    the thread acquire the write lock on psql_columns
    the thread enter the "ast_event_unsubscribe" function (event.c)
    the thread try to acquire the write lock on ast_event_subs[sub->type]

Thread 2 (core_event_dispatcher taskprocessor thread):

    the taskprocessor pop a CEL event
    the thread enter the "handle_event" function (event.c)
    the thread acquire the read lock on ast_event_subs[sub->type]
    the thread callback the "pgsql_log" function (cel_pgsql.c), since it's a subscriber of CEL events
    the thread try to acquire a read lock on psql_columns

(closes issue ASTERISK-22854)
Reported by: Etienne Lessard
Patches:
     cel_pgsql_fix_deadlock_event.patch uploaded by hexanol (license 6394)
........

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

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

11 years agochannels.c: core show channeltypes slicing
Kevin Harwell [Mon, 30 Dec 2013 23:16:04 +0000 (23:16 +0000)] 
channels.c: core show channeltypes slicing

'core show channeltypes' type column is being sliced, resulting in incomplete
type names.

(closes issue ASTERISK-22919)
Reported by: outtolunc
Patches:
     svn_channel.c.format_15.diff.txt uploaded by outtolunc (license 5198)

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

11 years agosay.c: correct time for polish
Scott Griepentrog [Fri, 20 Dec 2013 21:15:41 +0000 (21:15 +0000)] 
say.c: correct time for polish

In ast_say_date_with_format_pl(), change ast_say_number() to
use tm_sec instead of tm_mn.

(closes issue ASTERISK-22856)
Reported by: Robert Mordec
Review: https://reviewboard.asterisk.org/r/3082/
Patches:
     say.c.patch uploaded by veilen (license 6555)
........

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

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

11 years agores_fax.c: crash on framehook with no dsp in fax detect
Scott Griepentrog [Thu, 19 Dec 2013 16:57:29 +0000 (16:57 +0000)] 
res_fax.c: crash on framehook with no dsp in fax detect

In fax_detect_framehook() a null pointer reference can occur where a
voice frame is processed but no dsp is attached to the fax detection
structure.  The code block that rejects frames that detection cannot
be processed on is checking for dsp but falls through when it should
instead return, as this change implements.

(closes issue ASTERISK-22942)
Reported by: adomjan
Review: https://reviewboard.asterisk.org/r/3076/

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

11 years agoastdb: crash in sqlite3 during shutdown
Scott Griepentrog [Thu, 19 Dec 2013 16:30:33 +0000 (16:30 +0000)] 
astdb: crash in sqlite3 during shutdown

When Asterisk is shut down, the astdb_atexit() function releases
(finalize) the previously initiated (prepared) SQL statements in
sqlite3.  Another thread making a subsequent request can cause a
crash in sqlite3.  This patch eliminates that issue by resetting
the statement pointer after it is released/cleared.  The sqlite3
code detects the null pointer, and aborts the operation cleanly.

(closes issue AST-1265)
Reported by: Alexander Hömig
(closes issue ASTERISK-22350)
Reported by: Birger "WIMPy" Harzenetter
Review: https://reviewboard.asterisk.org/r/3078/

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

11 years agoHandle temporary failures on gk registration
Alexandr Anikin [Thu, 19 Dec 2013 08:15:45 +0000 (08:15 +0000)] 
Handle temporary failures on gk registration
Introduce new 'stopped' state for gk client and restart gk client
on failures
Remove ooh323 stack command lock as it is not need now.
(closes issue ASTERISK-21960)
Reported by: Dmitry Melekhov
Patches:
ASTERISK-21960.patch
ASTERISK-21960-stacklockup-2.patch
Tested by: Dmitry Melekhov

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

11 years agoAdd AMI event for presence state.
Jason Parker [Wed, 18 Dec 2013 22:34:21 +0000 (22:34 +0000)] 
Add AMI event for presence state.

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

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

11 years agoooh323c: Fix gcc 4.6.3 compiler warnings.
Richard Mudgett [Wed, 18 Dec 2013 20:19:30 +0000 (20:19 +0000)] 
ooh323c: Fix gcc 4.6.3 compiler warnings.
........

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

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

11 years agores_calendar: Protect channel when adding datastore.
Joshua Colp [Wed, 18 Dec 2013 11:59:49 +0000 (11:59 +0000)] 
res_calendar: Protect channel when adding datastore.

This change adds a missing channel lock when adding a datastore
to a channel.
........

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

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

11 years agofunc_strings: Documentation fix for QUOTE()
Rusty Newton [Wed, 18 Dec 2013 00:28:49 +0000 (00:28 +0000)] 
func_strings: Documentation fix for QUOTE()

Example output was inaccurate.

(issue ASTERISK-22970)
(closes issue ASTERISK-22970)
Reported by: Gareth Palmer
Patches:
   func_strings.patch uploaded by Gareth Palmer (license 5169)
........

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

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

11 years agoSeveral components: fixing Typos in comments and code, "avaliable" instead of "available"
Rusty Newton [Tue, 17 Dec 2013 23:35:07 +0000 (23:35 +0000)] 
Several components: fixing Typos in comments and code, "avaliable" instead of "available"

(issue ASTERISK-23021)
(closes issue ASTERISK-23021)
Reported by: Jeremy Lainé
Tested by: Rusty Newton
Patches:
   available.patch uploaded by Jeremy Lainé (license 6561)

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

11 years agosecurity: Inhibit execution of privilege escalating functions
David M. Lee [Mon, 16 Dec 2013 17:14:14 +0000 (17:14 +0000)] 
security: Inhibit execution of privilege escalating functions

This patch allows individual dialplan functions to be marked as
'dangerous', to inhibit their execution from external sources.

A 'dangerous' function is one which results in a privilege escalation.
For example, if one were to read the channel variable SHELL(rm -rf /)
Bad Things(TM) could happen; even if the external source has only read
permissions.

Execution from external sources may be enabled by setting
'live_dangerously' to 'yes' in the [options] section of asterisk.conf.
Although doing so is not recommended.

(closes issue ASTERISK-22905)
Review: http://reviewboard.digium.internal/r/432/
........

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

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

11 years agopbx.c: put copy of ast_exten.data on stack to prevent memory corruption
Scott Griepentrog [Mon, 16 Dec 2013 15:55:04 +0000 (15:55 +0000)] 
pbx.c: put copy of ast_exten.data on stack to prevent memory corruption

During dialplan execution in pbx_extension_helper(), the contexts global
read lock prevents link list corruption, but was released with a pointer
to the ast_exten and data later used in variable substitution.  Instead,
this patch removes pbx_substitute_variables() and locates a copy of the
ast_exten data on the stack before releasing the lock, where ast_exten
could get free'd by another thread performing a module reload.

(issue AST-1179)
Reported by: Thomas Arimont
(issue AST-1246)
Reported by: Alexander Hömig
Review: https://reviewboard.asterisk.org/r/3055/
........

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

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

11 years agoapp_sms: BufferOverflow when receiving odd length 16 bit message
Scott Griepentrog [Mon, 16 Dec 2013 15:25:37 +0000 (15:25 +0000)] 
app_sms: BufferOverflow when receiving odd length 16 bit message

This patch prevents an infinite loop overwriting memory when
a message is received into the unpacksms16() function, where
the length of the message is an odd number of bytes.

(closes issue ASTERISK-22590)
Reported by: Jan Juergens
Tested by: Jan Juergens
........

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

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

11 years agoReset peer outboundproxy on sip.conf reload
Russell Bryant [Wed, 11 Dec 2013 19:14:52 +0000 (19:14 +0000)] 
Reset peer outboundproxy on sip.conf reload

If you set a peer's outboundproxy and then removed it from the config,
this would not get picked up in a config reload.  This patch fixes that
by resetting it in set_peer_defaults().

Closes ASTERISK-19454
Review: https://reviewboard.asterisk.org/r/3065/
........

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

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

11 years agores_fax_spandsp: Always init T.38 session to avoid crashes during state change
Matthew Jordan [Mon, 9 Dec 2013 03:11:05 +0000 (03:11 +0000)] 
res_fax_spandsp: Always init T.38 session to avoid crashes during state change

Prior to this patch, res_fax_spandsp was conservative with how it initialized
the spandsp T.38 context. It would only initialize it if the driver thought
the current state was a T.38 fax. While this works fine in nominal situations,
in certain off nominal situations, res_fax_spandsp can believe that a T.38
fax will not occur when in fact one has started. In particular, this was
discovered when res_fax would fall back to audio after timing out on a T.38
upgrade. The SIP channel driver would continue to retry the re-INVITE and -
if the remote end responded after res_fax timed out with a 200 OK - a T.38
frame would be delivered to the res_fax stack when it no longer expected it.

As it turns out, there does not appear to be any downside to always
initializing the T.38 context, other than the actual memory allocation.
Since that avoids this off nominal situation (and others which are equally
likely hard to predict), this is the safest way to avoid this problem.

Much thanks to Torrey as well for providing a scenario that reproduces this
issue.

(closes issue ASTERISK-21242)
Reported by: Ashley Winters
Tested by: Torrey Searle
patches:
  always-init-t38.patch uploaded by awinters (License 6477)
  A_PARTY.xml uploaded by tsearle (License 5334)
........

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

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

11 years agoCheck and reject non-digits e164 values on peers and general sections in ooh323.conf
Alexandr Anikin [Mon, 2 Dec 2013 17:55:49 +0000 (17:55 +0000)] 
Check and reject non-digits e164 values on peers and general sections in ooh323.conf
Regenerate e164 endpoint list on reload ooh323
(issue ASTERISK-22901)
Reported by: Cyril CONSTANTIN
Patches:
ASTERISK-22901.patch

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

11 years agotranslate: Move freeing of frame to after it is used.
Joshua Colp [Fri, 22 Nov 2013 17:11:07 +0000 (17:11 +0000)] 
translate: Move freeing of frame to after it is used.

When translating from one format to another it is possible
to inform the translation function that the source frame should
be freed. This was previously done immediately but shortly
afterwards the frame that was freed was accessed and used again.

This change moves code around a bit so that the frame is now
freed after it has been completely used.

(closes issue ASTERISK-22788)
Reported by: Corey Farrell
Patches:
translate-access-after-free-11up.patch uploaded by coreyfarrell (license 5909)
translate-access-after-free-1.8.patch uploaded by coreyfarrell (license 5909)
........

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

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

11 years agochan_dahdi: Fix crash during caller ID read
Kinsey Moore [Tue, 12 Nov 2013 15:00:36 +0000 (15:00 +0000)] 
chan_dahdi: Fix crash during caller ID read

Asterisk will sometimes core dump during caller id read on analog
channels due to a negative return value from the read() in
my_get_callerid that slips through as a negative length argument to
callerid_feed() if the errno returned by DAHDI is ELAST. This change
ensures that the negative return is treated properly even when it is
ELAST.

(closes issue ASTERISK-22746)
Reported by: Michael Walton
Patches:
    chan_dahdi_cid_crash_fix.r401410.patch uploaded by Michael Walton (License 6502)
........

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

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

11 years agoGet rid of some inaccurate comments.
Mark Michelson [Mon, 11 Nov 2013 19:26:08 +0000 (19:26 +0000)] 
Get rid of some inaccurate comments.

I'm doing some unrelated work in app_confbridge and finding
these "invalid pin" comments to be annoying. Get out!

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

11 years agoapp_queue: Honor penalty limits of 0
Kinsey Moore [Mon, 11 Nov 2013 15:35:22 +0000 (15:35 +0000)] 
app_queue: Honor penalty limits of 0

In the current app_queue code from 1.8 up to trunk the upper and lower
penalties can be set to 0 but the value is interpreted to be disabled
instead of actually setting limits. This is especially evident if min
and max limits are set to 0 and members with penalties of 0 and 1 are
in the queue since the member with penalty 1 will still receive calls.
This patch adjusts the special disabled value to be INT_MAX instead of
0.

(closes issue ASTERISK-20862)
Review: https://reviewboard.asterisk.org/r/2995/
Reported by: Schmooze Com
........

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

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

11 years agochan_sip: keep same local (from) tag for outgoing register requests
Scott Griepentrog [Fri, 8 Nov 2013 22:48:34 +0000 (22:48 +0000)] 
chan_sip: keep same local (from) tag for outgoing register requests

For outbound register requests the tag on the From line was
updated every 20 seconds prior to a successful registration
and also once for each registration renewal.  That behavior
can possibly cause the registration to be denied because of
the different tag, and is not aligned with the intention of
RFC 3261 8.1.3.5 "... request constitutes a new transaction
and SHOULD have the same value of the Call-ID, To, and From
of the previous request...".  This updates chan_sip to have
a field to keep the local tag in the registration structure
and use that tag for registration requests where the callid
is also unchanged.

(closes issue ASTERISK-12117)
Reported by: Pawel Pierscionek
Review: https://reviewboard.asterisk.org/r/2988/
........

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

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

11 years agoRecorded merge of revisions 402468 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Kevin Harwell [Tue, 5 Nov 2013 15:11:07 +0000 (15:11 +0000)] 
Recorded merge of revisions 402468 from http://svn.asterisk.org/svn/asterisk/branches/1.8

........
chan_sip: notify dialog info ignores presentation indicator in callerid

The presentation indicator in a callerid (e.g. set by dialplan function
Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog Info Notifies
are generated during extension monitoring.  Added a check to make sure the
name and/or number presentations on the callee (remote identity) are set to
allow.  If they are restricted then "anonymous" is used instead.

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

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

11 years agochan_sip: notify dialog info ignores presentation indicator in callerid
Kevin Harwell [Mon, 4 Nov 2013 20:52:58 +0000 (20:52 +0000)] 
chan_sip: notify dialog info ignores presentation indicator in callerid

The presentation indicator in a callerid (e.g. set by dialplan function
Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog Info Notifies
are generated during extension monitoring.  Added a check to make sure the
name and/or number presentations on the callee (remote identity) are set to
allow.  If they are restricted then "anonymous" is used instead.

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

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

11 years agoconfbridge: Separate user muting from system muting overrides.
Richard Mudgett [Sat, 2 Nov 2013 02:11:03 +0000 (02:11 +0000)] 
confbridge: Separate user muting from system muting overrides.

The system overrides the user muting requests when MOH is playing or a
waitmarked user is waiting for a marked user to join.  System muting
overrides interfere with what the user may wish the muting to be when the
system override ends.

* User muting requests are now independent of the system muting overrides.
The effective muting is now the logical or of the user request and system
override.

* Added a Muted column to the CLI "confbridge list <conference>" command.

* Added a Muted header to the AMI ConfbridgeList action ConfbridgeList
event.

(closes issue AST-1102)
Reported by: John Bigelow

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

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

11 years agoconfig: Allow ConfBridge DTMF menus to have '#' as the first digit.
Richard Mudgett [Fri, 1 Nov 2013 23:52:45 +0000 (23:52 +0000)] 
config: Allow ConfBridge DTMF menus to have '#' as the first digit.

ConfBridge allows custom DTMF menus to be created in the confbridge.conf
file by assigning a DTMF key sequence to a sequence of actions as follows:

DTMF-sequence = action,action...

Unfortunately, the normal config file processing code interprets an
initial '#' character as starting a directive such as #include.

* Add the ability to escape the first non-blank character in a config line
so the '#' character can be used without triggering the directive
processing code.

(closes issue AFS-2)
(closes issue ASTERISK-22478)
Reported by: Nicolas Tanski
Patches:
      jira_asterisk_22478_v11.patch (license #5621) patch uploaded by rmudgett (modified)

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

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

11 years agochan_sip: Fix RTCP port for SRFLX ICE candidates
Kinsey Moore [Fri, 1 Nov 2013 12:31:49 +0000 (12:31 +0000)] 
chan_sip: Fix RTCP port for SRFLX ICE candidates

This corrects one-way audio between Asterisk and Chrome/jssip as a
result of Asterisk inserting the incorrect RTCP port into RTCP SRFLX
ICE candidates. This also exposes an ICE component enumeration to
extract further details from candidates.

(closes issue ASTERISK-21383)
Reported by: Shaun Clark
Review: https://reviewboard.asterisk.org/r/2967/

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

11 years agocore/loader: Don't call dlclose in a while loop
Matthew Jordan [Thu, 31 Oct 2013 15:59:50 +0000 (15:59 +0000)] 
core/loader: Don't call dlclose in a while loop

For awhile now, we've noticed continuous integration builds hanging on CentOS 6
64-bit build agents. After resolving a number of problems with symbols, strange
locks, and other shenanigans, the problem has persisted. In all cases, gdb
shows the Asterisk process stuck in loader.c on one of the infinite while loops
that calls dlclose repeatedly until success.

The documentation of dlclose states that it returns 0 on success; any other
value on error. It does not state that repeatedly calling it will eventually
clear those errors. Most likely, the repeated calls to dlclose was to force a
close by exhausting the references on the library; however, that will never
succeed if:
(a) There is some fundamental error at work in the loaded library that
    precludes unloading it
(b) Some other loaded module is referencing a symbol in the currently loaded
    module

This results in Asterisk sitting forever.

Since we have matching pairs of dlopen/dlclose, this patch opts to only call
dlclose once, and log out as an ERROR if dlclose fails to return success. If
nothing else, this might help to determine why on the CentOS 6 64-bit build agent
things are not closing successfully.

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

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

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

11 years agoUpdates for 1.4.25 core sounds and 1.4.14 extra sounds, plus new en_GB language set
Rusty Newton [Tue, 29 Oct 2013 23:42:45 +0000 (23:42 +0000)] 
Updates for 1.4.25 core sounds and 1.4.14 extra sounds, plus new en_GB language set

The new sound packages relate to issues: ASTERISK-22544, ASTERISK-22411, ASTERISK-21413, ASTERISK-20782
Modified sounds/Makefile for the new sound versions and to account for the new en_GB language set.

(issue ASTERISK-22659)
(closes issue ASTERISK-22659)
(closes issue ASTERISK-22411)
(closes issue ASTERISK-22544)
........

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

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