Commit Graph

175 Commits

Author SHA1 Message Date
Olle Johansson f83b845f08 - Implement error handling in ast_append_ha
- Use this in chan_sip
- Document ha functions in acl.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-01 19:20:46 +00:00
Russell Bryant ec8591d04c Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:35:31 +00:00
Tilghman Lesher 691363656f Merged revisions 47436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47436 | tilghman | 2006-11-10 10:51:55 -0600 (Fri, 10 Nov 2006) | 2 lines

Discussion of these CLI changes resulted in more consistency (Bug 8236)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 17:01:06 +00:00
Steve Murphy 908f176cf3 A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 21:47:49 +00:00
Tilghman Lesher 10875731ec Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines

Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:16:09 +00:00
Kevin P. Fleming 749029de38 Merged revisions 46200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines

apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:44:50 +00:00
Kevin P. Fleming 3c876af5cf Merged revisions 44378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines

update thread creation code a bit
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:51:38 +00:00
Matt O'Gorman ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Joshua Colp 29d27bfe0d Merged revisions 43933 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43933 | file | 2006-09-28 14:05:43 -0400 (Thu, 28 Sep 2006) | 2 lines

Put in missing \ns on the end of ast_logs (issue #7936 reported by wojtekka)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 18:09:01 +00:00
Joshua Colp a5e4e31654 Merged revisions 43454 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43454 | file | 2006-09-21 18:12:09 -0400 (Thu, 21 Sep 2006) | 2 lines

Clean up chan_mgcp's module load function (issue #8001 reported by Mithraen with mods by moi)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 22:14:31 +00:00
Tilghman Lesher 6ae8741518 Lots more removal of deprecated things
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:59:12 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Matt O'Gorman 05a695af72 everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it 
had a non static function when it should.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:20 +00:00
Joshua Colp c6977b9983 Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 01:59:02 +00:00
Joshua Colp c70ed7614a Merge in RTP-level packet bridging. Packet comes in, packet goes out - that's what RTP-level packet bridging is all about!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 17:37:56 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00
Kevin P. Fleming e441faab72 Merged revisions 40057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40057 | kpfleming | 2006-08-16 13:57:44 -0500 (Wed, 16 Aug 2006) | 2 lines

don't allow AUEP responses to overflow the stack during a string copy (reported by Mu Security)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 18:58:43 +00:00
Russell Bryant 9f9a5f1984 move the calls to ast_jb_configure() to before the PBX thread is started on the
channel to remove the theoretical race condition that the channel could get
bridged before the channel's jitterbuffer gets configured.  This was pointed
out by PCadach on IRC.  Thanks!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 03:43:47 +00:00
Russell Bryant 663adb2b0e Merged revisions 38903-38904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines

suppress a compiler warning about the usage of a potentially uninitialized variable

........
r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines

Fix an issue that would cause a NewCallerID manager event to be generated
before the channel's NewChannel event.  This was due to a somewhat recent
change that included using ast_set_callerid() where it wasn't before.  This
function should not be used in the channel driver "new" functions.
(issue #7654, fixed by me)

Also, fix a couple minor bugs in usecount handling.  chan_iax2 could have
increased the usecount but then returned an error.  The place where chan_sip
increased the usecount did not call ast_update_usecount()

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 05:26:29 +00:00
Russell Bryant ca9ba719b6 Merge a new implementation of ast_inet_ntoa, our thread safe replacement for
inet_ntoa, which uses thread specific data (aka thread local storage) instead
of stack allocatted buffers to store the result.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 17:31:28 +00:00
Kevin P. Fleming 6d0742fc16 merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 20:44:39 +00:00
Kevin P. Fleming fd9c9ec28f allow users of RTP to use G726-32 AAL2 packing even when RFC3551 packing has been requested (Sipura/Grandstream ATAs and others will need this)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 01:38:47 +00:00
Russell Bryant 73e8e2ab1f Blocked revisions 36725 via svnmerge
........
r36725 | russell | 2006-07-03 00:19:09 -0400 (Mon, 03 Jul 2006) | 4 lines

use ast_set_callerid to be more consistent and to make sure that the
"callerid" option in the conf files is always handled the same way and sets ANI
(issue #7285, gkloepfer)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 04:25:21 +00:00
Russell Bryant c8ceb92a4f revert my changes that converted the jb on the channel to be dynamically
allocated. These changes caused crashes when using a channel type that did
not support the jitterbuffer. Instead of fixing why it's crashing, I'm going
to implement this in a better way next week. The way I did it caused a
jitterbuffer to be allocated on every channel where the channel type supported
jitterbuffers, even if they were disabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 16:49:12 +00:00
Russell Bryant 46018d5032 - dynamically allocate the ast_jb structure that is on the channel structure
so that channels not using a jitterbuffer don't waste as much memory
- ensure that the channel drivers that use jitterbuffers can handle a failure
  from configuring a jitterbuffer on a new channel because of a memory
  allocation error
- On passing through these channel drivers, configure the jitterbuffer before
  starting the PBX thread instead of afterwards. If the pbx fails to start for
  whatever reason, this would have caused a crash.
- Also on passing, move the increase of the usecount to after all of the
  possible failure conditions in the function
- fix a place where ast_update_use_count() was not called
- ensure that the owner channel pointer of the channel pvt strcutures is set to
  NULL in failure conditions


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 17:05:17 +00:00
Kevin P. Fleming 472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Russell Bryant 4c76028de9 - add the ability to configure forced jitterbuffers on h323, jingle,
and mgcp channels
- remove the jitterbuffer configuration from the pvt structures in
  the sip, zap, and skinny channel drivers, as copying the same global
  configuration into each pvt structure has no benefit.
- update and fix some typos in jitterbuffer related documentation
(issue #7257, north, with additional updates and modifications)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:47:28 +00:00
Russell Bryant 0384330d64 update the rest of the channel drivers that use RTP so that their channel
tech structures indicate that they create jitter


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 17:21:21 +00:00
Kevin P. Fleming fdcfd6469b ensure that control frames with payload can be sent to channel drivers via ->indicate()
update iax2_indicate to pass control frame payload to the connected channel
add an API call for sending an indication with payload, and use it for control frames with payload


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 12:24:11 +00:00
Luigi Rizzo 5fa0dc4316 more stncpy/ast_copy_string replacement.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 18:34:38 +00:00
Luigi Rizzo e43bc6634d This rather large commit changes the way modules are loaded.
As partly documented in loader.c and include/asterisk/module.h,
modules are now expected to return all of their methods and flags
into a structure 'mod_data', and are normally loaded with RTLD_NOW
| RTLD_LOCAL, so symbols are resolved immediately and conflicts
should be less likely.  Only in a small number of cases (res_*,
typically) modules are loaded RTLD_GLOBAL, so they can export
symbols.
 
The core of the change is only the two files loader.c and
include/asterisk/module.h, all the rest is simply adaptation of the
existing modules to the new API, a rather mechanical (but believe
me, time and finger-consuming!) process whose detail you can figure
out by svn diff'ing any single module.

Expect some minor compilation issue after this change, please
report it on mantis http://bugs.digium.com/view.php?id=6968
so we collect all the feedback in one place.

I am just sorry that this change missed SVN version number 20000!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 14:08:19 +00:00
Kevin P. Fleming f10f427d49 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:01:19 +00:00
Tilghman Lesher 756c7cbb12 Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 17:44:44 +00:00
Russell Bryant 452f87a465 Merged revisions 9609 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9609 | russell | 2006-02-11 14:23:20 -0500 (Sat, 11 Feb 2006) | 2 lines

fix memory leak from not destroying the scheduler context on module unload

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:31:11 +00:00
Kevin P. Fleming cadfcdfe8e Merged revisions 9404 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9404 | kpfleming | 2006-02-10 14:38:59 -0600 (Fri, 10 Feb 2006) | 2 lines

don't create monitor threads in detached mode, when we need to be able to pthread_join() them later if the module is unloaded (solve crash-on-unload problem for these channel modules)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 20:40:00 +00:00
Kevin P. Fleming a16ae226b6 use string fields for some stuff in ast_channel
const-ify some more APIs
remove 'type' field from ast_channel, in favor of the one in the channel's tech structure
allow string field module users to specify the 'chunk size' for pool allocations
update chan_alsa to be compatible with recent const-ification patches


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 23:05:28 +00:00
Russell Bryant e01861fafd define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 17:18:58 +00:00
Tilghman Lesher e3e7e1d1b2 Bug 5515 - Devicestate and API documentation update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 05:15:56 +00:00
Russell Bryant a725468381 update doxygen docs to specify authors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 21:18:06 +00:00
Mark Spencer 0d32a85be1 Major RTP fixes for using inbound SDP on outbound connection, get rid of
old local rtp stuff...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 17:52:31 +00:00
Tilghman Lesher 870f98f02d Bug 5858 - Make the chanvars.c functions return a 'const char *'
This should prevent us from unintentionally changing variable
values when they're returned from pbx_builtin_getvar_helper.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 19:25:33 +00:00
Kevin P. Fleming 2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Russell Bryant 31a804b97c issue #5605
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-06 15:09:47 +00:00
Russell Bryant 9ddf0e4dce Remove unnecessary checks before calls to ast_strlen_zero. Also, change
some places where strlen is used instead of ast_strlen_zero


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-27 02:19:37 +00:00
Russell Bryant 3453e3efa5 Doxygen documentation update from oej (issue #5505)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24 20:12:06 +00:00
Kevin P. Fleming 5da915dcfd update MANY more files with proper copyright/license info (thanks Ian!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14 20:46:50 +00:00
Kevin P. Fleming 60ffafcc39 allow users of RTP to know when the peer endpoint is (apparently) behind a NAT
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-09 19:54:34 +00:00
Russell Bryant 52ef5c7d30 add function to convert a cause code to a string
create MAX_MUSICCLASS instead of using MAX_LANGUAGE


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-05 17:16:17 +00:00
Kevin P. Fleming 4803ab0bb2 don't use locks when reading usecounts (reading only, not writing)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-24 02:15:04 +00:00
Kevin P. Fleming aa0608cb34 remove useless code (bug #4492)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-09 20:43:54 +00:00