Commit Graph

22710 Commits

Author SHA1 Message Date
Igor Goncharovskiy
28b726e79b Add update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue functions conforming to other channel drivers. Do not forget auto-detected and user-selected phone settings on 'unistim reload'
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 05:10:50 +00:00
Michael L. Young
0e3e1b678c func_audiohookinheritance: Check If A Channel Was Specified
This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 19:32:21 +00:00
Kinsey Moore
f75aeea441 AO2: Add an assert for bad objects
This adds an assert that will only be active if Asterisk is compiled
with DO_CRASH and allows the testsuite to fail tests that would
otherwise require log file parsing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 16:50:24 +00:00
Kinsey Moore
133a042f25 rtp_engine: Clean up after a failed remote bridge
Upon failure of an INVITE transaction meant to initiate a remote native
bridge, rtp_engine.c would not clean up non-reference-counted bridge
instance pointers leaving a dangling pointer which was being used to
perform a local native bridge after the other channel had hung up. This
lead to dereferencing into freed memory and plenty of AO2 errors. This
change allows the remote native bridge loop to clean up properly when
the bridge fails.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 15:31:05 +00:00
Sean Bright
2942d6fdac Minor whitespace change to 'sip show peers' output.
(closes issue ASTERISK-23406)
Reported by: ibercom
Tested by: ibercom
Patches:
    asterisk-11.patch uploaded by ibercom


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 14:50:55 +00:00
Walter Doekes
c6f7a6652a buildsystem: Unbreak 'make -qp' on 1.8.
r408083 caused trouble with make -qp. Backport r408193 to 1.8 as well.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 13:39:13 +00:00
Matthew Jordan
b42ab7fe81 doxygen: Tweak the link back to ye olde Digium website
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03 02:06:24 +00:00
Tzafrir Cohen
25d1057845 Makefile: replace -O6 with -O3
-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the 
default optimization flag to be -O3, like gcc actually considered it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-02 10:58:13 +00:00
Richard Mudgett
5e47d100d1 chan_sip: Add precautionary p->owner checks.
* Add precautionary p->owner checks in sip_hangup(), get_refer_info(),
get_also_info(), and interpret_t38_parameters().

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

* Removed some dead code in handle_request_invite().

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:00:43 +00:00
Richard Mudgett
5f27cde1ea chan_sip: Fix crash in ast_channel_hangupcause_set().
* Fix crash in ast_channel_hangupcause_set() because p->owner not checked
before calling.  Regression introduced by the fix for ASTERISK-22621.

(closes issue ASTERISK-23135)
Reported by: OK

(issue ASTERISK-23323)
Reported by: Walter Doekes


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 17:57:45 +00:00
David M. Lee
b695da6510 Fix memory stomping bug in astman.
This memset complained in dev mod on my Ubuntu box. The memset is both
unnecessary and dangerous. At this point, m hasn't been initialized
yet, so the memset will write off to whatever address happens to be
on the stack at the time.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 16:23:11 +00:00
Corey Farrell
a6a92ffe3d res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.
Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 15:59:15 +00:00
Matthew Jordan
bb9dfa1962 rtp_engine: fix crash during remote native bridging when calling get_codecs
When two RTP channels are in a remote bridge, the remote bridging loop in
rtp_engine will periodically check to see if the two channels can still be
bridged. One of the many things it checks is whether or not the codecs have
changed on the channel. If the codec has changed, it will break out of the
loop to re-determine which type of bridge is appropriate.

In order to perform this check, the ast_rtp_glue virtual table's get_codec
callback is called for each channel. The callback implementations assume
that the channel tech private is valid when called; as such, there has
always been some code in place to check whether or not the channel pvt is
NULL before calling. However, this check is insufficient.

The channels are unlocked during the remote bridging loop. It is possible
for a channel to get masqueraded between the check for the pvt being NULL and
the actual call to get_codec. When this occurs, the callback is called with a
ZOMBIE channel, which now has a NULL pvt. Crash.

While this has always been possible in Asterisk 1.8, it is much more likely to
occur in Asterisk 11 and later versions due to the timing changes that occur
when getting the codec from a channel. Note that this is much more likely to be
reproduced on slow, boggy hardware running Asterisk 11 - but fairly rarely
otherwise.

Also Note: This crash was also caught by the various SIP blind transfer tests,
in addition to the bug report Alec filed.

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

(closes issue ASTERISK-21737)
Reported by: Alec Davis
Tested by: Alec Davis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 12:39:34 +00:00
Rusty Newton
d72f70e9a5 configs/voicemail.conf.sample - Make mailcmd sample text more explicit
Made the wording a bit more explicit. Didn't really change the meaning.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25 17:41:50 +00:00
Corey Farrell
b78f5a2d30 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22 02:26:36 +00:00
Kevin Harwell
c8e50614fb 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 20:18:45 +00:00
Kevin Harwell
d2e5c5f922 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 15:56:56 +00:00
Kevin Harwell
2197b1d114 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 15:24:27 +00:00
Alexandr Anikin
44af8d9f46 Fix type of roundTripDelay variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 10:35:36 +00:00
Michael L. Young
2b4a90343a 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 00:46:35 +00:00
Rusty Newton
8c1e17b171 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 02:39:48 +00:00
Richard Mudgett
ba39ba7635 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 19:01:05 +00:00
Alexandr Anikin
8c234f205d process receiveAndTransmit user input remote caps instead of receive only
send receiveAndTransmit user input our caps instead of receive only



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 11:30:25 +00:00
Matthew Jordan
834f3215a9 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-16 03:14:52 +00:00
Scott Griepentrog
e0bed661dd 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 21:52:33 +00:00
Walter Doekes
b78a146975 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 13:25:24 +00:00
Rusty Newton
f0f80e418b 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 01:22:46 +00:00
Walter Doekes
f6aed66f77 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10 16:33:21 +00:00
Tzafrir Cohen
8ee947ed5e 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-09 15:34:53 +00:00
Richard Mudgett
414d336f45 chan_iax2: Add some more iaxs[] NULL checks to a routine already full of them.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 20:42:26 +00:00
Richard Mudgett
6e6a7f2af0 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 17:16:42 +00:00
Tzafrir Cohen
8878f38742 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 12:59:04 +00:00
Rusty Newton
c31d664b0a 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05 22:58:08 +00:00
Kinsey Moore
d824987e9d 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'.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05 20:30:53 +00:00
Richard Mudgett
d1b9b7fc77 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04 19:48:02 +00:00
Richard Mudgett
d06ec403aa 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04 17:50:04 +00:00
Joshua Colp
3e1ec590f3 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04 02:19:22 +00:00
Corey Farrell
36771d3004 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-01 00:22:52 +00:00
Matthew Jordan
c5e4585565 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@407041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 23:18:17 +00:00
Corey Farrell
ea65e4d44c 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30 20:26:52 +00:00
Russell Bryant
f82e6e93c5 queues.conf.sample Fix documented default for persistentmembers
Closes issue ASTERISK-22662


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-29 00:36:38 +00:00
Kevin Harwell
88794101a9 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 23:02:38 +00:00
Scott Griepentrog
9ab9f6e6b4 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 16:36:46 +00:00
Russell Bryant
bfd09ecfd4 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-27 20:34:31 +00:00
Russell Bryant
270775ce52 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/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-27 01:07:07 +00:00
Richard Mudgett
45b6991b92 tcptls.c: Add missing cleanup on off nominal path.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-26 22:59:35 +00:00
Richard Mudgett
56d694e261 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.

* 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 22:56:09 +00:00
Jonathan Rose
8c63b6d468 res_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practical
Review: https://reviewboard.asterisk.org/r/3141/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 20:57:50 +00:00
Richard Mudgett
f623b1f1cb 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.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 20:56:05 +00:00
Scott Griepentrog
16c2728634 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@406241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 22:16:47 +00:00