Commit Graph

26 Commits

Author SHA1 Message Date
Richard Mudgett 83a871ea35 Restore chan_dahdi native bridging and PRI tromboned call elimination.
Created a native_dahdi bridging technology for use with the new bridging
API.

The new bridging technology is part of the chan_dahdi channel driver
because it is very specific to that driver.  Rather than include the new
code directly into chan_dahdi.c the new bridge technology is in its own
file and linked into chan_dahdi.so.  A large part of this change is the
mechanical process of moving declarations around so chan_dahdi.c can be
split up into more files later.

* Changed the bridging core to pass NULL frames into the channel
technologies instead of discarding them.  The channel technologies may
need the proding to determine if their configuration is still valid.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 15:59:32 +00:00
Richard Mudgett 1267c91315 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
2013-06-21 22:39:27 +00:00
Richard Mudgett cd6e2538f2 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
2013-06-21 17:48:14 +00:00
Richard Mudgett c88b7945f6 Fix a crash when a bridge switches from the softmix bridge technology to another.
A three party bridge uses the softmix bridging technology.  This
technology has a dedicated thread used to perform the analog mixing.  When
one of these parties leaves the bridge, the bridge technology is changed
from the softmix technology to a two-party mixing technology.  Changing
technologies is done by removing channels from the old technology and
adding them to the new technology.  Since the remaining channels do not
leave the bridge, the softmix mixing thread could continue to process all
channels in the bridge.  If the bridge code is not able to start
destruction of the softmix technology before the softmix mixing thread
wakes up, a crash happens.

* Added a stop technology callback that technologies can use to request
any helper threads to stop in preparation for being destroyed.

(closes issue AST-1156)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08 05:18:22 +00:00
Richard Mudgett 9895fecf58 The bridge uniqueid is available for softmix destructor.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08 02:10:47 +00:00
Richard Mudgett 6a013e3a07 Add some bridge identifiers to some softmix messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08 01:12:57 +00:00
Richard Mudgett 3d63833bd6 Merge in the bridge_construction branch to make the system use the Bridging API.
Breaks many things until they can be reworked.  A partial list:
chan_agent
chan_dahdi, chan_misdn, chan_iax2 native bridging
app_queue
COLP updates
DTMF attended transfers
Protocol attended transfers


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21 18:00:22 +00:00
Richard Mudgett 7bb540dc80 More trivial bridge code cleanup.
* Breaking long lines
* Word wrapping comment blocks.
* Removing redundant initializers.
* Debug message wording.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25 19:29:04 +00:00
Richard Mudgett 240fab21f9 Trivial misc bridge code changes.
* softmix_bridge_thread() was redundantly initializing an 8K buffer.

* Promoted a debug message to a warning in multiplexed_add_or_remove().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09 23:23:41 +00:00
Matthew Jordan a0c363e227 Refactor ast_timer_ack to return an error and handle the error in timer users
Currently, if an acknowledgement of a timer fails Asterisk will not realize
that a serious error occurred and will continue attempting to use the timer's
file descriptor.  This can lead to situations where errors stream to the
CLI/log file.  This consumes significant resources, masks the actual problem
that occurred (whatever caused the timer to fail in the first place), and
can leave channels in odd states.

This patch propagates the errors in the timing resource modules up through
the timer core, and makes users of these timers handle acknowledgement
failures.  It also adds some defensive coding around the use of timers
to prevent using bad file descriptors in off nominal code paths.

Note that the patch created by the issue reporter was modified slightly for
this commit and backported to 1.8, as it was originally written for
Asterisk 10.

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

(issue ASTERISK-20032)
Reported by: Jeremiah Gowdy
patches:
  jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358)
........

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

Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 23:10:14 +00:00
Richard Mudgett 9240971cd4 Fix ConfBridge crash if no timing module loaded.
(closes issue ASTERISK-19448)
Reported by: feyfre
Patches:
      smfix.patch (license #6099) patch uploaded by feyfre
      Modified for coding guidelines.
........

Merged revisions 375496 from http://svn.asterisk.org/svn/asterisk/branches/10
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-30 19:31:02 +00:00
Terry Wilson ebaf59a656 Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 00:32:20 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
David Vossel 881173268c Updates follow_talker video_mode in confbridge application.
follow_talker mode originally echoed the same video stream
to all participants. As the primary talker switched around, the
video stream would result in the talker seeing themselves.  Now
the primary talker sees the last person who was talking rather than
themselves.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 18:44:06 +00:00
David Vossel 1339a0a535 Video support for ConfBridge.
Review: https://reviewboard.asterisk.org/r/1288/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-30 20:33:15 +00:00
David Vossel 00dc1556ab Fixes reliability issues with func_jitterbuffer's usage in the new ConfBridge application.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 18:08:42 +00:00
David Vossel 7f23115ad2 New HD ConfBridge conferencing application.
Includes a new highly optimized and customizable
ConfBridge application capable of mixing audio at
sample rates ranging from 8khz-192khz.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 18:11:40 +00:00
David Vossel d760e81f37 Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
   using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
   and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate.  This allows
   for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
   updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.

-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22 23:04:49 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
David Vossel eb31f8b082 fixes confbridge crash when no timing module is loaded.
(closes issue #16471)
Reported by: kjotte
Patches:
      M16471.diff uploaded by junky (license 177)
Tested by: kjotte, junky



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-18 21:23:48 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Kevin P. Fleming 9381bff79d Improve timing interface to remember which provider provided a timer
The ability to load/unload timing interfaces is nice, but it means that when a timer is allocated, it may come from provider A, but later provider B becomes the 'preferred' provider. If this happens, all timer API calls on the timer that was provided by provider A will actually be handed to provider B, which will say WTF and return an error.

This patch changes the timer API to include a pointer to the provider of the timer handle so that future operations on the timer will be forwarded to the proper provider.

(closes issue #14697)
Reported by: moy

Review: http://reviewboard.digium.com/r/211/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 19:10:32 +00:00
Joshua Colp b101b68e2f Fix a potential timer leak in bridge_softmix.
It is possible for a bridge to be created without actually being used.
In that scenario a timing file descriptor would be opened and not
closed. To fix this the timing file descriptor is now closed in the
destroy callback, not the thread function.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 15:57:28 +00:00
Joshua Colp 39a09b0af9 Remove a cast that is not needed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 14:18:40 +00:00
Joshua Colp 1cd4ecd0b7 Fix a potential race condition when creating a software based mixing bridge.
It was possible for no timer to become available between creating the bridge
and starting it. We now open a timer when creating it and keep it open until the
bridge is destroyed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 13:57:29 +00:00
Joshua Colp 4c9ab0df8c Merge phase 1 support for the new bridging architecture.
This commit brings in the bridging core, bridging technologies,
and the ConfBridge application.

For usage information on the ConfBridge application please see
the output of "core show application ConfBridge" from the CLI.

For API documentation please see the doxygen page describing the
architecture and the documentation for each API call.

Review: http://reviewboard.digium.com/r/93/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05 18:18:27 +00:00