Commit Graph

13806 Commits

Author SHA1 Message Date
Leif Madsen
446f9a0e47 Update WARNING message.
Update a WARNING message to give a suggested fix when encountered.

(closes issue #16198)
Reported by: atis
Tested by: atis

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-09 15:37:43 +00:00
Matthew Nicholson
a3887d4511 Perform limited bounds checking when destroying ast_mutex_t structures to make sure we don't try to use negative indices.
(closes issue #15588)
Reported by: zerohalo
Patches:
      20090820__issue15588.diff.txt uploaded by tilghman (license 14)
Tested by: zerohalo


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-09 14:16:03 +00:00
David Vossel
8939eece6a fixes audiohook write crash occuring in chan_spy whisper mode.
After writing to the audiohook list in ast_write(), frames
were being freed incorrectly.  Under certain conditions this
resulted in a double free crash.

(closes issue #16133)
Reported by: wetwired

(closes issue #16045)
Reported by: bluecrow76
Patches:
      issue16045.diff uploaded by dvossel (license 671)
Tested by: bluecrow76, dvossel, habile


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 22:33:27 +00:00
Joshua Colp
0eb5bea853 Don't overwrite caller ID name on a trunk with the configured fullname when using users.conf
(issue ABE-1989)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 18:32:58 +00:00
David Vossel
5f6bf9a820 fixes segfault in iLBC
For reasons not yet known, it appears possible for an ast_frame
to have a datalen greater than zero while the actual data is NULL
during Packet Loss Concealment.  Most codecs don't support PLC so
this doesn't affect them.  This patch catches the malformed frame
and prevents the crash from occuring.  Additional efforts to determine
why it is possible for a frame to look like this are still being
investigated.

(issue #16979)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 17:07:13 +00:00
Joshua Colp
3e10834b22 Fix a bug caused by a partially invalid frame (from the jitterbuffer) passing through the Asterisk core.
(closes issue #15560)
Reported by: jvandal
(closes issue #15709)
Reported by: covici


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 16:41:20 +00:00
Matthew Nicholson
aa51d30173 Properly handle '=' while decoding base64 messages and null terminate strings returned from BASE64_DECODE.
(closes issue #15271)
Reported by: chappell
Patches:
      base64_fix.patch uploaded by chappell (license 8)
Tested by: kobaz


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 16:26:59 +00:00
David Vossel
15d78bc88b fixes crash in astfd.c
(closes issue #15981)
Reported by: slavon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 15:41:41 +00:00
David Vossel
25968fe49b fixes memory leak in func_audiohookinherit.c
(closes issue 0015394)
Reported by: boroda
Patches:
      bug15394_memoryleak_diff2.txt uploaded by dbrooks (license 790)
Tested by: dbrooks, boroda



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 15:07:31 +00:00
Jason Parker
d7dfd99014 Fix crash on VPB exception when no hardware is present.
(closes issue #14970)
Reported by: tzafrir
Patches:
      vpb_exception.diff uploaded by tzafrir (license 46)
Tested by: markwaters


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-05 19:14:25 +00:00
David Brooks
50c0d05b8a chan_misdn Asterisk 1.4.27-rc2 crash
Crash related to chan_misdn connection. Patch submitted by gknispel_proformatique, tested
by francesco_r. "I have many crash since i have upgraded to Asterisk 1.4.27-rc2. Attached
a full bt." This patch zeros out an ast_frame.

(closes issue #16041)
Reported by: francesco_r


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-05 18:59:41 +00:00
Jeff Peeler
cd447927e4 Fix incorrect filename comparsion after monitor file change
The logic to detect if a requested file is indeed a different file from the
current file was incorrect. The main issue being confusion of the use of
filename_base which was previously set without pathing information and then
compared to another full path. Robust file comparison logic has been added
to properly check if two files are the same even if symlinks are used.

(closes issue #15313)
Reported by: caspy
Patches: 
      20091103__issue15313__1.4.diff.txt uploaded by jpeeler (license 325)
      but mostly tilghman's work


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 23:47:08 +00:00
Matthew Nicholson
3c256882d6 This patch modifies the Dial application to monitor the calling channel for hangups while playing back announcements.
(closes issue #16005)
Reported by: falves11
Patches:
      dial-announce-hangup-fix1.diff uploaded by mnicholson (license 96)
Tested by: mnicholson, falves11

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 20:52:27 +00:00
Matthew Nicholson
841a1d5ed5 Modify the SDP parsing code to parse session and media level items separately.
With the new code, media level proprieties should no longer be confused with session level proprieties. This change also reorganizes some of the SDP parsing code which should make it easier to manage in the future.

(closes issue #14994)
Reported by: frawd
Tested by: frawd, mnicholson, file

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 19:55:44 +00:00
Joshua Colp
d1ec8f8be6 Fix a security issue where it may be possible for someone to execute a cross-site
AJAX request exploit.

(AST-2009-009)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 19:25:37 +00:00
Joshua Colp
7f8c4f7278 Fix a security issue where sending a REGISTER with a differing username in the From
URI and Authorization header would reveal whether it was valid or not.

(AST-2009-008)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 19:17:39 +00:00
Richard Mudgett
dc898f35c9 Make sure the outgoing flag is cleared if a new channel fails to get created for outgoing calls.
This is the relevant portion of asterisk/trunk -r226648


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 17:55:47 +00:00
Joshua Colp
f4298a49f0 Fix a bug where an RPID header could be generated with a blank username in the URI.
(closes issue #15909)
Reported by: kobaz


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 15:36:16 +00:00
Olle Johansson
6ad9ff8acc Fixing bug before someone reports it...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 10:48:41 +00:00
Olle Johansson
8239b12ab7 Adding IP address in Contact ACL log message and removing redundant message
(based on kpfleming's feedback)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 10:41:45 +00:00
Olle Johansson
05390babd0 Use proper response code when violating Contact ACL's.
Review: https://reviewboard.asterisk.org/r/415/

Thanks kpfleming for a quick review.
(EDVX-003)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 10:29:59 +00:00
David Brooks
e3103c39a7 SIP channel name uniqueness
SIP channel names were supposed to be unique by way of a name suffix derived from the
pointer to the channel's private data. Uniqueness was preserved on 32-bit systems, but
not on 64-bit systems. This patch, as suggested by kpfleming, replaces this suffix with
a simple incremented unsigned int.

(closes issue #15152)
Reported by: palbrecht

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 20:52:53 +00:00
Joshua Colp
ed413ec76c Fix a bug where the recorded privacy introduction file would not get removed if the caller hung up
while the called party had not yet answered.

This was fixed by introducing an argument to the 'n' option which, when enabled, removes the introduction
file under all scenarios. This was done to preserve the behavior that has existed for quite some time.

(closes issue #14674)
Reported by: ulogic
Patches:
      bug14674.patch uploaded by jpeeler (license 325)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 18:08:11 +00:00
Tilghman Lesher
717c3e1789 Don't allow two separate instances of safe_asterisk when restarting from the init script.
(closes issue #14562)
 Reported by: davidw
 Patches: 
       Initially 20091022__issue14562.diff.txt uploaded by tilghman (license 14)
       Modified to 20091030__Issue14562_diff.txt uploaded by davidw (license 780)
 Tested by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 17:14:20 +00:00
David Vossel
9c6f754b18 fixes crash on iterator_destroy on uninitialized iterator
(closes issue #16162)
Reported by: krn


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 15:31:02 +00:00
David Vossel
183624e194 changes calltoken debug messages from LOG_NOTICE to LOG_DEBUG like they are supposed to be
(closes issue #16144)
Reported by: aragon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 15:16:30 +00:00
Joshua Colp
6070611b35 Add an option to enabling passing music on hold start and stop requests through instead of
acting on them in chan_local.

(closes issue #14709)
Reported by: dimas


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-29 18:11:26 +00:00
Leif Madsen
ff7b512bcc Update documentation in sip.conf.sample.
Update the documentation in sip.conf.sample in order to make it more clear
that directmedia/canreinvite do not cause Asterisk to ignore reINVITEs. It
is only used to stop Asterisk from generating a reINVITE, but does not stop
it from accepting them if necessary.

(closes issue #15644)
Reported by: lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-28 20:06:13 +00:00
Leif Madsen
93433cfc47 Update CALLINGSUBADDR channel variable documentation.
(closes issue #15734)
Reported by: alecdavis
Patches:
      channelvariables.tex.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-28 19:48:29 +00:00
Tilghman Lesher
41f0b0de9c Fix documentation (pointed out by TheDavidFactor on #-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-28 18:02:25 +00:00
Tilghman Lesher
50c0fedbc0 Manager output is not always NULL-terminated, so force a NULL at the end of the filestream.
(closes issue #15495)
 Reported by: pdf
 Patches: 
       20090916__issue15495.diff.txt uploaded by tilghman (license 14)
 Tested by: pdf


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@226138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-27 20:16:49 +00:00
Tzafrir Cohen
217a115da8 detect ARM Linux EABI OSARCH as linux-gnu instead of linux-gnueabi
* Set OSARCH to linux-gnu even if host_os is linux-gnueabi
* When checking if we are Linux, check OSARCH rather than host_os

The newer ARM ABI ("EABI") shows the OS name 'linux-gnueabi' rather than
'linux-gnu' . This patch sets OSARCH to be 'linux-gnu' even in such a case.

OSARCH is tested for the value of 'linux-gnu' in one or two places in the
tree. This patch also fixes the check libcap to check for $OSARCH rather
than $host_os .

See also: http://wiki.debian.org/ArmEabiPort


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-26 22:13:25 +00:00
Kevin P. Fleming
d3f44108f1 Don't force menuselect.makeopts to be rebuilt on every build.
For some reason the menuselect.makeopts file was listed as PHONY in the Makefile,
resulting in 'make' needing to rebuild it for every build. This then resulted in
the embedded module rules being rebuilt on every build, which can be slow and is
unnecessary.

This patch fixes the problem by properly allowing 'make' to know when the
menuselect.makeopts file needs to be rebuilt (defining the proper dependencies).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-23 14:00:01 +00:00
Leif Madsen
8ddf6e4088 Clean valgrind output by suppressing false errors.
Update valgrind.txt documentation and add valgrind.supp file in order to
allow those who are creating valgrind output to have less false errors in
the logfile.

(closes issue #16007)
Reported by: atis
Patches:
      valgrind.txt.diff uploaded by atis (license 242)
      asterisk2.supp uploaded by atis (license 242)
Tested by: atis, amorsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 21:51:52 +00:00
David Vossel
bb3f1903fc IAX2: VNAK loop caused by signaling frames with no destination call number
It is possible for the PBX thread to queue up signaling frames before
a destination call number is received.  This can result in signaling
frames being sent out with no destination call number. Since recent
versions of Asterisk require accurate destination callnumbers for all
Full Frames, this can cause a VNAK loop to occur.  To resolve this
no signaling frames are sent until a destination callnumber is received,
and destination call numbers are now only required for iax_pvt matching
when the frame is an ACK.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 20:58:08 +00:00
Russell Bryant
40dfab583e Revert 225169, as this doesn't account for the possibility of a list of frames.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 16:44:49 +00:00
Russell Bryant
758ed8d437 Isolate the frame returned from ast_translate().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 16:39:20 +00:00
Tilghman Lesher
6e8a455534 Fix documentation for ast_softhangup() and correct the misuse thereof.
(closes issue #16103)
 Reported by: majorbloodnok


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 16:02:12 +00:00
Tilghman Lesher
8699a5f158 Suffix is not needed for a match
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 15:45:54 +00:00
David Vossel
bedd6eb8a4 IAX/SIP shrinkcallerid option
The shrinking of caller id removes '(', ' ', ')', non-trailing '.',
and '-' from the string.  This means values such as 555.5555 and
test-test result in 555555 and testtest.  There are instances,
such as Skype integration, where a specific value is passed via
caller id that must be preserved unmodified.  This patch makes
the shrinking of caller id optional in chan_sip and chan_iax in
order to support such cases.  By default this option is on to
preserve previous expected behavior.

(closes issue #15940)
Reported by: dimas
Patches:
      v2-15940.patch uploaded by dimas (license 88)
      15940_shrinkcallerid_trunk.c uploaded by dvossel (license 671)
Tested by: dvossel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 14:37:04 +00:00
Russell Bryant
9d65850202 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@224931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 02:59:54 +00:00
Tilghman Lesher
0db2d51ac1 Pay attention to the return value of the manipulate function.
While this looks like an optimization, it prevents a crash from occurring
when used with certain audiohook callbacks (diagnosed with SVN trunk,
backported to 1.4 to keep the source consistent across versions).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@224855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-20 22:07:11 +00:00
Joshua Colp
7de8f53607 Add support for relaying early media in the features attended transfer option.
(closes issue #14828)
Reported by: licedey


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@224773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-20 17:46:37 +00:00
Kevin P. Fleming
dd9837bba0 Correct timestamp calculations when RTP sample rates over 8kHz are used.
While testing some endpoints that support 16kHz and 32kHz sample rates, some
log messages were generated due to calc_rxstamp() computing timestamps in a way
that produced odd results, so this patch sanitizes the result of the
computations.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@224670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19 23:44:07 +00:00
Joshua Colp
926a033bf9 Do not attempt early media bridging (ie: direct RTP setup) if options are enabled that should prevent it.
(closes issue #14763)
Reported by: cupotka


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@224565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19 19:47:50 +00:00
Jeff Peeler
7f84021814 Fix stale caller id data from being reported in AMI NewChannel event
The problem here is that chan_dahdi is designed in such a way to set
certain values in the dahdi_pvt only once. One of those such values
is the configured caller id data in chan_dahdi.conf. For PRI, the
configured caller id data could be overwritten during a call. Instead
of saving the data and restoring, it was decided that for all non-analog
channels it was simply best to not set the configured caller id in the
first place and also clear it at the end of the call.

(closes issue #15883)
Reported by: jsmith


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@224330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-17 01:32:47 +00:00
Richard Mudgett
c3501b93e1 Never released PRI channels when using Busy() or Congestion() dialplan apps.
When the Busy() or Congestion() application is used towards ISDN (an ISDN
progress is sent), the responding ISDN Disconnect or Release may contain
the ISDN cause user busy or one of the congestion causes.  In chan_dahdi.c
these causes will only set the needbusy or needcongestion flags and not
activate the softhangup procedure.  Unfortunately only the latter can
interrupt the endless wait loop of Busy()/Congestion().

Result: PRI channels staying in state busy for the rest of asterisk life
or until the other end times out and forces the call to clear.

(in issue 0014292)
Reported by: tomaso
Patches:
      disc_rel_userbusy.patch uploaded by tomaso (license 564)
      (This patch is unrelated to the issue.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@224260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-16 20:25:23 +00:00
Jean Galarneau
7499289537 Fix PRI timer T309 operation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@223955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-13 20:58:17 +00:00
Jeff Peeler
e3464ac40a Ensure ringing continues for branched calls after progress is received
While waiting for an answer, don't send progress for branched calls
for which ringing was sent.

(closes issue #15028)
Reported by: fnordian


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@223804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-12 23:12:50 +00:00
Kevin P. Fleming
0a226d933f Remove automatic switching from T.38 to voice mode in chan_sip.
chan_sip has some code to automatically switch from T.38 mode to voice mode when
a voice frame is written to the channel while it is in T.38 mode; this was
intended to handle the situation when a FAX transmission has ended and the channel
is not yet hung up, but is causing problems at the beginning of FAX sessions as
well when there are still voice frames 'in flight' at the time the T.38 negotiation
completes. This patch removes the automatic switchover.
  
(issue #16025)
Reported by: jamicque



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@223692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-12 15:30:40 +00:00