Commit Graph

13490 Commits

Author SHA1 Message Date
Steve Murphy a897556f7f This is the perhaps the biggest, boldest, most daring change I've ever committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-09 16:00:22 +00:00
Jason Parker ec8497c58f Merged revisions 89125 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11203)
........
r89125 | qwell | 2007-11-08 17:52:35 -0600 (Thu, 08 Nov 2007) | 4 lines

Properly say the seconds here..

Issue 11203, fix described by vma.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 23:53:00 +00:00
Jason Parker 267e829cbd Add check_hangup() method to pbx_lua, which can be used to check whether it is time to hangup a channel.
Closes issue #11202, patch by mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 23:38:30 +00:00
Mark Michelson 35d7946cda app_voicemail failed to build when compiling with IMAP_STORAGE
Now it does not.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 22:33:59 +00:00
Mark Michelson 0881f07aed AST_LIST_REMOVE_CURRENT takes only one argument.
Thanks to snuffy for pointing this out on IRC



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 21:31:06 +00:00
Joshua Colp e4187a7a26 Make func_env build again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 21:27:37 +00:00
Mark Michelson beef61b718 Merged revisions 89119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89119 | mmichelson | 2007-11-08 15:00:08 -0600 (Thu, 08 Nov 2007) | 7 lines

Rework of the commit I made yesterday to use the already built-in
ast_uri_decode function as opposed to my home-rolled one. Also added
comments.

Thanks to oej for pointing me in the right direction


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 21:01:02 +00:00
Kevin P. Fleming f806dea3dd convert this code to a more efficient idiom
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 20:39:41 +00:00
Jason Parker 8b6c511200 Change a warning to a notice. Issue #11195, patch by eliel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 18:49:08 +00:00
Jason Parker e03cb6a721 Merged revisions 89115 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11195)
........
r89115 | qwell | 2007-11-08 12:45:15 -0600 (Thu, 08 Nov 2007) | 4 lines

Avoid warnings on load when using sample configuration files.

Issue 11195, patch by eliel.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 18:48:15 +00:00
Tilghman Lesher 3a70afbc3e Add the FILE() dialplan function and deprecate ReadFile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 17:32:15 +00:00
Tilghman Lesher 86e5e39198 Fix missed conversion to linkedlists macro change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 17:28:45 +00:00
Mark Michelson 314238d9cb Blocking changes from previous 1.4 commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 16:51:08 +00:00
Luigi Rizzo 01a1cfd262 use %f instead of %lf (the 'l' is ignored anyways).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 09:21:02 +00:00
Luigi Rizzo 339d27ebe9 use %d and cast to int instead of %zd for size_t object,
this helps portability.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 09:20:05 +00:00
Luigi Rizzo 4216934121 initialize a variable to silence compiler.
The type of warnings emitted depends on the optimization level,
at the lower levels the compiler doesn't always understand what the
programmer has in mind. In this case I could not understand it either.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 09:15:05 +00:00
Kevin P. Fleming c18691dec0 Merged revisions 89105 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89105 | kpfleming | 2007-11-08 00:26:47 -0500 (Thu, 08 Nov 2007) | 2 lines

fix a glaring bug in the new SRV record handling that would cause incorrect weight sorting

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:36:28 +00:00
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +00:00
Tilghman Lesher 950528b638 Merged revisions 89103 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89103 | tilghman | 2007-11-07 22:55:19 -0600 (Wed, 07 Nov 2007) | 2 lines

Typo

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:00:39 +00:00
Joshua Colp 6878c9962a Merged revisions 89101 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89101 | file | 2007-11-07 22:26:48 -0400 (Wed, 07 Nov 2007) | 4 lines

Do not add a sip: to the beginning of the To URI unless needed.
(closes issue #10756)
Reported by: goestelecom

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 02:28:15 +00:00
Joshua Colp 5a63438787 Merged revisions 89099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89099 | file | 2007-11-07 21:28:56 -0400 (Wed, 07 Nov 2007) | 6 lines

Improve the devicestate logic for multiple devices. If any are available then the extension is considered available.
(closes issue #10164)
Reported by: nic_bellamy
Patches:
      sip-hinting-svn-branch-1.4.patch uploaded by nic (license 299)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 01:30:29 +00:00
Joshua Colp f34bb18940 Merged revisions 89097 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89097 | file | 2007-11-07 21:11:25 -0400 (Wed, 07 Nov 2007) | 8 lines

Add support for allowing one outgoing transaction. This means if a response comes back out of order chan_sip will still handle it. I dream of a chan_sip with real transaction support.
(closes issue #10946)
Reported by: flefoll
(closes issue #10915)
Reported by: ramonpeek
(closes issue #9567)
Reported by: atca_pres

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 01:14:31 +00:00
Joshua Colp 7c6127ceef Merged revisions 89095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89095 | file | 2007-11-07 19:53:25 -0400 (Wed, 07 Nov 2007) | 4 lines

If callerid is configured in sip.conf use that for checking the presence of an extension in the dialplan.
(closes issue #11185)
Reported by: spditner

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:55:08 +00:00
Tilghman Lesher 97744f54e7 Merged revisions 89093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89093 | tilghman | 2007-11-07 17:39:37 -0600 (Wed, 07 Nov 2007) | 7 lines

The member refcount must be incremented, to avoid using it after deallocation.
A huge thanks go to lvl- for patiently providing the necessary valgrind output
that was necessary to finding this problem of memory corruption.
Reported by: lvl-
Patch by: tilghman
Closes issue #11174

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:47:45 +00:00
Mark Michelson 4f34bc609b If imapfolder has been specified in voicemail.conf, we should not connect to INBOX...
ever. It may not exist.

(closes issue #11151, reported by selsky, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:18:22 +00:00
Mark Michelson 9aca31f0fc Merged revisions 89090 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89090 | mmichelson | 2007-11-07 16:40:35 -0600 (Wed, 07 Nov 2007) | 6 lines

This patch makes it possible for SIP phones to dial extensions defined with '#' characters
in extensions.conf AND maintain their escaped characters when forming URI's

(closes issue #10681, reported by cahen, patched by me, code review by file)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 22:42:24 +00:00
Steve Murphy a87efea3c4 Merged revisions 89088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89088 | murf | 2007-11-07 14:40:28 -0700 (Wed, 07 Nov 2007) | 1 line

In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 22:09:10 +00:00
Joshua Colp fc0853c7bc Minor change so chan_h323 builds again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 17:45:31 +00:00
Luigi Rizzo 225b653fc0 remove enter/exit comments when handling subdirectory.
If we really want them we can remove the --no-print-directory



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 13:12:28 +00:00
Luigi Rizzo d0b2d2dc62 remove a debugging message which i forgot in.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 11:33:55 +00:00
Luigi Rizzo 19dda440b1 match changes in menuselect's Makefile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 11:15:42 +00:00
Tilghman Lesher 6f3f010ca0 Suppress erroneous warnings on load.
Reported by: eliel
Patch by: eliel
Closes issue #11177


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 04:21:27 +00:00
Tilghman Lesher 6a9fbeaf68 Merged revisions 89079 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89079 | tilghman | 2007-11-06 22:07:49 -0600 (Tue, 06 Nov 2007) | 5 lines

Suppress AEL warnings on load.
Reported by: eliel
Patch by: eliel
Closes issue #11178

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 04:11:32 +00:00
Tilghman Lesher 37166d9a1a Provide the ability to directly manipulate the TON/NPI bits in the dialstring.
Reported by: thetatag
Patch by: thetatag/stevens/tilghman
Closes issue #5331


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 02:14:40 +00:00
Tilghman Lesher fd15274898 Add contributed EAGI proxy, which provides FastAGI functionality for EAGI, while also
buffering the audio stream.
Reported by: devil_slayer
Patch by: devil_slayer
Closes issue #8921


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 01:08:31 +00:00
Russell Bryant 5480c54e56 Fix another CLI command so it doesn't run the real code when called for initialization.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 00:16:03 +00:00
Mark Michelson 6e5b9e4951 Adding documentation regarding imapfolder, imapgreetings, and greetingsfolder options
in voicemail.conf

(closes issue #11133, reported by selsky, patched by blitzrage)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 00:04:30 +00:00
Russell Bryant 4afb905cf0 Print out the channel name as a prefix to the "agi debug" output. This makes
AGI debugging on busy systems much easier.

(closes issue #10730)
Reported by: junky
Patches: 
      agi_debug_chan.diff uploaded by junky (license 177)
	  20070923_10730.diff uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 00:00:38 +00:00
Russell Bryant e309393920 Added the ability to do "meetme concise" with the "meetme" CLI command.
This extends the concise capabilities of this CLI command to include
listing all conferences, instead of an addition to the other sub commands
for the "meetme" command.

(closes issue #11078)
Reported by: jthomas
Patches: 
      meetme-concise.patch uploaded by jthomas (license 293)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 23:44:39 +00:00
Joshua Colp f440f8ba48 Fix up some PBX logic that became broken. The code would exit prematurely when it should have been collecting more digits.
(closes issue #11175)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 23:08:36 +00:00
Tilghman Lesher 7c56918262 Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits.
 - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution.
   (This doesn't affect anything immediately, until another codec has wb support.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:51:48 +00:00
Mark Michelson 0cd3118a62 Adding the queue strategy wrandom
(closes issue #10942, reported and patched by julianjm, documentation changes by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:36:55 +00:00
Russell Bryant a06218ee6d Added the S() and L() options to the MeetMe application. These are pretty
much identical to the S() and L() options to Dial().  They let you set
timeouts for the conference, as well as have warning sounds played to
let the caller know how much time is left, and when it is running out.

(closes issue #8030)
Reported by: areski
Patches: 
      meetme_timeout_timelimit_v2.patch uploaded by areski (license 29)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:15:32 +00:00
Mark Michelson 01e1f6cc94 Added CLI and manager commands for changing a queue member's penalty
(closes issue #9374, reported and initially patched by wuwu, intermediate patch by eliel, and final patch by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:05:56 +00:00
Matthew Fredrickson ebf9f0bc0e Add some more locking as well as API update for libss7 for new transport types
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:01:10 +00:00
Steve Murphy 9f08e7e132 Merged revisions 89036 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89036 | murf | 2007-11-06 10:52:50 -0700 (Tue, 06 Nov 2007) | 1 line

closes issue #8786 - where the [catname](!) and [catname](othercat1,othercat2,...) notation gets dropped across a ConfigUpdate (or any other thing that would cause a config file to be written). While I was at it, I also cleaned up some of the destroy routines to free up comments, which was not being done. Made sure the new struct I introduced is also cleaned up properly at destruction time. My code handles multiple template inclusions. Many thanks to ssokol for his patch, which, while not literally used in the final merge, served as a foundation for the fix.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 21:08:38 +00:00
Joshua Colp 0971b51cfc Remove native bridging check for DTMF based transfers. Thanks to the last batch of RTP changes it is no longer required for the media stream to go through Asterisk if DTMF is going over signalling. It will simply reinvite back as needed.
(closes issue #11172)
Reported by: ibc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 20:55:58 +00:00
Mark Michelson 1d0687dc2c Instead of trying to callback a local channel on a failed attended transfer, call
the device that made the transfer instead. This makes for much smoother calling back
when queues are involved.

(closes issue #11155, reported by IPetrov)

Tremendous thanks to Russell for pulling me out of my block I was having on this one



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 20:32:49 +00:00
Russell Bryant 4e871ae483 Merged revisions 89053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89053 | russell | 2007-11-06 14:18:49 -0600 (Tue, 06 Nov 2007) | 3 lines

Fix init_classes() so that classes that actually do have files loaded aren't
treated as empty, and immediately destroyed ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 20:22:50 +00:00
Russell Bryant 5ab1541da9 Fix the memory show allocations CLI command so that it doesn't spew out all
of the current memory allocations when you start Asterisk, when the command's
handler gets called for initialization.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 19:51:37 +00:00