dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

621 Commits

Author SHA1 Message Date
kpfleming db025d69eb Merged revisions 49600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49600 | kpfleming | 2007-01-04 18:01:40 -0600 (Thu, 04 Jan 2007) | 2 lines

revert the dynamic_list insertion change... that was not the right thing to do

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05 00:02:48 +00:00
kpfleming a08d12f459 Merged revisions 49581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49581 | kpfleming | 2007-01-04 17:50:15 -0600 (Thu, 04 Jan 2007) | 3 lines

create the IAX2 processing threads as background threads so they will use smaller stacks
when we create a dynamic thread, put it on the dynamic_list right away so we don't lose track of it

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49584 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 23:54:09 +00:00
file ae60d026a0 Merged revisions 49568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49568 | file | 2007-01-04 18:00:50 -0500 (Thu, 04 Jan 2007) | 2 lines

It's possible for the iax2 pvt to disappear, so if it has... don't bother looking for dpentries.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49573 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 23:02:32 +00:00
kpfleming 7457dc351c Merged revisions 49465 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49465 | kpfleming | 2007-01-04 12:31:55 -0600 (Thu, 04 Jan 2007) | 2 lines

only do IAX2 frame caching for voice and video frames

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 18:32:23 +00:00
file 00c1434719 Merged revisions 49259 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49259 | file | 2007-01-02 20:19:53 -0500 (Tue, 02 Jan 2007) | 2 lines

Check pvt structure presence before passing to send_command. This gets rid of the irritating message about a packet without pvt structure. This happens because the scheduled item is getting cancelled at almost the exact moment it is getting executed.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49260 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-03 01:21:41 +00:00
oej 98cbdc7b3c - Implement error handling in ast_append_ha
- Use this in chan_sip
- Document ha functions in acl.c


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49092 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-01 19:20:46 +00:00
file c3751a7675 count is no longer used in the iaxq structure really so let's just make this a statically declared linked list.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49089 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-31 19:15:23 +00:00
file e095143a37 Merged revisions 49063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49063 | file | 2006-12-29 22:37:22 -0500 (Fri, 29 Dec 2006) | 2 lines

Initialize the packet queue in load_module instead of just declaring the list with the default value. (issue #8695 reported by ssokol)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49064 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-30 03:40:42 +00:00
russell b850b5d8c7 Merged revisions 48944 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48944 | russell | 2006-12-24 02:25:38 -0500 (Sun, 24 Dec 2006) | 11 lines

Merged revisions 48943 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48943 | russell | 2006-12-24 02:23:07 -0500 (Sun, 24 Dec 2006) | 3 lines

Check for the proper return value on an error in a call to mmap().
This was reported by Andy Wang on the asterisk-dev list.  Thanks!

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48945 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-24 07:27:29 +00:00
murf 322326058e a quick fix to app_sms.c to get rid of cursed compiler warnings so I can compile under --enable-dev-mode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48767 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21 19:44:20 +00:00
murf 864a2f7600 As per bug 7978, this version introduces the jittertargetextra option in config files
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48663 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21 00:24:08 +00:00
file 8b5bed10cb Clean up find_idle_thread function and use atomic operations for dynamic thread count.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48567 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-18 17:30:53 +00:00
file db7f2d33e9 Merged revisions 48564 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48564 | file | 2006-12-18 12:15:49 -0500 (Mon, 18 Dec 2006) | 2 lines

Put thread into proper list if we abort handling due to an error, and also hold the lock while putting it back into the proper idle list so we don't prematurely get a signal. (issue #8604 reported by arkadia)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48565 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-18 17:18:18 +00:00
file e5cfad953d Merged revisions 48504 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48504 | file | 2006-12-15 14:38:51 -0500 (Fri, 15 Dec 2006) | 2 lines

Hold call structure lock in places where a qualify or peer action can destroy it.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48505 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-15 19:40:29 +00:00
file a9d5207d8f Merged revisions 48502 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48502 | file | 2006-12-15 14:24:15 -0500 (Fri, 15 Dec 2006) | 2 lines

Lock network retransmission queue in all places that it is used.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48503 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-15 19:26:45 +00:00
file c830210dc8 Merged revisions 48478 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48478 | file | 2006-12-15 01:28:05 -0500 (Fri, 15 Dec 2006) | 2 lines

Use a wakeup variable so that we don't wait on IO indefinitely if packets need to be retransmitted.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48479 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-15 06:31:26 +00:00
russell f27abefed8 convert the thread IO state and type to use enums.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48365 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-09 16:44:41 +00:00
russell 5aeb18e7b7 Merged revisions 48363 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48363 | russell | 2006-12-09 10:59:42 -0500 (Sat, 09 Dec 2006) | 8 lines

Use locking when accessing the registrations list.  This list is not actually
used very often, so the likelihood of there being a problem is pretty small,
but still possible.  For example, if the CLI command to list the registrations
was called at the same time that a reload was occurring and the registrations
list was getting destroyed and rebuilt, a crash could occur.

In passing, go ahead and convert this list to use the linked list macros.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-09 16:04:06 +00:00
russell da4a5d26c7 chan_iax2 has an extremely large function, socket_process(), to handle incoming
frames.  The function, before this commit, was roughly 1400 lines long.  So, I
am working on breaking this up into functions so that the code is easier to
follow and debug.  Also, I will be committing these changes in chunks as I do
them to ease tracking down any potentially introduced problems.

Break out roughly 150 lines from socket_process() and introduce a new function, 
socket_process_meta() which handles the parsing of an incoming meta frame.
Also, restructure some of this code a bit to reduce the deep nesting that was
in this code.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48360 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-09 07:10:55 +00:00
russell 6bfcfe8369 - Fix a few spelling mistakes
- Use sizeof() to pass an array size to a function
- Use a single bit for a variable in the chan_iax2_pvt stuct since that is all
  it needs.
- Add some comments about the iaxs, iaxl, and lastused arrays.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48359 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-09 05:04:38 +00:00
russell 8048b9c718 Constify a bunch of the usage strings for CLI commands.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48302 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06 07:23:32 +00:00
russell 5087e63494 Instead of creating an unused instance of an unnamed enum, give it a name.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48300 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06 07:16:09 +00:00
file a0c0c3b79b Merged revisions 48158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48158 | file | 2006-11-30 15:07:55 -0500 (Thu, 30 Nov 2006) | 10 lines

Merged revisions 48157 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48157 | file | 2006-11-30 15:06:43 -0500 (Thu, 30 Nov 2006) | 2 lines

Only print out debug message if bridged channel is not NULL. (issue #8412 reported by jubilex)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48160 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30 20:09:46 +00:00
russell c561cdc896 Add a comment to note near some code that performs a very expensive operation
that occurs for every incoming media frame.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48099 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 23:13:37 +00:00
russell c01dbd5df9 The use of an ifdef to check for FreeBSD is useless here because the two
versions of the format string are identical.  Also, since each format is only
used once, get rid of the use of defines all together.  (issue #8344, julieng)

In passing, also clean up the formatting a but to get rid of the nesting
without the use of braces, as defined in the coding guidelines.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47520 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-12 19:22:19 +00:00
russell 026703da23 Merged revisions 47497 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47497 | russell | 2006-11-12 01:23:23 -0500 (Sun, 12 Nov 2006) | 12 lines

Merged revisions 47496 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47496 | russell | 2006-11-12 01:09:03 -0500 (Sun, 12 Nov 2006) | 4 lines

Only do the check to determine whether the channel calling this function is an
IAX2 channel when getting the IP address using the special argument, 
CURRENTCHANNEL.  (issue #8341, jcovert)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47498 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-12 06:31:39 +00:00
tilghman 597aa05da5 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: http://svn.digium.com/svn/asterisk/trunk@47439 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-10 17:01:06 +00:00
murf 4d6996c27a A fair number of changes for the sake of bug 7506
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47290 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-07 21:47:49 +00:00
tilghman 278341b071 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: http://svn.digium.com/svn/asterisk/trunk@47052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02 23:16:09 +00:00
file abf2e713d2 Merged revisions 46775 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46775 | file | 2006-11-01 13:21:34 -0500 (Wed, 01 Nov 2006) | 2 lines

It's another round of chan_iax2 fixes! Should hopefully fix the deadlock issues people have been reporting. IAXtel now has qualify turned on for 800 peers and it is handling it fine.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46777 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-01 18:26:12 +00:00
rizzo d4ef7c0a1e remove old/useless usecount handling
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46696 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-31 18:10:21 +00:00
file 37e4b82104 Merged revisions 46474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46474 | file | 2006-10-30 13:13:07 -0500 (Mon, 30 Oct 2006) | 2 lines

We need to lock the pvt structure during retransmission as another worker thread may be doing something as well.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46475 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-30 18:17:02 +00:00
kpfleming fb76c79434 restore bugfix that was reverted by trunk_mtu patch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46202 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:47:01 +00:00
kpfleming 470f688a28 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: http://svn.digium.com/svn/asterisk/trunk@46201 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:44:50 +00:00
oej 6b11ab9b13 Ok, second attempt...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46199 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:26:22 +00:00
oej 568e38af17 On the other hand, don't use 1.4 patches for trunk... Sorry.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46197 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:14:53 +00:00
oej 691cd5a180 Add ability to adapt the IAX trunk packets to the MTU size, to avoid bad audio
when the number of channels fill the MTU on a given link.

In the future, this needs to be configurable per peer with trunking enabled.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46195 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:06:13 +00:00
kpfleming cfed87ed3a Merged revisions 46154 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46154 | kpfleming | 2006-10-24 19:26:17 -0500 (Tue, 24 Oct 2006) | 2 lines

add passthrough and file format support for G.722 16KHz audio (issue #5084, original patch by andrew, updated by mithraen)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46155 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 00:32:23 +00:00
file 84191d1d03 Merged revisions 46130 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46130 | file | 2006-10-24 15:29:56 -0400 (Tue, 24 Oct 2006) | 2 lines

We need to initialize our scheduler pthread condition... yes.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46131 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24 19:33:02 +00:00
kpfleming 05c0b1648b Merged revisions 45408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45408 | kpfleming | 2006-10-17 17:24:10 -0500 (Tue, 17 Oct 2006) | 3 lines

optimize the 'quick response' code a bit more... no more malloc() or memset() for each response
expand stringfields API a bit to allow reusing the stringfield pool on a structure when needed, and remove some unnecessary code when the structure was being freed

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45409 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-17 22:24:45 +00:00
kpfleming 358e9d2522 Merged revisions 45049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r45049 | kpfleming | 2006-10-13 11:19:35 -0500 (Fri, 13 Oct 2006) | 10 lines

Merged revisions 45048 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r45048 | kpfleming | 2006-10-13 11:18:08 -0500 (Fri, 13 Oct 2006) | 2 lines

when sending a call to a peer, use the proper socket if we have multiple bindings (reported on asterisk-dev)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45050 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-13 16:20:26 +00:00
file e8cb8aa430 Merged revisions 44759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44759 | file | 2006-10-09 11:41:28 -0400 (Mon, 09 Oct 2006) | 2 lines

Properly avoid a collision with iax2_hangup (issue #8115 reported by vazir)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44762 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-09 15:49:45 +00:00
kpfleming 1a08d9e31b 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: http://svn.digium.com/svn/asterisk/trunk@44379 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04 19:51:38 +00:00
mogorman 4a1aaf52ae bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-03 15:53:07 +00:00
markster cdf3564fde Don't use channel when you don't mean a channel
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44147 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-02 02:38:52 +00:00
file b6ae1eec31 One must remember to unlock their list... thanks to Qwell for letting me into his box
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43961 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-29 01:36:26 +00:00
file 3a27d3bc70 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: http://svn.digium.com/svn/asterisk/trunk@43934 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-28 18:09:01 +00:00
file 61084e666f Merged revisions 43915 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43915 | file | 2006-09-28 13:31:09 -0400 (Thu, 28 Sep 2006) | 2 lines

Make sure the pvt exists before accessing it again as it may have gone away (issue #7562 reported by Seb7 and issue #7939 reported by sorg)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43917 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-28 17:32:46 +00:00
file 4b9c516fa0 I *think* this is the last list in chan_iax2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43802 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27 19:39:39 +00:00
file a21b1c1f05 Merged revisions 43783 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43783 | file | 2006-09-27 13:00:31 -0400 (Wed, 27 Sep 2006) | 2 lines

Get rid of two functions from a time now past (we THINK these are from pre-recursive lock time) that may be contributing to two open issues on the bug tracker (7562/7939) and that has the potential to just make bad things happen if the timing is right.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43792 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27 17:02:28 +00:00
file b40b0fba67 Clean up code and convert last two things (firmware/dialplan cache) to linked list macros.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43733 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27 01:39:39 +00:00
russell a88e60b94b Merged revisions 43553 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43553 | russell | 2006-09-24 09:53:35 -0400 (Sun, 24 Sep 2006) | 12 lines

Merged revisions 43552 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43552 | russell | 2006-09-24 09:50:30 -0400 (Sun, 24 Sep 2006) | 4 lines

Check to see if the channel that is activating the IAXPEER function is actually
an IAX2 channel before proceeding to process it to avoid crashing.
(issue #8017, reported by admott, fixed by myself)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43554 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-24 13:57:19 +00:00
file ed0fae08aa Oh look more changes, but these are my own! (Clean up module load functions)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43461 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-21 22:53:17 +00:00
tilghman 2a2a143966 Lots more removal of deprecated things
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43452 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-21 21:59:12 +00:00
tilghman e8ef9fd3ba Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20 20:40:39 +00:00
kpfleming 5aacb6a82d merge qwell's CLI verbification work
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18 19:54:18 +00:00
kpfleming 5c0e56df21 merge markster's usersconf branch with some slight changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16 23:53:58 +00:00
tilghman 9e59e6756a Merged revisions 43019 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43019 | tilghman | 2006-09-16 02:57:04 -0500 (Sat, 16 Sep 2006) | 2 lines

When a realtime peer expires, reset the ipaddress in the realtime database back to 0 (Issue 6656)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43024 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16 08:10:55 +00:00
file 6ef68d2d62 Merged revisions 42086 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42086 | file | 2006-09-06 11:55:20 -0400 (Wed, 06 Sep 2006) | 2 lines

Make realtime regseconds work as people expected (0 on registration expiration or release, and actual on normal state) (issue #7684 reported by kshumard)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42087 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-06 15:58:21 +00:00
mogorman 73925ee14a 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: http://svn.digium.com/svn/asterisk/trunk@41633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31 21:00:20 +00:00
file 3f22aa53af 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: http://svn.digium.com/svn/asterisk/trunk@41507 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31 01:59:02 +00:00
file d5de83cadf Limit challenges to 9 digits in length
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41280 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29 20:53:27 +00:00
russell 53f8d43e29 Merge team/russell/frame_caching
There are some situations in Asterisk where ast_frame and/or iax_frame
structures are rapidly allocatted and freed (at least 50 times per second
for one call).

This code significantly improves the performance of ast_frame_header_new(), 
ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping
a thread-local cache of these structures and using frames from the cache 
whenever possible instead of calling malloc/free every time.

This commit also converts the ast_frame and iax_frame structures to use the
linked list macros.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41278 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29 20:50:36 +00:00
russell edfcc0682a don't seg fault when using dbsecret
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41034 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-25 02:55:00 +00:00
kpfleming 8b0c007ad9 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: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21 02:11:39 +00:00
russell 7eba1e86bd Merge team/russell/ast_verbose_threadstorage
- instead of defining a free() wrapper in a bunch of files, define it as
  ast_free() in utils.h and remove the copies from all the files.

- centralize and abstract the code used for doing thread storage. The code
  lives in threadstorage.h, with one function being implemented in utils.c.
  This new API includes generic thread storage as well as special functions
  for handling thread local dynamic length string buffers.

- update ast_inet_ntoa() to use the new threadstorage API
- update ast_state2str() to use the new threadstorage API
- update ast_cli() to use the new threadstorage API

- Modify manager_event() to use thread storage. Instead of using a buffer of
  4096 characters as the workspace for building the manager event, use a thread
  local dynamic string.  Now there is no length limitation on the length of the
  body of a manager event.

- Significantly simplify the handling of ast_verbose() ...
  - Instead of using a static char buffer and a lock to make sure only one
    thread can be using ast_verbose() at a time, use a thread local dynamic
    string as the workspace for preparing the verbose message. Instead of
    locking around the entire function, the only locking done now is when the
    message has been built and is being deliviered to the list of registered
    verbose message handlers.
  - This function was doing a strdup() on every message passed to it and
    keeping a queue of the last 200 messages in memory. This has been
    completely removed. The only place this was used was that if there were
    any messages in the verbose queue when a verbose handler was registered,
    all of the messages in the queue would be fed to it.  So, I just made sure
    that the console verbose handler and the network verbose handler (for
    remote asterisk consoles) were registered before any verbose messages.
    pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at
    startup, but I didn't feel the performance hit of this message queue was
    worth saving the initial verbose output for these very rarely used modules.
  - I have removed the last three arguments to the verbose handlers, leaving
    only the string itself because they aren't needed anymore. For example,
    ast_verbose had some logic for telling the verbose handler to add
    a newline if the buffer was completely full. Now that the buffer can grow
    as needed, this doesn't matter anymore.
  - remove unused function, ast_verbose_dmesg() which was to dispatch the
    message queue
  - Convert the list of verbose handlers to use the linked list macros.

- add missing newline characters to a few ast_verbose() calls

- convert the list of log channels to use the linked list macros in logger.c

- fix close_logger() to close all of the files it opened for logging

- update ast_log() to use a thread local dynamic string for its workspace
  for preparing log messages instead of a buffer of size BUFSIZ (8kB on my
  system) allocated on the stack.  The dynamic string in this case is limited
  to only growing to a maximum size of BUFSIZ.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-08 06:32:04 +00:00
murf 5704962ab9 This commit folds in changes to both stringfields (some enhancements to the ...field_set() macro, to optimize setting strings to empty, resetting strings to shorter contents, etc.) and to chan_iax2.c, to use stringfields in the user, peer, and pvt structs. Has been running stably on iaxtel, but while iaxtel has a large registration volume, it doesn't seem to have a high call volume. So far, it seems to reduce heap usage by over half. YMMV\! Please report any IAX bugs that might involve stringfields\!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39203 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 18:12:51 +00:00
russell a0ab5e9b80 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: http://svn.digium.com/svn/asterisk/trunk@38905 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 05:26:29 +00:00
file 1bdd7371e0 It is better to hold a lock then not hold a lock when you are supposed to.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38887 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 00:13:44 +00:00
file 886cf39b10 Minor optimization but use a linkedlists.h macro that pops the head off the list instead of getting the first entry and then removing it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38871 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-04 23:17:40 +00:00
russell 0fdbca7bd0 Merged revisions 38328 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38328 | russell | 2006-07-27 00:25:41 -0400 (Thu, 27 Jul 2006) | 4 lines

Fix crash when using the "regexten" option with MALLOC_DEBUG enabled.  This was
not reported in the bug tracker but the same bug has been demonstrated in other
places in the code.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38329 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-27 04:28:09 +00:00
russell ffb56d9d39 use ast_atomic_fetchadd_int in chan_zap, sip, and iax2 for usecount handling
and fix a couple little things in passing
 - usecnt was not initialized in chan_iax2
 - ast_update_use_count() was not called after incrementing the count in chan_sip


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38077 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-22 00:33:56 +00:00
russell f395a52a02 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: http://svn.digium.com/svn/asterisk/trunk@38042 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-21 17:31:28 +00:00
kpfleming 6049bb6539 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: http://svn.digium.com/svn/asterisk/trunk@37988 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19 20:44:39 +00:00
kpfleming 5bc0cc9b00 Merged revisions 37949 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37949 | kpfleming | 2006-07-19 12:10:10 -0500 (Wed, 19 Jul 2006) | 2 lines

ensure that global 'maxauthreq' is reset to zero during 'reload'

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37951 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19 17:16:25 +00:00
north b18aa7c3fb There was an issue with ADSI and iax2, where on an iaxy with a normal phone connected,
in vm_authenticate, it was try to start ADSI on the channel, and it WOULD because it
  was "supported", according to the iaxy.  There is now a config option (adsi=yes) for
  this, which defaults to no.  (config sample coming shortly)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37643 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-14 21:49:20 +00:00
kpfleming b2b23b395d G726-32 changes:
split support for G726-32 into RFC3551 and AAL2 packing orders, since both are in use
change "G726-32" to be RFC3551 packing order, in spite of devices that use AAL2 order with this MIME type
add ability to directly transcode between packing orders


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37494 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-12 22:42:13 +00:00
file 6410161e82 Merged revisions 37439 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37439 | file | 2006-07-12 11:23:59 -0400 (Wed, 12 Jul 2006) | 2 lines

Add support to have maxauthreq as a global option

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37440 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-12 15:25:17 +00:00
kpfleming 52a1c0b8fc Merged revisions 37419 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37419 | kpfleming | 2006-07-12 08:54:10 -0500 (Wed, 12 Jul 2006) | 2 lines

remove some more bad examples of using printf

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37433 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-12 14:04:16 +00:00
file e3ad207f58 And now the trunk version! Add an option for IAX2 users that allows you to set how many outstanding AUTHREQs chan_iax2 will wait for replies on.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37380 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-11 19:03:56 +00:00
file 39ee281615 Remove BRIDGE_OPTIMIZATION since it is deprecated or obsolete (take your pick)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37346 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-10 19:39:47 +00:00
russell ed6fd36fd8 eliminate some pointer signedness warnings
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37290 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-07 07:01:50 +00:00
kpfleming cda33c11a8 prepare Asterisk for new zaptel.h/tonezone.h installation locations
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37027 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-05 16:44:41 +00:00
russell 4c50c16add 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: http://svn.digium.com/svn/asterisk/trunk@36726 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-03 04:25:21 +00:00
kpfleming 41af2260b7 The Eurostar Commit! (it's amazing how much work you can get done on a 150 minute train ride from Paris to London <G>)
support the new location for zaptel.h and tonezone.h
use the dependency information output by menuselect to build Makefile rules for each module for header files and libraries
combine the common rules into a top-level Makefile.rules file
remove all (now) unnecessary stuff from subdir Makefiles
change translator API so that the newpvt() callback returns an int instead of a pointer (it no longer allocates memory)
alphabetize --with-<foo> options in configure script
enhance Net-SNMP support in configure script to provide a --with-netsnmp option
fix support for --with-pq so that if pg-config is not found when --with-pq is specified, an error will be generated
add 'optional package' usage to modules now that menuselect can output it
allow res_snmp to build by default, since the new loader changes coming soon will solve the function naming problem (and users can disable it via menuselect anyway)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35832 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-24 19:43:31 +00:00
russell 2102917875 reduce indentation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35628 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-23 02:03:21 +00:00
russell dcc31562c9 - move the increase of the use count to be after the possible failures
- if the pbx fails to start, set the owner channel of the pvt strucutre
  to be NULL
- return immediately if the pbx fails to start so the loop to set all of
  the variables from the "setvar" options aren't set as a bunch of global
  variables instead


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35554 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-22 17:10:16 +00:00
file 6ceeba67f1 Fix timing issue (race) with poke/pong for very close peers that can cause a peer to be declared unreachable (issue #7396 reported by stevedavies)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35264 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-21 16:50:24 +00:00
russell 0d41f64569 Merged revisions 34627 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34627 | russell | 2006-06-18 16:15:15 -0400 (Sun, 18 Jun 2006) | 5 lines

don't store multiple secrets delimited with semicolons for peers because this
is only valid for users. Instead, only keep the last specified secret for a
peer entry. Also, document how multiple secrets are handled in the sample
config. (Reported by PCadach on #asterisk-bugs)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34628 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-18 20:18:41 +00:00
file 061f59c391 Merged revisions 34400 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34400 | file | 2006-06-16 00:37:05 -0300 (Fri, 16 Jun 2006) | 2 lines

Zero out a declared structure so as to not crash if it contains invalid data (reported by Qwell on #asterisk-dev)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34401 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-16 03:38:24 +00:00
kpfleming 00a6d4e9ce Merged revisions 34159-34160 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34159 | kpfleming | 2006-06-14 17:17:37 -0500 (Wed, 14 Jun 2006) | 2 lines

use existing dial string parser for strings supplied to iax2_devicestate, because they can be complete dial strings, not just device names

........
r34160 | kpfleming | 2006-06-14 17:22:21 -0500 (Wed, 14 Jun 2006) | 2 lines

coding style cleanups on queue interface handling code that was committed for the last release

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34161 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-14 22:35:49 +00:00
file 546d1ce90b Change a bit of logic in peer expiry back to the way it used to be
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33595 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-12 02:54:32 +00:00
file b8a3a27c99 Merged revisions 33297 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33297 | file | 2006-06-09 15:26:42 -0300 (Fri, 09 Jun 2006) | 2 lines

Remove an unneeded double lock (issue #7310 reported by arkadia)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33298 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-09 18:29:58 +00:00
file 70f848545e Wait until we have the lock before getting the pvt structure pointer (issue #7313 reported by arkadia)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33296 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-09 18:20:28 +00:00
kpfleming 73c525e6e2 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07 18:54:56 +00:00
russell 91c50d3c58 Merged revisions 32818 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32818 | russell | 2006-06-07 13:53:21 -0400 (Wed, 07 Jun 2006) | 2 lines

fix some broken code with BRIDGE_OPTIMIZATION defined (issue #7292)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32819 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07 17:54:26 +00:00
russell d655fb8033 add an updated patch that adds dnsmgr support for outgoing iax2 registrations
(issue #6305, by ivanfm, with mods)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32817 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07 17:44:36 +00:00
kpfleming 5b2d437368 Merged revisions 32566 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32566 | kpfleming | 2006-06-06 10:48:00 -0500 (Tue, 06 Jun 2006) | 2 lines

clean up yesterday's security fix to not cause breakage when video mini frames are received

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32567 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-06 15:48:42 +00:00
kpfleming 4bd2904449 Merged revisions 32373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32373 | kpfleming | 2006-06-05 14:53:16 -0500 (Mon, 05 Jun 2006) | 2 lines

ensure that the received number of bytes is included in all IAX2 incoming frame analysis checks (fixes a known vulnerability)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32401 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-05 20:10:06 +00:00
russell c5b26df05c revert the changes to allow chan_iax2 to use dnsmgr for registrations.
my concerns are listed in issue #6305


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32327 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-05 16:17:31 +00:00