Commit Graph

12104 Commits

Author SHA1 Message Date
Mark Michelson
7decb0d343 Fix a deadlock in chan_local in local_hangup. There was contention because
the local_pvt was held and it was attempting to lock a channel, which is the
incorrect locking order.

(closes issue #11730)
Reported by: UDI-Doug
Patches:
      11730.patch uploaded by putnopvut (license 60)
	  Tested by: UDI-Doug


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 17:20:11 +00:00
Joshua Colp
a93c14cbfe Introduce a lock into the dialing API that protects it when destroying the structure.
(closes issue #11687)
Reported by: callguy
Patches:
      11687.diff uploaded by file (license 11)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 15:08:24 +00:00
Joshua Colp
1379764f4c Add two more SDP names for ulaw and alaw.
(closes issue #11777)
Reported by: tootai


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 15:03:14 +00:00
Joshua Colp
d35f5e39a2 Don't drop the old record route information when dealing with packets related to a reinvite.
(closes issue #11545)
Reported by: kebl0155
Patches:
      reinvite-patch.txt uploaded by kebl0155 (license 356)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 03:07:24 +00:00
Joshua Colp
a0c14dbda3 Add autoconf logic for speexdsp. Later versions use a separate library for some things so we need to use it if present in codec_speex.
(closes issue #11693)
Reported by: yzg


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 01:13:27 +00:00
Russell Bryant
48a72bba86 Change a buffer in check_auth() to be a thread local dynamically allocated
buffer, instead of a massive buffer on the stack.  This fixes a crash reported
by Qwell due to running out of stack space when building with LOW_MEMORY defined.

On a very related note, the usage of BUFSIZ in various places in chan_sip is
arbitrary and careless.  BUFSIZ is a system specific define.  On my machine,
it is 8192, but by definition (according to google) could be as small as 256.  
So, this buffer in check_auth was 16 kB.  We don't even support SIP messages 
larger than 4 kB!  Further usage of this define should be avoided, unless it 
is used in the proper context.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:50:10 +00:00
Russell Bryant
7a007060bd Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:26:52 +00:00
Joshua Colp
d355eb9c84 Based on the boundary found move over the correct amount.
(closes issue #11750)
Reported by: tasker


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 20:08:43 +00:00
Joshua Colp
e3458a4976 Accept "; boundary=" not just ";boundary=" in the multipart mixed content type.
(closes issue #11750)
Reported by: tasker


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 22:41:55 +00:00
Mark Michelson
d186a861cf Adding in appropriate unlocks for the locks I added. Thanks to joetester on IRC
for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 20:59:26 +00:00
Russell Bryant
9a241dd2b9 Revert a change that introduces an unacceptable performance hit and is causing
memory leaks ... (from rev 97973)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 17:38:38 +00:00
Mark Michelson
8e3c058e44 Fixing another compilation error. I'm a bit off today :(
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:35:12 +00:00
Mark Michelson
1a95cfaf45 Oops. Last commit had compilation error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:30:33 +00:00
Mark Michelson
aa320d23a9 Adding explicit defaults for missing options to init_queue. This is necessary because
if a user either removes or comments one of these options and reloads their queues, the
option will not reset to its default, instead maintaining the value from prior to the 
reload. 

Thanks to John Bigelow for pointing this error out to me.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:21:28 +00:00
Tilghman Lesher
6efee0907d Add a connection timeout attribute, as that was what was intended with the
login timeout, but ODBC divides it up into 2 different timeouts.
(Closes issue #11745)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-12 00:05:08 +00:00
Russell Bryant
665c498c52 Fix up setting the EID on BSD based systems.
(closes issue #11646)
Reported by: caio1982
Patches:
      dundi_osx_eid6.diff.txt uploaded by caio1982 (license 22)
      dundi_osx_eid6-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 22:46:21 +00:00
Pari Nannapaneni
ee32b1246d Comment explaining how to force browser to always read some html files from server.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 21:28:48 +00:00
Joshua Colp
aa95b890ea If the incoming RTP stream changes codec force the bridge to break if the other side does not support it.
(closes issue #11729)
Reported by: tsearle
Patches:
      new_codec_patch_udiff.patch uploaded by tsearle (license 373)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:51:10 +00:00
Joshua Colp
ebdf2940b8 If the channel is hungup during RECORD FILE send a result code of -1 to be uniform with everything else.
(closes issue #11743)
Reported by: davevg
Patches:
      res_agi.diff uploaded by davevg (license 209)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:28:30 +00:00
Mark Michelson
d97e842d55 Properly report the hangup cause as no answer when someone does not answer
(closes issue #10574, reported by boch, patched by moy)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:10:57 +00:00
Tilghman Lesher
42d3e979f6 Add another exception (which doesn't work) for -march optimization flag.
Reported by: thomasmebes
Patch by: tilghman
(Closes issue #11563)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 18:25:44 +00:00
Russell Bryant
45f3890926 Backport the ability to set the ToS bits on Linux when not running as root.
Normally, we would not backport features into 1.4, but, I was convinced by the
justification supplied by the supplier of this patch.  He pointed out that this
patch removes a requirement for running as root, thus reducing the potential
impacts of security issues.

(closes issue #11742)
Reported by: paravoid
Patches:
      libcap.diff uploaded by paravoid (license 200)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 18:25:30 +00:00
Joshua Colp
441b809159 Ensure the return value of ast_bridge_call is passed back up as the application return value. This is needed for transfers to function so the PBX core knows to continue execution.
(closes issue #10327)
Reported by: kkiely


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 17:22:53 +00:00
Tilghman Lesher
0b289ed1b6 Back out changes from revision 97077, since it wasn't perfect
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 15:52:31 +00:00
Russell Bryant
f826e84059 Fix samples vs. length calculations for g722
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 03:39:33 +00:00
Russell Bryant
97ac0d3d1c Simplify this code with a suggestion from Luigi on the asterisk-dev list.
Instead of using is16kHz(), implement a format_rate() function.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 00:14:59 +00:00
Russell Bryant
8fd3d8a51b Fix various timing calculations that made assumptions that the audio being
processed was at a sample rate of 8 kHz.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:30:40 +00:00
Tilghman Lesher
7f61492a42 1) When we get a translated frame out, clone it, because if the
translator pvt is freed before we use the frame, bad things happen.
2) Getting a failure from ast_sched_delete means that the schedule
ID is currently running.  Don't just ignore it.
(Closes issue #11698)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:08:36 +00:00
Mark Michelson
87a55d5882 Let us leave a voicemail for ourself if we have logged into VoiceMailMain and chosen
to leave a message.

(closes issue #11735, reported and patched by jamessan)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 21:57:06 +00:00
Steve Murphy
b04af32888 Applied the same fixes for ael.flex as was done in 97849 for ast_expr2.fl; overrode the normally generate yyfree func with our own version that checks the pointer for non-null before passing to free(). Also takes care of a little problem with 2.5.33 and the use of the __STDC_VERSION__ macro.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 21:37:10 +00:00
Steve Murphy
9eeca94298 This is a fix for 2 things: a problem Terry was having in OSX with null pointers, which was my fault, as I probably forgot to run the sed script last time I made mods. So, I moved the fix into the flex input itself. Then, I found when I used flex 2.5.33, that it was using __STDC_VERSION__, and that's not real good; so I added back in a DIFFERENT sed script to fix that little mess. Tested everything, a couple different ways. Hope I did no harm, at the least.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 20:21:27 +00:00
Jason Parker
00b8f86349 Fix a comment that is no longer true.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 20:12:37 +00:00
Russell Bryant
142e5dd457 Remove other remnants of pbx_kdeconsole
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 16:19:47 +00:00
Russell Bryant
742fd8127c Remove pbx_kdeconsole from the tree. It hasn't worked in ages, and nobody has
complained.
(closes issue #11706, reported by caio1982)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 16:10:09 +00:00
Joshua Colp
91762636b9 Don't try to copy the category from the group if no category exists.
(closes issue #11724)
Reported by: IgorG
Patches:
      group_count.v1.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 15:07:12 +00:00
Russell Bryant
3378ef39fd Strip terminal sequences from the verbose messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 23:01:48 +00:00
Russell Bryant
d8004449d5 Make pbx_gtkconsole build ... but doesn't actually load on my system still
(related to issue #11706)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 22:26:33 +00:00
Jason Parker
3b966ed04e Correctly display a message if a command could not be found.
Also fix a comment which may have led to this happening.

Issue 11718, reported by kshumard.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 20:28:43 +00:00
Jason Parker
5583996b22 Fix some locking and return value funkiness. We really shouldn't be unlocking this lock inside of a function, unless we locked it there too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 20:05:45 +00:00
Mark Michelson
2da89b6120 Part 2 of app_queue doxygen improvements. Some smaller functions this time
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 18:48:15 +00:00
Russell Bryant
eebd74ee97 Fix saying the parking space number to the caller doing the parking ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 18:02:08 +00:00
Kevin P. Fleming
ce81b232e3 report the same message whether Zaptel does not have transcoder support loaded or no transcoders were found
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 17:21:14 +00:00
Philippe Sultan
863ef8d7d2 Set the caller id within the gtalk_alloc function.
As underlined in issue #10437 by Josh, we need to prevent a possible
memory leak. We only set the name part of the caller id, the number
part is not relevant when dealing with JIDs.

Closes issue #11549.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 16:44:24 +00:00
Joshua Colp
7a3ee5a7fc Don't do conferencing totally in Zaptel if Monitor is running on the channel.
(closes issue #11709)
Reported by: BigJimmy
Patches:
      patch-meetmerec uploaded by BigJimmy (license 371)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 16:11:17 +00:00
Kevin P. Fleming
d235974bd6 pass the right variable to get an error string... oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 15:43:19 +00:00
Kevin P. Fleming
7bfd21933f add error number output to ioctl failure messages to help with debugging
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 15:26:23 +00:00
Tilghman Lesher
1f14e0cf39 Allow filename completion on zero-length modules, remove a memory leak, remove
a file descriptor leak, and make filename completion thread-safe.
Patched and tested by tilghman.
(Closes issue #11681)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 00:44:14 +00:00
Mark Michelson
34f994f017 use the \retval doxygen command properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 00:17:40 +00:00
Mark Michelson
2a0748b0fe Part 1 of N of adding doxygen comments to app_queue. I picked some of the most common functions
used (which also happen to be some the biggest/ugliest functions too) to document first. I'm pretty
new to doxygen so criticism is welcome.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 23:49:11 +00:00
Mark Michelson
fdd5c25103 Some coding guidelines-related cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 21:24:48 +00:00