Matthew Jordan [Fri, 28 Mar 2014 04:27:02 +0000 (04:27 +0000)]
res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.
This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.
This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.
Matthew Jordan [Fri, 28 Mar 2014 03:51:34 +0000 (03:51 +0000)]
chan_sip: Add MESSAGE request to allowed methods
The allowed methods advertised by chan_sip did not previously note the MESSAGE
request. Even in Asterisk 1.8, we do accept in-dialog MESSAGE requests; we
should advertise that we support MESSAGE requests.
ASTERISK-23504 #close
ASTERISK-23504 #comment Reported by: Martin Kontsek
ASTERISK-23504 #comment Patch sip.h_patch.diff uploaded by Martin Kontsek (license 6587)
Joshua Colp [Wed, 26 Mar 2014 22:44:11 +0000 (22:44 +0000)]
say: Fix a bug where SayNumber in Polish tries to play incorrect sound.
This change fixes a bug where calling SayNumber with a number divisible by
100 using the Polish language would cause the code to attempt to play a
sound file with an empty name.
Jonathan Rose [Wed, 26 Mar 2014 15:57:36 +0000 (15:57 +0000)]
chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.
(closes issue AST-1301)
........
Merged revisions 411189 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Kinsey Moore [Tue, 25 Mar 2014 15:52:55 +0000 (15:52 +0000)]
chan_sip: Fix incorrect use of timers
If update_provisional_keepalive() is called while
send_provisional_keepalive_full() is waiting on the PVT lock, then
pvt->provisional_keepalive_sched_id will be changed to a new sched_id
value by update_provisional_keepalive(), but that new sched_id then may
be overwritten with -1 by send_provisional_keepalive_full(), killing
the pvt's reference to a schedule and "leaking" the reference.
(closes issue ASTERISK-22079)
Review: https://reviewboard.asterisk.org/r/3368/
Reported by: Jamuel Starkey, Matteo, Leif Madsen, Steve Davies
Patches:
provisional_keepalive_fix.diff uploaded by Steve Davies (license 5012)
........
Merged revisions 411088 from http://svn.asterisk.org/svn/asterisk/branches/1.8
g711_free() was introduced in spandsp 0.0.6pre4 and g711_release() became a
noop. I opted not to remove the call to g711_release() since it is harmless
and to call g711_free() if we have a sufficiently recent version of spandsp.
(issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Russ Meyerriecks [Mon, 17 Mar 2014 21:19:49 +0000 (21:19 +0000)]
callerid: Logic error in checksum processing
Callerid checksum-ing was being handled incorrectly here. When the checksum is
calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This
value will then fail the otherwise correct callerid message.
This patch changes the logic to simply add the calculated checksum to the
transmitted 2's compliment checksum.
Mark Michelson [Fri, 14 Mar 2014 15:56:43 +0000 (15:56 +0000)]
Prevent delayed astdb syncs.
The syncing thread sleeps for a second before waiting to be
told to attempt to sync again. If a signal were sent during this
sleeping period, we would end up having to wait until the next
sync signal occurred in order to sync up the astdb.
This code rearrangement also ensures that any pending transactions
will be synced prior to Asterisk shutting down.
Patches: db_sync.patch by John Hardin (License #6512)
Richard Mudgett [Wed, 12 Mar 2014 18:35:14 +0000 (18:35 +0000)]
app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.
When MOH is playing to a user in a conference and the user is kicked or
hangs up from the conference then the AMI MusicOnHoldStop events didn't
happen. (Asterisk v11 AMI event: MusicOnHold, state:Stop)
(closes issue ASTERISK-23311)
Reported by: Benjamin Keith Ford
Richard Mudgett [Mon, 10 Mar 2014 17:09:42 +0000 (17:09 +0000)]
AST-2014-001: Stack overflow in HTTP processing of Cookie headers.
Sending a HTTP request that is handled by Asterisk with a large number of
Cookie headers could overflow the stack.
Another vulnerability along similar lines is any HTTP request with a
ridiculous number of headers in the request could exhaust system memory.
(closes issue ASTERISK-23340)
Reported by: Lucas Molas, researcher at Programa STIC, Fundacion; and Dr. Manuel Sadosky, Buenos Aires, Argentina
........
Merged revisions 410380 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Kinsey Moore [Mon, 10 Mar 2014 13:18:55 +0000 (13:18 +0000)]
AST-2014-002: chan_sip: Exit early on bad session timers request
This change allows chan_sip to avoid creation of the channel and
consumption of associated file descriptors altogether if the inbound
request is going to be rejected anyway.
Matthew Jordan [Fri, 7 Mar 2014 04:38:47 +0000 (04:38 +0000)]
chan_sip: Allow static realtime members to be qualified during module load.
When a static realtime peer with qualify=yes is loaded, Asterisk will fail to
send an OPTIONS request due to the lastms being equal to 0. This results in
the peer being unable to receive calls from Asterisk because the status is
permanently UNKNOWN.
This patch allows an OPTIONS request to be sent during module load by
ignoring the lastms value on startup only.
Review: https://reviewboard.asterisk.org/r/3294/
(closes issue ASTERISK-17523)
Reported by: Maciej Krajewski
Tested by: wushumasters
patches:
realtime_fix_11.7.0.txt uploaded by Trevor Peirce (license 6112)
........
Merged revisions 410105 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Russell Bryant [Thu, 6 Mar 2014 23:15:42 +0000 (23:15 +0000)]
moh: fix a refcount error with realtime MOH
I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH. Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to. I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.
1) Remove a usless block of code that was impossible to reach. There was even
a comment indicating that it was impossible to reach. The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)". There's no good reason to keep it around.
2) A similar block to #1 contained a reference counting error. It stores
state->class in the local variable mohclass without increasing its reference
count. The reference count on mohclass is decremented at the end of the
function. This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.
Matthew Jordan [Thu, 6 Mar 2014 01:58:10 +0000 (01:58 +0000)]
res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp
When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash
in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw
frame would be passed to modem_connect_tones_rx. That particular routine
expects the data to be in slin format. This patch looks at the frame type and,
if the data is ulaw/alaw, converts the format to slin before passing it to
modem_connect_tones_rx.
Review: https://reviewboard.asterisk.org/r/3296
(closes issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Tested by: Michal Rybarik
patches:
spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578)
Kinsey Moore [Wed, 5 Mar 2014 20:37:51 +0000 (20:37 +0000)]
config: Fix inverted test
The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.
(closes issue ASTERISK-23383)
Reported by: David Woolley
........
Merged revisions 409916 from http://svn.asterisk.org/svn/asterisk/branches/1.8
David M. Lee [Wed, 5 Mar 2014 16:55:52 +0000 (16:55 +0000)]
Corrected cross-platform stat nanosecond code
When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.
Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.
Correct RTP handling in chan_unistim and fix transfer process broken in previous fix:
- Fixed too early RTP setup with phone, that cause no ringback tone on caller side
- Handle call transfer cancel only in STATE_CALL case (related to ASTERISK-23073)
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'
........
Merged revisions 409705 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Moises Silva [Wed, 5 Mar 2014 00:25:44 +0000 (00:25 +0000)]
Fix WebRTC over WSS not working
Several fixes for the WebSockets implementation in res/res_http_websocket.c
* Flush the websocket session FILE* as fwrite() may not actually guarantee sending
the data to the network. If we do not flush, it seems that buffering on the SSL
socket for outbound messages causes issues
* Refactored ast_websocket_read to take into account that SSL file descriptors
may be ready to read via fread() but poll() will not actually say so because
the data was already read from the network buffers and is now in the libc buffers
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)
Kinsey Moore [Tue, 4 Mar 2014 16:51:11 +0000 (16:51 +0000)]
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.
........
Merged revisions 409566 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Kinsey Moore [Tue, 4 Mar 2014 15:35:49 +0000 (15:35 +0000)]
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
........
Merged revisions 409521 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Tzafrir Cohen [Sun, 2 Mar 2014 12:26:17 +0000 (12:26 +0000)]
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.
Kinsey Moore [Fri, 28 Feb 2014 21:13:49 +0000 (21:13 +0000)]
app_queue: Fix documentation generation
The documentation for QueueMemberPaused was causing documentation
generation to fail because the documentation for that AMI event was in
the wrong location. This moves that documentation the correct location
and adds a missing parameter.
Jonathan Rose [Thu, 27 Feb 2014 19:19:02 +0000 (19:19 +0000)]
res_rtp_asterisk: Fix checklist creating problems in ICE sessions
Prior to this patch, local candidate lists including SRFLX would fail to start
properly when building ICE candidate check lists. This patch fixes that problem
by making sure that each SRFLX candidate is associated with the proper
base address so that the check list can create matches properly.
This patch was written by jcolp. The issue will be left open to await testing
by the issue participants.
(issue ASTERISK-23213)
Reported by: Andrea Suisani
Review: https://reviewboard.asterisk.org/r/3256/
David M. Lee [Thu, 27 Feb 2014 16:24:20 +0000 (16:24 +0000)]
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.
........
Merged revisions 409077 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Corey Farrell [Thu, 27 Feb 2014 16:03:56 +0000 (16:03 +0000)]
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/
........
Merged revisions 409052 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Matthew Jordan [Thu, 27 Feb 2014 12:47:29 +0000 (12:47 +0000)]
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
........
Merged revisions 409001 from http://svn.asterisk.org/svn/asterisk/branches/1.8
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).
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.
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
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)
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.
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
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
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)
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.
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.
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.
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
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.
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.
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).
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
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
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
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
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.
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.
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
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.
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.
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.
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.
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().
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
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.
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.
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