Mark Michelson [Fri, 26 Apr 2013 20:32:11 +0000 (20:32 +0000)]
Add an \extref doxygen pointer for libuuid.
Thanks to Olle Johansson for suggesting this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386638
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 26 Apr 2013 20:05:15 +0000 (20:05 +0000)]
Example of how to use the Stasis message bus
In order to get people familiar with the Stasis message bus, it would
be useful to have something of a tutorial. Since I'm not clever enough
to think of some cool integration we could do with Twitter, I settled
for something that might actually be useful.
This patch adds a res_statsd.so module, which implements a basic
statsd[1] client. Statsd is a very simple statistics gathering server,
which can publish its results to a backend graphing engine, like
Graphite[2]. There are several different Statsd server
implementations[3], so you can pick what works best for your
environment.
The actual example of how to use the Stasis message bus is in
res_chan_stats.so. This module demonstrates how to use subscriptions
and the message router by monitoring messages and posting channels
stats to the statsd server.
A wiki page walking through res_chan_stats.so is forthcoming.
[1]: https://github.com/etsy/statsd/
[2]: http://graphite.readthedocs.org/en/latest/
[3]: http://joemiller.me/2011/09/21/list-of-statsd-server-implementations/
Review: https://reviewboard.asterisk.org/r/2460/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386624
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 26 Apr 2013 20:03:32 +0000 (20:03 +0000)]
Ignore *.[oi] files in res/res_sip
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386623
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Thu, 25 Apr 2013 21:32:48 +0000 (21:32 +0000)]
Don't bind to anything in the sample configuration so we don't clash with chan_sip on a "make samples" right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386577
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 25 Apr 2013 18:28:37 +0000 (18:28 +0000)]
REmove automerge properties.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386541
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 25 Apr 2013 18:25:31 +0000 (18:25 +0000)]
Merge the pimp_my_sip branch into trunk.
The pimp_my_sip branch is being merged at this point because
it offers basic functionality, and from an API standpoint, things
are complete.
SIP work is *not* feature-complete; however, with the completion
of the SUBSCRIBE/NOTIFY API, all APIs (except a PUBLISH API) have
been created, and thus it is possible for developers to attempt
to create new SIP work.
API documentation can be found in the doxygen in the code, but
usability documentation is still lacking.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386540
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Thu, 25 Apr 2013 03:04:21 +0000 (03:04 +0000)]
Fix Displaying Symmetric RTP Global Setting
* Use comedia_string() to display correctly the symmetric rtp setting when
running "sip show settings"
........
Merged revisions 386486 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386487
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Thu, 25 Apr 2013 02:48:44 +0000 (02:48 +0000)]
Change Case On Forcerport For Consistency
* Change "ForcerPort" to "Forcerport" to match everywhere else it is displayed
........
Merged revisions 386483 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 386484 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386485
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 24 Apr 2013 21:47:03 +0000 (21:47 +0000)]
Document JSON models in resource_*.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386462
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 24 Apr 2013 21:43:16 +0000 (21:43 +0000)]
Oops. Mustache doesn't like dictionaries
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386461
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 23 Apr 2013 20:18:44 +0000 (20:18 +0000)]
confbridge: Make search the conference bridges container using OBJ_KEY.
* Make confbridge config parsing user profile, bridge profile, and menu
container hash/cmp functions correctly check the OBJ_POINTER, OBJ_KEY, and
OBJ_PARTIAL_KEY flags.
* Made confbridge load_module()/unload_module() free all resources on
failure conditions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386375
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 23 Apr 2013 18:57:00 +0000 (18:57 +0000)]
Fix some bad whitespace
This crept in with the RESTful HTTP interface merge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386352
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 22 Apr 2013 16:44:21 +0000 (16:44 +0000)]
Fix crash when AMI redirect action redirects two channels out of a bridge.
The two party bridging loops were changing the bridge peer pointers
without the channel locks held. Thus when ast_channel_massquerade()
tested and used the pointer there is a small window of opportunity for the
pointers to become NULL even though the masquerade code has the channels
locked.
(closes issue ASTERISK-21356)
Reported by: William luke
Patches:
jira_asterisk_21356_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: William luke
........
Merged revisions 386256 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 386286 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386289
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Andrew Latham [Mon, 22 Apr 2013 16:22:00 +0000 (16:22 +0000)]
Doxygen - Markup Guidelines
Expand on a commit by OEJ to use the Coding-Guidelines
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386266
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 22 Apr 2013 14:58:53 +0000 (14:58 +0000)]
This patch adds a RESTful HTTP interface to Asterisk.
The API itself is documented using Swagger, a lightweight mechanism for
documenting RESTful API's using JSON. This allows us to use swagger-ui
to provide executable documentation for the API, generate client
bindings in different languages, and generate a lot of the boilerplate
code for implementing the RESTful bindings. The API docs live in the
rest-api/ directory.
The RESTful bindings are generated from the Swagger API docs using a set
of Mustache templates. The code generator is written in Python, and
uses Pystache. Pystache has no dependencies, and be installed easily
using pip. Code generation code lives in rest-api-templates/.
The generated code reduces a lot of boilerplate when it comes to
handling HTTP requests. It also helps us have greater consistency in the
REST API.
(closes issue ASTERISK-20891)
Review: https://reviewboard.asterisk.org/r/2376/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386232
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Olle Johansson [Mon, 22 Apr 2013 12:45:26 +0000 (12:45 +0000)]
Fix mistake in Doxygen.
Doxygen is only *ONE* comment that applies to the NEXT piece of code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386211
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 22 Apr 2013 01:05:43 +0000 (01:05 +0000)]
sla: remove redundant locking.
sla.lock was already locked in the only place that sla_check_reload() was called.
Remove the redundant locking of sla.lock done in this function. Less recursive
locking is A Good Thing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386190
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 19 Apr 2013 22:27:08 +0000 (22:27 +0000)]
Prevent res_timing_pthread from blocking callers
There were several reports of deadlock when using
res_timing_pthread. Backtraces indicated that one thread was blocked
waiting for the write to the pipe to complete and this thread held
the container lock for the timers. Therefore any thread that wanted
to create a new timer or read an existing timer would block waiting
for either the timer lock or the container lock and deadlock ensued.
This patch changes the way the pipe is used to eliminate this source
of deadlocks:
1) The pipe is placed in non-blocking mode so that it would never
block even if the following changes someone fail...
2) Instead of writing bytes into the pipe for each "tick" that's
fired the pipe now has two states--signaled and unsignaled. If
signaled, the pipe is hot and any pollers of the read side
filedescriptor will be woken up. If unsigned the pipe is idle. This
eliminates even the chance of filling up the pipe and reduces the
potential overhead of calling unnecessary writes.
3) Since we're tracking the signaled / unsignaled state, we can
eliminate the exta poll system call for every firing because we know
that there is data to be read.
(closes issue ASTERISK-21389)
Reported by: Matt Jordan
Tested by: Shaun Ruffell, Matt Jordan, Tony Lewis
patches:
0001-res_timing_pthread-Reduce-probability-of-deadlocking.patch uploaded by sruffell (License 5417)
(closes issue ASTERISK-19754)
Reported by: Nikola Ciprich
(closes issue ASTERISK-20577)
Reported by: Kien Kennedy
(closes issue ASTERISK-17436)
Reported by: Henry Fernandes
(closes issue ASTERISK-17467)
Reported by: isrl
(closes issue ASTERISK-17458)
Reported by: isrl
Review: https://reviewboard.asterisk.org/r/2441/
........
Merged revisions 386109 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 386159 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386160
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 19 Apr 2013 05:20:02 +0000 (05:20 +0000)]
cli.c: Properly initialize debug_modules and verbose_modules.
This avoids some lock errors on the core set {debug,verbose} commands.
........
Merged revisions 386049 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 386051 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386054
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Thu, 18 Apr 2013 17:30:28 +0000 (17:30 +0000)]
Allow WebSocket connections on more URL's
This patch adds the concept of ast_websocket_server to
res_http_websocket, allowing WebSocket connections on URL's more more
than /ws.
The existing funcitons for managing the WebSocket subprotocols on /ws
still work, so this patch should be completely backward compatible.
(closes issue ASTERISK-21279)
Review: https://reviewboard.asterisk.org/r/2453/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386020
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Thu, 18 Apr 2013 17:26:29 +0000 (17:26 +0000)]
Fix lock errors on startup.
In messages.c, there are several places in the code where we create a
tmp_tech_holder and pass that into an ao2_find call. Unfortunately, we
weren't initializing the rwlock on the tmp_tech_holder, which the hash
function was locking. It's apparently harmless, but still not the best
code.
This patch extracts all that copy/pasted code into two functions,
msg_find_by_tech and msg_find_by_tech_name, which properly initialize
and destroy the rwlock on the tmp_tech_holder.
Review: https://reviewboard.asterisk.org/r/2454/
........
Merged revisions 386006 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386019
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Alec L Davis [Tue, 16 Apr 2013 23:44:18 +0000 (23:44 +0000)]
res_xmpp and res_jabber need to search 'cachable' in the attrib section of the received IE, not data.
(issue ASTERISK-20175)
(closes issue ASTERISK-21429)
(closes issue ASTERISK-21069)
(closes issue ASTERISK-21164)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
Review https://reviewboard.asterisk.org/r/2452/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385939
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 16 Apr 2013 17:50:14 +0000 (17:50 +0000)]
Allow res_corosync to build
ast_enable_distributed_devstate is no longer applicable to how the
distributed device state system works and is no longer necessary.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385886
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 16 Apr 2013 15:48:16 +0000 (15:48 +0000)]
Move presence state distribution to Stasis-core
Convert presence state events to Stasis-core messages and remove
redundant serializers where possible.
Review: https://reviewboard.asterisk.org/r/2410/
(closes issue ASTERISK-21102)
Patch-by: Kinsey Moore <kmoore@digium.com>
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385862
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 16 Apr 2013 15:33:59 +0000 (15:33 +0000)]
Move device state distribution to Stasis-core
In the move from Asterisk's event system to Stasis, this makes
distributed device state aggregation always-on, removes unnecessary
task processors where possible, and collapses aggregate and
non-aggregate states into a single cache for ease of retrieval. This
also removes an intermediary step in device state aggregation.
Review: https://reviewboard.asterisk.org/r/2389/
(closes issue ASTERISK-21101)
Patch-by: Kinsey Moore <kmoore@digium.com>
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385860
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 16 Apr 2013 14:09:25 +0000 (14:09 +0000)]
Fixed a typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385835
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Mon, 15 Apr 2013 17:26:49 +0000 (17:26 +0000)]
Don't unnecessarily rebuild things on every run of 'make'.
Review: https://reviewboard.asterisk.org/r/2449/
........
Merged revisions 385745 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385768 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385782
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 15 Apr 2013 16:47:25 +0000 (16:47 +0000)]
Avoid unused variable warning when not in devmode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385743
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 15 Apr 2013 16:43:47 +0000 (16:43 +0000)]
Moved core logic from app_stasis to res_stasis
After some discussion on asterisk-dev, it was decided that the bulk of
the logic in app_stasis actually belongs in a resource module instead
of the application module.
This patch does that, leaves the app specific stuff in app_stasis, and
fixes up everything else to be consistent with that change.
* Renamed test_app_stasis to test_res_stasis
* Renamed app_stasis.h to stasis_app.h
* This is still stasis application support, even though it's no
longer in an app_ module. The name should never have been tied to
the type of module, anyways.
* Now that json isn't a resource module anymore, moved the
ast_channel_snapshot_to_json function to main/stasis_channels.c,
where it makes more sense.
Review: https://reviewboard.asterisk.org/r/2430/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385742
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 15 Apr 2013 16:22:03 +0000 (16:22 +0000)]
DTMF events are now published on a channel's stasis_topic. AMI was
refactored to use these events rather than producing the events directly
in channel.c. Finally, the code was added to app_stasis to produce
DTMF events on the WebSocket.
The AMI events are completely backward compatible, including sending
events on transmitted DTMF, and sending DTMF start events.
The Stasis-HTTP events are somewhat simplified. Since DTMF start and
DTMF send events are generally less useful, Stasis-HTTP will only send
events on received DTMF end.
(closes issue ASTERISK-21282)
(closes issue ASTERISK-21359)
Review: https://reviewboard.asterisk.org/r/2439
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385734
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 15 Apr 2013 16:10:10 +0000 (16:10 +0000)]
Fix the svn:keywords property on several files.
Normally I think keyword expansion is silly, but the one time it would have
been good, it didn't work because the property had quotes in it. This patch
fixes obviously busted svn:keywords properties.
........
Merged revisions 385683 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385689 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385718
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 14 Apr 2013 03:01:33 +0000 (03:01 +0000)]
Calculate the timestamp for outbound RTP if we don't have timing information
This patch calculates the timestamp for outbound RTP when we don't have timing
information. This uses the same approach in res_rtp_asterisk. Thanks to both
Pietro and Tzafrir for providing patches.
(closes issue ASTERISK-19883)
Reported by: Giacomo Trovato
Tested by: Pietro Bertera, Tzafrir Cohen
patches:
rtp-timestamp-1.8.patch uploaded by tzafrir (License 5035)
rtp-timestamp.patch uploaded by pbertera (License 5943)
........
Merged revisions 385636 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385637 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385638
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 14 Apr 2013 02:35:04 +0000 (02:35 +0000)]
Don't attempt to create a voice frame on a read error
Prior to this patch, a read error in snd_pcm_readi would still be treated as a
nominal result when constructing a voice frame from the expected data. Since
the value returned is negative, as opposed to the number of samples read,
this could result in a crash. With this patch, we now return a null frame
when a read error is detected.
Note that the patch on ASTERISK-21329 was modified slightly for this commit,
in that we bail immediately on detecting the read error, rather than bypassing
the construction of the voice frame.
(closes issue ASTERISK-21329)
Reported by: Keiichiro Kawasaki
patches:
chan_alsa.diff uploaded by kawasaki (License 6489)
........
Merged revisions 385633 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385634 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385635
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Fri, 12 Apr 2013 22:38:56 +0000 (22:38 +0000)]
Fix Manager Segfault When app_queue Is Unloaded
When app_queue is unloaded, some manager commands are not being unregistered
which result in a segfault. This patch corrects this.
(closes issue ASTERISK-21397)
Reported by: Peter Katzmann, Corey Farrell
Tested by: Corey Farrell
Patches:
asterisk-21397-missing-unreg-manager-cmd_1.8.diff
Michael L. Young (license 5026)
asterisk-21397-missing-unreg-manager-cmd_11.diff
Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2444/
........
Merged revisions 385593 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385594 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385595
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 12 Apr 2013 22:26:17 +0000 (22:26 +0000)]
Allow codec_resample to be unloaded
Ensure that trans_size is correct to prevent uninitialized entries from
preventing reload.
(closes issue ASTERISK-21401)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
codec_resample-unload.patch uploaded by Corey Farrell
........
Merged revisions 385582 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385585
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Fri, 12 Apr 2013 22:22:58 +0000 (22:22 +0000)]
Fix app_voicemail Segfault And A Few Memory Leaks
The original report was that app_voicemail would crash. This was caused by
ast_config_load() returning CONFIG_STATUS_FILEINVALID but no checks being
performed for that return status. After adding the initial patch to fix this
issue, Jaco Kroon (jkroon) added some fixes to memory leaks he had discovered.
During review, Walter Doekes (wdoekes) suggested adding a helper function in
order to determine if we had a valid configuration or not.
This patch does the following:
* Creates a helper function to check if the configuration is valid
* Adds calls to the new helper function where appropiate
* Fixes memory leaks where the code returned without running
ast_config_destroy() on the configuration that was loaded
(closes issue ASTERISK-21302)
Reported by: Jaco Kroon
Tested by: Jaco Kroon, Michael L. Young
Patches:
asterisk-11.3.0-app_voicemail-ast_config-fixes.patch
Jaco Kroon (license 5671)
asterisk-21302-valid_cfg_and_mem_leaks_v3-1.8.diff
Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2443/
........
Merged revisions 385551 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385557 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385573
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Fri, 12 Apr 2013 21:48:10 +0000 (21:48 +0000)]
Fix documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385548
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 12 Apr 2013 21:11:02 +0000 (21:11 +0000)]
Expose channel snapshot manager blob generation
These functions are already used in one branch (jrose's parking branch)
and will soon be used in other branches as well.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385522
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Fri, 12 Apr 2013 15:06:09 +0000 (15:06 +0000)]
Fix One-Way Audio With auto_* NAT Settings When SIP Calls Initiated By PBX
When we reload Asterisk or chan_sip, the flags force_rport and comedia that are
turned on and off when using the auto_force_rport and auto_comedia nat settings
go back to the default setting off. These flags are turned on when needed or
off when not needed at the time that a peer registers, re-registers or initiates
a call. This would apply even when only the default global setting
"nat=auto_force_rport" is being used, which in this case would only affect the
force_rport flag.
Everything is good except for the following: The nat setting is set to
auto_force_rport and auto_comedia. We reload Asterisk and the peer's
registration has not expired. We load in the settings for the peer which turns
force_rport and comedia back to off. Since the peer has not re-registered or
placed a call yet, those flags remain off. We then initiate a call to the peer
from the PBX. The force_rport and comedia flags stay off. If NAT is involved,
we end up with one-way audio since we never checked to see if the peer is behind
NAT or not.
This patch does the following:
* Moves the checking of whether a peer is behind NAT into its own function
* Create a function to set the peer's NAT flags if they are using the auto_* NAT
settings
* Adds calls in sip_request_call() to these new functions in order to setup the
dialog according to the peer's settings
(closes issue ASTERISK-21374)
Reported by: Michael L. Young
Tested by: Michael L. Young
Patches:
asterisk-21374-auto-nat-outgoing-fix_v2.diff Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2421/
........
Merged revisions 385473 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385474
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Alec L Davis [Fri, 12 Apr 2013 08:52:44 +0000 (08:52 +0000)]
IAX2 defer_full_frames fail to get sent
Ensure iax2_process_thread is signalled when a deferred frame is queued to it.
(closes issue ASTERISK-18827)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
Review https://reviewboard.asterisk.org/r/2426/
........
Merged revisions 385429 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385430 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385431
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Alec L Davis [Fri, 12 Apr 2013 08:18:20 +0000 (08:18 +0000)]
IAX2, prevent network thread starting before all helper threads are ready
On startup, it's possible for a frame to arrive before the processing threads were ready.
In iax2_process_thread() the first pass through falls into ast_cond_wait, should a frame arrive
before we are at ast_cond_wait, the signal will be ignored.
The result iax2_process_thread stays at ast_cond_wait forever, with deferred frames being queued.
Fix: When creating initial idle iax2_process_threads, wait for init_cond to be signalled
after each thread is started.
(issue ASTERISK-18827)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
Review https://reviewboard.asterisk.org/r/2427/
........
Merged revisions 385402 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385403 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385406
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Thu, 11 Apr 2013 20:00:46 +0000 (20:00 +0000)]
Blocked revisions 385356
........
Add dependency on libuuid, for res_rtp_asterisk
pjproject is what actually requires libuuid.
(closes issue ASTERISK-21125)
reported by Private Name
(Ed. note: Really? Private Name? I am rolling my eyes so hard right now.)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385357
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 11 Apr 2013 16:53:21 +0000 (16:53 +0000)]
Fix 'pri intense debug span' alias.
........
Merged revisions 385313 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385314
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 10 Apr 2013 23:08:02 +0000 (23:08 +0000)]
Eliminated dial_features_destroy() since it is equivalent to ast_free_ptr()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385278
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 10 Apr 2013 23:03:30 +0000 (23:03 +0000)]
* Fix unlocked accesses to feature_list. The feature_list is now also
protected by the features_lock.
* Made all calls to ast_find_call_feature() have the features_lock held.
* Fixed set_config_flags() to actually use find_group() to look for
feature groups in DYNAMIC_FEATURES. The code originally assumed all
feature groups were listed in DYNAMIC_FEATURES.
* Make everyone use ast_rdlock_call_features(),
ast_unlock_call_features(), and new ast_wrlock_call_features() instead of
directly calling the rwlock API on features_lock.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385277
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 10 Apr 2013 15:34:47 +0000 (15:34 +0000)]
Fixed manager channelvars support.
For the events that have been ported to Stasis, this was broken in
r384910, when a couple of lines of code was lost in a merge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385236
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 10 Apr 2013 14:26:22 +0000 (14:26 +0000)]
Use LDAP memory management functions instead of Asterisk's
When MALLOC_DEBUG is enabled with res_config_ldap, issues (munmap_chunk:
invalid pointer errors) can occur as the memory is being allocated with
Asterisk's wrappers around malloc/calloc/free/strdup, as opposed to the
LDAP library's wrappers.
This patch uses the LDAP library's wrappers where appropriate, so that
compiling with MALLOC_DEBUG doesn't cause more problems than it solves.
Note that the patch listed below was modified slightly for this commit
to account for some additional memory allocation/deallocations.
(closes issue ASTERISK-17386)
Reported by: John Covert
Tested by: Andrew Latham
patches:
issue18789-1.8-r316873.patch uploaded by seanbright (License 5060)
........
Merged revisions 385190 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385199 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385202
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 10 Apr 2013 14:07:27 +0000 (14:07 +0000)]
Fix crash in chan_sip when a core initiated op occurs at the same time as a BYE
When a BYE request is processed in chan_sip, the current SIP dialog is detached
from its associated Asterisk channel structure. The tech_pvt pointer in the
channel object is set to NULL, and the dialog persists for an RFC mandated
period of time to handle re-transmits.
While this process occurs, the channel is locked (which is good).
Unfortunately, operations that are initiated externally have no way of knowing
that the channel they've just obtained (which is still valid) and that they are
attempting to lock is about to have its tech_pvt pointer removed. By the time
they obtain the channel lock and call the channel technology callback, the
tech_pvt is NULL.
This patch adds a few checks to some channel callbacks that make sure the
tech_pvt isn't NULL before using it. Prime offenders were the DTMF digit
callbacks, which would crash if AMI initiated a DTMF on the channel at the
same time as a BYE was received from the UA. This patch also adds checks on
sip_transfer (as AMI can also cause a callback into this function), as well
as sip_indicate (as lots of things can queue an indication onto a channel).
Review: https://reviewboard.asterisk.org/r/2434/
(closes issue ASTERISK-20225)
Reported by: Jeff Hoppe
........
Merged revisions 385170 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385173 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385174
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 9 Apr 2013 19:58:35 +0000 (19:58 +0000)]
Rename struct feature_ds to struct feature_datastore.
Because "struct feature_ds *feature_ds" is not a good thing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385142
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 9 Apr 2013 18:22:08 +0000 (18:22 +0000)]
Backported app_stasis fix from stasis-http branch.
The hash and compare functions for the control container was reusing
the wrong ones, causing some problems. I fixed it, but in the wrong
branch. Oh well, it happens.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385116
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 9 Apr 2013 06:16:42 +0000 (06:16 +0000)]
Add inheritance support to FEATURE()/FEATUREMAP().
The settings saved on the channel for FEATURE()/FEATUREMAP() were only
for that channel. This patch adds the ability to have these settings
inherited to child channels if you set FEATURE(inherit)=yes.
Closes issue ASTERISK-21306.
Review: https://reviewboard.asterisk.org/r/2415/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385088
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Mon, 8 Apr 2013 23:38:08 +0000 (23:38 +0000)]
Modified the list of keys for the driver backends for sake of sample clarity
Added a line showing the mapping of "mysql" to res_config_mysql available in add-ons. We used "mysql" as an example driver key in the sample, but didn't show what module it mapped too. Also added a subtitle above the list of keys for driver backends.
........
Merged revisions 385047 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 385048 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385049
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Mon, 8 Apr 2013 18:24:50 +0000 (18:24 +0000)]
Clean up Makefile "warning" clutter when makeopts doesn't exist.
Review: https://reviewboard.asterisk.org/r/2304
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384989
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 8 Apr 2013 15:38:34 +0000 (15:38 +0000)]
Don't attempt a websocket protocol removal if res_http_websocket isn't there
This patch sets the protocols container provided by res_http_websocket to NULL
when the module gets unloaded and adds the necessary checks when adding/
removing a websocket protocol. This prevents some FRACKing on an invalid
pointer to the disposed container if a module that uses res_http_websocket is
unloaded after it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384942
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 8 Apr 2013 14:26:37 +0000 (14:26 +0000)]
Add multi-channel Stasis messages; refactor Dial AMI events to Stasis
This patch does the following:
* A new Stasis payload has been defined for multi-channel messages. This
payload can store multiple ast_channel_snapshot objects along with a single
JSON blob. The payload object itself is opaque; the snapshots are stored
in a container keyed by roles. APIs have been provided to query for and
retrieve the snapshots from the payload object.
* The Dial AMI events have been refactored onto Stasis. This includes dial
messages in app_dial, as well as the core dialing framework. The AMI events
have been modified to send out a DialBegin/DialEnd events, as opposed to
the subevent type that was previously used.
* Stasis messages, types, and other objects related to channels have been
placed in their own file, stasis_channels. Unit tests for some of these
objects/messages have also been written.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384910
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 8 Apr 2013 13:27:45 +0000 (13:27 +0000)]
Stasis application WebSocket support
This is the API that binds the Stasis dialplan application to external
Stasis applications. It also adds the beginnings of WebSocket
application support.
This module registers a dialplan function named Stasis, which is used
to put a channel into the named Stasis app. As a channel enters and
leaves the Stasis diaplan application, the Stasis app receives a
'stasis-start' and 'stasis-end' events.
Stasis apps register themselves using the stasis_app_register and
stasis_app_unregister functions. Messages are sent to an application
using stasis_app_send.
Finally, Stasis apps control channels through the use of the
stasis_app_control object, and the family of stasis_app_control_*
functions.
Other changes along for the ride are:
* An ast_frame_dtor function that's RAII_VAR safe
* Some common JSON encoders for name/number, timeval, and
context/extension/priority
Review: https://reviewboard.asterisk.org/r/2361/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384879
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 6 Apr 2013 16:00:20 +0000 (16:00 +0000)]
Add a res_sorcery_astdb module which uses the astdb to persist objects.
Review: https://reviewboard.asterisk.org/r/2420/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384857
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Fri, 5 Apr 2013 20:41:27 +0000 (20:41 +0000)]
Fix For Not Overriding The Default Settings In chan_sip
The initial report was that the "nat" setting in the [general] section was not
having any effect in overriding the default setting. Upon confirming that this
was happening and looking into what was causing this, it was discovered that
other default settings would not be overriden as well.
This patch works similar to what occurs in build_peer(). We create a temporary
ast_flags structure and using a mask, we override the default settings with
whatever is set in the [general] section.
In the bug report, the reporter who helped to test this patch noted that the
directmedia settings were being overriden properly as well as the nat settings.
This issue is also present in Asterisk 1.8 and a separate patch will be applied
to it.
(issue ASTERISK-21225)
Reported by: Alexandre Vezina
Tested by: Alexandre Vezina, Michael L. Young
Patches:
asterisk-21225-handle-options-default-prob_v4.diff
Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2385/
........
Merged revisions 384827 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384828
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 4 Apr 2013 18:15:34 +0000 (18:15 +0000)]
Separate some event struct definitions from instantiation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384760
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 3 Apr 2013 20:27:11 +0000 (20:27 +0000)]
chan_dahdi: Change inband_on_proceeding option default to no/disabled.
(issue ASTERISK-21151)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384711
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 3 Apr 2013 20:20:09 +0000 (20:20 +0000)]
chan_dahdi: Add inband_on_proceeding compatibility option.
The new inband_on_proceeding option causes Asterisk to assume inband audio
may be present when a PROCEEDING message is received.
Q.931 Section 5.1.2 says the network cannot assume that the CPE side has
attached to the B channel at this time without explicitly sending the
progress indicator ie informing the CPE side to attach to the B channel
for audio. However, some non-compliant ISDN switches send a PROCEEDING
without the progress indicator ie indicating inband audio is available and
assume that the CPE device has connected the media path for listening to
ringback and other messages.
ASTERISK-17834 which causes this issue was dealing with a non-compliant
network switch.
(closes issue ASTERISK-21151)
Reported by: Gianluca Merlo
Tested by: rmudgett
........
Merged revisions 384685 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384689 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384696
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 3 Apr 2013 17:17:33 +0000 (17:17 +0000)]
Update documentation for CHANNEL function
Document that you can read/write the 'accountcode' and 'amaflags' on a channel.
........
Merged revisions 384640 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384641 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384642
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 3 Apr 2013 16:01:51 +0000 (16:01 +0000)]
astobj2: Fix rbtree duplicate handling.
OBJ_PARTIAL_KEY searching a rbtree did not find all possible matches if
the container did not accept duplicates.
Added matching node bias to indicate which matching node is being searched
for: first, last, any.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384616
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 2 Apr 2013 17:35:45 +0000 (17:35 +0000)]
Fixed spurious rebuilds of func_version.
func_version.so was being rebuilt every time, because build.h was
changing every build, because of the cleantest dependency that was
added in r384410 to fix parallel make bugs.
Now build.h will only be created if it does not exist, which was the
original behavior of the Makefile.
........
Merged revisions 384544 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384545 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384546
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 2 Apr 2013 12:18:50 +0000 (12:18 +0000)]
Pass the object type name to the configuration framework.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384518
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 2 Apr 2013 11:40:05 +0000 (11:40 +0000)]
Make things work again
Sorry folks. ',' are still greater than '|'.
Thanks for playing along :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384514
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 1 Apr 2013 20:10:47 +0000 (20:10 +0000)]
install_prereq: Build jansson from source, when necessary
When r383579 was committed, it made Jansson a required dependency.
While libjansson-dev and jansson-devel are available on recent
distros, some older (but still supported) distros don't have
it. There's a pull request[1] to get it into repoforge, but that still
doesn't help everyone. (And helps no one until the pull request is
merged and packages are built).
This patch adds Jansson install from source to the install_unpackaged()
function. There are a few gotcha's, which makes this change not
completely trivial.
* Since Jansson may be installed by a package, don't install from
source if a package installation can be found
* libresample may also be installed via package, so I added a
similar check to that.
* Since Jansson installs into /usr/local, this patch also adds
/usr/local/lib to /etc/ld.so.conf.d so that the library can be
found.
* The alternative was to install into /usr, but then it gets
complicated having to deal with EL's /usr/lib{32,64} shenanigans.
[1]: https://github.com/repoforge/rpms/pull/250
Review: https://reviewboard.asterisk.org/r/2414/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384488
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 1 Apr 2013 14:44:30 +0000 (14:44 +0000)]
Make appropriate items parse using '|' instead of ','
This patch fixes a bug introduced in r76703, wherein Asterisk could only parse
arguments in the so-called 'recommended' way, e.g., NoOp(foo,bar). The proper
syntax of NoOp,foo|bar is now parsed correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384452
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Mon, 1 Apr 2013 14:10:46 +0000 (14:10 +0000)]
Remove silly use of strncmp.
........
Merged revisions 384414 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384416
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 1 Apr 2013 13:37:51 +0000 (13:37 +0000)]
stasis: Fixed message ordering issues when forwarding
This patch fixes an issue of message ordering that occurs when
multiple topics are forwarded to an aggregator topic (such as
ast_channel_topic_all()).
It is (very reasonably) expected that the rules governing message
dispatch order still apply, so long as the messages start from the
same thread, and are received by the same subscription. Because the
existing code had an additional layer of dispatching via the Stasis
thread pool for forwards, those promises couldn't be kept.
Forwarding subscriptions no longer have their own mailbox, and now
dispatch directly from the forwarding topic's stasis_publish()
call. This means that the topic's lock is held for the duration of not
only a message's dispatch, but the dispatch of all the forwards. This
shouldn't be a problem right now, but if an aggregator topic had many
subscribers, it could become a problem. But I figure we can write more
clever code when the time comes, if necessary.
Review: https://reviewboard.asterisk.org/r/2419/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384413
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 1 Apr 2013 13:34:51 +0000 (13:34 +0000)]
Fix parallel make problems.
Occasionally, make -j would fail due to missing includes, or other
unusual errors.
This was due to the 'cleantest' target, which was designed to force a
make clean when some change in the code would cause the typical
depedency checking to fail. Several targets in the main Makefile did
not depend upon cleantest, hence would run in parallel to it. By
adding the dependency, make -j runs happily now.
Review: https://reviewboard.asterisk.org/r/2418/
........
Merged revisions 384410 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384411 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384412
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sat, 30 Mar 2013 05:15:42 +0000 (05:15 +0000)]
Properly format an intmax_t value
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384390
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sat, 30 Mar 2013 05:06:54 +0000 (05:06 +0000)]
Convert TestEvent AMI events over to Stasis Core
This patch migrates the TestEvent AMI events to first be dispatched over the
Stasis-Core message bus. This helps to preserve the ordering of the events
with other events in the AMI system, such as the various channel related
events.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384389
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Fri, 29 Mar 2013 16:37:23 +0000 (16:37 +0000)]
app_voicemail: Add blank argument to externnotify if no context argument
At least one call to run_externnotify provides a NULL context parameter and
because the snprintf statement doesn't account for a NULL context parameter,
it simply writes '(null)' to the arguments string instead. This patch makes
it write two quotes back to back for that argument instead in the event of
a NULL context.
(closes issue ASTERISK-18207)
Reported by: Barry L. Kline
Patches:
modified from patch-
20130306 uploaded by Karsten Wemheuer (License 5930)
........
Merged revisions 384325 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384326 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384327
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 28 Mar 2013 23:59:20 +0000 (23:59 +0000)]
Add uuid wrapper API call ast_uuid_generate_str().
* Updated test_uuid.c to test the new API call.
* Made system use the new API call to eliminate "10's of lines" where
used.
* Fixed untested ast_strdup() return in stasis_subscribe() by eliminating
the need for it. struct stasis_subscription now contains the uniqueid[]
string.
* Fixed some issues in exchangecal_write_event():
Create uid with enough space for a UUID string to avoid a realloc.
Fix off by one error if the calendar event provided a UUID string.
There is no need to check for NULL before calling ast_free().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384302
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Thu, 28 Mar 2013 15:45:18 +0000 (15:45 +0000)]
Break the world. Stasis message type accessors should now all be named correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384261
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 27 Mar 2013 22:42:06 +0000 (22:42 +0000)]
Convert MWI state message type to the new stasis naming convention
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384219
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 27 Mar 2013 21:52:43 +0000 (21:52 +0000)]
Added a doxygen group for Stasis messages and topics
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384201
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 27 Mar 2013 19:52:19 +0000 (19:52 +0000)]
Address uninitialized conditional that valgrind found
........
Merged revisions 384162 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384163 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384164
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 27 Mar 2013 18:52:16 +0000 (18:52 +0000)]
Fix a file descriptor leak in off nominal path
While looking at the security vulnerability in ASTERISK-20967, Walter noticed
a file descriptor leak and some other issues in off nominal code paths. This
patch corrects them.
Note that this patch is not related to the vulnerability in ASTERISK-20967,
but the patch was placed on that issue.
(closes issue ASTERISK-20967)
Reported by: wdoekes
patches:
issueA20967_file_leak_and_unused_wkspace.patch uploaded by wdoekes (License 5674)
........
Merged revisions 384118 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384119 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384120
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 27 Mar 2013 17:07:44 +0000 (17:07 +0000)]
Fix white noise on SRTP decryption
When res_rtp_asterisk.c was altered to avoid attempting to apply
unprotect algorithms to non-audio RTP packets, the test used was
incorrect. This caused the audio packets to not be decrypted and
resulted in loud white noise on the other endpoint (or both endpoints
depending on the call legs involved). The test now properly checks the
version field in the RTP header to ensure that RTP and RTCP are
decrypted while other types of packets are not.
(closes issue ASTERISK-21323)
Reported by: andrea
Tested by: Kinsey Moore, andrea, John Bigelow
Patches:
whitenoise_fix.diff uploaded by Kinsey Moore
........
Merged revisions 384048 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 384049 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384050
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 27 Mar 2013 15:27:31 +0000 (15:27 +0000)]
AST-2013-003: Prevent username disclosure in SIP channel driver
When authenticating a SIP request with alwaysauthreject enabled, allowguest
disabled, and autocreatepeer disabled, Asterisk discloses whether a user
exists for INVITE, SUBSCRIBE, and REGISTER transactions in multiple ways. The
information is disclosed when:
* A "407 Proxy Authentication Required" response is sent instead of a
"401 Unauthorized" response
* The presence or absence of additional tags occurs at the end of "403
Forbidden" (such as "(Bad Auth)")
* A "401 Unauthorized" response is sent instead of "403 Forbidden" response
after a retransmission
* Retransmission are sent when a matching peer did not exist, but not when a
matching peer did exist.
This patch resolves these various vectors by ensuring that the responses sent
in all scenarios is the same, regardless of the presence of a matching peer.
This issue was reported by Walter Doekes, OSSO B.V. A substantial portion of
the testing and the solution to this problem was done by Walter as well - a
huge thanks to his tireless efforts in finding all the ways in which this
setting didn't work, providing automated tests, and working with Kinsey on
getting this fixed.
(closes issue ASTERISK-21013)
Reported by: wdoekes
Tested by: wdoekes, kmoore
patches:
AST-2013-003-1.8 uploaded by kmoore, wdoekes (License 6273, 5674)
AST-2013-003-10 uploaded by kmoore, wdoekes (License 6273, 5674)
AST-2013-003-11 uploaded by kmoore, wdoekes (License 6273, 5674)
........
Merged revisions 384003 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384019
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 27 Mar 2013 14:39:11 +0000 (14:39 +0000)]
AST-2013-002: Prevent denial of service in HTTP server
AST-2012-014, fixed in January of this year, contained a fix for Asterisk's
HTTP server for a remotely-triggered crash. While the fix put in place fixed
the possibility for the crash to be triggered, a denial of service vector still
exists with that solution if an attacker sends one or more HTTP POST requests
with very large Content-Length values. This patch resolves this by capping
the Content-Length at 1024 bytes. Any attempt to send an HTTP POST with
Content-Length greater than this cap will not result in any memory allocation.
The POST will be responded to with an HTTP 413 "Request Entity Too Large"
response.
This issue was reported by Christoph Hebeisen of TELUS Security Labs
(closes issue ASTERISK-20967)
Reported by: Christoph Hebeisen
patches:
AST-2013-002-1.8.diff uploaded by mmichelson (License 5049)
AST-2013-002-10.diff uploaded by mmichelson (License 5049)
AST-2013-002-11.diff uploaded by mmichelson (License 5049)
........
Merged revisions 383978 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383980
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 27 Mar 2013 14:28:36 +0000 (14:28 +0000)]
AST-2013-001: Prevent buffer overflow through H.264 format negotiation
The format attribute resource for H.264 video performs an unsafe read against a
media attribute when parsing the SDP. The value passed in with the format
attribute is not checked for its length when parsed into a fixed length buffer.
This patch resolves the vulnerability by only reading as many characters from
the SDP value as will fit into the buffer.
(closes issue ASTERISK-20901)
Reported by: Ulf Harnhammar
patches:
h264_overflow_security_patch.diff uploaded by jrose (License 6182)
........
Merged revisions 383973 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383975
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Damien Wedhorn [Wed, 27 Mar 2013 07:24:37 +0000 (07:24 +0000)]
Fix skinny encall button to not blind xfer.
The softbutton endcall should not turn a transfer into a blind transfer but
hangup the exten being called and leave the original call on hold. This does
that.
(closes issue ASTERISK-21321)
Reported by: wedhorn
Tested by: snuffy, myself
Patches:
skinny-xferendcall01.diff uploaded by wedhorn (license 5019)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383948
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 26 Mar 2013 23:34:43 +0000 (23:34 +0000)]
Remove the noop handler from sorcery so it does not produce an empty value.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383925
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 26 Mar 2013 02:30:10 +0000 (02:30 +0000)]
Resolve deadlock between SIP registration and channel based functions
In r373424, several reentrancy problems in chan_sip were addressed. As a
result, the SIP channel driver is now properly locking the channel driver
private information in certain operations that it wasn't previously. This
exposed two latent problems either in register_verify or by functions called
by register_verify. This includes:
* Holding the private lock while calling sip_send_mwi_to_peer. This can create
a new sip_pvt via sip_alloc, which will obtain the channel container lock.
This is a locking inversion, as any channel related lock must be obtained
prior to obtaining the SIP channel technology private lock.
Note that this issue was already fixed in Asterisk 11.
* Holding the private lock while calling sip_poke_peer. In the same vein as
sip_send_mwi_to_peer, sip_poke_peer can create a new SIP private, causing
the same locking inversion.
Note that this locking inversion typically occured when CLI commands were run
while a SIP REGISTER request was being processed, as many CLI commands (such
as 'sip show channels', 'core show channels', etc.) have to obtain the channel
container lock.
(issue ASTERISK-21068)
Reported by: Nicolas Bouliane
(issue ASTERISK-20550)
Reported by: David Brillert
(issue ASTERISK-21314)
Reported by: Badalian Vyacheslav
(issue ASTERISK-21296)
Reported by: Gabriel Birke
........
Merged revisions 383863 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 383878 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383879
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 26 Mar 2013 01:58:45 +0000 (01:58 +0000)]
Resolve deadlock between pending CDR and batch CDR locks
r375757 attempted to resolve a race condition between multiple submissions of
CDRs while in batch mode from attempting to destroy the scheduled batch
submission by extending the batch CDR lock. Unfortunately, this causes a
deadlock between the pending CDR lock and the batch CDR lock. This patch
resolves the intent of r375757 by simply providing a new lock that protects
the scheduling of the batches. The original batch CDR lock is kept to protect
manipulation of the batch CDR settings, but has been placed such that it
is not held when the pending lock is held.
Thanks to Chase Venters for providing lock analysis on the issue.
(issue ASTERISK-21162)
Reported by: Chase Venters
........
Merged revisions 383839 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 383840 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383841
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 26 Mar 2013 01:46:39 +0000 (01:46 +0000)]
Suppress compiler warning.
This code caused a compiler warning when --enable-dev-mode was not used.
The warning was that this variable was set but not used. That was indeed
the case as the only place this is used is as an argument to SKINNY_DEBUG
which is compiled out when not in dev mode.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383838
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 26 Mar 2013 01:38:56 +0000 (01:38 +0000)]
Fix multi-station answer race condition.
When an SLA trunk is ringing (inbound call on the trunk) Asterisk will
make outbound calls to the stations that have that trunk. If more than
one station answers the call at the same time, all channels other than
the first one to answer are left in a bad state. The channel gets
leaked, is not connected to anything, and there's no way to get rid of
it.
We now properly clean up these losing channels by hanging up on them.
Since they lost the race, as we process their answer, there is no
ringing trunk for them to answer.
........
Merged revisions 383835 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 383836 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383837
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 25 Mar 2013 23:25:32 +0000 (23:25 +0000)]
Set the CALLERID(dnid-num-plan) for incoming ISDN calls.
The CALLEDTON channel variable is set for incoming ISDN calls to the lower
7 bits of the Q.931 type-of-number/numbering-plan octet. The
CALLERID(dnid-num-plan) should have the same value.
(closes issue ASTERISK-21248)
Reported by: rmudgett
........
Merged revisions 383796 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 383798 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383799
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Mon, 25 Mar 2013 20:15:09 +0000 (20:15 +0000)]
Fix typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383754
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Mon, 25 Mar 2013 20:07:00 +0000 (20:07 +0000)]
Fix missing ' ' around '='
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383753
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 25 Mar 2013 19:28:04 +0000 (19:28 +0000)]
install_prereq: removed some out-of-date comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383747
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 25 Mar 2013 17:12:03 +0000 (17:12 +0000)]
install_prereq: Adding jansson-devel to RH packages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383728
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 25 Mar 2013 16:19:55 +0000 (16:19 +0000)]
Move NewCallerid, HangupRequest and SoftHangupRequest to Stasis
HangupRequest and SoftHangupRequest are now ast_channel_blob Stasis
messages, with the cause code as an optional field in the blob.
NewCallerid now simply watches for changes in the callerid information
in channel snapshots, and creates the AMI event appropriately.
Since the original NewCallerid event honored the channelvars setting
in manager.conf, the channel variables configured there had to become
a part of the channel snapshot. These are now a part of every snapshot
based event, making the configuration description "every time a
channel-oriented event is emitted" less of a lie.
There a a few other changes wrapped up in here as well.
* When ast_channel_topic() is given NULL for a channel, it returns
the ast_channel_topic_all() topic instead of NULL. This can clean
up a lot of NULL checking we're doing currently.
* The fields Cause and Cause-txt were removed from the base channel
information and put only on the Hangup events, since those fields
are meaningless outside of a Hangup event.
* Removed the pipe-delimiter processing of the channelvars field,
since that's been deprecated forever.
(closes issue ASTERISK-21096)
Review: https://reviewboard.asterisk.org/r/2405/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383726
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Sean Bright [Mon, 25 Mar 2013 12:38:15 +0000 (12:38 +0000)]
Properly delimit post data in res_config_curl.
........
Merged revisions 383667 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 383668 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383669
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 22 Mar 2013 20:51:33 +0000 (20:51 +0000)]
Fixed another issue from r383579.
Core modules don't honor <depend> flags in MODULEINFO, which broke jansson
if specified --with-jansson to configure.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383633
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Fri, 22 Mar 2013 20:43:24 +0000 (20:43 +0000)]
Fix StopMixMonitor Hanging Up When Unable To Stop MixMonitor On A Channel
A regression was accidentally introduced when allowing an optional ID to be used
when calling StopMixMonitor. When we are unable to stop MixMonitor on a
channel, -1 is being returned which triggers the hangup of the channel.
This patch restores the prior behavior by returning 0 whether we were successful
or not. It also allows the call from the manager to use the return code when
the action fails.
(closes issue ASTERISK-21294)
Reported by: daroz
Tested by: daroz
Patches:
asterisk-21294-stop_mixmonitor_hangingup.diff Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2404/
........
Merged revisions 383631 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383632
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 22 Mar 2013 19:26:37 +0000 (19:26 +0000)]
Corrected some module issues introduced by r383579.
When I moved res_json.c to json.c, I left the MODULE_INFO stuff in there,
which was interesting if you ran module show. I also forgot to call what
was in module_load() from asterisk main().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383611
65c4cc65-6c06-0410-ace0-
fbb531ad65f3