Commit Graph

260 Commits

Author SHA1 Message Date
Leif Madsen
b0c91953cf Document CHANNEL(transfercapability) in CLI documentation.
(issue #15073)
Reported by: pkempgen
Patches:
      20090511__issue15073.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@193544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-11 17:35:17 +00:00
Tilghman Lesher
591dd05d9e Add a workaround for func_odbc/ARRAY() for problems that occur with certain special characters.
In certain cases, due to the way Set() works in 1.4, values may not get set
properly.  This is a workaround for 1.4 only that corrects for these issues,
without making func_odbc more difficult to use properly.
(closes issue #14614)
 Reported by: wdoekes
 Patches: 
       20090309__bug14614__2.diff.txt uploaded by tilghman (license 14)
       double_set_unescape_workaround_for_func_odbc.osso-and-tilghman-1.diff uploaded by wdoekes (license 717)
 Tested by: wdoekes, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@189537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 22:02:16 +00:00
Russell Bryant
9161b7fc87 Revert unnecessary indications API change from rev 122314
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 19:13:05 +00:00
Tilghman Lesher
ebe9c9c5db If either conditional is NULL, don't try copying it.
(closes issue #14226)
 Reported by: caspy
 Patches: 
       20090113__bug14226.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 17:48:00 +00:00
Mark Michelson
7fdf99803e Backport of AUDIOHOOK_INHERIT for Asterisk 1.4
(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:34:57 +00:00
Russell Bryant
32fff369e7 Fix some observed slowdowns in dialplan processing.
The change is to remove autoservice usage from dialplan functions that do not
need it because they do not perform operations that potentially block.

(closes issue #13940)
Reported by: tbelder


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 21:46:29 +00:00
Steve Murphy
ba6d2c67ac (closes issue #13597)
Reported by: john8675309
Patches:
      patch.13597 uploaded by murf (license 17)
Tested by: murf, john8675309

This patch causes the setcid func to update the CDR
clid after setting the channel field.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 20:41:42 +00:00
Kevin P. Fleming
18df35a2c1 somehow missed a bunch of gcc 4.3.x warnings in this branch on the first pass
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 13:01:18 +00:00
Kevin P. Fleming
add5ff5b05 fix a bunch of potential problems found by gcc 4.3.x, primarily bare strings being passed to printf()-like functions and ignored results from read()/write() and friends
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 18:22:39 +00:00
Steve Murphy
961bc7e758 The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the 
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.

If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.

If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.

Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden 
(in trunk).

All the places that previously tested for 
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.

I tested this against the 4 common parking
scenarios:


1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.

2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.

3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.

4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.


No crash.

I also ran the scenarios above against valgrind, and accesses looked good.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 04:36:32 +00:00
Sean Bright
a300fefab6 Since passing \0 as the second argument to strchr is valid (and will
match the trailing \0 of a string) we need to check that first, otherwise
we end up with incorrect results.  Fix suggested by reporter.

(closes issue #13787)
Reported by: meitinger


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-26 20:23:36 +00:00
Tilghman Lesher
93ef1ee4ef Dialplan functions should not actually return 0, unless they have modified the
workspace.  To signal an error (and no change to the workspace), -1 should be
returned instead.
(closes issue #13340)
 Reported by: kryptolus
 Patches: 
       20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 20:52:04 +00:00
Tilghman Lesher
afae26f04d Backport support for some of the keyword modifications used in 1.6 (while warning that
some options aren't really supported) and add some warning messages.  Some credit to
oej, who was complaining in #asterisk-dev.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@145839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-02 16:39:56 +00:00
Tilghman Lesher
e647244fe8 Additional check for more string specifiers than arguments.
(closes issue #13299)
 Reported by: adomjan
 Patches: 
       20080813__bug13299.diff.txt uploaded by Corydon76 (license 14)
       func_strings.c-sprintf.patch uploaded by adomjan (license 487)
 Tested by: adomjan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15 14:51:12 +00:00
Russell Bryant
7a5caf1a57 Fix a memory leak in func_curl. Every thread that used this function leaked
an allocation the size of a pointer.
(reported by jmls in #asterisk-dev)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-30 19:52:53 +00:00
Jeff Peeler
f9818af8dd Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should continue working. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 19:08:20 +00:00
Steve Murphy
5c2cf0f3c0 (closes issue #10668)
Reported by: arkadia
Tested by: murf, arkadia

Options added to forkCDR() app and the CDR() func to
remove some roadblocks for CDR applications.

The "show application ForkCDR" output was upgraded
to more fully explain the inner workings of forkCDR.

The A option was added to forkCDR to force the
CDR system to NOT change the disposition on the
original CDR, after the fork. This involves
ast_cdr_answer, _busy, _failed, and so on.

The T option was added to forkCDR to force 
obedience of the cdr LOCKED flag in the
ast_cdr_end, all the disposition changing
funcs (ast_cdr_answer, etc), and in the
ast_cdr_setvar func.

The CHANGES file was updated to explain ALL
the new options added to satisfy this bug report
(and some requests made verbally and via 
email, irc, etc, over the past months/year)

The 's' option was added to the CDR() func,
to force it to skip LOCKED cdr's in the
chain.

Again, the new options should be totally transparent
to existing apps! Current behavior of CDR,
forkCDR, and the rest of the CDR system should
not change one little bit. Until you add the
new options, at least!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 13:47:34 +00:00
Tilghman Lesher
2691e0d5b0 Take into account the length of delimiters when calculating result string length.
(closes issue #12696)
 Reported by: adomjan
 Patches: 
       func_realtime.c-longdelimiter.patch uploaded by adomjan (license 487)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:47:03 +00:00
Tilghman Lesher
dccfa36f8e Force ast_mktime() to check for DST, since strptime(3) does not.
(Closes issue #12374)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@113117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 17:51:49 +00:00
Tilghman Lesher
56e908b787 Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:36:33 +00:00
Jason Parker
f29e9e72ba swap location for this..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 19:51:39 +00:00
Jason Parker
01b6eae2e5 Document the 'l' option to the CDR() function.
(Thanks voipgate for pointing out the option, and Leif for providing text for it.)

Closes issue #11695.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 19:51:10 +00:00
Tilghman Lesher
1dde474916 Missing braces.
(closes issue #11912)
 Reported by: dimas
 Patches: 
       sprintf.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-04 05:10:02 +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
Joshua Colp
edfb14d0f6 If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
(closes issue #11077)
Reported by: m4him


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 19:53:52 +00:00
Tilghman Lesher
3d142f0271 Allow the default "0" to be returned if the STAT fails
(Closes issue #11659)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31 20:27:26 +00:00
Kevin P. Fleming
fd1e942f53 fix some copy-and-paste leftovers
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:21:08 +00:00
Kevin P. Fleming
627f595c58 In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 06:44:51 +00:00
Russell Bryant
c1556baa9f fix some formatting i accidentally changed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 00:36:59 +00:00
Russell Bryant
2fc83c3db1 This set of changes is to make some callerID handling thread-safe.
The ast_set_callerid() function needed to lock the channel.  Also, the handlers
for the CALLERID() dialplan function needed to lock the channel when reading
or writing callerid values directly on the channel structure.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 00:20:34 +00:00
Tilghman Lesher
1d33d680b9 Default result of STAT should be "0" not "".
Reported via the -users mailing list, fixed by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 15:38:03 +00:00
Jason Parker
71319ccaa9 Allow some function modules to compile under dev mode.
Issue 11104, patch by andrew.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 17:13:04 +00:00
Tilghman Lesher
18eafd3074 Add autoservice to several more functions which might delay in their responses.
Also, make sure that func_odbc functions have a channel on which to set
variables.
Reported by russell
Fixed by tilghman
Closes issue #11099


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-28 13:46:55 +00:00
Tilghman Lesher
aa7f0bf1b2 The addition of autoservice to func_curl additionally made func_curl dependent
on the existence of a channel, with no real reason.  This should make func_curl
once again work without a channel.
Reported by jmls.
Fixed by tilghman.
Closes issue #11090


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26 13:54:30 +00:00
Tilghman Lesher
5ee24bef92 Backport alternate encoding of newline delimiters from trunk to 1.4, as approved by Russell
Reported by blitzrage
Closes issue #10903


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-25 22:53:06 +00:00
Steve Murphy
9ecad31855 closes issue #11052 -- where nothing after the ? will allow un-initialized variable values to corrupt and crash asterisk on 64-bit platforms
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-23 21:18:08 +00:00
Russell Bryant
f59ad2a3ed Using curl can take a substantial amount of time, so the channel should be
autoserviced while waiting for it to complete.
(closes issue #10725, reported by mnicholson)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 19:34:25 +00:00
Tilghman Lesher
a390611c48 The IF() function was not allowing true values that had embedded colons (closes issue #10613)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-31 19:16:52 +00:00
Russell Bryant
7b1aaf8791 Revert very broken fix for issue #10540 ... none of these values take ms so I
don't know what I was thinking


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 19:29:44 +00:00
Russell Bryant
e5be9cb65f Fix func_timeout to take values in floating point so 1.5 actually means
1.5 seconds instead of being rounded.
(closes issue #10540, reported by spendergrass, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 19:21:53 +00:00
Russell Bryant
cbdc6b5b2d To prevent 92138749238754 more reports of "I have unixodbc installed, but
still can't build *_odbc.so!", check for ltdl directly, instead of just listing
it as another library to include in the unixodbc check in the configure script.
This also makes ltdl show up as a dependency in menuselect so people know what
to go install.  (related to issue #9989, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@69702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 16:35:02 +00:00
Jason Parker
5305d9c27f Merged revisions 69258 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69258 | qwell | 2007-06-14 10:15:53 -0500 (Thu, 14 Jun 2007) | 4 lines

Change a quite broken while loop to a for loop, so "continue;" works as expected instead of eating 99% CPU...

Issue 9966, patch by me.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@69259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 15:21:29 +00:00
Tilghman Lesher
cb8813a250 Merged revisions 67161 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r67161 | tilghman | 2007-06-04 18:41:49 -0500 (Mon, 04 Jun 2007) | 2 lines

According to MATH, 0+1181000386 = 1181000448.  Oops.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 23:43:01 +00:00
Tilghman Lesher
70b882702c On some drivers, deallocating the statement handle isn't enough. We also have to clear the cursor (nice, Oracle)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-01 21:45:44 +00:00
Tilghman Lesher
e21412d53d Merged revisions 66537 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r66537 | tilghman | 2007-05-29 16:49:35 -0500 (Tue, 29 May 2007) | 2 lines

If the value of a variable passed to FIELDQTY is blank, then FIELDQTY should return 0, not 1.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 21:56:07 +00:00
Dwayne M. Hubbard
f4fc851405 merged qwell's func_math patch for issue 9507
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 15:08:56 +00:00
Joshua Colp
1d4adc0174 Merged revisions 61804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r61804 | file | 2007-04-25 14:52:50 -0400 (Wed, 25 Apr 2007) | 2 lines

Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 19:21:54 +00:00
Tilghman Lesher
1572777fa0 Merged revisions 61680 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r61680 | tilghman | 2007-04-18 21:30:18 -0500 (Wed, 18 Apr 2007) | 5 lines

Bug 9557 - Specifying the GetVar AMI action without a Channel parameter can
cause Asterisk to crash.  The reason this needs to be fixed in the functions
instead of in AMI is because Channel can legitimately be NULL, such as when
retrieving global variables.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-19 02:45:05 +00:00
Russell Bryant
c0aca26f30 Convert the RTPQOS function to just be additional parameter of the CHANNEL
function.  This way, it will be possible for other RTP based channel drivers
to expose this information in the future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 16:20:53 +00:00
Tilghman Lesher
7246207bd8 Oops, this should have been a %d all along
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-19 22:29:56 +00:00