Commit Graph

1727 Commits

Author SHA1 Message Date
Matthew Jordan 89bbecc724 Fix premature free'ing of the frame committed in r349608
Even though we set the frame to the ast_null_frame and return that,
the caller of the frame hook may still need the frame.  This now is
a bit more careful about when it frees the frame, i.e., only under
the same conditions that applied when we duplicated it in the first
place.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-05 23:58:26 +00:00
Matthew Jordan 12e3f412b5 Free successfully translated frame in fax_gateway_framehook
A frame that is translated via ast_translate is also duplicated via ast_frdup.
This will allocate a new frame on the heap, which needs to be free'd
at the appropriate time.  This issue reporter used valgrind to find that this
occurred in res_fax's fax_gateway_framehook; a quick search through the code
showed that only place this was currently not handling the translatted frame
properly.

(closes issue ASTERISK-19133)
Reported by: Sylvain Rochet
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-04 21:40:45 +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 Jordan d9651f2be9 Fix timing source dependency issues with MOH
Prior to this patch, res_musiconhold existed at the same module priority level
as the timing sources that it depends on.  This would cause a problem when
music on hold was reloaded, as the timing source could be changed after
res_musiconhold was processed.  This patch adds a new module priority level,
AST_MODPRI_TIMING, that the various timing modules are now loaded at.  This
now occurs before loading other resource modules, such that the timing source
is guaranteed to be set prior to resolving the timing source dependencies.

(closes issue ASTERISK-17474)
Reporter: Luke H
Tested by: Luke H, Vladimir Mikhelson, zzsurf, Wes Van Tlghem, elguero, Thomas Arimont
Patches:
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3_branch-1.8.diff uploaded by elguero (License #5026)
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3_branch-10.diff uploaded by elguero (License #5026)
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3.diff uploaded by elguero (License #5026)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-27 20:55:15 +00:00
Terry Wilson 78b17e6d41 Add a separate buffer for SRTCP packets
The function ast_srtp_protect used a common buffer for both SRTP and SRTCP
packets. Since this function can be called from multiple threads for the same
SRTP session (scheduler for SRTCP and channel for SRTP) it was possible for the
packets to become corrupted as the buffer was used by both threads
simultaneously.

This patch adds a separate buffer for SRTCP packets to avoid the problem.

(closes issue ASTERISK-18889, Reported/patch by Daniel Collins)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-19 01:36:21 +00:00
Richard Mudgett b05d4603c4 Fix crash during CDR update.
The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to
be called by different threads for the same channel.  The channel driver
thread and the PBX thread running dialplan.

* Add lock protection around CDR API calls that access an ast_channel
pointer.

(closes issue ASTERISK-18836)
Reported by: gpluser

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16 21:10:19 +00:00
Matthew Nicholson 1c78d82f18 Don't clear LOCALSTATIONID before sending or receiving. The user may set that
variable.

ASTERISK-18921
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14 22:05:57 +00:00
Kinsey Moore ae61df53f1 Fix chan_jingle/gtalk load regression introduced in r346087
Add missing symbol exports for ast_aji_client_destroy and ast_aji_buddy_destroy
for usage outside res_jabber.  Testing of these changes focused on res_jabber
itself, so this problem was missed.

Reported-by: Michael Spiceland
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-05 14:47:11 +00:00
Richard Mudgett 83cd844b82 Re-resolve the STUN address if a STUN poll fails for res_stun_monitor.
The STUN socket must remain open between polls or the external address
seen by the STUN server is likely to change.  However, if the STUN request
poll fails then the STUN server address needs to be re-resolved and the
STUN socket needs to be closed and reopened.

* Re-resolve the STUN server address and create a new socket if the STUN
request poll fails.

* Fix ast_stun_request() return value consistency.

* Fix ast_stun_request() to check the received packet for expected message
type and transaction ID.

* Fix ast_stun_request() to read packets until timeout or an associated
response packet is found.  The stun_purge_socket() hack is no longer
required.

* Reduce ast_stun_request() error messages to debug output.

* No longer pass in the destination address to ast_stun_request() if the
socket is already bound or connected to the destination.

(closes issue ASTERISK-18327)
Reported by: Wolfram Joost
Tested by: rmudgett

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-01 21:19:41 +00:00
Tilghman Lesher 77b670c4ab Allow each logging destination and console to have its own notion of the verbosity level.
Review: https://reviewboard.asterisk.org/r/1599


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 18:43:16 +00:00
Stefan Schmidt edaf970c38 Fix regression that 'rtp/rtcp set debup ip' only works when also a port was specified.
(closes issue ASTERISK-18693)
Reported by: Davide Dal Fra

Review: https://reviewboard.asterisk.org/r/1600/
Reviewed by: Walter Doekes
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-28 14:34:14 +00:00
Kinsey Moore e6ca768081 Fix res_jabber resource leaks
This should fix almost all resource leaks in res_jabber that involve
ASTOBJ_CONTAINER_FIND and resolves an ambiguous situation where
ast_aji_get_client would sometimes bump an object's refcount and sometimes not.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 17:16:33 +00:00
Terry Wilson 6d05a31d9f Resume playing existing hold music for cached realtime MOH
As a result of the fix for ASTERISK-18039, realtime caching MOH no longer
properly resumes playing back a file between different holds in the same call.
This is because scanning for new files causes the existing file array to be
emptied and we were just comparing that the saved pointer to the filename
matched the pointer to the filename in a particular position in the array. An
easy fix is to save the filename instead of a pointer to it and then do a
strcmp instead of comparing the addresses.

(closes issue ASTERISK-18912)
Review: https://reviewboard.asterisk.org/r/1596/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 16:12:34 +00:00
Paul Belanger f59322f724 Added support level for new modules
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 16:10:45 +00:00
Richard Mudgett a86037d959 Make FastAGI HANGUP show up in AGI debug output.
* Change from using send() to ast_agi_send() so the HANGUP shows up in the
AGI debug output.

(closes issue ASTERISK-18723)
Reported by: James Van Vleet
Patches:
      jira_asterisk_18723_v1.8.patch (license #5621) patch uploaded by rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-15 20:11:06 +00:00
Terry Wilson bd486fcf41 Don't forget to rescan MOH files for cached realtime classes
Realtime MOH class caching was implemented because without it, you would build
a completely new MOH class and would start the music over at the beginning each
time hold was pressed in a conversation. Unfortunately, this broke re-scanning
for file changes for realtime MOH classes. This patch corrects that issue.

(closes issue ASTERISK-18039)
Review: https://reviewboard.asterisk.org/r/1579/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-12 00:36:37 +00:00
Matthew Nicholson 3d44965e70 only attempt to do stun handling on ipv4 or ipv4 mapped to ipv6 addresses
Patch by: jkonieczny (modified)
ASTERISK-18490
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 16:29:13 +00:00
Walter Doekes 969f4aa3d6 Fix sqlite config driver segfault and broken queries
The sqlite realtime handler assumed you had a static config configured
as well. The realtime multientry handler assumed that you weren't using
dynamic realtime.

(closes issue ASTERISK-18354)
(closes issue ASTERISK-18355)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-03 20:37:50 +00:00
Walter Doekes 25ee5f83b5 Cleanup references to sipusers and sipfriends dynamic realtime families
Somewhere between 1.4 and 1.8 the sipusers family has become completely
unused. Before that, the sipfriends family had been obsoleted in favor
of separate sipusers and sippeers families. Apparently, they have been
merged back again into a single family which is now called "sippeers".

Reviewed by: irroot, oej, pabelanger

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 19:53:26 +00:00
Terry Wilson 4b826c46b3 Don't crash on empty notify channel
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-30 02:31:02 +00:00
Jonathan Rose e5ac65bb43 Fix sequence number overflow over 16 bits causing codec change in RTP packets.
Sequence number was handled as an unsigned integer (usually 32 bits I think, more
depending on the architecture) and was put into the rtp packet which is basically
just a bunch of bits using an or operation. Sequence number only has 16 bits
allocated to it in an RTP packet anyway, so it would add to the next field which
just happened to be the codec. This makes sure the sequence number is set to be
a 16 bit integer regardless of architecture (hopefully) and also makes it so the
incrementing of the sequence number does bitwise or at the peak of a 16 bit number
so that the value will be set back to 0 when going beyond 65535 anyway.

(closes issue ASTERISK-18291)
Reported by: Will Schick
Review: https://reviewboard.asterisk.org/r/1542/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-27 19:48:23 +00:00
Jonathan Rose b61256c64b Cleanup reference leaks in res_jabber
res_jabber.c had a number of places where astobjs would be referenced and have their
reference counts bumped without having a dereference made before the object lost scope.
This patch adds a number of ASTOBJ_UNREFs to resolve that.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-27 14:24:01 +00:00
Gregory Nietsky b009ea5216 White space fixes in res_fax
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-21 09:16:12 +00:00
Richard Mudgett b961d57c4c Fix AGI exec Park to honor the Park application parameters.
The fix for ASTERISK-12715 and ASTERISK-12685 added a check for the Park
application because the channel needed to be masqueraded to prevent a
crash.  Since the Park application now always masquerades the channel into
the parking lot, the special check is no longer needed.  The fix also
resulted in AGI exec Park attempting to double park the call and not honor
the Park application parameters.

* Removed no longer necessary call to ast_masq_park_call() by AGI exec for
the Park application.  (Reverts -r146923)

* Fix Park application to only return 0 or -1.  The AGI exec Park was
causing broken pipe error messages because the Park application returned 1
on successful park.

(closes issue ASTERISK-18737)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 22:03:35 +00:00
Kinsey Moore 4b9546abdf Merged revisions 340971 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r340971 | kmoore | 2011-10-14 15:50:37 -0500 (Fri, 14 Oct 2011) | 15 lines
  
  Merged revisions 340970 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r340970 | kmoore | 2011-10-14 15:49:39 -0500 (Fri, 14 Oct 2011) | 8 lines
    
    Quiet RTCP Receiver Reports during fax transmission
    
    RTCP is now disabled for "inactive" RTP audio streams during SIP T.38 sessions.
    The ability to disable RTCP streams in res_rtp_asterisk was missing, so this
    code was added to support the bug fix.
    
    (closes issue ASTERISK-18400)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-14 20:51:19 +00:00
Terry Wilson 9d83162d55 Don't skip the query field on a realtime multi query
There is no documented reason to not add the query field to the varlist
returned by a realtime multi query, despite the config category being
set to its value. Of course, there is no documentation that the category
should be set to the value either. There is lots of no documentation
when it comes to realtime. But, other engines do not skip this field so
I am forcing this backend to follow the convention, because not doing so
is very silly.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-13 00:17:42 +00:00
Matthew Nicholson bb07ca66a1 Merged revisions 340109 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r340109 | mnicholson | 2011-10-10 09:15:41 -0500 (Mon, 10 Oct 2011) | 18 lines
  
  Merged revisions 340108 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r340108 | mnicholson | 2011-10-10 09:14:48 -0500 (Mon, 10 Oct 2011) | 11 lines
    
    Load the proper XML documentation when multiple modules document the same application.
    
    This patch adds an optional "module" attribute to the XML documentation spec
    that allows the documentation processor to match apps with identical names from
    different modules to their documentation. This patch also fixes a number of
    bugs with the documentation processor and should make it a little more
    efficient. Support for multiple languages has also been properly implemented.
    
    ASTERISK-18130
    Review: https://reviewboard.asterisk.org/r/1485/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 14:16:27 +00:00
Matthew Nicholson 07133b3a96 Merged revisions 339507 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339507 | mnicholson | 2011-10-05 11:32:59 -0500 (Wed, 05 Oct 2011) | 10 lines
  
  Merged revisions 339505 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339505 | mnicholson | 2011-10-05 11:31:21 -0500 (Wed, 05 Oct 2011) | 3 lines
    
    The app name in the documentation must match what we register the application
    as.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-05 16:35:03 +00:00
Gregory Nietsky b698038995 Add generic faxdetect framehook to res_fax
Added func FAXOPT(faxdetect)=yes,cng,t38[,timeout]/no
to enable dialplan faxdetect allowing more flexibility.

as soon as a fax tone is detected the framehook is removed.
there is a penalty involved in running this framehook on
non G711 channels as they will be transcoded.

CNG tone is suppresed using the SQUELCH flag to allow
WaitForNoise to be run on the channel to detect Voice.

(Closes issue ASTERISK-18569)
Reported by: Myself
Reviewed by: Matthew Nicholson, Kevin Fleming

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-05 06:50:18 +00:00
Gregory Nietsky 1b3bd7ddb4 Merged revisions 339463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r339463 | irroot | 2011-10-05 08:28:46 +0200 (Wed, 05 Oct 2011) | 9 lines
  
  Only change the capabilities on the gateway when
  the session is been destroyed there is still
  a race condition that ends in a segfault.
  
  if the caps are changed the logic in res_fax_spandsp
  will run T30 code not gateway code to end the session.
  this has been experienced on a "slower" under spec system.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-05 06:40:40 +00:00
Jonathan Rose 635118043d Merged revisions 339298 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339298 | jrose | 2011-10-04 09:09:50 -0500 (Tue, 04 Oct 2011) | 19 lines
  
  Merged revisions 339297 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339297 | jrose | 2011-10-04 09:01:05 -0500 (Tue, 04 Oct 2011) | 13 lines
    
    Reverting revision 333265 due to component connection problems it introduces.
    
    I'm going to attempt some generic res_jabber cleanup and come up with a new fix for this
    problem, but first it seems prudent to remove this rather broad attempt to fix it and
    instead approach this problem either from the same angle but looking only at canceling
    (or possibly rescheduling) the send when we absolutely know it will cause a segfault 
    or, if that can't be easily accomplished, strictly from the devstate side of things.
    Also, I'm pretty sure a lot of the code in res_jabber isn't thread safe.
    
    (issue ASTERISK-18626)
    (issue ASTERISK-18078)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-04 14:22:11 +00:00
Matthew Nicholson 69ea68a1f5 Merged revisions 339045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r339045 | mnicholson | 2011-10-03 10:54:55 -0500 (Mon, 03 Oct 2011) | 4 lines
  
  Ported ast_fax_caps_to_str() to 10, not sure why it wasn't already here.
  
  This function prints a list of caps instead of a hex bitfield.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03 15:55:28 +00:00
Matthew Nicholson 0932d899e6 Merged revisions 339043 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r339043 | mnicholson | 2011-10-03 10:41:36 -0500 (Mon, 03 Oct 2011) | 2 lines
  
  Don't clear the AST_FAX_TECH_MULTI_DOC flag right after we set it.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03 15:42:01 +00:00
Matthew Nicholson 9a5de09f92 Merged revisions 339011 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r339011 | mnicholson | 2011-10-03 10:19:44 -0500 (Mon, 03 Oct 2011) | 2 lines
  
  properly remove the AST_FAX_TECH_GATEWAY flag (instead of setting all of the other flags)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03 15:21:50 +00:00
Gregory Nietsky ebf3632e08 Merged revisions 338950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r338950 | irroot | 2011-10-03 11:37:59 +0200 (Mon, 03 Oct 2011) | 14 lines
  
  Fixup a race condition in res_fax.c where FAXOPT(gateway)=no will
  turn off the gateway but the framehook is not destroyed.
  
  this problem happens when a gateway is attempted in the dialplan and
  the device is not available i may want to do fax to mail in the server
  it will not be allowed.
  
  instead of checking only AST_FAX_TECH_GATEWAY also check gateway_id
  
  Reverts 338904
  
  Fix some white space.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03 09:49:38 +00:00
Gregory Nietsky b5147c8817 Merged revisions 338904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r338904 | irroot | 2011-10-02 16:17:32 +0200 (Sun, 02 Oct 2011) | 8 lines
  
  Remove T38 Gateway capability when detaching framehook.
  
  SET(FAXOPT(gateway)=no) does not remove the capability when 
  detaching the framehook.
  
  small patch to fix this problem.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-02 14:20:35 +00:00
Olle Johansson c04ab6b35c Just formatting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-29 09:32:34 +00:00
Gregory Nietsky 8a74aa9ef9 Merged revisions 337542 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r337542 | irroot | 2011-09-22 13:44:22 +0200 (Thu, 22 Sep 2011) | 14 lines
  
  Merged revisions 337541 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r337541 | irroot | 2011-09-22 13:39:49 +0200 (Thu, 22 Sep 2011) | 8 lines
    
    Add warned to ast_srtp to prevent errors on each frame from libsrtp
    
    The first 9 frames are not reported as some devices dont use srtp 
    from first frame these are suppresed.
    
    the warning is then output only once every 100 frames.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-22 11:46:35 +00:00
Olle Johansson 2ae7ae00c8 Merged revisions 337178 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r337178 | oej | 2011-09-21 10:51:41 +0200 (Ons, 21 Sep 2011) | 14 lines
  
  Change strictrtp option to default to yes in the RTP module
  
  Suggested by Kapejod on Facebook
  
  Review: https://reviewboard.asterisk.org/r/1448/
  (closes issue ASTERISK-18587)
  
  Thanks for quick feedback to kpfleming and Tilghman
  --Denna och nedanstående rader kommer inte med i loggmeddelandet--
  
  M    CHANGES
  M    configs/rtp.conf.sample
  M    res/res_rtp_asterisk.c
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-21 09:06:22 +00:00
Russell Bryant 14d3f891e0 Merged revisions 336878 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336878 | russell | 2011-09-19 20:03:55 -0500 (Mon, 19 Sep 2011) | 43 lines
  
  Merged revisions 336877 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336877 | russell | 2011-09-19 19:56:20 -0500 (Mon, 19 Sep 2011) | 36 lines
    
    Fix crashes in ast_rtcp_write().
    
    This patch addresses crashes related to RTCP handling.  The backtraces just
    show a crash in ast_rtcp_write() where it appears that the RTP instance is no
    longer valid.  There is a race condition with scheduled RTCP transmissions and
    the destruction of the RTP instance.  This patch utilizes the fact that
    ast_rtp_instance is a reference counted object and ensures that it will not get
    destroyed while a reference is still around due to scheduled RTCP
    transmissions.
    
    RTCP transmissions are scheduled and executed from the chan_sip scheduler
    context.  This scheduler context is processed in the SIP monitor thread.  The
    destruction of an RTP instance occurs when the associated sip_pvt gets
    destroyed (which happens when the sip_pvt reference count reaches 0).  However,
    the SIP monitor thread is not the only thread that can cause a sip_pvt to get
    destroyed.  The sip_hangup function, executed from a channel thread, also
    decrements the reference count on a sip_pvt and could cause it to get
    destroyed.
    
    While this is being changed anyway, the patch also removes calling
    ast_sched_del() from within the RTCP scheduler callback.  It's not helpful.
    Simply returning 0 prevents the callback from being rescheduled.
    
    (closes issue ASTERISK-18570)
    
    Related issues that look like they are the same problem:
    
    (issue ASTERISK-17560)
    (issue ASTERISK-15406)
    (issue ASTERISK-15257)
    (issue ASTERISK-13334)
    (issue ASTERISK-9977)
    (issue ASTERISK-9716)
    
    Review: https://reviewboard.asterisk.org/r/1444/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20 01:11:18 +00:00
Jonathan Rose 364eb56835 Merged revisions 336717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336717 | jrose | 2011-09-19 15:16:23 -0500 (Mon, 19 Sep 2011) | 14 lines
  
  Merged revisions 336716 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336716 | jrose | 2011-09-19 15:07:36 -0500 (Mon, 19 Sep 2011) | 7 lines
    
    Document applications that play audio and do not answer unanswered calls.
    
    This patch is part of an effort to document early media and its usage. If you are
    interested in contributing to this documentation effort, there are probably other
    applications worth documenting as well as an Asterisk wiki article at
    https://wiki.asterisk.org/wiki/display/AST/Early+Media+and+the+Progress+Application
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:23:29 +00:00
Russell Bryant 2a25779d47 Merged revisions 335510 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r335510 | russell | 2011-09-13 02:24:34 -0500 (Tue, 13 Sep 2011) | 22 lines
  
  Merged revisions 335497 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r335497 | russell | 2011-09-13 02:11:36 -0500 (Tue, 13 Sep 2011) | 15 lines
    
    Fix a crash in res_ais.
    
    This patch resolves a crash observed in a load testing environment that
    involved the use of the res_ais module.  I observed some crashes where
    the event delivery callback would get called, but the length parameter
    incidcating how much data there was to read was 0.  The code assumed
    (with good reason I would think) that if this callback got called, there
    was an event available to read.  However, if the rare case that there's
    nothing there, catch it and return instead of blowing up.
    
    More specifically, the change always ensure that the size of the received
    event in the cluster is always big enough to be a real ast_event.
    
    Review: https://reviewboard.asterisk.org/r/1423/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-13 07:35:59 +00:00
Terry Wilson 1fed068bae Add SQLite 3 realtime support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-11 17:09:36 +00:00
Richard Mudgett 35e27201c7 Merged revisions 334357 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334357 | rmudgett | 2011-09-02 16:08:16 -0500 (Fri, 02 Sep 2011) | 26 lines
  
  Merged revisions 334355 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334355 | rmudgett | 2011-09-02 15:59:49 -0500 (Fri, 02 Sep 2011) | 19 lines
    
    MusicOnHold has extra unref which may lead to memory corruption and crash.
    
    The problem happens when a call is disconnected and you had started a MOH 
    class that does not use the files mode.  If you define REF_DEBUG and 
    recreate the problem, it will announce itself with the following warning: 
    Attempt to unref mohclass 0xb70722e0 (default) when only 1 ref remained, 
    and class is still in a container!  
    
    * Fixed moh_alloc() and moh_release() functions not handling the
    state->class reference consistently.
    
    (closes issue ASTERISK-18346)
    Reported by: Mark Murawski
    Patches:
          jira_asterisk_18346_v1.8.patch (license #5621) patch uploaded by rmudgett
    Tested by: rmudgett, Mark Murawski
    
    Review: https://reviewboard.asterisk.org/r/1404/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-02 21:09:31 +00:00
Tilghman Lesher e68be70646 Merged revisions 334230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334230 | tilghman | 2011-09-01 12:30:19 -0500 (Thu, 01 Sep 2011) | 25 lines
  
  Merged revisions 334229 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334229 | tilghman | 2011-09-01 12:28:09 -0500 (Thu, 01 Sep 2011) | 18 lines
    
    Create a local alias for ast_odbc_clear_cache.
    
    As a function pointer, the reference has to be resolved at load time
    irrespective of the RTLD_LAZY flag.  Creating a local alias solves
    this problem, because the structure is initialized with that local
    function pointer, while the actual function can remain lazily linked
    until runtime.
    
    The reason why this is important is because we lazily load function
    references during the module loading process, in order to obtain
    priority values for each module, ensuring that modules are loaded in
    the correct order.  Previous to this change, when this module was
    initially loaded, the module loader would emit a symbol resolution
    error, because of the above requirement.
    
    Closes ASTERISK-18399 (reported by Mikael Carlsson, fix suggested by
    Walter Doekes, patch by me)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-01 17:31:34 +00:00
Matthew Nicholson dadc749dac Merged revisions 334064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r334064 | mnicholson | 2011-08-31 11:31:00 -0500 (Wed, 31 Aug 2011) | 4 lines
  
  only alter the gateway_timeout when attching the gateway to a channel
  
  ASTERISK-18219
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-31 16:31:30 +00:00
Matthew Nicholson cae7253575 Merged revisions 333895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r333895 | mnicholson | 2011-08-30 09:01:31 -0500 (Tue, 30 Aug 2011) | 6 lines
  
  Replaced FAXOPT(gwtimeout) with a second parameter to FAXOPT(gateway).
  
  Patch by: irroot
  Review: https://reviewboard.asterisk.org/r/1385/
  ASTERISK-18219
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-30 14:03:02 +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
Jonathan Rose d836c88b49 Merged revisions 333570 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r333570 | jrose | 2011-08-29 10:56:56 -0500 (Mon, 29 Aug 2011) | 11 lines
  
  Merged revisions 333569 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r333569 | jrose | 2011-08-29 10:55:34 -0500 (Mon, 29 Aug 2011) | 4 lines
    
    Accidental use of variable client->status instead of client->state in from ASTERISK-18078
    
    (issue ASTERISK-18078)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-29 15:58:24 +00:00
Jonathan Rose 10183c021e Merged revisions 333410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r333410 | jrose | 2011-08-26 11:28:03 -0500 (Fri, 26 Aug 2011) | 19 lines
  
  Merged revisions 333378 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r333378 | jrose | 2011-08-26 11:19:07 -0500 (Fri, 26 Aug 2011) | 13 lines
    
    [patch] Buddies are always auto-registered when processing the roster
    
    Reporter said autoregister flag was ignored for registering 'buddies' which
    had a subscription to us. Verified that this was the case and observed how
    the patch addressed this and made sure it didn't break anything.
    
    (closes issue ASTERISK-14233)
    Reported by: Simon Arlott
    Patches:
          asterisk-0015229.patch (license #5756) patch uploaded by Simon Arlott
    Tested by: Jonathan Rose
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-26 16:38:37 +00:00