Commit Graph

23763 Commits

Author SHA1 Message Date
Joshua Colp 56313ee068 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
2013-04-02 12:18:50 +00:00
Matthew Jordan bcc0aca23d 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
2013-04-02 11:40:05 +00:00
David M. Lee d4e25a456e 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
2013-04-01 20:10:47 +00:00
Matthew Jordan 8c5367226b 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
2013-04-01 14:44:30 +00:00
Joshua Colp 3f2ff8594b 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
2013-04-01 14:10:46 +00:00
David M. Lee b23e8e1950 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
2013-04-01 13:37:51 +00:00
David M. Lee 2d45dbc79b 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
2013-04-01 13:34:51 +00:00
Matthew Jordan ad191ebfcd Properly format an intmax_t value
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-30 05:15:42 +00:00
Matthew Jordan e8015cc460 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
2013-03-30 05:06:54 +00:00
Jonathan Rose d16efd5be8 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
2013-03-29 16:37:23 +00:00
Richard Mudgett a1c94fece8 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
2013-03-28 23:59:20 +00:00
Kinsey Moore 71206544a7 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
2013-03-28 15:45:18 +00:00
Kinsey Moore 1a2a4578d2 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
2013-03-27 22:42:06 +00:00
David M. Lee c67a06a2ff 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
2013-03-27 21:52:43 +00:00
Kinsey Moore 72bccf69c3 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
2013-03-27 19:52:19 +00:00
Matthew Jordan 15b892323a 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
2013-03-27 18:52:16 +00:00
Kinsey Moore 15bbfb941f 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
2013-03-27 17:07:44 +00:00
Matthew Jordan 0ffce56f1b 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
2013-03-27 15:27:31 +00:00
Matthew Jordan ec144089ea 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
2013-03-27 14:39:11 +00:00
Matthew Jordan 4b5a0e1932 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
2013-03-27 14:28:36 +00:00
Damien Wedhorn 63a4da4eba 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
2013-03-27 07:24:37 +00:00
Joshua Colp 7aab90b366 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
2013-03-26 23:34:43 +00:00
Matthew Jordan 58ee2b7d11 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
2013-03-26 02:30:10 +00:00
Matthew Jordan ec7de8ed97 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
2013-03-26 01:58:45 +00:00
Russell Bryant 88874a95d7 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
2013-03-26 01:46:39 +00:00
Russell Bryant 03047a47b6 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
2013-03-26 01:38:56 +00:00
Richard Mudgett 23f363fcb1 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
2013-03-25 23:25:32 +00:00
Kinsey Moore f073c27b60 Fix typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 20:15:09 +00:00
Kinsey Moore 4227863d9a Fix missing ' ' around '='
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 20:07:00 +00:00
David M. Lee c2ae4acb15 install_prereq: removed some out-of-date comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 19:28:04 +00:00
David M. Lee 2e0f5cc854 install_prereq: Adding jansson-devel to RH packages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 17:12:03 +00:00
David M. Lee 4a6237b231 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
2013-03-25 16:19:55 +00:00
Sean Bright d484f366f5 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
2013-03-25 12:38:15 +00:00
David M. Lee 766c146fe3 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
2013-03-22 20:51:33 +00:00
Michael L. Young 2a65c9408c 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
2013-03-22 20:43:24 +00:00
David M. Lee cfd2b244f7 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
2013-03-22 19:26:37 +00:00
David M. Lee cf9324b25e Move more channel events to Stasis; move res_json.c to main/json.c.
This patch started out simply as fixing the bouncing tests introduced
in r382685, but required some other changes to give it a decent
implementation.

To fix the bouncing tests, the UserEvent and Newexten AMI events
needed to be refactored to dispatch via Stasis. Dispatching directly
to AMI resulted in those events sometimes getting ahead of the
associated Newchannel events, which would understandably confuse anyone.

I found that instead of creating a zillion different message types and
structures associated with them, it would be preferable to define a
message type that has a channel snapshot and a blob of structured data
with a small bit of additional information. The JSON object model
provides a very nice way of representing structured data, so I went
with that.

 * Move JSON support from res_json.c to main/json.c
   * Made libjansson-dev a required dependency
 * Added an ast_channel_blob message type, which has a channel
   snapshot and JSON blob of data.
 * Changed UserEvent and Newexten events so that they are dispatched
   via ast_channel_blob messages on the channel's topic.
 * Got rid of the ast_channel_varset message; used ast_channel_blob
   instead.
 * Extracted the manager functions converting Stasis channel events to
   AMI events into manager_channel.c.

(issue ASTERISK-21096)
Review: https://reviewboard.asterisk.org/r/2381/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22 14:06:46 +00:00
Damien Wedhorn 401f7c1880 Fix skinny voicemail indication issues.
Unsubscribe from MWI stasis event on channel reload.

(closes issue ASTERISK-21216)
Reported by: wedhorn 
Tested by: snuffy, myself
Patches: 
    skinny-mwiind02.diff uploaded by snuffy (license 5024)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22 06:32:03 +00:00
David M. Lee 05ec2860df Corrected doc error for Stasis. I guess the mutex isn't necessary.
Thanks, rmudgett!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-21 20:09:11 +00:00
Richard Mudgett 14dd9445e9 Fix astobj2 doxygen comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-21 17:41:52 +00:00
Walter Doekes 220cc9b9af Have func_curl log a warning when a curl request fails.
Review: https://reviewboard.asterisk.org/r/2403/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 20:27:37 +00:00
Walter Doekes 0b1e78cace Minor cleanup in func_curl near hashcompat code.
Review: https://reviewboard.asterisk.org/r/2402/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 20:18:40 +00:00
Kinsey Moore 7ed0b80d94 Resolve a race condition in Stasis
Because of the way that topics were handled when publishing, it was
possible to dispatch a message to a subscription after that
subscription had been unsubscribed such that the dispatched message
arrived at the callback after the callback had received its final
message. In callbacks that cleaned up user data, this would often cause
a segfault. This has been resolved by locking the topic during the
entirety of dispatch. To prevent long publishing and topic locking
times, forwarding subscriptions have been made to be standard
subscriptions instead of mailboxless subscriptions which were
dispatched at publishing time.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 16:01:30 +00:00
Joshua Colp 07d01e1c41 Pass the sorcery instance to wizards for CUD operations as well as retrieve.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 14:52:23 +00:00
Kinsey Moore 6aee9178d5 Fix lock destruction/unlock inversion
When using scoped locks, the unref of an AO2 object should happen after
the unlock occurs which requires usage of scoped refs.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 19:07:46 +00:00
David M. Lee ed382681e5 Multiple revisions 383341-383342
........
  r383341 | dlee | 2013-03-19 10:57:29 -0500 (Tue, 19 Mar 2013) | 5 lines
  
  Removed codecs/g722/*.i on make clean
  ........
  
  Merged revisions 383340 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r383342 | dlee | 2013-03-19 10:58:33 -0500 (Tue, 19 Mar 2013) | 1 line
  
  Remove codecs/speex/*.i on make clean
........

Merged revisions 383341-383342 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 16:00:22 +00:00
Kinsey Moore 6300aa6ae4 Make sure things compile...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16 16:00:40 +00:00
Kinsey Moore 99aa02d17f Transition MWI to Stasis-core
Remove MWI's dependency on the event system by moving it to
Stasis-core. This also introduces forwarding topic pools in Stasis-core
which aggregate many dynamically allocated topics into a single primary
topic.

Review: https://reviewboard.asterisk.org/r/2368/
(closes issue ASTERISK-21097)
Patch-by: Kinsey Moore


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16 15:45:58 +00:00
Joshua Colp 5d45596f62 Add support for using XMPP buddy state via device state.
This change allows you to use XMPP buddy state in places where device state
can be used be used, such as dialplan hints. If at least one resource is
available the buddy is considered available. Now your phone can reflect
their IM status too!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16 15:40:31 +00:00
Joshua Colp 2f89b7a6eb Fix a bug where resources were not found due to hashing on the priority itself.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16 15:15:44 +00:00