Richard Mudgett [Wed, 3 Jul 2013 22:05:54 +0000 (22:05 +0000)]
Fix some indentation in stasis_config.c.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393600
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 3 Jul 2013 22:04:08 +0000 (22:04 +0000)]
Fix some bugs in CDRs; add some CLI commands to help debugging
This patch fixes a few minor bugs and one major one: the CDR by bridge
container was less than helpful. The mechanism previously used to try
and find all of the CDRs in a particular bridge ended up missing CDRs,
resulting in incorrect records.
When looking up CDRs in a bridge, we now just bite the bullet and do
a selection across all existing CDRs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393599
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 3 Jul 2013 21:14:03 +0000 (21:14 +0000)]
Let Stasis load itself with default values
While a Stasis configuration file is nice, it shouldn't be mandatory.
We can carry on with default values.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393589
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Wed, 3 Jul 2013 20:41:00 +0000 (20:41 +0000)]
Publish a bridge enter before pulling on a push-and-swap operation.
Prior to this patch, the order of procedures on a bridge push was
* Add new bridge channel to bridge's array.
* Pull the swap channel out of the bridge
* Publish a bridge enter event.
The problem is that when the swap channel was pulled from the bridge,
a bridge leave event would be published. The bridge snapshot
published during the bridge leave showed the new channel that had
been added to the bridge, but there had been no bridge enter event
for that channel.
The fix provided here was to change the order a bit
* Add new bridge channel to bridge's array.
* Publish bridge enter event.
* Pull the swap channel out of the bridge.
This makes it so that the bridge snapshots during the stasis
events are accurate.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393586
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 3 Jul 2013 19:46:50 +0000 (19:46 +0000)]
Fix load errors related to the new ari_model_validators.
The Asterisk strategy of loading modules with RTLD_LAZY to extract metadata
from the module works well enough, until you try to take the address of a
function.
If a module takes the address of a function, that function needs to be
resolved at load time. That kinda defeats RTLD_LAZY.
This patch adds some ari_validator_{id}_fn() wrapper functions for safely
getting the function pointer from a different module.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393576
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 3 Jul 2013 18:24:45 +0000 (18:24 +0000)]
Violating the margins to make menuconfig happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393561
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 3 Jul 2013 17:58:45 +0000 (17:58 +0000)]
ARI - channel recording support
This patch is the first step in adding recording support to the
Asterisk REST Interface.
Recordings are stored in /var/spool/recording. Since recordings may be
destructive (overwriting existing files), the API rejects attempts to
escape the recording directory (avoiding issues if someone attempts to
record to ../../lib/sounds/greeting, for example).
(closes issue ASTERISK-21594)
(closes issue ASTERISK-21581)
Review: https://reviewboard.asterisk.org/r/2612/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393550
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 3 Jul 2013 17:20:43 +0000 (17:20 +0000)]
Configuration for Stasis threadpool
The appropriate settings for the Stasis threadpool is very system
specific, depending upon both workload and system configuration.
This patch adds a stasis.conf file which can be used to configure the
key attributes of the threadpool for the Stasis message bus.
(closes issue ASTERISK-21280)
Review: https://reviewboard.asterisk.org/r/2651/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393542
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 3 Jul 2013 16:33:13 +0000 (16:33 +0000)]
ARI authentication.
This patch adds authentication support to ARI.
Two authentication methods are supported. The first is HTTP Basic
authentication, as specified in RFC 2617[1]. The second is by simply
passing the username and password as an ?api_key query parameter
(which allows swagger-ui[2] to authenticate more easily).
ARI usernames and passwords are configured in the ari.conf file
(formerly known as stasis_http.conf). The user may be set to
`read_only`, which will prohibit the user from issuing POST, DELETE,
etc. Also, the user's password may be specified in either plaintext,
or encrypted using the crypt() function.
Several other notes about the patch.
* A few command line commands for seeing ARI config and status were
also added.
* The configuration parsing grew big enough that I extracted it to
its own file.
[1]: http://www.ietf.org/rfc/rfc2617.txt [2]:
https://github.com/wordnik/swagger-ui
(closes issue ASTERISK-21277)
Review: https://reviewboard.asterisk.org/r/2649/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393530
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 3 Jul 2013 16:32:41 +0000 (16:32 +0000)]
Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:
{ "stasis_start": { "args": [], "channel": { ... } } }
The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.
This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.
[1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ
In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.
The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.
Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.
The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.
* The model for a channel snapshot was trimmed down to match the
information sent via AMI. Many of the field being sent were not
useful in the general case.
* The model for a bridge snapshot was updated to be more consistent
with the other ARI models.
Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.
Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.
(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 3 Jul 2013 16:32:00 +0000 (16:32 +0000)]
Shuffle RESTful URL's around.
This patch moves the RESTful URL's around to more appropriate
locations for release.
The /stasis URL's are moved to /ari, since Asterisk REST Interface was
a more appropriate name than Stasis-HTTP. (Most of the code still has
stasis_http references, but they will be cleaned up after there are no
more outstanding branches that would have merge conflicts with such a
change).
A larger change was moving the ARI events WebSocket off of the shared
/ws URL to its permanent home on /ari/events. The Swagger code
generator was extended to handle "upgrade: websocket" and
"websocketProtocol:" attributes on an operation.
The WebSocket module was modified to better handle WebSocket servers
that have a single registered protocol handler. If a client
connections does not specify the Sec-WebSocket-Protocol header, and
the server has a single protocol handler registered, the WebSocket
server will go ahead and accept the client for that subprotocol.
(closes issue ASTERISK-21857)
Review: https://reviewboard.asterisk.org/r/2621/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393528
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Tue, 2 Jul 2013 22:01:23 +0000 (22:01 +0000)]
Add a SystemName field to all AMI events.
This only gets sent out if configured in asterisk.conf
(closes issue ASTERISK-21494)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393508
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 21:19:21 +0000 (21:19 +0000)]
MixMonitor: Minor code cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393500
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 21:16:25 +0000 (21:16 +0000)]
MixMonitor: Make start_mixmonitor_callback() options parameter NULL tolerant.
* Removed some unnecessary code in start_mixmonitor_callback().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393496
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 21:13:56 +0000 (21:13 +0000)]
MixMonitor: Don't use ast_strdupa() in a loop.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393494
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 21:12:26 +0000 (21:12 +0000)]
MixMonitor: Update XML documentation and CLI "mixmonitor {start|stop|list}" help.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393493
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 21:01:23 +0000 (21:01 +0000)]
MixMonitor: Fix refleak in manager_stop_mixmonitor() if could not stop monitoring.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393490
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 20:56:13 +0000 (20:56 +0000)]
MixMonitor: Remove some unnecessary channel locking.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393489
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 20:45:47 +0000 (20:45 +0000)]
Fix MixMonitor b option.
The option had not been converted to use the replacement for
ast_bridged_channel(). One touch mixmonitor now records files again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393487
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 2 Jul 2013 20:43:10 +0000 (20:43 +0000)]
Fix chan_gtalk.c compile error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393485
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 2 Jul 2013 20:34:42 +0000 (20:34 +0000)]
Add pjproject dependency to res_sip_notify
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393484
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Tue, 2 Jul 2013 18:28:16 +0000 (18:28 +0000)]
Remove unused blind transfer publication structure.
I ended up using a bridge blob, so this structure was
unused. Keeping it in the header would just cause confusion.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393463
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Tue, 2 Jul 2013 17:20:20 +0000 (17:20 +0000)]
Stasis - Refactor AOC Events
Refactored the AMI events in AOC onto Stasis-Core. The ast_aoc_manager_event
function now publishes a channel snapshot, along with a JSON blob describing
the advice of charge. A "to_ami" handler has also been added that converts
the channel snapshot and AOC event data back into the appropriate data structure
for use with AMI.
(closes issue ASTERISK-21472)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2643/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393449
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Tue, 2 Jul 2013 17:06:06 +0000 (17:06 +0000)]
New SIP Channel driver: Always Auth Reject
If no matching endpoint is found for the incoming request Asterisk will respond
with a 401 Unauthorized (rejecting the request), but will first challenge if
no authorization creditials are given.
Changes also included moving ACL options into a new global 'security'
configuration section in res_sip.conf.
(closes issue ASTERISK-21433)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2554/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393442
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 2 Jul 2013 16:11:32 +0000 (16:11 +0000)]
Fix transfer AMI event parameter naming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393429
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 2 Jul 2013 14:01:53 +0000 (14:01 +0000)]
Add CEL unit tests and do some cleanup
This adds several unit tests for CEL functionality and provides the
requisite framework for creating additional unit tests.
This also cleans up some reference leaks that were occurring in
Stasis-Core message callback code.
Review: https://reviewboard.asterisk.org/r/2646/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393410
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Igor Goncharovskiy [Tue, 2 Jul 2013 10:16:27 +0000 (10:16 +0000)]
Fix issue with inability to cancell call transfer made by on-sceen menus.
Reported by: Igor Olhovskiy
........
Merged revisions 393395 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393396
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tzafrir Cohen [Tue, 2 Jul 2013 08:23:16 +0000 (08:23 +0000)]
ast_tls_cert: don't recreate generated files
Don't regenrate cat.cfg, ca.crt and ca.key if they were already created
on a previous run.
(closes issue ASTERISK-21932)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393383
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Mon, 1 Jul 2013 21:28:32 +0000 (21:28 +0000)]
New SIP Channel Driver - Add CLI/AMI initiated NOTIFY requests
Added the ability to send unsolicited NOTIFY requests to a particular endpoint
with a configured payload. Added both CLI and AMI support. For a given
endpoint, this module will iterate over all its contacts sending the appropriate
NOTIFY request to each.
(closes issue ASTERISK-21436)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2623/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393364
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 1 Jul 2013 21:24:20 +0000 (21:24 +0000)]
Prevent crash during synchronous AMI origination by ref bumping returned channel
The originate APIs allow callers to provide a pointer to a channel that will
point to the originated channel if the function call succeeds. This is used by AMI
to provide channel information when the originate is performed synchronously.
Unfortunately, if the originate fails in certain ways, the outbound channel is
already disposed of during the dialing itself. This results in the channel being
improperly dereferenced by the internal originate function in pbx.c.
This patch ref bumps the channel to prevent this from occurring. Callers must now
unlock and unref the channel (which is more in line with general channel management
guidelines anyway).
This only affects manager, as it is the only consumer of this API function that
actually passes in a channel pointer.
Review: https://reviewboard.asterisk.org/r/2617/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393361
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Mon, 1 Jul 2013 18:56:21 +0000 (18:56 +0000)]
ARI: Implement channel hold/unhold.
This puts the channel on hold (rather than queueing a frame from the channel).
(closes issue ASTERISK-21619)
Review: https://reviewboard.asterisk.org/r/2647/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393332
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Mon, 1 Jul 2013 18:19:15 +0000 (18:19 +0000)]
ARI: Implement channel dial.
This creates a new outbound channel, and bridges it to a channel already in
the Stasis application.
(closes issue ASTERISK-21620)
Review: https://reviewboard.asterisk.org/r/2634/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393326
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Mon, 1 Jul 2013 16:01:24 +0000 (16:01 +0000)]
bridge_features: Support One touch Monitor/MixMonitor
In addition to porting those features, they now enjoy greater feature parity
with one another. Specifically, AutoMixMon now has a start and stop
message that can be specified with TOUCH_MIXMONITOR_MESSAGE_START and
TOUCH_MIXMONITOR_MESSAGE_STOP.
(closes issue ASTERISK-21553)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2620/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393309
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Mon, 1 Jul 2013 13:16:09 +0000 (13:16 +0000)]
Refactor extraneous channel events
This change removes JitterBufStats, ChannelReload, and ChannelUpdate
and refactors the following events to travel over Stasis-Core:
* LocalBridge
* DAHDIChannel
* AlarmClear
* SpanAlarmClear
* Alarm
* SpanAlarm
* DNDState
* MCID
* SIPQualifyPeerDone
* SessionTimeout
Review: https://reviewboard.asterisk.org/r/2627/
(closes issue ASTERISK-21476)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 29 Jun 2013 13:47:22 +0000 (13:47 +0000)]
Nothing to see here, move along.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393264
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 29 Jun 2013 13:42:19 +0000 (13:42 +0000)]
Implement the defined PUBLISH ESC API within res_sip_pubsub.
(closes issue ASTERISK-21452)
Review: https://reviewboard.asterisk.org/r/2630/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393262
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Sat, 29 Jun 2013 00:31:00 +0000 (00:31 +0000)]
Tweak after bridge callback reason to string strings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393241
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Sat, 29 Jun 2013 00:26:07 +0000 (00:26 +0000)]
Fix after bridge callback datastore data memory leak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393240
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Sat, 29 Jun 2013 00:18:57 +0000 (00:18 +0000)]
This is no longer needed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393239
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 28 Jun 2013 20:43:48 +0000 (20:43 +0000)]
Promote local channel optimizing debug messages to verbose 3 messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393219
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Fri, 28 Jun 2013 19:22:16 +0000 (19:22 +0000)]
res_parking: Dynamic Parking Lots
(closes issue ASTERISK-21644)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2615/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393197
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Fri, 28 Jun 2013 19:19:15 +0000 (19:19 +0000)]
features: call pickup stasis refactoring
(issue ASTERISK-21544)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2588/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393190
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 28 Jun 2013 19:05:52 +0000 (19:05 +0000)]
Fix overlapping enum ast_bridge_feature_flags.
Things may no longer behave in an unexpected fashion. Local channel
optimization to holding bridges will work again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393184
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Fri, 28 Jun 2013 18:42:24 +0000 (18:42 +0000)]
Add stasis publications for blind and attended transfers.
This creates stasis messages that are sent during a blind or
attended transfer. The stasis messages also are converted to
AMI events.
Review: https://reviewboard.asterisk.org/r/2619
(closes issue ASTERISK-21337)
Reported by Matt Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393182
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 28 Jun 2013 17:31:33 +0000 (17:31 +0000)]
Handle an originated channel being sent into a non-empty bridge
Originated channels are a bit odd - they are technically a dialed channel (thus
the party B or peer) but, since there is no caller, they are treated as the
party A. When entering into a bridge that already contains participants, the CDR
engine - if the CDR record is in the Dial state - attempts to match the person
entering the bridge with an existing participant. The idea is that if you dialed
someone and the person you dialed is already in the bridge, you don't need a new
CDR record, the existing CDR record describes the relationship.
Unfortunately, for an originated channel, there is no Party B. If no one was in
the bridge this didn't cause any issues; however, if participants were in the
bridge the CDR engine would attempt to match a non-existant Party B on the
channel's CDR record and explode.
This patch fixes that, and a unit test has been added to cover this case.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393164
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Fri, 28 Jun 2013 16:23:24 +0000 (16:23 +0000)]
Change ARI originate to also allow dialing an exten/context/priority.
The old way didn't make much sense, so some of the fields were repurposed.
(closes issue ASTERISK-21658)
Review: https://reviewboard.asterisk.org/r/2626/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393144
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 28 Jun 2013 15:50:56 +0000 (15:50 +0000)]
Better handle parking in CDRs
Parking typically occurs when a channel is transferred to a parking extension.
When this occurs, the channel never actually hits the dialplan if the extension
it was transferred to was a "parking extension", that is, the extension in
the first priority calls the Park application. Instead, the channel is
immediately sent into the holding bridge acting as the parking bridge.
This is problematic.
Because we never go out to the dialplan, the CDRs won't transition properly
and the application field will not be set to "Park". CDRs typically swallow
holding bridges, so the CDR itself won't even be generated.
This patch handles this by pulling out the holding bridge handling into its
own CDR state. CDRs now have an explicit parking state that accounts for this
specific subclass of the holding bridge. In addition, we handle the parking
stasis message to set application specific data on the CDR such that the
last known application for the CDR properly reflects "Park".
This is a bit sad since we're working around the odd internal implementation
of parking that exists in Asterisk (and that we had to maintain in order to
continue to meet some odd use cases of parking), but at least the code to
handle that is where it belongs: in CDRs as opposed to sprinkled liberally
throughout the codebase.
This patch also properly clears the OUTBOUND channel flag from a channel when
it leaves a bridge, and tweaks up dialing handling to properly compare the
correct CDR with the channel calling/being dialed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393130
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Fri, 28 Jun 2013 15:36:49 +0000 (15:36 +0000)]
Change some 500 errors to 400.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393128
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 28 Jun 2013 02:14:27 +0000 (02:14 +0000)]
Removed stray apostrophe.
Apparently the pluralization of an acronym does not use an apostophe,
according to most modern style guides. I feel like I've been living a
lie this whole time.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393100
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 28 Jun 2013 01:07:32 +0000 (01:07 +0000)]
Removed the automatic 302 redirects for ARI URL's that end with a slash.
There were some problems redirecting RESTful API requests; notably the client
would change the request method to GET on the redirected requests. After some
looking into, I decided that a 404 would be simpler and have more consistent
behavior.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393083
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 27 Jun 2013 21:01:04 +0000 (21:01 +0000)]
Change the name of some local variables in bridging.c to reflect what they really mean.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393066
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 27 Jun 2013 02:55:16 +0000 (02:55 +0000)]
Add config framework non-empty string validation requirement option.
Add config framework OPT_CHAR_ARRAY_T and OPT_STRINGFIELD_T non-empty
requirement option. There are cases were you don't want a config option
string to be empty. To require the option string to be non-empty, just
set the aco_option_register() flags parameter to non-zero.
* Updated some config framework enum aco_option_type comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393034
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 26 Jun 2013 20:59:14 +0000 (20:59 +0000)]
func_channel: Read/Write after_bridge_goto option
Allows reading and setting of a channel's after_bridge_goto datastore
(closes issue ASTERISK-21875)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2628/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393005
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Wed, 26 Jun 2013 19:29:57 +0000 (19:29 +0000)]
ARI: Add support for continuing to a different location in dialplan.
This allows going elsewhere in the dialplan, so that the location can be
specified after exiting the Stasis application.
(closes issue ASTERISK-21870)
Review: https://reviewboard.asterisk.org/r/2644/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392987
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 26 Jun 2013 19:15:23 +0000 (19:15 +0000)]
Remove some redundant parking config error messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392972
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 26 Jun 2013 14:38:57 +0000 (14:38 +0000)]
Fix several problems with ast_bridge_add_channel().
* Fix locking problems. ast_bridge_move() locks two bridges. To do that,
deadlock avoidance must be done. Called bridge_move_locked() instead.
* Fix inconsistency in the bridge dissolve check callers. The original
caller has already removed the channel from the bridge. The new caller
has not removed the channel from the bridge. Reverted
bridge_dissolve_check() and added bridge_dissolve_check_stolen() to be
used by the new caller on the original bridge after the channel is moved
to the new bridge.
* Fix memory leak of features if the added channel was already in a
bridge.
* Fix incorrect call to ast_bridge_impart().
* Renamed bridge_chan to yanked_chan.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392953
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 26 Jun 2013 01:46:30 +0000 (01:46 +0000)]
Fix incorrect calls to ast_bridge_impart().
There was a misunderstanding about ast_bridge_impart()'s handling of the
imparted channel's reference. The channel reference is passed by the
caller unless ast_bridge_impart() returns an error.
* Fixed a memory leak in conf_announce_channel_push() if the impart
failed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392934
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 26 Jun 2013 01:39:04 +0000 (01:39 +0000)]
AMI Bridge action: Get channel xfer config after we have found the second channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392933
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Tue, 25 Jun 2013 22:28:22 +0000 (22:28 +0000)]
res_parking: Add Parking manager action to the new parking system
(closes issue ASTERISK-21641)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2573/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392915
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Tue, 25 Jun 2013 20:25:55 +0000 (20:25 +0000)]
Fix typo with XML docs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392898
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 25 Jun 2013 19:22:13 +0000 (19:22 +0000)]
Add a note about being ready to accept observer invocations before adding an observer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392879
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 25 Jun 2013 19:10:14 +0000 (19:10 +0000)]
Move where the sorcery observer is added for qualify to guarantee the sched_qualifies container exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392864
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 25 Jun 2013 13:03:17 +0000 (13:03 +0000)]
CEL refactoring cleanup
This change removes AST_CEL_BRIDGE_UPDATE since it should no longer be
used because masquerade situations are now accounted for in other ways.
This also refactors usage of AST_CEL_FORWARD to be produced by a Dial
message which has been extended with a "forward" field.
(closes issue ASTERISK-21566)
Review: https://reviewboard.asterisk.org/r/2635/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392829
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 25 Jun 2013 01:12:58 +0000 (01:12 +0000)]
Fix memory/ref counting leaks in a variety of locations
This patch fixes the following memory leaks:
* http.c: The structure containing the addresses to bind to was not being
deallocated when no longer used
* named_acl.c: The global configuration information was not disposed of
* config_options.c: An invalid read was occurring for certain option types.
* res_calendar.c: The loaded calendars on module unload were not being
properly disposed of.
* chan_motif.c: The format capabilities needed to be disposed of on module
unload. In addition, this now specifies the default options for the
maxpayloads and maxicecandidates in such a way that it doesn't cause the
invalid read in config_options.c to occur.
(issue ASTERISK-21906)
Reported by: John Hardin
patches:
http.patch uploaded by jhardin (license 6512)
named_acl.patch uploaded by jhardin (license 6512)
config_options.patch uploaded by jhardin (license 6512)
res_calendar.patch uploaded by jhardin (license 6512)
chan_motif.patch uploaded by jhardin (license 6512)
........
Merged revisions 392810 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392812
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 24 Jun 2013 23:56:54 +0000 (23:56 +0000)]
Fix a variety of memory leaks
This patch addresses the following memory/ref counting leaks:
* main/devicestate.c - unsubscribe and join our devicestate message
subscription
* main/cel.c - clean up the datastore and config objects on exist
* main/parking.c - cleanup memory leak of retriever snapshot on message
payload destruction
* res/parking/parking_bridge.c - cleanup memory leak of retrieve snapshot
on message payload destruction
* main/presencestate.c - unsubscribe and join the caching topic on exit
* manager.c - properly unregister the manager action "BlindTransfer"
* sorcery.c - shutdown the threadpool on exit and dispose of any wizards
(issue ASTERISK-21906)
Reported by: John Hardin
patches:
cel.patch uploaded by jhardin (license #6512)
devicestate.patch uploaded by jhardin (license #6512)
manager.patch uploaded by jardin (license #6512)
presencestate.patch uploaded by jhardin (license #6512)
retriever-channel-snapshot.patch uploaded by jhardin (license #6512)
sorcery.patch uploaded by jhardin (license #6512)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392797
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 24 Jun 2013 22:05:28 +0000 (22:05 +0000)]
Few more menuselect fixes missed in r392777
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392779
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 24 Jun 2013 21:48:39 +0000 (21:48 +0000)]
Fixed templates so that the changes from r392777 won't be overwritten the next
time we run the generators.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392778
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 24 Jun 2013 21:40:52 +0000 (21:40 +0000)]
Fix menuselect display for stasis modules.
The menuselect parser is very simple. It looks for AST_MODULE_INFO and
uses any quoted string on that line as the module summary display.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392777
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Mon, 24 Jun 2013 19:28:51 +0000 (19:28 +0000)]
Remove stray properties from merge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392747
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Mon, 24 Jun 2013 18:33:13 +0000 (18:33 +0000)]
Add documentation for features configuration.
Review: https://reviewboard.asterisk.org/r/2616
(closes issue ASTERISK-21542)
Reported by Matt Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392729
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Mon, 24 Jun 2013 13:49:20 +0000 (13:49 +0000)]
Index installed sounds and implement ARI sounds queries
This adds support for stasis/sounds and stasis/sounds/{ID} queries via
the Asterisk RESTful Interface (ARI, formerly Stasis-HTTP).
The following changes have been made to accomplish this:
* A modular indexer was created for local media.
* A new function to get an ast_format associated with a file extension
was added.
* Modifications were made to the built-in HTTP server so that URI
decoding could be deferred to the URI handler when necessary.
* The Stasis-HTTP sounds JSON documentation was modified to handle
cases where multiple languages are installed in different formats.
* Register and Unregister events for formats were added to the system
topic.
(closes issue ASTERISK-21584)
(closes issue ASTERISK-21585)
Review: https://reviewboard.asterisk.org/r/2507/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392700
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 23 Jun 2013 19:19:30 +0000 (19:19 +0000)]
Properly pack the parameters into ast_json_pack when sending a send fax message
This patch properly packs the parameters into the send fax message so that it
actually work.
Missing a ',' between two string fields can be difficult to debug, particularly
when the actual packing succeeds. Interestingly enough, this didn't actually
crash until the JSON blob we deref'd and disposed of. Since that happened in
a different thread, it was pretty tough to track down.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392676
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sun, 23 Jun 2013 18:59:36 +0000 (18:59 +0000)]
Add some more missing ast_sorcery_generic_alloc conversions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392667
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sun, 23 Jun 2013 13:24:18 +0000 (13:24 +0000)]
Add missing ast_sorcery_generic_alloc conversions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392647
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sun, 23 Jun 2013 00:02:01 +0000 (00:02 +0000)]
Fix a bug where messages were getting duplicated on AMI.
This was caused by forwarding all endpoint messages to manager which includes
channel messages that are related to the endpoint. This change causes only
the PeerStatus messages to be forwarded to manager thus eliminating the
duplicate channel messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392627
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sat, 22 Jun 2013 22:42:34 +0000 (22:42 +0000)]
Properly extract channel variables for the SendFAX/ReceiveFAX Stasis messages
By the time something extracts the pointers from ast_json_pack, the channels
will already be disposed of. This patch properly pulls the information out of
the variables and packs them into the JSON blob.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392607
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 22 Jun 2013 14:26:25 +0000 (14:26 +0000)]
Make sorcery details opaque and add extended fields.
Sorcery specific object information is now opaque and allocated with the object.
This means that modules do not need to be recompiled if the sorcery specific part
is changed. It also means that sorcery can store additional information on objects
and ensure it is freed or the reference count decreased when the object goes away.
To facilitate the above a generic sorcery allocator function has been added which
also ensures that allocated objects do not have a lock.
Extended fields have been added thanks to all of the above which allows specific fields
to be marked as extended, and thus simply stored as-is within the object. Type safety
is *NOT* enforced on these fields. A consumer of them has to query and ultimately perform
their own safety check. What does this mean? Extra modules can extend already defined
structures without having to modify them.
Tests have also been included to verify extended field functionality.
Review: https://reviewboard.asterisk.org/r/2585/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392586
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 22 Jun 2013 14:03:22 +0000 (14:03 +0000)]
Merge in current pimp_my_sip work, including:
1. Security events
2. Websocket support
3. Diversion header + redirecting support
4. An anonymous endpoint identifier
5. Inbound extension state subscription support
6. PIDF notify generation
7. One touch recording support (special thanks Sean Bright!)
8. Blind and attended transfer support
9. Automatic inbound registration expiration
10. SRTP support
11. Media offer control dialplan function
12. Connected line support
13. SendText() support
14. Qualify support
15. Inband DTMF detection
16. Call and pickup groups
17. Messaging support
Thanks everyone!
Side note: I'm reminded of the song "How Far We've Come" by Matchbox Twenty.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392565
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sat, 22 Jun 2013 13:58:07 +0000 (13:58 +0000)]
Fix a deadlock and possible crash in res_fax
This patch fixes two bugs.
(1) It unlocks the channel in the framehook handlers before attempting to grab
the peer from the bridge. The locking order for the bridging framework is
bridge first, then channel - having the channel locked while attempting to
obtain the bridge lock causes a locking inversion and a deadlock. This
patch bumps the channel ref count prior to releasing the lock in the
framehook to avoid lifetime issues.
Note that this does expose a subtle problem in framehooks; that is,
something could modify the framehook list while we are executing, causing
issues in the framehook list traversal that the callback executes in.
Fixing this is a much larger problem that is beyond the scope of this
patch - (a) we already unlock the channel in this particular framehook
and we haven't run into a problem yet (as modifying the framehook list
when a channel is about to perform a fax gateway would be a very odd
operation) and (b) migrating to an ao2 container of framehooks would be
more invasive at this point. See the referenced ASTERISK issue for more
information.
(2) Directly packing channel variables into a JSON object turned out to be
unsafe. A condition existed where the strings in the JSON blob were no
longer safe to be accessed if the channel object itself was disposed of.
(issue ASTERISK-21951)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392564
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 22 Jun 2013 12:40:16 +0000 (12:40 +0000)]
Migrate PeerStatus events to stasis, add stasis endpoints, and add chan_pjsip device state.
(closes issue ASTERISK-21489)
(closes issue ASTERISK-21503)
Review: https://reviewboard.asterisk.org/r/2601/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392538
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 21 Jun 2013 22:39:27 +0000 (22:39 +0000)]
Extract a useful routine from the softmix bridge technology.
* Extract a useful routine from the softmix bridge technology for other
technologies. Make other technologies use it if they can.
* Made native and 1-1 bridges write to all parties if the bridge channel
writing the frame into the bridge is NULL. Softmix will also do the same
for frame types that make sense.
* Tweak the bridge write routine return value meaning and adjust the
bridge technologies to match.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392514
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 21 Jun 2013 21:22:07 +0000 (21:22 +0000)]
Add BUGBUG for broken direct media in chan_gulp
(issue ASTERISK-21947)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392489
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Fri, 21 Jun 2013 18:54:49 +0000 (18:54 +0000)]
Fix typo.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392464
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 21 Jun 2013 18:10:28 +0000 (18:10 +0000)]
Add channel optimization interaction with frame hooks BUGBUG comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392437
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Fri, 21 Jun 2013 18:05:56 +0000 (18:05 +0000)]
Change chan_unistim to use core transfer API.
Review: https://reviewboard.asterisk.org/r/2553
(closes issue ASTERISK-21527)
Reported by Matt Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392436
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 21 Jun 2013 17:48:14 +0000 (17:48 +0000)]
Change several bridge functions to return error status.
The bridge frame queue functions need to return an error status if the
frame failed to be queued because of an error condition. The main calls
that needed to return the status are:
ast_bridge_channel_queue_action_data() and
ast_bridge_channel_write_action_data(). The other return changes are
ripple effects.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392435
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 21 Jun 2013 14:21:16 +0000 (14:21 +0000)]
Update autosupport script
This patch updates the autosupport script to collect all information available
to the Asterisk CLI command "digium_phones". It also makes minor improvements
in options handling.
(closes issue AST-1163)
Reported by: Trey Blancher
patches:
390347_autosupport.diff uploaded by tblancher (License 5821)
390348_autosupport.diff uploaded by tblancher (License 5821)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392409
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Thu, 20 Jun 2013 21:13:17 +0000 (21:13 +0000)]
Add a log message for when an incoming session is rejected due to the extension not being found.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392364
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 20 Jun 2013 17:21:40 +0000 (17:21 +0000)]
Fix potential bridge hook resource leak if the hook install fails.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392335
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 20 Jun 2013 16:29:35 +0000 (16:29 +0000)]
Fix threadpool rapid growth problem.
When a threadpool is set to autoincrement its threadcount, an issue
may arise when multiple tasks are queued at once into the threadpool. Since
threads start active, each new task would result in autoincrementing the
thread count. So if all threads were active, and a thread's autoincrement
value were 5, then 3 new tasks would result in 15 threads being created even
though the initial autoincrement was sufficient to handle the number of tasks.
This change introduces three behavior changes:
1) New threads in the threadpool start idle instead of active.
2) When a threadpool autoincrements, one thread is activated after the growth.
3) When a threadpool's size is incremented manually, all added threads are activated.
For a more detailed explanation about the changes, please see the Review Board link
at the bottom of this commit.
Review: https://reviewboard.asterisk.org/r/2629
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392318
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Wed, 19 Jun 2013 22:52:23 +0000 (22:52 +0000)]
Fix build problem on OS X Mountain Lion (10.8)
For about forever, our build flags for OS X have been slightly off, but
good enough to build and run. Apparently they aren't good enough any more.
Previously, we would compile with macosx-version-min unset and link with
it set. This combination, using GCC 4.8, on Mountain Lion, would create a
bad executable ("Illegal Instruction: 4", or something like that)
This patch consistently sets macosx-version-min for both compiling and
linking, which makes everything happy enough to build and run.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392279
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 19 Jun 2013 12:55:34 +0000 (12:55 +0000)]
Pull CEL linkedid manipulation into cel.c
This finishes moving all CEL linkedid tracking entirely within cel.c
since that is now possible with channel snapshots.
This also removes another CEL linkedid manipulation function from cel.h
that has already been internalized and is neither called nor available
to link against.
Review: https://reviewboard.asterisk.org/r/2632/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392241
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 19 Jun 2013 01:28:40 +0000 (01:28 +0000)]
Handle variable substitution in dummy variables
When func_cdr is used for variable substitution, there is no channel name
and hence no run-time information available for CDR variable substitution.
In that case, the correct thing to do is to use the CDR object on the channel
passed to the function. This patch checks to see if the channel passed in
has a name - if not, it uses ast_cdr_format_var instead of ast_cdr_get_var.
This allows CDR backends to continue to use variable substitution in order to
resolve ast_cdr object properties.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392214
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 18 Jun 2013 22:37:09 +0000 (22:37 +0000)]
Fix the test_substitution test
In r391947, the CDR function was modified such that it will return a
value for the start,answer, and end times if asked. That time will just
be 0 if it hasn't happened yet.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392190
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 18 Jun 2013 19:31:31 +0000 (19:31 +0000)]
Bridging: Fix crash on destruction of a partially constructed bridge.
* Promoted some bridge construction debug messages to warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392166
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 18 Jun 2013 16:09:15 +0000 (16:09 +0000)]
Add some safety cleanup for a failed push into a bridge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392140
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 18 Jun 2013 16:05:24 +0000 (16:05 +0000)]
Remove stub comment on function that is not a stub.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392139
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 18 Jun 2013 14:30:06 +0000 (14:30 +0000)]
Fix bridge snapshot conversion to JSON
This makes ast_bridge_snapshot_to_json conform to the swagger Bridge
model by adding the two fields it required.
Review: https://reviewboard.asterisk.org/r/2583/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392116
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 17 Jun 2013 18:58:56 +0000 (18:58 +0000)]
Fix build warnings related to printf/scanf of tv_usec.
The type of tv_usec is suseconds_t. On Linux, this is usually a long int, but
the specification is actually pretty lax on what it might actually be. And,
sadly, there's no printf/scanf width specifier for suseconds_t. So it could
bit an int or a long, but there's not a great way to tell which it is.
This patch fixes scanf by reading into a long temporary variable that's then
stored into the tv_usec. It fixes printf by casting the tv_usec to a long
first.
This patch also adds some missing width specifiers for some debug statements,
which would cause ".000001" to be displayed at ".1".
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392076
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 17 Jun 2013 18:37:27 +0000 (18:37 +0000)]
chan_vpb: Fix compile error and __ast_channel_alloc() prototype const inconsistency.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392073
65c4cc65-6c06-0410-ace0-
fbb531ad65f3