Commit Graph

21 Commits

Author SHA1 Message Date
Kinsey Moore abd3e4040b Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

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

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

Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:49:26 +00:00
Sean Bright 8357027080 res_fax_spandsp: Use g711_free() when available.
Per Johann Steinwendtner on the asterisk-dev mailing list:

http://lists.digium.com/pipermail/asterisk-dev/2014-March/066102.html

g711_free() was introduced in spandsp 0.0.6pre4 and g711_release() became a
noop.  I opted not to remove the call to g711_release() since it is harmless
and to call g711_free() if we have a sufficiently recent version of spandsp.

(issue ASTERISK-20149)
Reported by: Alexandr Gordeev
........

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

Merged revisions 410830 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 11:52:15 +00:00
Matthew Jordan 38da8d2fda res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp
When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash
in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw
frame would be passed to modem_connect_tones_rx. That particular routine
expects the data to be in slin format. This patch looks at the frame type and,
if the data is ulaw/alaw, converts the format to slin before passing it to
modem_connect_tones_rx.

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

(closes issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Tested by: Michal Rybarik
patches:
  spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578)
........

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

Merged revisions 409991 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 02:22:59 +00:00
Matthew Jordan 8042f4cdd2 res_fax_spandsp: Always init T.38 session to avoid crashes during state change
Prior to this patch, res_fax_spandsp was conservative with how it initialized
the spandsp T.38 context. It would only initialize it if the driver thought
the current state was a T.38 fax. While this works fine in nominal situations,
in certain off nominal situations, res_fax_spandsp can believe that a T.38
fax will not occur when in fact one has started. In particular, this was
discovered when res_fax would fall back to audio after timing out on a T.38
upgrade. The SIP channel driver would continue to retry the re-INVITE and -
if the remote end responded after res_fax timed out with a 200 OK - a T.38
frame would be delivered to the res_fax stack when it no longer expected it.

As it turns out, there does not appear to be any downside to always
initializing the T.38 context, other than the actual memory allocation.
Since that avoids this off nominal situation (and others which are equally
likely hard to predict), this is the safest way to avoid this problem.

Much thanks to Torrey as well for providing a scenario that reproduces this
issue.

(closes issue ASTERISK-21242)
Reported by: Ashley Winters
Tested by: Torrey Searle
patches:
  always-init-t38.patch uploaded by awinters (License 6477)
  A_PARTY.xml uploaded by tsearle (License 5334)
........

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

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

Merged revisions 403458 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 03:21:56 +00:00
Matthew Jordan 2d2a47fae3 Fix some more fax test errors due to needing the peer in a bridge
In r389799, a number of fax errors in gateway mode were fixed by using the
appropriate function to get a channel's peer while in a bridge. This patch
does two things:
(1) It uses the same function in res_fax_spandsp while starting the fax
    gateway. Without this, the fax gateway will not actually start up, as
    res_fax_spandsp also must inspect the channel's peer in a two-party
    bridge
(2) It refactors some ao2 objects in sendfax_exec to use RAII_VAR. This was
    reverted in r389799 as some off nominal paths were getting hit without
    the fix in (1) that indicated an ao2 object issue; this turned out to
    be a red herring (which is an odd phrase)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-27 01:33:12 +00:00
Jonathan Rose 945fc670f9 res_fax_spandsp: fix t38 transmission bug caused by not returning success
This patch fixes the problem, but the issue includes a test which is still
being considered for the automated test suite.

(issue ASTERISK-20919)
Reported by: NITESH BANSAL
Patches:
	patch_ast_fax_spandsp.patch uploaded by NITESH BANSAL (license 6418)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22 22:19:02 +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
Jonathan Rose e96a59acfd Replace GNU old-style field designator extensions to fix clang warnings
(issue ASTERISK-19540)
Reported by: Makoto Dei
Patches:
	clang-gnu-designator.patch uploaded by Makoto Dei (license 5027)
........
Also add from the patch the portion in res_fax_spandsp that didn't apply to 1.8

Merged revisions 361142 from http://svn.asterisk.org/svn/asterisk/branches/1.8
(closes issue ASTERISK-19540)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-04 18:08:28 +00:00
Matthew Jordan 59a42de303 Correctly apply FAXOPT settings (V17, V27, V29) before starting spandsp layer
While the FAXOPT function could be used to set the modem capabilities, the
input to that function was not being applied correctly to the spandsp layer.
This patch applies the current model capabilities before starting the spandsp
layer.

(closes issue: ASTERISK-16409)
Reported by: Kristijan Vrban
Tested by: Matt Jordan, Matthew Nicholson
Patches:
  spandsp-modems-1.8.diff uploaded by mnicholson (license 5081)
  spandsp-modems-10.diff uploaded by mnicholson (license 5081)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 19:22:11 +00:00
Kevin P. Fleming fdda494776 Improve T.38 gateway V.21 preamble detection.
This commit removes the V.21 preamble detection code previously added to the
generic DSP implementation in Asterisk, and instead enhances the res_fax module
to be able to utilize V.21 preamble detection functionality made available by
FAX technology modules. This commit also adds such support to res_fax_spandsp,
which uses the Spandsp modem tone detection code to do the V.21 preamble
detection.

There should be no functional change here, other than much more reliable V.21
preamble detection (and thus T.38 gateway initiation).
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-28 18:59:16 +00:00
Matthew Nicholson 7067bb8b42 Merged revisions 333716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r333716 | mnicholson | 2011-08-29 13:22:58 -0500 (Mon, 29 Aug 2011) | 5 lines
  
  It is possible for the gateway to be attached when the channel is still
  negotiating T.38. This change handles that case.
  
  ASTERISK-18329
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-29 18:28:02 +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
Matthew Nicholson c3193742e0 updated irroots info for the authors section
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-01 12:45:09 +00:00
Matthew Nicholson 0f0956e67a Fax gateway functionality (i.e. translating between a T.30 terminal and a T.38
terminal). Can be enabled on a channel by setting FAXOPT(gateway)=yes in the
dialplan.

Big thanks to irroot for porting this code to use the framehooks api.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-30 18:22:28 +00:00
Tzafrir Cohen 2b56cf085c Merged revisions 314779 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314779 | tzafrir | 2011-04-22 16:59:43 +0300 (ו', 22 אפר 2011) | 2 lines
  
  Fix a few typos (shown by Lintian)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-22 14:49:47 +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
Matthew Nicholson 3b5d63fd2b Properly show the current page being transfered for 'fax show session'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21 15:54:29 +00:00
Mark Michelson 0a63e3fa10 Log spandsp's fax debug output to the FAX logger level.
Review: https://reviewboard.asterisk.org/r/658



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@264953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-21 15:15:58 +00:00
Matthew Nicholson 13f523731a Update res_fax and res_fax_spandsp to be compatible with Fax For Asterisk 1.2.
The fax session initilization code for T.38 faxes has been rewritten. T.38 session initialization was removed from generic_fax_exec, and split into two different code paths for receive and send.  Also the 'z' option (to send a T.38 reinvite if we do not receive one) was added to sendfax.

In the output of 'fax show sessions', the 'Type' column has been renamed to 'Tech' and replaced with a new 'Tech' column that will report 'G.711' or 'T.38'.

Control of ECM defaults has been added to res_fax

A 'fax show settings' CLI command has been added.

Support of the new AST_T38_REQUEST_PARMS control method request to handle channels that have already received a T.38 reinvite before the FAX application is start has been added.

Support for the 'fax show settings' command has been added to res_fax_spandsp and handling of the ECM flag has been slightly altered.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-26 14:18:15 +00:00
Matthew Nicholson 8ef8706944 Updated CHANGES file to mention res_fax and res_fax_spandsp.
Also fixed MODULEINFO depends and conflicts for app_fax, res_fax, and res_fax_spandsp.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03 15:39:45 +00:00
Matthew Nicholson 06dc8bc123 Merge res_fax and res_fax_spandsp.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-02 23:11:06 +00:00