Commit Graph

2285 Commits

Author SHA1 Message Date
Matthew Jordan
f13c3b3fd2 Fix for incorrect voicemail duration in external notifications
This patch fixes an issue where the voicemail duration was being reported
with a duration significantly less than the actual sound file duration.
Voicemails that contained mostly silence were reporting the duration of
only the sound in the file, as opposed to the duration of the file with
the silence.  This patch fixes this by having two durations reported in
the __ast_play_and_record family of functions - the sound_duration and the
actual duration of the file.  The sound_duration, which is optional, now
reports the duration of the sound in the file, while the actual full duration
of the file is reported in the duration parameter.  This allows the voicemail
applications to use the sound_duration for minimum duration checking, while
reporting the full duration to external parties if the voicemail is kept.

(issue ASTERISK-2234)
(closes issue ASTERISK-16981)
Reported by: Mary Ciuciu, Byron Clark, Brad House, Karsten Wemheuer, KevinH
Tested by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@337118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20 22:38:54 +00:00
Tilghman Lesher
02795f190e Various changes to allow 1.8 to compile on Mac OS X Lion (10.7)
* Makefile workaround for 10.6 extended to work on 10.7 and later.
* Now uses the 'weak' symbol for Lion systems, which no longer support
  'weak_import'

Closes ASTERISK-17612.
Closes ASTERISK-18213.

Tested by: tilghman, oej.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@336733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:27:03 +00:00
Jonathan Rose
21714a05b6 Fix bad RTP media bridges in directmedia calls on peers separated by multiple Asterisk nodes.
In a situation involving devices on separate Asterisk trunks, the remote RTP bridge would
break when starting a call with directmedia. This patch queues a new type of control frame
so that our RTP bridge loop can properly detect when these situations occur and check to see
if peers need to be updated in order to send their media to the proper location.

(Closes issue ASTERISK-18340)
Reported by: Thomas Arimont
(Closes issue ASTERISK-17725)
Reported by: kwk
Tested by: twilson, jrose


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@336294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-16 19:53:40 +00:00
Richard Mudgett
9910558356 Remove unnecessary libpri dependency checks in the configure script.
Using the --with-pri option with the configure script generated an error
about not having PRI_L2_PERSISTENCE if you did not have the absolute
latest libpri SVN checkout installed.

The AST_EXT_LIB_SETUP_DEPENDENT macro in the configure.ac script seems to
be for libraries that are dependent upon other libraries and not
necessarily for optional/added features within a library.

(closes issue ASTERISK-18535)
Reported by: Michael Keuter


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@335911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-14 18:21:35 +00:00
Russell Bryant
5f1882731a 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/branches/1.8@335497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-13 07:11:36 +00:00
Matthew Jordan
7dc49195d8 Updated SIP 484 handling; added Incomplete control frame
When a SIP phone uses the dial application and receives a 484 Address 
Incomplete response, if overlapped dialing is enabled for SIP, then
the 484 Address Incomplete is forwarded back to the SIP phone and the
HANGUPCAUSE channel variable is set to 28.  Previously, the Incomplete
application dialplan logic was automatically triggered; now, explicit
dialplan usage of the application is required.

Additionally, this patch adds a new AST_CONTOL_FRAME type called
AST_CONTROL_INCOMPLETE.  If a channel driver receives this control frame,
it is an indication that the dialplan expects more digits back from the
device.  If the device supports overlap dialing it should attempt to 
notify the device that the dialplan is waiting for more digits; otherwise,
it can handle the frame in a manner appropriate to the channel driver.

(closes issue ASTERISK-17288)
Reported by: Mikael Carlsson
Tested by: Matthew Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@335064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-09 16:09:09 +00:00
Richard Mudgett
6d49117675 Fix potential memory allocation failure crashes in config.c.
* Added required checks to the returned memory allocation pointers to
prevent crashes.

* Made ast_include_rename() create a replacement ast_variable list node if
the new filename is longer than the available space.  Fixes potential
crash and memory leak.

* Factored out ast_variable_move() from ast_variable_update() so
ast_include_rename() can also use it when creating a replacement
ast_variable list node.

* Made the filename stuffed at the end of the struct a minimum allocated
size in ast_variable_new() in case ast_include_rename() changes the stored
filename.

* Constify struct char pointers pointing to strings stuffed at the end of
the struct for: ast_variable, cache_file_mtime, and ast_config_map.

* Factored out cfmtime_new() to remove inlined code and allow some struct
pointers to become const.

* Removed the list lock from struct cache_file_mtime that was never used.

* Added doxygen comments to several structure elements and better
documented what strings are stuffed at the struct end char array.

* Reworked ast_config_text_file_save() and set_fn() to handle allocation
failure of the include file scratch pad object tracking blank lines.

* Made ast_config_text_file_save() fn[] declared with PATH_MAX to ensure
it is long enough for any filename with path.  Also reduced the number of
container fileset buckets from a rediculus 180,000 to 1023.

JIRA AST-618

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@334296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-02 17:10:58 +00:00
Richard Mudgett
b806cbbccb Add some do not hold locks notes to channel.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@333785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-29 21:06:16 +00:00
Richard Mudgett
b1f11e0df4 Revert previous commit. Not ready yet.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@332945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 22:11:54 +00:00
Richard Mudgett
c0ce03d77f Signed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@332943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 22:02:52 +00:00
Matthew Jordan
56549c96ab Review: https://reviewboard.asterisk.org/r/1364/
This update adds a new AMI event, TestEvent, which is enabled when the TEST_FRAMEWORK compiler flag is defined.  It also adds initial usage of this event to app_voicemail.  The TestEvent AMI event is used extensively by the voicemail tests in the Asterisk Test Suite.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@332817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 18:15:51 +00:00
Tilghman Lesher
582aacb3d8 Re-add support for spaces in pathnames, including now spaces in DESTDIR.
This was initially added to 1.8 prior to release, primarily to support the
standard paths on Mac OS X, but was partially reverted recently in Subversion,
due to the lack of support for spaces in DESTDIR.  This commit restores support
for the standard paths on Mac OS X, and also includes support for spaces in
DESTDIR.

(closes issue ASTERISK-18290)
Reported by: pabelanger

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@332355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 19:21:36 +00:00
Richard Mudgett
9328590ddb Outgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.
France Telecom brings layer 2 and layer 1 down on BRI lines when the line
is idle.  When layer 1 goes down Asterisk cannot make outgoing calls and
the HA8 and HB8 cards also get IRQ misses.

The inability to make outgoing calls is because the line is in red alarm
and Asterisk will not make calls over a line it considers unavailable.
The IRQ misses for the HA8 and HB8 card are because the hardware is
switching clock sources from the line which just brought layer 1 down to
internal timing.

There is a DAHDI option for the B410P card to not tell Asterisk that layer
1 went down so Asterisk will allow outgoing calls: "modprobe wcb4xxp
teignored=1".  There is a similar DAHDI option for the HA8 and HB8 cards:
"modprobe wctdm24xxp bri_teignored=1".  Unfortunately that will not clear
up the IRQ misses when the telco brings layer 1 down.

* Add layer 2 persistence option to customize the layer 2 behavior on BRI
PTMP lines.  The new option has three settings: 1) Use libpri default
layer 2 setting.  2) Keep layer 2 up.  Bring layer 2 back up when the peer
brings it down.  3) Leave layer 2 down when the peer brings it down.
Layer 2 will be brought up as needed for outgoing calls.

JIRA AST-598


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@332264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 15:51:08 +00:00
Jonathan Rose
31a1b94622 Fixes some voicemail forwarding behavior based around prepend mode.
Formerly, prepend forwarding would have the user record a message with no useful prompt
and an expectation for the user to push a button on the phone when finished recording.
If a length of silence was detected instead, the recording would be canceled and the user
would re-enter the voicemail forwarding menu. Subsequent time-outs in prepend recording
would also bug out in the sense that they would write over the original message and get
sent to the recipient regardless of whether they timed out or were accepted. This patch
fixes this issue and adds a prompt which will be played after a timeout informing the
user that they needed to press a button. Currently, the sound files that we have are
somewhat inadquate for this, so after the call we simply have Allison say "Please try
again. Then press pound." which actually relies on two separate sound files. Just one
would be more appropriate.

reporter: Vlad Povorozniuc
Review: https://reviewboard.asterisk.org/r/1327/ 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-26 13:25:35 +00:00
Kinsey Moore
5905269669 RTP bridge away with inband DTMF and feature detection
When deciding whether Asterisk was allowed to bridge the call away from the
core, chan_sip did not take into account the usage of features on dialed
channels that require monitoring of DTMF on channels utilizing inband DTMF.
This would cause Asterisk to allow the call to be locally or remotely bridged, 
preventing access to the data required to detect activations of such features.

(closes 17237)
Review: https://reviewboard.asterisk.org/r/1302/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 17:57:18 +00:00
Terry Wilson
d72bfe9db3 Make AST_LIST_REMOVE safer
AST_LIST_REMOVE shouldn't modify the element passed in if it isn't found. This
commit also adds linked list unit tests.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 01:35:53 +00:00
Terry Wilson
4a19bd7e74 Update chan_gtalk to work with changed GMail-based calls
The messages sent by the GMail client have changed, but include the
old-style messages as well. This patch checks for this case and
uses the old-style offer.

(closes issue ASTERISK-18084)
Review: https://reviewboard.asterisk.org/r/1312/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 19:41:59 +00:00
Jonathan Rose
83fad31713 DTMF wasn't being logged on connected consoles when enabled in logger.conf
Previously in order for DTMF to be logged in a connected console session, the user would
have to do logger set channel DTMF on.  This corrects that so that it is on by default.
This issue was caused by an off by one error incurred by a logger level count of 6 in
logger.h where it should have been 7.

(closes issue: ASTERISK-17974)
Reported by: Luke H



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-24 16:48:06 +00:00
David Vossel
e1adc7cefa 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: https://origsvn.digium.com/svn/asterisk/branches/1.8@324652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23 18:23:21 +00:00
Terry Wilson
0ada0bfea3 Stop sending IPv6 link-local scope-ids in SIP messages
The idea behind the patch listed below was used, but in a more targeted manner.
There are now address stringification functions for addresses that are meant to
be sent to a remote party. Link-local scope-ids only make sense on the machine
from which they originate and so are stripped in the new functions.

There is also a host sanitization function added to chan_sip which is used
for when peer and dialog tohost fields or sip_registry hostnames are used to
craft a SIP message.

Also added are some basic unit tests for netsock2 address parsing.

(closes issue ASTERISK-17711)
Reported by: ch_djalel
Patches:
      asterisk-1.8.3.2-ipv6_ll_scope.patch uploaded by ch_djalel (license 1251)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-22 18:52:04 +00:00
David Vossel
87908a3f5d Fixes locking inversion issue in ast_async_goto()
During this function we can not hold the "chan" lock while
doing the masquerade, the explicit goto on the tmp chan, or
the channel alloc.  Instead we need to get the channel lock,
store off information about the channel that we need, and
then let the channel lock go for the remainder of the function.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-21 20:11:52 +00:00
Terry Wilson
c84e7b911e Lock the channel before calling the setoption callback
The channel needs to be locked before calling these callback functions. Also,
sip_setoption needs to lock the pvt and a check p->rtp is non-null before using
it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-16 22:35:41 +00:00
Terry Wilson
c71181a78f Make ARRAY_LEN() return the same type on x86 and x86_64 systems
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 19:58:18 +00:00
Terry Wilson
ee2920afba Add rtpkeepalives back to 1.8
The RTP-engine conversion left out support for handling rtpkeepalives.
This patch adds them back.

(closes issue ASTERISK-17304)
Reported by: lmadsen

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-14 16:33:55 +00:00
Terry Wilson
b304546811 Correct ast_db_deltree documentation
ast_db_deltree returns -1 on error, otherwise the number of deletions


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 22:29:20 +00:00
Richard Mudgett
aec1979e7f Remove potential deadlock in call pickup race.
Deadlock is possible in ast_do_pickup() when holding the target channel
lock and trying to get the chan channel lock.  Also, holding the target
lock when calling ast_channel_masquerade() is not a good idea because that
routine does deadlock avoidance.

* Removed the need to hold the target lock after marking the target with a
datastore and getting the connected line data off of the target channel.

* Moved can_pickup() to ast_can_pickup() in features.c.  Now all the call
pickup methods use the same basic call pickup availability check.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 16:31:53 +00:00
Jonathan Rose
5f46b994f4 Adds ast_escape_encoded utility to properly handle escaping of quoted field before uri.
This commit backports a feature in trunk affecting initreqprep so that display name won't
be encoded improperly. Also includes unit tests for the ast_escape_quoted function.
This patch gives 1.8 a much improved outlook in countries which don't use standard
ASCII characters.

(closes issue ASTERISK-16949)
Reported by: Örn Arnarson
Review: https://reviewboard.asterisk.org/r/1235/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 14:06:42 +00:00
Jonathan Rose
c728c8d56b Fixes level toggling for logger set levels since it was reversed
(closes issue ASTERISK-17850)
Reported by: Luke H
Tested by: jrose, Luke H
  
Review: https://reviewboard.asterisk.org/r/1244/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-06 19:07:56 +00:00
Richard Mudgett
a32c86fb71 Constify subscription description parameter string.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 19:56:09 +00:00
Richard Mudgett
8668ec7ef9 Update some comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-31 20:54:35 +00:00
Leif Madsen
9718442188 Fix issue with playback of H.261 video.
(closes issue #19379)
Reported by: neutrino88
Patches:
      videoprompt.patch uploaded by neutrino88 (license 297)
(changes by russell)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 21:54:54 +00:00
Richard Mudgett
7257b78f53 Update ast_sockaddr comment with an important note.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-26 18:10:17 +00:00
Richard Mudgett
aa64eb1077 Give zombies a safe channel driver to use.
Recent crashes from zombie channels suggests that they need a safe home to
goto.  When a masquerade happens, the physical part of the zombie channel
is hungup.  The hangup normally sets the channel private pointer to NULL.
If someone then blindly does a callback to the channel driver, a crash is
likely because the private pointer is NULL.

The masquerade now sets the channel technology of zombie channels to the
kill channel driver.

Related to the following issues:
(issue #19116)
(issue #19310)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25 16:23:11 +00:00
Terry Wilson
95bf6f2fc3 Revert part of a change to the bridging API code
The capabilities used in the bridging API are very different than the
ones used for formats. When the conversion was made expanding the bit
width of codecs, the bridging code was accidentally accosted in ways
that it didn't deserve.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-19 23:28:13 +00:00
Paul Belanger
e8935ca8e4 Support gmime-2.4
(closes issue #18863)
Reported by: tzafrir
Patches:
      gmime-2.4-18.diff uploaded by tzafrir (license 46)
      Tested by: tzafrir

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 14:35:21 +00:00
Alec L Davis
87d80af96c Fix directed group pickup feature code *8 with pickupsounds enabled
Since 1.6.2, the new pickupsound and pickupfailsound in features.conf cause many issues.

1). chan_sip:handle_request_invite() shouldn't be playing out the fail/success audio, as it has 'netlock' locked.
2). dialplan applications for directed_pickups shouldn't beep.
3). feature code for directed pickup should beep on success/failure if configured.

Created a sip_pickup() thread to handle the pickup and playout the audio, spawned from handle_request_invite.

Moved app_directed:pickup_do() to features:ast_do_pickup().

Functions below, all now use the new ast_do_pickup()
app_directed_pickup.c:
   pickup_by_channel()
   pickup_by_exten()
   pickup_by_mark()
   pickup_by_part()
features.c:
   ast_pickup_call()

(closes issue #18654)
Reported by: Docent
Patches: 
      ast_do_pickup_1.8_trunk.diff.txt uploaded by alecdavis (license 585)
Tested by: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot, rymkus, loloski, rmudgett

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-12 22:52:08 +00:00
Russell Bryant
a82f1bb995 Fix a bunch of compiler warnings generated by gcc 4.6.0.
Most of these are -Wunused-but-set-variable, but there were a few others
mixed in here, as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 19:55:49 +00:00
Tilghman Lesher
016370cc5c Merged revisions 315502 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r315502 | tilghman | 2011-04-26 14:22:52 -0500 (Tue, 26 Apr 2011) | 21 lines
  
  Merged revisions 315501 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r315501 | tilghman | 2011-04-26 14:18:46 -0500 (Tue, 26 Apr 2011) | 14 lines
    
    Fix the bounds-checking code.
    
    The code that set the bit within the select bitfield was correct, but the
    bounds-checking code was not.  The change to that line uses the new _bitsize
    macro for clarity.  Also, FD_ZERO macro did not zero-out anything but the
    first word of the bitfield, so this could have caused problems with modules
    using that macro with the expanded bitfield.
    
    (closes issue #18773)
     Reported by: jamicque
     Patches: 
           20110423__issue18773.diff.txt uploaded by tilghman (license 14)
     Tested by: chris-mac
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 19:32:50 +00:00
Richard Mudgett
79e275d265 AST_CONTROL_XXX comment changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 16:54:02 +00:00
David Vossel
2998c62fc4 sip codec negotiation of dynamic rtp payloads error fix
This patch fixes how chan_sip handles dynamic rtp payload types
it does not understand.  At the moment if a dynamic payload's mime
type does not match one we understand, the payload does not get
removed from our payload table.  As a result of this, the payload
is set to whatever dynamic codec we use internally for that payload
number on outgoing INVITES.  This is incorrect.

This patch fixes this by properly checking the rtpmap set function's
return code to make sure it was found.  The function can return both
-1 and -2 depending on the source of the mismatch.  We were just
checking -1 explicitly.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 13:41:06 +00:00
Leif Madsen
55aa84a6e9 Merged revisions 313278 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r313278 | lmadsen | 2011-04-11 14:33:03 -0500 (Mon, 11 Apr 2011) | 14 lines
  
  Merged revisions 313277 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r313277 | lmadsen | 2011-04-11 14:30:20 -0500 (Mon, 11 Apr 2011) | 6 lines
    
    Fix detection of OpenSSL 1.0
    
    (closes issue #19093)
    Reported by: tzafrir
    Patches: 
          detect_openssl_10.diff uploaded by tzafrir (license 46)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@313279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-11 19:36:40 +00:00
Tilghman Lesher
b17b0a7fa8 Merged revisions 312287 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r312287 | tilghman | 2011-04-01 05:51:24 -0500 (Fri, 01 Apr 2011) | 14 lines
  
  Merged revisions 312285 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r312285 | tilghman | 2011-04-01 05:36:42 -0500 (Fri, 01 Apr 2011) | 7 lines
    
    Found some leaking file descriptors while looking at ast_FD_SETSIZE dead code.
    
    (issue #18969)
     Reported by: oej
     Patches: 
           20110315__issue18969__14.diff.txt uploaded by tilghman (license 14)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@312288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01 10:58:45 +00:00
Tilghman Lesher
56cd7709a5 Merged revisions 309251 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r309251 | tilghman | 2011-03-01 19:06:02 -0600 (Tue, 01 Mar 2011) | 7 lines
  
  Revert previous 2 commits, and instead conditionally redefine the same macro used in flex 2.5.35 that clashed with our workaround.
  
  Not surprisingly, the workaround was exactly the same code as was provided by
  the Flex maintainers, albeit in two different places, in different macros.
  
  This should fix the FreeBSD builds, which have an older version of Flex.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@309808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-07 00:54:42 +00:00
Tilghman Lesher
1b78442e0d Merged revisions 309033-309034 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r309033 | tilghman | 2011-02-28 04:43:12 -0600 (Mon, 28 Feb 2011) | 4 lines
  
  A later version of flex already includes the fwrite workaround code, which if used twice causes a compilation error.
  
  Detect whether Flex will compile without the workaround; if so, suppress our workaround code.
........
  r309034 | tilghman | 2011-02-28 05:07:52 -0600 (Mon, 28 Feb 2011) | 2 lines
  
  Clarify meaning, removing double negative (stupid!)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@309035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-28 11:10:28 +00:00
Richard Mudgett
a5f6367057 No response sent for SIP CC subscribe/resubscribe request.
Asterisk does not send a response if we try to subscribe for call
completion after we have received a 180 Ringing.  You can only subscribe
for call completion when the call has been cleared.

When we receive the 180 Ringing, for this call, its call-completion state
is 'CC_AVAILABLE'.  If we then send a subscribe message to Asterisk, it
trys to change the call-completion state to 'CC_CALLER_REQUESTED'.
Because this is an invalid state change, it just ignores the message.  The
only state Asterisk will accept our subscribe message is in the
'CC_CALLER_OFFERED' state.

Asterisk will go into the 'CC_CALLER_OFFERED' when the SIP client clears
the call by sending a CANCEL.

Asterisk should always send a response.  Even if its a negative one.


The fix is to allow for the CCSS core to notify a CC agent that a failure
has occurred when CC is requested.  The "ack" callback is replaced with a
"respond" callback.  The "respond" callback has a parameter indicating
either a successful response or a specific type of failure that may need
to be communicated to the requester.

(closes issue #18336)
Reported by: GeorgeKonopacki
Tested by: mmichelson, rmudgett

JIRA SWP-2633

(closes issue #18337)
Reported by: GeorgeKonopacki
Tested by: mmichelson

JIRA SWP-2634


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@307879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-15 16:13:55 +00:00
Andrew Latham
5f9a130198 Documentation Updates.
More updates to the removed doc folder and
start updates to the man page.

(issue #16505)
Reported by: tzafrir
Tested by: lathama


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@306826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-08 01:45:04 +00:00
Tilghman Lesher
1440b054eb Use the non-specific API aliases, to avoid a problem with building the utils directory.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@305040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 07:51:40 +00:00
Tilghman Lesher
fd11f34692 Change mutex tracking so that it only consumes memory in the core mutex object when it's actually being used.
This reduces the overall size of a mutex which was 3016 bytes before this back
down to 216 bytes (this is on 64-bit Linux with a glibc-implemented mutex).
The exactness of the numbers here may vary slightly based upon how mutexes are
implemented on a platform, but the long and short of it is that prior to this
commit, chan_iax2 held down 98MB of memory on a 64-bit system for nothing more
than a table of 32767 locks.  After this commit, the same table occupies a mere
7MB of memory.

(closes issue #18194)
 Reported by: job
 Patches: 
       20110124__issue18194.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman
 
Review: https://reviewboard.asterisk.org/r/1066


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@304950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 06:41:36 +00:00
Matthew Nicholson
193a80b513 Reimplemented fax session reservation to reverse the ABI breakage introduced in r297486.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@303907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-25 20:56:12 +00:00
Russell Bryant
cfc893a5bc Merged revisions 303548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r303548 | russell | 2011-01-24 14:49:53 -0600 (Mon, 24 Jan 2011) | 38 lines
  
  Merged revisions 303546 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r303546 | russell | 2011-01-24 14:32:21 -0600 (Mon, 24 Jan 2011) | 31 lines
    
    Fix channel redirect out of MeetMe() and other issues with channel softhangup.
    
    Mantis issue #18585 reports that a channel redirect out of MeetMe() stopped
    working properly.  This issue includes a patch that resolves the issue by
    removing a call to ast_check_hangup() from app_meetme.c.  I left that in my
    patch, as it doesn't need to be there.  However, the rest of the patch fixes
    this problem with or without the change to app_meetme.
    
    The key difference between what happens before and after this patch is the
    effect of the END_OF_Q control frame.  After END_OF_Q is hit in ast_read(),
    ast_read() will return NULL.  With the ast_check_hangup() removed, app_meetme
    sees this which causes it to exit as intended.  Checking ast_check_hangup()
    caused app_meetme to exit earlier in the process, and the target of the
    redirect saw the condition where ast_read() returned NULL.
    
    Removing ast_check_hangup() works around the issue in app_meetme, but doesn't
    solve the issue if another application did the same thing.  There are also
    other edge cases where if an application finishes at the same time that a
    redirect happens, the target of the redirect will think that the channel hung
    up.  So, I made some changes in pbx.c to resolve it at a deeper level.  There
    are already places that unset the SOFTHANGUP_ASYNCGOTO flag in an attempt to
    abort the hangup process.  My patch extends this to remove the END_OF_Q frame
    from the channel's read queue, making the "abort hangup" more complete.  This
    same technique was used in every place where a softhangup flag was cleared.
    
    (closes issue #18585)
    Reported by: oej
    Tested by: oej, wedhorn, russell
    
    Review: https://reviewboard.asterisk.org/r/1082/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@303549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 20:51:37 +00:00