Commit Graph

24296 Commits

Author SHA1 Message Date
Matthew Jordan 3a2a12ca1a Tweak debug statements
This patch does two things:
1. It moves the debug statement that shows the HTTP sub-protocols being
   compared after the string length calculation such that it shows the correct
   string length in the output
2. It adds some additional debug that displays when it matches on a
   sub-protocol and when it fails



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 14:50:56 +00:00
David M. Lee de68dabb97 Fix caching topic shutdown assertions
The recent changes to update stasis_cache_topics directly from the
publisher thread uncovered a race condition, which was causing asserts
in the /stasis/core tests.

If the caching topic's subscription is the last reference to the
caching topic, it will destroy the caching topic after the final
message has been processed. When dispatching to a different thread,
this usually gave the unsubscribe enough time to finish before
destruction happened. Now, however, it consistently destroys before
unsubscription is complete.

This patch adds an extra reference to the caching topic, to hold it
for the duration of the unsubscription.

This patch also removes an extra unref that was happening when the
final message was received by the caching topic. It was put there
because of an extra ref that was put into the caching topic's
constructor. Both have been removed, which makes the destructor a bit
less confusing.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 14:08:21 +00:00
Michael L. Young 6d9909887e Properly indicate failure to open an audio stream in res_agi
If there is an error streaming an audio file, the current return status makes it
difficult for an AGI script to determine that there was an error with the audio
file.

This patches changes the result to return -1 and the function returns
RESULT_FAILURE instead of RESULT_SUCCESS.  From looking at other parts of
res_agi, this would appear to be the proper way to handle an error.

(closes issue ASTERISK-21903)
Reported by: Ariel Wainer
Tested by: Ariel Wainer
Patches:
	asterisk-21903-return-stream-res_1.8.diff
					by Michael L. Young (license 5026)

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

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

Merged revisions 394641 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 12:54:50 +00:00
Richard Mudgett 40ce5e0d18 Change ast_hangup() to return void and be NULL safe.
Since ast_hangup() is effectively a channel destructor, it should be a
void function.

* Make the few silly callers checking the return value no longer do so.
Only the CDR and CEL unit tests checked the return value.

* Make all callers take advantage of the NULL safe change and remove the
NULL check before the call.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 22:30:28 +00:00
Richard Mudgett da1902cdc0 Remove some completed and no longer relevant BUGBUG notes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 19:27:26 +00:00
Jonathan Rose 4f29b97020 app_confbridge: Eliminate a reference leak for confbridge announcer channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 18:26:19 +00:00
Tzafrir Cohen 109f527eb9 Left over spacing issues of review 726.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 17:49:54 +00:00
Tzafrir Cohen b10bb8fa7b handle DAHDI_EVENT_REMOVED on a pri D-Channel
When a DAHDI device is removed at run-time it sends the event
DAHDI_EVENT_REMOVED on each channel. This is intended to signal the
userspace program to close the respective file handle, as the driver of
the device will need all of them closed to properly clean-up.

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

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

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

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 16:56:14 +00:00
Matthew Jordan 19d8f8c8e4 Add 'kick all' capability to ConfBridge CLI command
This patch adds the ability to kick all users out of a conference from the
ConfBridge kick CLI command. It is invoked by passing 'all' as the channel
parameter to the CLI command, i.e., "confbridge kick <conf> all".

Note that this patch was modified slightly to conform to trunk.

(closes issue ASTERISK-21827)
Reported by: dorianlogan
patches:
  kickall-patch_v2.diff uploaded by dorianlogan (License 6504)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 22:33:27 +00:00
Matthew Jordan 1623347817 Re-order handlers in CEL to ensure that HANGUP events happen after APP_END
When a channel is hungup, both an APP_END event and a HANGUP event can be
fired. To ensure that HANGUP events occur after APP_END events, the method
callbacks for the APP_END event should be processed prior to the callbacks
for the HANGUP event.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 22:25:33 +00:00
David M. Lee e1b75afdb8 Debug logging to help with WebSocket connection problems
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 21:44:12 +00:00
Richard Mudgett 3f9be54d91 chan_gulp: Fix gulp_indicate() handling of AST_CONTROL_PVT_CAUSE_CODE.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 20:00:25 +00:00
Mark Michelson 6bdd453168 Prevent crash from trying to end a session in an invalid way.
This ensures that code that was only meant to be run on a reinvite failure
only runs on a reinvite failure.

(closes issue ASTERISK-22061)
reported by Rusty Newton



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 19:13:04 +00:00
Richard Mudgett 6ba25dd3f2 Remove some dead code dealing with old bridging method.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 18:49:26 +00:00
Richard Mudgett 9732112261 Simplify bridge_simple chan join code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 18:48:49 +00:00
Matthew Jordan 957f863dba Re-order cleanup
This patch attempts to fix some possible race conditions in shutdown of the
CDR engine. It:
* Adds a cleanup handler to only unsubscribe and join on stasis messages during
  graceful shutdown. The cleanup handler should execute before the regular atexit
  handler, as we want to unsubscribe for any further messages before dispatching
  the CDRs.
* The CDRs are now locked when we dispatch them on shutdown.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 18:22:07 +00:00
David M. Lee 80dd0229f1 Fixed null dereference when WebSocket protocol is omitted
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 15:30:09 +00:00
Richard Mudgett d43b17a872 Replace chan_agent with app_agent_pool.
The ill conceived chan_agent is no more.  It is now replaced by
app_agent_pool.

Agents login using the AgentLogin() application as before.  The
AgentLogin() application no longer does any authentication.
Authentication is now the responsibility of the dialplan.  (Besides, the
authentication done by chan_agent did not match what the voice prompts
asked for.)

Sample extensions.conf
[login]
; Sample agent 1001 login
; Set COLP for in between calls so the agent does not see the last caller COLP.
exten => 1001,1,Set(CONNECTEDLINE(all)="Agent Waiting" <1001>)
; Give the agent DTMF transfer and disconnect features when connected to a caller.
same => n,Set(CHANNEL(dtmf-features)=TX)
same => n,AgentLogin(1001)
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Hangup()

[caller]
; Sample caller direct connect to agent 1001
exten => 800,1,AgentRequest(1001)
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Hangup()

; Sample caller going through a Queue to agent 1001
exten => 900,1,Queue(agent_q)
same => n,Hangup()

Sample queues.conf
[agent_q]
member => Local/800@caller,,SuperAgent,Agent:1001

Under the hood operation overview:
1) Logged in agents wait for callers in an agents holding bridge.
2) Caller requests an agent using AgentRequest()
3) A basic bridge is created, the agent is notified, and caller joins the
   basic bridge to wait for the agent.
4) The agent is either automatically connected to the caller or must ack
   the call to connect.
5) The agent is moved from the agents holding bridge to the basic bridge.
6) The agent and caller talk.
7) The connection is ended by either party.
8) The agent goes back to the agents holding bridge.

To avoid some locking issues with the agent holding bridge, I needed to
make some changes to the after bridge callback support.  The after bridge
callback is now a list of requested callbacks with the last to be added
the only active callback.  The after bridge callback for failed callbacks
will always happen in the channel thread when the channel leaves the
bridging system or is destroyed.

(closes issue ASTERISK-21554)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-15 23:20:55 +00:00
Mark Michelson d43bbfb74e Remove misleading documentation for channel snapshot creation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-15 22:05:57 +00:00
David M. Lee de31a362db Document the ari.conf allowed_origins setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-15 21:22:12 +00:00
Joshua Colp b75b88e8f7 Remove some callbacks and functions which are not needed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-15 13:43:37 +00:00
Matthew Jordan f54b1f2788 Provide error message for QUEUE_MEMBER when member is not in queue
When QUEUE_MEMBER is used and the member specified is not in the queue,
Asterisk provides an ERROR message that indicates that the option specified
is not valid. This patch now properly displays an ERROR message that the
member is not in the queue if an interface is specified.

(closes issue ASTERISK-21980)
Reported by: Avraam David
........

Merged revisions 394345 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-14 02:41:43 +00:00
Matthew Jordan 583226dc5e Remove redundant code in dns.c
Peter J Philipp pointed out that there are two checks that ensure that len is
not less than 0. If len is less than 0, the function returns. Having both of
them is clearly redundant.

This removes the second and attempts to clarify (slightly) the error condition.

(closes issue ASTERISK-21772)
Reported by: Peter J Philipp


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-14 02:05:04 +00:00
Matthew Jordan a3592db1fb Clarify documentation for function PASSTHRU
It is not apparent to the average user that the PASSTHRU function should not
be passed as ${PASSTHRU(string)} but just as PASSTHRU(string) to functions
which take a variable name and not its contents.

This patch clarifies the behavior in the documentation and provides an example.

(closes issue ASTERISK-21717)
Reported by: Richard Miller
patches:
  func_strings.diff uploaded by Richard Miller (license 5685)
........

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

Merged revisions 394303 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-14 02:00:02 +00:00
Matthew Jordan 70decd0abe Fix FRACK message from external redirects; handle outbound channels better
This patch does the following:
 * It simplifies the Dial handling in CDRs. As a rule, the caller in a dial
   relationship is always the Party A. There was some logic present in the
   handling of the dial message that could, conceivably, pick the caller
   as Party A for the beginning of the dial and the peer as Party A for the
   end of the dial. This shouldn't have happened if the code in the bridging
   framework was doing its job; however, that was broken and it led to the
   FRACK. As it is, this code was overly ocmplex and not needed: the caller,
   if present, should always be Party A. Period.
 * It properly checks to see if a channel will continue on in the dialplan.
   ast_check_hangup - much like cake at the end - is a lie. It will tell
   you that you are hungup when you are not. Do not believe it.

   I would make this function tell the truth, but I'm nervous that we've been
   depending on it sitting on its throne of lies for far too long, and it would
   probably break lots of things. So I'm just checking the "internal" soft
   hangup flags, like everyone else.

(closes issue ASTERISK-22060)
Reported by: Mark Michelson

(issue ASTERISK-21831)
Reported by: Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-13 23:28:23 +00:00
Matthew Jordan c3c0315693 Pretty up a debug message if the referred-by-uri isn't available
Instead of formatting a NULL pointer into a "%s" format string (which is
usually not a good thing to do), we instead print "Unknown".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-13 22:14:04 +00:00
Moises Silva d92b2f3754 Fix a longstanding issue with MFC-R2 configuration that prevented users
from mixing different variants or general MFC-R2 settings within the same E1 line.

Most users do not have a problem with this since MFC-R2 lines are usually fractional E1s, or
the whole E1 has the same country variant and R2 settings.

In Venezuela however is common to have inbound MFC-R2 and outbound DTMF-R2 within the same E1.

This fix now properly parses the chan_dahdi.conf file to generate a new openr2 context every
time a new channel => section is found and the configuration was changed.

(closes issue ASTERISK-21117)
Reported by: Rafael Angulo
Related Elastix issue: http://bugs.elastix.org/view.php?id=1612
........

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

Merged revisions 394173 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-12 22:35:50 +00:00
Joshua Colp 238a54fa15 Add support to the bridging core for performing COLP updates when channels join a 2 party bridge.
(closes issue ASTERISK-21829)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-12 21:42:53 +00:00
Mark Michelson d418e991ee Prevent potential race condition in multiparty basic bridges.
For more details about the race condition see the linked review
at the bottom of this commit

(closes issue ASTERISK-21882)
Reported by Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-12 21:01:51 +00:00
Jason Parker b700dc6641 Fix a compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-12 19:35:08 +00:00
David M. Lee c3ffc13e41 Fixed intermittent crash when loading test_json.so
The JSON test attempted an overly clever use of RAII_VAR to run code
at the beginning and end of each test, in order to validate that no
JSON objects were leaked during the test.

The problem is that the validation code would run during the initial
load, when the tests were initialized. This happens during startup,
when other parts of the system might actively be allocating and
freeing JSON objects.

This patch changes the RAII_VAR to use the new
ast_test_register_{init,cleanup} functions to run the validations
properly.

(closes issue ASTERISK-21978)
Review: https://reviewboard.asterisk.org/r/2669/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-12 18:23:39 +00:00
Jason Parker 2bad69006f ARI: Add support for Cross-Origin Resource Sharing (CORS), origin headers
This rejects requests from any unknown origins.

(closes issue ASTERISK-21278)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-12 17:52:52 +00:00
Richard Mudgett f5a1058316 Fix bridge tech write callback parameter name.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 21:01:09 +00:00
David M. Lee 043a71ee76 Fixed chan_skinny for systems were pthread_t isn't an int.
I'm looking at you, OS X.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 20:59:10 +00:00
Damien Wedhorn 6a2b3af90c Refactor and cleanup of skinny session handling.
Major changes are to pull all packet reading functions into skinny_session 
and move timeout handling to scheduling arrangements. Thread cancelling is 
now undertaken directly rather than waiting for the read to timeout 
(cleanup is popped on thread cancel). Also added some keepalive timings in 
debugging messages.

Keepalive timeout has been increased from 1.1 by keepalive to 3 times 
keepalive. This seems to align (after keepalives stabilise) with when 
devices reset after not receiving keepalives. Probably needs more work, 
especially around the first and/or second keepalives that vary 
significantly by device and firmware version.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 20:17:53 +00:00
Joshua Colp 0ce29906eb Tweak the subscription failure warning message to include endpoint name and context.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 16:23:41 +00:00
David M. Lee c2bb638f1f Correct test_cel cleanup.
When I corrected the CEL test crash in r394037, I didn't quite pay attention
to how the globals and locals were being shuffled around in the cleanup
callback. I removed the nulling of the global variables, which caused them
to be double cleaned.

This patch puts the global nulling code back (since the vars are cleaned up
by RAII_VARs), and removes the explicit ao2_cleanup() (since they were no-ops,
because the variables had just been nulled).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 15:37:51 +00:00
David M. Lee 684481b74c Change ARI user config to use a type field
When I initially wrote the configuration support for ARI users, I
determined the section type by a category prefix (i.e., [user-admin]).

This is neither idiomatic Asterisk configuration, nor is it really
that user friendly. This patch replaces the category prefix with a
type field in the section, which is much cleaner.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 14:39:55 +00:00
David M. Lee fb09d5bc60 Apply defaults to ari.conf's general section
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 13:56:26 +00:00
David M. Lee d3939686cd test_voicemail_api: fix warning found by gcc-4.8
The voicemail_api test had code like strncmp(a, b, sizeof(a)), but a was a
char pointer, instead of a literal or char array. This meant that sizeof was
the size of the pointer, not the length of the string.

Since the string is in a stringfield and should be null terminated, I just
changed it to a plain strcmp.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 04:34:49 +00:00
David M. Lee 31a58b2604 Fixed some CEL test crashes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 02:02:48 +00:00
Kevin Harwell 5d9ac58d8e PSJIP - sip.conf to res_sip.conf script
** This script is in no way finished.

Started the initial "cut" at converting a sip.conf file to a res_sip.conf file.
Hopefully the bulk of the framework is in place and only a few minor adjustments
need to be made when an option mapping is added that "doesn't fit".  This script
and supporting files should be executable against python version 2.5.

An OrderedDict class (backported from a newer version of python) is included.
A MultiOrderedDict class is implemented so options, when added, should be able
to be added in order and allowed to have multiple values.

Currently the scripts supports the majority of endpoint options found in
res_sip.conf.  Support has also been added for Aor(s) and the ACL/security
sections.  Inside the sip_to_res_sip.py file one can see a list of options
that still need to be mapped.

Also items that still need to be done: templates, includes, parsing '=>'
delimiter.  Note that some code is hopefully in place already to support
templates (e.g. lookup/retrieving defaults from them).  However, the
parsing of and adding of the section needs to be done.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 22:26:13 +00:00
Joshua Colp c232a1f821 Handle outbound registration failures that do not occur as a result of a real response.
(closes issue ASTERISK-22064)
Reported by: Rusty Newton


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 20:02:59 +00:00
David M. Lee 15036c2979 Document the 400 error response for originate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 17:13:21 +00:00
David M. Lee a73394abb8 Corrected api-docs for channel variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 13:50:48 +00:00
Russell Bryant 0bfe2d4cc4 astobj2-ify the SLA code
The SLA code within app_meetme was written before asotbj2 had been
merged into Asterisk.  Worse, support for reloads did not exist at first
and was added later as a bolt-on feature.  I knew at the time that
reloading was not safe at all while SLA was in use, so the reload would
be queued up to execute when the system was idle.  Unfortunately, this
approach was still prone to errors beyond the fact that this was the
only place in Asterisk where configuration was not reloaded
instantly when requested.

This patch converts various SLA objects to be reference counted objects
using astobj2.  This allows reloads to be processed while the system is
in use.  The code ensures that the objects will not disappear while one
of the other threads is using them.  However, they will be immediately
removed from the global trunk and station containers so no new calls
will use them if removed from configuration.

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

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

Merged revisions 393929 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 01:56:15 +00:00
Jason Parker 3355bb2fa5 Make SCOPED_LOCK use RAII_VAR.
This fixes an issue with requiring SCOPED_LOCK to be the last variable
declaration and removes duplicate code in the process.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-09 21:40:38 +00:00
Richard Mudgett 5dbaee232c Fix printf NULL string (null) substituion for NULL config framework default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-09 21:06:21 +00:00
Mark Michelson 0e25d8036e Use correct function for getting bridged peer when doing direct media checks.
(closes issue ASTERISK-21947)
reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-09 20:07:21 +00:00
Richard Mudgett bb7def1b5b Fix some stasis doxygen comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-09 19:38:00 +00:00