Commit Graph

232 Commits

Author SHA1 Message Date
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
Joshua Colp
54a94c650b Fix typo in help for CDR function. (issue #9295 reported by ajohnson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-19 15:52:28 +00:00
Tilghman Lesher
1771f9621d Function works fine, but the documentation is backwards.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-15 22:32:33 +00:00
Tilghman Lesher
2fd66654ac Issue 9162 - pbx_substitute_variables_helper assumes the buffer is initialized
to all zeroes.  This fixes a case where it wasn't.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-14 01:47:08 +00:00
Kevin P. Fleming
07462b8d1b add some inter-module dependencies
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-09 23:51:41 +00:00
Russell Bryant
51bcb9d3be Fix the FIELDQTY function to not crash. (reported by blitzrage and Corydon on IRC)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 21:24:52 +00:00
Joshua Colp
290fd87817 Make func_strings build under dev mode. Didn't I do this today already in the berkeley DB?
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 21:06:02 +00:00
Tilghman Lesher
86f51691c5 Oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 20:13:40 +00:00
Tilghman Lesher
a94d8f5bd8 Merged revisions 53074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53074 | tilghman | 2007-02-01 14:07:35 -0600 (Thu, 01 Feb 2007) | 2 lines

Bug 8965 - Allow FIELDQTY to work with both variables and dialplan functions

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 20:09:52 +00:00
Tilghman Lesher
7e0a469bda Merged revisions 53069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53069 | tilghman | 2007-02-01 13:13:53 -0600 (Thu, 01 Feb 2007) | 2 lines

No wonder FIELDQTY doesn't work with functions... the documentation in pbx.c was wrong

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 19:21:20 +00:00
Jason Parker
76eb4e76dc Add some more checks for option_debug before ast_log(LOG_DEBUG, ...) calls.
Issue 8832, patch(es) by tgrman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 22:50:23 +00:00
Russell Bryant
8d0defa82b Fix some instances where when loading func_odbc, a double-free could occur.
Also, remove an unneeded error message.  If the failure condition is
actually a memory allocation failure, a log message will already be
generated automatically.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-17 23:31:11 +00:00
Russell Bryant
525f5e6d75 Fix the REALTIME() dialplan function. ast_build_string() advances the string
pointer to the position to begin the next write into the buffer.  So, this 
pointer can not be used to copy the contents of the string later.  The
beginning of the buffer must be saved.  Interestingly enough, this code could
not have ever worked.  (Pointed out by Sebb on IRC, thanks!)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 04:33:00 +00:00
Russell Bryant
ab43c25d33 Merged revisions 48955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48955 | russell | 2006-12-25 00:19:48 -0500 (Mon, 25 Dec 2006) | 6 lines

Fix an error introduced by copying and pasting the handling of the >= operator
for the MATH function.  If a single equal sign was used as an operator, the
function would treat it is as if it were the >= operator.  Now, it properly
handles it as an invalid operator.
(issue #8665, patch by tempest1)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-25 05:21:20 +00:00
Kevin P. Fleming
8e900c7db7 use the proper variable type for these unixODBC API calls, eliminating warnings on 64-bit platforms that use the 'new' 64-bit types for ODBC API calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 14:57:09 +00:00
Kevin P. Fleming
c2490f8e72 instead of initializing the curl library every time the CURL() function is invoked, do it only once per thread (this allows multiple calls to CURL() in the dialplan for a channel to run much more quickly, and also to re-use connections to the server) (thanks to JerJer for frequently complaining about this performance problem)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 04:25:09 +00:00
Tilghman Lesher
fda0dce406 STRFTIME() does not actually require an argument (issue 8540)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 05:37:09 +00:00
Steve Murphy
be037061e8 might as well also document the raw values of the flag vars
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-26 00:26:16 +00:00
Steve Murphy
f4b1302b95 A little bit of func_cdr documentation upgrade-- no bug# involved, although 8221 may have inspired it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-26 00:01:34 +00:00
Joshua Colp
039c552a47 Small documentation clarification for URIENCODE. (issue #8294 reported by salaud)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 21:30:44 +00:00
Olle Johansson
d318976f4d Issue #8089 - Fix the ENUM support (picking one record by number). Thanks otmar!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 10:56:20 +00:00
Steve Murphy
2ba44e6b10 update the doc string for both AEL and extensions.conf users.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@45143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-14 04:38:15 +00:00
Paul Cadach
53024e3508 CHANNEL() function sometime mix parameter and value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 16:44:54 +00:00
Tilghman Lesher
88873fbafa Lost of a bit of logic when this was simplified between 1.2 and 1.4 (Bug 8117)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 16:42:19 +00:00
Joshua Colp
d2d4833b79 Put in missing \ns on the end of ast_logs (issue #7936 reported by wojtekka)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 18:05:43 +00:00
Tilghman Lesher
70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:40:39 +00:00
Kevin P. Fleming
32d119746c move ODBC API into ast_ namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 04:57:20 +00:00
Matthew Fredrickson
33ddb53663 Various updates from PCadach's chan_h323-live branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 21:07:49 +00:00
Steve Murphy
4c937339e5 As per discussion on bug 7862, the problem wasn't the fact that the documentation differed from behavior, but rather that users are used to REGEX having that space after the double quote in 1.2.x. So, in keeping with history, I investigated a little deeper, and discovered that the change in behavior was due to the modification of the function to use the AST_DECLARE_APP_ARGS and AST_NONSTANDARD_APP_ARGS() to parse the args. The code to skip the blank was left out. So, what I did was add code to throw out the first blank (space or tab) after the double quote, IF IT IS THERE. If not, nothing is done.Verbage is added to the function description saying that the space is optional, and skipped if it is there. If a space is desired, then the documentation advises putting two spaces there. This should make it compatible for 1.2 users, and not mess up new users who are used to using it with no space. It WILL mess up new users who WANT a space. Hopefully, they will double check the doc strings for this func and add the extra space. Hopefully, this class of new user is very small.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 16:44:38 +00:00