dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

153 Commits

Author SHA1 Message Date
dvossel 9cead6b7f8 Merged revisions 324652 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r324652 | dvossel | 2011-06-23 13:23:21 -0500 (Thu, 23 Jun 2011) | 20 lines
  
  Merged revisions 324634 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines
    
    Merged revisions 324627 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines
      
      Addresses AST-2011-010, remote crash in IAX2 driver
      
      Thanks to twilson for identifying the issue and providing the patches.
      
      AST-2011-010
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@324664 f38db490-d61c-443f-a65b-d21fe96a405b
2011-06-23 18:26:09 +00:00
rmudgett 5be63b7e1a Merged revisions 314417 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314417 | rmudgett | 2011-04-20 11:54:02 -0500 (Wed, 20 Apr 2011) | 1 line
  
  AST_CONTROL_XXX comment changes.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@314418 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-20 16:55:07 +00:00
dvossel f27e928f05 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: http://svn.digium.com/svn/asterisk/trunk@308582 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-22 23:04:49 +00:00
rmudgett bb65a33387 Pass a MCID request to the bridged channel.
Pass a MCID request to the bridged channel so the bridged channel can send
it to the network.

The ability to send the MCID request on an ISDN span is enabled with the
new chan_dahdi.conf mcid_send option.

JIRA SWP-2845
JIRA ABE-2736


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306755 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-07 23:33:44 +00:00
dvossel 4aca3187a3 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: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03 16:22:10 +00:00
tilghman 9947461351 Merged revisions 296992 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r296992 | tilghman | 2010-12-01 11:01:56 -0600 (Wed, 01 Dec 2010) | 19 lines
  
  Merged revisions 296991 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r296991 | tilghman | 2010-12-01 11:01:00 -0600 (Wed, 01 Dec 2010) | 12 lines
    
    Merged revisions 296990 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r296990 | tilghman | 2010-12-01 10:59:26 -0600 (Wed, 01 Dec 2010) | 5 lines
      
      Clarify documentation on how we store codec preference lists.
      
      (closes issue #18397)
       Reported by: birgita
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@296993 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-01 17:03:05 +00:00
tilghman c3e5b57e6c Add a comment on why the reserved bit is reserved.
Came up when reviewing discussion on the CODEC PREFS IE in IAX2.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@296826 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-30 22:32:20 +00:00
rmudgett 4ead3b5ab1 Merged revisions 295866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r295866 | rmudgett | 2010-11-22 13:36:10 -0600 (Mon, 22 Nov 2010) | 60 lines
  
  Merged revisions 295843 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r295843 | rmudgett | 2010-11-22 13:28:23 -0600 (Mon, 22 Nov 2010) | 53 lines
    
    Merged revisions 295790 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines
      
      The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.
      
      To recreate the problem:
      1) Party A calls Party B
      2) Invoke CLI "channel redirect" command to redirect channel call leg
      associated with A.
      3) All associated channels are hung up.
      
      Note that if the CLI command were done on the channel call leg associated
      with B it works.
      
      This regression was a result of the fix for issue #16946
      (https://reviewboard.asterisk.org/r/740/).
      
      The regression affects all features that use an async goto to execute the
      dialplan because of an external event: Channel redirect, AMI redirect, SIP
      REFER, and FAX detection.
      
      The struct ast_channel._softhangup code is a mess.  The variable is used
      for several purposes that do not necessarily result in the call being hung
      up.  I have added doxygen comments to describe how the various _softhangup
      bits are used.  I have corrected all the places where the variable was
      tested in a non-bit oriented manner.
      
      The primary fix is the new AST_CONTROL_END_OF_Q frame.  It acts as a weak
      hangup request so the soft hangup requests that do not normally result in
      a hangup do not hangup.
      
      JIRA SWP-2470
      JIRA SWP-2489
      
      (closes issue #18171)
      Reported by: SantaFox
      (closes issue #18185)
      Reported by: kwemheuer
      (closes issue #18211)
      Reported by: zahir_koradia
      (closes issue #18230)
      Reported by: vmarrone
      (closes issue #18299)
      Reported by: mbrevda
      (closes issue #18322)
      Reported by: nerbos
      
      Review:	https://reviewboard.asterisk.org/r/1013/
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@295867 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-22 19:42:02 +00:00
twilson 83c8d81101 Merged revisions 286189 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r286189 | twilson | 2010-09-10 17:04:53 -0500 (Fri, 10 Sep 2010) | 30 lines
  
  Merged revisions 286115 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines
    
    Merged revisions 286059 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines
      
      Inherit CHANNEL() writes to both sides of a Local channel
      
      Having Local (/n) channels as queue members and setting the language in the
      extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
      channel. Hold time report playbacks happen on the Local/...,1 channel and
      therefor do not play in the specified language.
      
      This patch modifies func_channel_write to call the setoption callback and pass
      the CHANNEL() write info to the callback. chan_local uses this information to
      look up the other side of the channel and apply the same changes to it.
      
      (closes issue #17673)
      Reported by: Guggemand
      
      Review: https://reviewboard.asterisk.org/r/903/
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@286190 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-10 22:15:47 +00:00
dvossel 637447be7d adds speex 16khz audio support
(closes issue #17501)
Reported by: fabled
Patches:
      asterisk-trunk-speex-wideband-v2.patch uploaded by fabled (license 448)
Tested by: malcolmd, fabled, dvossel



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@271231 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-17 17:23:43 +00:00
dvossel 497bf0b92c addition of G.719 pass-through support
(closes issue #16293)
Reported by: malcolmd
Patches:
      g719.passthrough.patch.7 uploaded by malcolmd (license 924)
      format_g719.c uploaded by malcolmd (license 924)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270940 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-16 19:03:24 +00:00
twilson 9b1a36a294 Add SRTP support for Asterisk
After 5 years in mantis and over a year on reviewboard, SRTP support is finally
being comitted. This includes generic CHANNEL dialplan functions that work for
getting the status of whether a call has secure media or signaling as defined
by the underlying channel technology and for setting whether or not a new
channel being bridged to a calling channel should have secure signaling or
media. See doc/tex/secure-calls.tex for examples.

Original patch by mikma, updated for trunk and revised by me.

(closes issue #5413)
Reported by: mikma
Tested by: twilson, notthematrix, hemanshurpatel

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@268894 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-08 05:29:08 +00:00
rmudgett 245c5d9eb8 Generic Advice of Charge.
Asterisk Generic AOC Representation
- Generic AOC encode/decode routines.
  (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
- AST_CONTROL_AOC frame type to represent generic encoded AOC data
- Manager events for AOC-S, AOC-D, and AOC-E messages

Asterisk App Support
- app_dial AOC-S pass-through support on call setup
- app_queue AOC-S pass-through support on call setup

AOC Unit Tests
- AOC Unit Tests for encode/decode routines
- AOC Unit Test for manager event representation.

SIP AOC Support
- Pass-through of generic AOC-D and AOC-E messages to snom phones via the
  snom AOC specification.
- Creation of chan_sip page3 flags for the addition of the new
  'snom_aoc_enabled' sip.conf option.

IAX AOC Support
- Natively supports AOC pass-through through the use of the new
  AST_CONTROL_AOC frame type

DAHDI AOC Support
- ETSI PRI full AOC Pass-through support
- 'aoc_enable' chan_dahdi.conf option for independently enabling
  pass-through of AOC-S, AOC-D, AOC-E.
- 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
- DAHDI A() dial string option for requesting AOC services.
  example usage:
  ;requests AOC-S, AOC-D, and AOC-E on call setup
  exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267096 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02 18:10:15 +00:00
mmichelson 82c8ef7415 Enhancements to connected line and redirecting work.
From reviewboard:

Digium has a commercial customer who has made extensive use of the connected party and
redirecting information present in later versions of Asterisk Business Edition and which
is to be in the upcoming 1.8 release. Through their use of the feature, new problems and solutions
have come about. This patch adds several enhancements to maximize usage of the connected party
and redirecting information functionality.

First, Asterisk trunk already had connected line interception macros. These macros allow you to
manipulate connected line information before it was sent out to its target. This patch adds the
same feature except for redirecting information instead.

Second, the ast_callerid and ast_party_id structures have been enhanced to provide a "tag." This
tag can be set with func_callerid, func_connectedline, func_redirecting, and in the case of DAHDI,
mISDN, and SIP channels, can be set in a configuration file. The idea behind the callerid tag is
that it can be set to whatever value the administrator likes. Later, when running connected line
and redirecting macros, the admin can read the tag off the appropriate structure to determine what
action to take. You can think of this sort of like a channel variable, except that instead of having
the variable associated with a channel, the variable is associated with a specific identity within
Asterisk.

Third, app_dial has two new options, s and u. The s option lets a dialplan writer force a specific
caller ID tag to be placed on the outgoing channel. The u option allows the dialplan writer to force
a specific calling presentation value on the outgoing channel.

Fourth, there is a new control frame subclass called AST_CONTROL_READ_ACTION added. This was added
to correct a very specific situation. In the case of SIP semi-attended (blond) transfers, the party
being transferred would not have the opportunity to run a connected line interception macro to
possibly alter the transfer target's connected line information. The issue here was that during a
blond transfer, the SIP transfer code has no bridged channel on which to queue the connected line
update. The way this was corrected was to add this new control frame subclass. Now, we queue an
AST_CONTROL_READ_ACTION frame on the channel on which the connected line interception macro should
be run. When ast_read is called to read the frame, ast_read responds by calling a callback function
associated with the specific read action the control frame describes. In this case, the action taken
is to run the connected line interception macro on the transferee's channel.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@263541 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17 15:36:31 +00:00
jmls f3be709455 Added MixMonitorMute manager command
Added a new manager command to mute/unmute MixMonitor audio on a channel. 
Added a new feature to audiohooks so that you can mute either read / write
(or both) types of frames - this allows for MixMonitor to mute either side
of the conversation without affecting the conversation itself.

(closes issue #16740)
Reported by: jmls

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@258190 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-21 11:27:27 +00:00
mmichelson 0eb1e5407a Merge Call completion support into trunk.
From Reviewboard:
CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date
overview of the architecture can be found in the file doc/CCSS_architecture.pdf
in the CCSS branch. Off the top of my head, the big differences between what is
implemented and what is in the document are as follows:

1. We did not end up modifying the Hangup application at all.
2. The document states that a single call completion monitor may be used across
   multiple calls to the same device. This proved to not be such a good idea
   when implementing protocol-specific monitors, and so we ended up using one
   monitor per-device per-call.
3. There are some configuration options which were conceived after the document
   was written. These are documented in the ccss.conf.sample that is on this
   review request.
		      
For some basic understanding of terminology used throughout this code, see the
ccss.tex document that is on this review.

This implements CCBS and CCNR in several flavors.

First up is a "generic" implementation, which can work over any channel technology
provided that the channel technology can accurately report device state. Call
completion is requested using the dialplan application CallCompletionRequest and can
be canceled using CallCompletionCancel. Device state subscriptions are used in order
to monitor the state of called parties.

Next, there is a SIP-specific implementation of call completion. This method uses the
methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion
using SIP signaling. There are a few things to note here:

* The agent/monitor terminology used throughout Asterisk sometimes is the reverse of
  what is defined in the referenced draft.

* Implementation of the draft required support for SIP PUBLISH. I attempted to write
  this in a generic-enough fashion such that if someone were to want to write PUBLISH
  support for other event packages, such as dialog-state or presence, most of the effort
  would be in writing callbacks specific to the event package.

* A subportion of supporting PUBLISH reception was that we had to implement a PIDF
  parser. The PIDF support added is a bit minimal. I first wrote a validation
  routine to ensure that the PIDF document is formatted properly. The rest of the
  PIDF reading is done in-line in the call-completion-specific PUBLISH-handling
  code. In other words, while there is PIDF support here, it is not in any state
  where it could easily be applied to other event packages as is.

Finally, there are a variety of ISDN-related call completion protocols supported. These
were written by Richard Mudgett, and as such I can't really say much about their
implementation. There are notes in the CHANGES file that indicate the ISDN protocols
over which call completion is supported.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256528 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-09 15:31:32 +00:00
kpfleming a37e15e1be Improve handling of T.38 re-INVITEs that arrive before a T.38-capable
application is executing on a channel.

This patch addresses an issue found during working with end-users
using res_fax. If an incoming call is answered in the dialplan, or
jumps to the 'fax' extension due to reception of a CNG tone (with
faxdetect enabled), and then the remote endpoint sends a T.38
re-INVITE, it is possible for the channel's T.38 state to be
'T38_STATE_NEGOTIATING' when the application starts up. Unfortunately,
even if the application wants to use T.38, it can't respond to the
peer's negotiation request, because the AST_CONTROL_T38_PARAMETERS
control frame that chan_sip sent originally has been lost, and the
application needs the content of that frame to be able to formulate a
reply.

This patch adds a new 'request' type to AST_CONTROL_T38_PARAMETERS,
AST_T38_REQUEST_PARMS. If the application sends this request, chan_sip
will re-send the original control frame (with
AST_T38_REQUEST_NEGOTIATE as the request type), and the application
can respond as normal. If this occurs within the five second timeout
in chan_sip, the automatic cancellation of the peer reinvite will be
stopped, and the application will 'own' the negotiation process from
that point onwards.

This also improves the code path in chan_sip to allow sip_indicate(),
when called for AST_CONTROL_T38_PARAMETERS, to be able to return a
non-zero response, which should have been in place before since the
control frame *can* fail to be processed properly. It also modifies
ast_indicate() to return whatever result the channel driver returned
for this control frame, rather than converting all non-zero results
into '-1'. Finally, the new request type intentionally returns a
positive value, so that an application that sends
AST_T38_REQUEST_PARMS can know for certain whether the channel driver
accepted it and will be replying with a control frame of its own, or
whether it was ignored (if the sip_indicate()/ast_indicate() path had
properly supported failure responses before, this would not be
necessary).

This patch also modifies res_fax to take advantage of the new request.

In addition, this patch makes sip_t38_abort() actually lock the
private structure before doing its work... bad programmer, no donut.

This patch also enhances chan_sip's 'faxdetect' support to allow
triggering on T.38 re-INVITEs received as well as CNG tone detection.

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@254450 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-25 15:27:31 +00:00
twilson 88bfcb6713 Only change the RTP ssrc when we see that it has changed
This change basically reverts the change reviewed in
https://reviewboard.asterisk.org/r/374/ and instead limits the
updating of the RTP synchronization source to only those times when we
detect that the other side of the conversation has changed the ssrc.

The problem is that SRCUPDATE control frames are sent many times where
we don't want a new ssrc, including whenever Asterisk has to send DTMF
in a normal bridge. This is also not the first time that this mistake
has been made. The initial implementation of the ast_rtp_new_source
function also changed the ssrc--and then it was removed because of
this same issue. Then, we put it back in again to fix a different
issue. This patch attempts to only change the ssrc when we see that
the other side of the conversation has changed the ssrc.

It also renames some functions to make their purpose more clear.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252089 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12 22:04:51 +00:00
mnicholson bc9bd7bb7c Merge res_fax and res_fax_spandsp.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250190 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02 23:11:06 +00:00
tilghman 3bacd4082e Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04 14:05:12 +00:00
russell 039146041a Merged revisions 224931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r224931 | russell | 2009-10-20 21:59:54 -0500 (Tue, 20 Oct 2009) | 5 lines
  
  Isolate frames returned from a DSP instance or codec translator.
  
  The reasoning for these changes are the same as what I wrote in the commit
  message for rev 222878.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@224932 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21 03:09:04 +00:00
russell 5b989dda45 Merged revisions 222878 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222878 | russell | 2009-10-08 14:45:47 -0500 (Thu, 08 Oct 2009) | 44 lines
  
  Make filestream frame handling safer by isolating frames before returning them.
  
  This patch is related to a number of issues on the bug tracker that show
  crashes related to freeing frames that came from a filestream.  A number of
  fixes have been made over time while trying to figure out these problems, but
  there re still people seeing the crash.  (Note that some of these bug reports
  include information about other problems.  I am specifically addressing
  the filestream frame crash here.)
  
  I'm still not clear on what the exact problem is.  However, what is _very_
  clear is that we have seen quite a few problems over time related to unexpected
  behavior when we try to use embedded frames as an optimization.  In some cases,
  this optimization doesn't really provide much due to improvements made in other
  areas.
  
  In this case, the patch modifies filestream handling such that the embedded frame
  will not be returned.  ast_frisolate() is used to ensure that we end up with a
  completely mallocd frame.  In reality, though, we will not actually have to malloc
  every time.  For filestreams, the frame will almost always be allocated and freed
  in the same thread.  That means that the thread local frame cache will be used.
  So, going this route doesn't hurt.
  
  With this patch in place, some people have reported success in not seeing the
  crash anymore.
  
  (SWP-150)
  (AST-208)
  (ABE-1834)
  
  (issue #15609)
  Reported by: aragon
  Patches:
        filestream_frisolate-1.4.diff2.txt uploaded by russell (license 2)
  Tested by: aragon, russell
  
  (closes issue #15817)
  Reported by: zerohalo
  Tested by: zerohalo
  
  (closes issue #15845)
  Reported by: marhbere
  
  Review: https://reviewboard.asterisk.org/r/386/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222880 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-08 19:52:03 +00:00
kpfleming aa4f4e142d Rework of T.38 negotiation and UDPTL API to address interoperability problems
Over the past couple of months, a number of issues with Asterisk
negotiating (and successfully completing) T.38 sessions with various
endpoints have been found. This patch attempts to address many of
them, primarily focused around ensuring that the endpoints'
MaxDatagram size is honored, and in addition by ensuring that T.38
session parameter negotiation is performed correctly according to the
ITU T.38 Recommendation.

The major changes here are:

1) T.38 applications in Asterisk (app_fax) only generate/receive IFP
packets, they do not ever work with UDPTL packets. As a result of
this, they cannot be allowed to generate packets that would overflow
the other endpoints' MaxDatagram size after the UDPTL stack adds any
error correction information. With this patch, the application is told
the maximum *IFP* size it can generate, based on a calculation using
the far end MaxDatagram size and the active error correction mode on
the T.38 session. The same is true for sending *our* MaxDatagram size
to the remote endpoint; it is computed from the value that the
application says it can accept (for a single IFP packet) combined with
the active error correction mode.

2) All treatment of T.38 session parameters as 'capabilities' in
chan_sip has been removed; these parameters are not at all like
audio/video stream capabilities. There are strict rules to follow for
computing an answer to a T.38 offer, and chan_sip now follows those
rules, using the desired parameters from the application (or channel)
that wants to accept the T.38 negotiation.

3) chan_sip now stores and forwards ast_control_t38_parameters
structures for tracking 'our' and 'their' T.38 session parameters;
this greatly simplifies negotiation, especially for pass-through
calls.

4) Since T.38 negotiation without specifying parameters or receiving
the final negotiated parameters is not very worthwhile, the
AST_CONTROL_T38 control frame has been removed. A note has been added
to UPGRADE.txt about this removal, since any out-of-tree applications
that use it will no longer function properly until they are upgraded
to use AST_CONTROL_T38_PARAMETERS.

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@208464 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-23 21:57:24 +00:00
kpfleming 358f6c409e Repair ability of SendFAX/ReceiveFAX to respond to T.38 switchover.
Recent changes in T.38 negotiation in Asterisk caused these applications to
not respond when the other endpoint initiated a switchover to T.38; this
resulted in the T.38 switchover failing, and the FAX attempt to be made
using an audio connection, instead of T.38 (which would usually cause the
FAX to fail completely).

This patch corrects this problem, and the applications will now correctly
respond to the T.38 switchover request. In addition, the response will include
the appopriate T.38 session parameters based on what the other end offered
and what our end is capable of.

(closes issue #14849)
Reported by: afosorio


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@205696 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-09 21:20:23 +00:00
dvossel 4fc4098a76 Merged revisions 205471 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r205471 | dvossel | 2009-07-08 18:15:54 -0500 (Wed, 08 Jul 2009) | 10 lines
  
  Fixes 8khz assumptions
  
  Many calculations assume 8khz is the codec rate. This
  is not always the case.  This patch only addresses chan_iax.c
  and res_rtp_asterisk.c, but I am sure there are other areas
  that make this assumption as well.
  
  Review: https://reviewboard.asterisk.org/r/306/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@205479 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-08 23:19:09 +00:00
file c26b86e763 Improve T.38 negotiation by exchanging session parameters between application and channel.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203699 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26 19:27:24 +00:00
kpfleming 0d442a7c2c Enable applications to enable/disable digit and tone detection.
Some applications (notably app_fax) do not need digit detection nor FAX tone
detection while they are running, and if Asterisk is using software DSPs to provide
the detection, this consumes extra CPU cycles that could be better spent on the
actual application. This patch allows applications to query and control the state
of digit and tone detection on a channel, and modifies app_fax to disable them
while the FAX operations are occurring (and re-enable digit detection afterwards).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@201139 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-16 21:10:15 +00:00
kpfleming ea5a74f18b Merged revisions 200991 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r200991 | kpfleming | 2009-06-16 12:05:38 -0500 (Tue, 16 Jun 2009) | 11 lines
  
  Improve support for media paths that can generate multiple frames at once.
  
  There are various media paths in Asterisk (codec translators and UDPTL, primarily)
  that can generate more than one frame to be generated when the application calling
  them expects only a single frame. This patch addresses a number of those cases,
  at least the primary ones to solve the known problems. In addition it removes the
  broken TRACE_FRAMES support, fixes a number of bugs in various frame-related API
  functions, and cleans up various code paths affected by these changes.
  
  https://reviewboard.asterisk.org/r/175/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@201056 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-16 18:54:30 +00:00
russell aa2ac6ca98 Minor whitespace fix.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198670 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01 20:17:50 +00:00
file 0728169c6a Add support for allowing the channel driver to handle transcoding.
This was accomplished using a set of options and the setoption channel callback.
The core calls into the channel driver using these options and the channel driver
either returns success or failure.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187360 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09 16:19:35 +00:00
mmichelson f00656db9e This commit introduces COLP/CONP and Redirecting party information into Asterisk.
The channel drivers which have been most heavily tested with these enhancements are
chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be
introduced in a later commit. chan_skinny has code added to it here, but according
to user pj, the support on chan_skinny is not working as of now. This will be fixed in
a later commit.

A special thanks goes out to bugtracker user gareth for getting the ball rolling and
providing the initial support for this work. Without his initial work on this, this would
not have been nearly as painless as it was.

This functionality has been tested by Digium's product quality department, as well as a
customer site running thousands of calls every day. In addition, many many many many bugtracker
users have tested this, too.

(closes issue #8824)
Reported by: gareth

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186525 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03 22:41:46 +00:00
file 27b4657d60 Add better support for relaying success or failure of the ast_transfer() API call.
This API call now waits for a special frame from the underlying channel driver to
indicate success or failure. This allows the return value to truly convey whether
the transfer worked or not. In the case of the Transfer() dialplan application this
means the value of the TRANSFERSTATUS dialplan variable is actually true.

(closes issue #12713)
Reported by: davidw
Tested by: file


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186382 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03 16:47:27 +00:00
kpfleming 5d5eb54ba7 Merged revisions 180372 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180372 | kpfleming | 2009-03-05 12:22:16 -0600 (Thu, 05 Mar 2009) | 9 lines
  
  Fix problems when RTP packet frame size is changed
  
  During some code analysis, I found that calling ast_rtp_codec_setpref() on an ast_rtp session does not work as expected; it does not adjust the smoother that may on the RTP session, in fact it summarily drops it, even if it has data in it, even if the current format's framing size has not changed. This is not good.
  
  This patch changes this behavior, so that if the packetization size for the current format changes, any existing smoother is safely updated to use the new size, and if no smoother was present, one is created. A new API call for smoothers, ast_smoother_reconfigure(), was required to implement these changes.
  
  Review: http://reviewboard.digium.com/r/184/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180373 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-05 18:29:38 +00:00
mmichelson 509eed412d Clear up documentation of AST_FRIENDLY_OFFSET in frame.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176697 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 21:40:09 +00:00
kpfleming a46dd55034 Add basic (passthrough, playback, record) support for ITU G.722.1 and G.722.1C (also known as Siren7 and Siren14)
This patch adds passthrough, file recording and file playback support for the codecs listed above, with negotiation over SIP/SDP supported. Due to Asterisk's current limitation of treating a codec/bitrate combination as a unique codec, only G.722.1 at 32 kbps and G.722.1C at 48 kbps are supported.

Along the way, some related work was done:

1) The rtpPayloadType structure definition, used as a return result for an API call in rtp.h, was moved from rtp.c to rtp.h so that the API call was actually usable. The only previous used of the API all was chan_h323.c, which had a duplicate of the structure definition instead of doing it the right way.

2) The hardcoded SDP sample rates for various codecs in chan_sip.c were removed, in favor of storing these sample rates in rtp.c along with the codec definitions there. A new API call was added to allow retrieval of the sample rate for a given codec.

3) Some basic 'a=fmtp' parsing for SDP was added to chan_sip, because chan_sip *must* decline any media streams offered for these codecs that are not at the bitrates that we support (otherwise Bad Things (TM) would result).

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175508 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13 13:35:24 +00:00
mmichelson 55c8679f51 Merged revisions 158072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r158072 | twilson | 2008-11-20 11:48:58 -0600 (Thu, 20 Nov 2008) | 2 lines

Begin on a crusade to end trailing whitespace!

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158133 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-20 18:20:00 +00:00
oej b141b74ceb Prefer T140 with REDundance before T140 without.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119207 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-30 11:26:05 +00:00
mvanbaak c1210321e7 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22 16:29:54 +00:00
oej f3a2d1775a Adding spport for T.140 RED - Simple RTP redundancy to prevent packet loss in text stream
Work sponsored by Omnitor AB, Stockholm, Sweden (http://www.omnitor.se)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116237 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14 13:37:07 +00:00
mmichelson e2b60bdefe Merged revisions 114207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114207 | mmichelson | 2008-04-17 11:28:03 -0500 (Thu, 17 Apr 2008) | 12 lines

It was possible for a reference to a frame which was part of a freed DSP to still be
referenced, leading to memory corruption and eventual crashes. This code change ensures
that the dsp is freed when we are finished with the frame. This change is very similar
to a change Russell made with translators back a month or so ago.

(closes issue #11999)
Reported by: destiny6628
Patches:
      11999.patch uploaded by putnopvut (license 60)
Tested by: destiny6628, victoryure


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114208 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-17 16:40:12 +00:00
file f6b76699b7 Merged revisions 106235 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106239 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05 22:43:22 +00:00
russell 6d9959cc34 Merged revisions 105932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105932 | russell | 2008-03-04 19:52:18 -0600 (Tue, 04 Mar 2008) | 5 lines

Fix a bug that I just noticed in the RTP code.  The calculation for setting the
len field in an ast_frame of audio was wrong when G.722 is in use.  The len field
represents the number of ms of audio that the frame contains.  It would have
set the value to be twice what it should be.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105933 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05 01:54:16 +00:00
file d9d1ed3822 Add a non-invasive API for application level manipulation of T38 on a channel. This uses control frames (so they can even pass across IAX2) to negotiate T38 and provided a way of getting the current status of T38 using queryoption. This should by no means cause any issues and if it does I will take responsibility for it.
(closes issue #11873)
Reported by: dimas
Patches:
      v4-t38-api.patch uploaded by dimas (license 88)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18 23:47:01 +00:00
russell 00e3ed0886 Merged revisions 99004 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99004 | russell | 2008-01-17 16:37:22 -0600 (Thu, 17 Jan 2008) | 10 lines

Have IAX2 optimize the codec translation path just like chan_sip does it.  If
the caller's codec is in our codec list, move it to the top to avoid transcoding.

(closes issue #10500)
Reported by: stevedavies
Patches:
      iax-prefer-current-codec.patch uploaded by stevedavies (license 184)
      iax-prefer-current-codec.1.4.patch uploaded by stevedavies (license 184)
Tested by: stevedavies, pj, sheldonh

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99006 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17 22:50:13 +00:00
russell b61a98675c Merged revisions 98943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98943 | russell | 2008-01-15 17:26:52 -0600 (Tue, 15 Jan 2008) | 25 lines

Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed.  Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code.  The reason this
happens is that the channel might get masqueraded during this time.  During a
masquerade, existing translation paths get destroyed.

So, this patch fixes the issue in an API and ABI compatible way.  (This one is
 for you, paravoid!)

It changes an int in ast_frame to be used as flag bits.  The 1 bit is still used
to indicate that the frame contains timing information.  Also, a second flag has
been added to indicate that the frame came from a translator.  When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed.  At this point, the flag gets
cleared.  Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.

Admittedly, this feels like a hack.  But, it does fix the issue, and I was not able 
to think of a better solution ...

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98944 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15 23:31:53 +00:00
qwell 8c685c6a42 Merged revisions 97847 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97847 | qwell | 2008-01-10 14:12:37 -0600 (Thu, 10 Jan 2008) | 1 line

Fix a comment that is no longer true.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97848 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10 20:13:24 +00:00
oej 19b0b54055 Doxygen updates
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92267 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-11 09:26:25 +00:00
rizzo 9a04121e36 implement the split of file.h and mod_format.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89515 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 00:53:49 +00:00
rizzo 82c12f8105 remove redundant #include "asterisk/compat.h",
but make sure that asterisk/compiler.h is included everywhere



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89336 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 21:08:28 +00:00
tilghman 4b2fc9d3e7 Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits.
 - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution.
   (This doesn't affect anything immediately, until another codec has wb support.)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 22:51:48 +00:00