Commit Graph

1355 Commits

Author SHA1 Message Date
David Vossel ba2a8457b8 Merged revisions 205471 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r205471 | dvossel | 2009-07-08 18:15:54 -0500 (Wed, 08 Jul 2009) | 10 lines
  
  Fixes 8khz assumptions
  
  Many calculations assume 8khz is the codec rate. This
  is not always the case.  This patch only addresses chan_iax.c
  and res_rtp_asterisk.c, but I am sure there are other areas
  that make this assumption as well.
  
  Review: https://reviewboard.asterisk.org/r/306/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 23:19:09 +00:00
Russell Bryant 0e8c630224 Move OpenSSL initialization to a single place, make library usage thread-safe.
While doing some reading about OpenSSL, I noticed a couple of things that
needed to be improved with our usage of OpenSSL.

1) We had initialization of the library done in multiple modules.  This has now
   been moved to a core function that gets executed during Asterisk startup.
   We already link OpenSSL into the core for TCP/TLS functionality, so this
   was the most logical place to do it.

2) OpenSSL is not thread-safe by default.  However, making it thread safe is
   very easy.  We just have to provide a couple of callbacks.  One callback
   returns a thread ID.  The other handles locking.  For more information,
   start with the "Is OpenSSL thread-safe?" question on the FAQ page of
   openssl.org.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 15:17:19 +00:00
Russell Bryant 0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

Review: https://reviewboard.asterisk.org/r/239/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Joshua Colp ae87ba45b5 Add support for multicast RTP paging.
(closes issue #11797)
Reported by: macbrody

Review: https://reviewboard.asterisk.org/r/270/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-25 18:25:24 +00:00
Tilghman Lesher 6b53ec413d Fix 2 typos and add support for wide character types.
Reported by Benny Amorsen via the asterisk-users mailing list.
http://lists.digium.com/pipermail/asterisk-users/2009-June/233622.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-19 15:47:55 +00:00
David Vossel dcfe69ec64 fixes some memory leaks and redundant conditions
(closes issue #15269)
Reported by: contactmayankjain
Patches:
      patch.txt uploaded by contactmayankjain (license 740)
      memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
Tested by: contactmayankjain, dvossel




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:37:42 +00:00
Russell Bryant 730e60e583 Merged revisions 201600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r201600 | russell | 2009-06-18 10:24:31 -0500 (Thu, 18 Jun 2009) | 29 lines
  
  Fix memory corruption and leakage related reloads of non files mode MoH classes.
  
  For Music on Hold classes that are not files mode, meaning that we are executing
  an application that will feed us audio data, we use a thread to monitor the
  external application and read audio from it.  This thread also makes use of the
  MoH class object.  In the MoH class destructor, we used pthread_cancel() to ask
  the thread to exit.  Unfortunately, the code did not wait to ensure that the
  thread actually went away.  What needed to be done is a pthread_join() to ensure
  that the thread fully cleans up before we proceed.  By adding this one line, we
  resolve two significant problems:
  
    1) Since the thread was never joined, it never fully goes away.  So, on every
       reload of non-files mode MoH, an unused thread was sticking around.
  
    2) There was a race condition here where the application monitoring thread
       could still try to access the MoH class, even though the thread executing
       the MoH reload has already destroyed it.
  
  (issue #15109)
  Reported by: jvandal
  
  (issue #15123)
  Reported by: axisinternet
  
  (issue #15195)
  Reported by: amorsen
  
  (issue AST-208)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 15:27:10 +00:00
Mark Michelson dce6a54a4a Trunk implementation of setting an alternate RTP source.
This contains the interface by which we can let an rtp instance know
that it might start receiving audio from a new source. This is similar
in nature to revision 197588 of Asterisk 1.4.

Review: https://reviewboard.asterisk.org/r/276



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 15:20:17 +00:00
Eliel C. Sardanons a179e144cd Show the interface name on error, if it is not found.
If the smdiport specified is not found, show the interface name
instead of '(null)'.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-16 12:32:00 +00:00
Kevin P. Fleming 82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00
Kevin P. Fleming 6c5987811c Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined
in asterisk/optional_api.h; this new version provides solves compatibility
issues with the use of linker version scripts for suppressing global symbols.
In addition, there is now a functional (and tested!) implementation for Mac OS/X,
so module writers no longer need to use special tests before calling optional
API functions. All future implementations must provide these same semantics,
so that module writers can rely on them.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 16:07:23 +00:00
David Vossel d532cbcd8a module load priority
This patch adds the option to give a module a load priority. The value represents the order in which a module's load() function is initialized.  The lower the value, the higher the priority.  The value is only checked if the AST_MODFLAG_LOAD_ORDER flag is set.  If the AST_MODFLAG_LOAD_ORDER flag is not set, the value will never be read and the module will be given the lowest possible priority
on load.  Since some modules are reliant on a timing interface, the timing modules have been given a high load priorty.

(closes issue #15191)
Reported by: alecdavis
Tested by: dvossel

Review: https://reviewboard.asterisk.org/r/262/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-09 16:22:04 +00:00
Eliel C. Sardanons 515166ba37 Move music on hold related applications documentation to XML.
Move MusicOnHold, SetMusicOnHold, StartMusicOnHold, StopMusicOnHold static
documentation to the new AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      res_musiconhold_static_conversion.txt uploaded by lmadsen (license 10)
      (with some fixes and formatting by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06 23:03:15 +00:00
Eliel C. Sardanons 4f94236de5 Move function PP_EACH_USER and PP_EACH_EXTENSION documentation to XML.
Move function PP_EACH_USER and PP_EACH_EXTENSION documentation to the new
AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      res_phoneprov_static_conversion.txt uploaded by lmadsen (license 10)
	(with PP_EACH_USER add by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06 22:45:42 +00:00
Eliel C. Sardanons 9ce385bd72 Move static docs to the new AstXML form.
Move SMDI_MSG and SMDI_MSG_RETRIEVE functions statis documentation
to XML.

(issue #15245)
Reported by: eliel
Patches:
      res_smdi_static_conversion.txt uploaded by lmadsen (license 10)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-04 16:29:50 +00:00
Eliel C. Sardanons fb73ee6187 Moved more static documentation to the new AstXML form.
Moved more static docs to XML (pplications and manager actions):
Monitor, StopMonitor, ChangeMonitor, PauseMonitor, UnpauseMonitor.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01 19:37:30 +00:00
Eliel C. Sardanons 8d464b7211 Move JabberSend manager action from static docs to the AstXML form.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01 16:09:42 +00:00
Eliel C. Sardanons 1b59a1cd7d Move static documentation of E|Dead|AGI() application and manager action to XML.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01 15:38:48 +00:00
Eliel C. Sardanons 0c99bc31cb Avoid a crash when res_timing_dahdi is unloaded but wasn't properly loaded.
if dahdi_test_timer() fails, timing_funcs_handle remains NULL causing a crash
when calling ast_unregister_timing_interface() with a NULL pointer.

(closes issue #15234)
Reported by: eliel
Patches:
      timing_dahdi1.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-31 01:22:15 +00:00
Sean Bright 3353710e16 Properly terminate the receive buffer before sending to iksemel.
aji_io_recv takes the maximum number of bytes to read (instead of the total
buffer size), so we have to subtract 1 from our buffer size.  Without this, when
we receive packets that are larger than our buffer, iksemel will choke and
things get wonky.

(closes issue #15232)
Reported by: lp0
Patches:
      05302009_res_jabber.c.patch uploaded by seanbright (license 71)
Tested by: seanbright, lp0


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 20:11:33 +00:00
Sean Bright 90c3db40ed Merged revisions 198370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198370 | seanbright | 2009-05-30 15:36:20 -0400 (Sat, 30 May 2009) | 12 lines
  
  Properly terminate AMI JabberSend response messages.
  
  The response message (either Error or Success) needs an extra trailing \r\n
  after the fields to inform the client that the message is complete.
  
  (closes issue #14876)
  Reported by: srt
  Patches:
        05302009_1.4_res_jabber.c.diff uploaded by seanbright (license 71)
        asterisk_14876.patch uploaded by srt (license 378)
        trunk-14876-2.diff uploaded by phsultan (license 73)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 19:38:58 +00:00
Russell Bryant 1ee78437e4 Merged revisions 198311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198311 | russell | 2009-05-29 22:42:46 -0500 (Fri, 29 May 2009) | 5 lines
  
  Fix a crash that occurred when MWI SMDI messages expired.
  
  (closes issue #14561)
  Reported by: cmoss28
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 03:43:23 +00:00
Russell Bryant 04beecc859 Improve handling of trying to ACK too many timer expirations.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 22:33:31 +00:00
Terry Wilson c317d8f444 Add a couple of TODO items so I don't forget
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 22:21:42 +00:00
Russell Bryant 1fab70a1c6 Resolve issues with choppy sound when using res_timing_pthread.
The situation that caused this problem was when continuous mode was being
turned on and off while a rate was set for a timing interface.  A very easy
way to replicate this bug was to do a Playback() from behind a Local channel.
In this scenario, a rate gets set on the channel for doing file playback.
At the same time, continuous mode gets turned on and off about every 20 ms
as frames get queued on to the PBX side channel from the other side of the
Local channel.

Essentially, this module treated continuous mode and a set rate as mutually
exclusive states for the timer to be in.  When I dug deep enough, I observed
the following pattern:

   1) Set timer to tick every 20 ms.
   2) Wait almost 20 ms ...
   3) Continuous mode gets turned on for a queued up frame
   4) Continuous mode gets turned off
   5) The timer goes back to its tick per 20 ms. state but starts counting
      at 0 ms.
   6) Goto step 2.

Sometimes, res_timing_pthread would make it 20 ms and produce a timer tick,
but not most of the time.  This is what produced the choppy sound (or sometimes
no sound at all).

Now, the module treats continuous mode and a set rate as completely independent
timer modes.  They can be enabled and disabled independently of each other and
things work as expected.


(closes issue #14412)
Reported by: dome
Patches:
      issue14412.diff.txt uploaded by russell (license 2)
      issue14412-1.6.1.0.diff.txt uploaded by russell (license 2)
Tested by: DennisD, russell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 20:06:59 +00:00
Russell Bryant 5894cefe1f Trim trailing whitespace so that I can work on this bug without it bothering me. :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 16:15:30 +00:00
Terry Wilson 71a3a2ebf6 Add Calendaring support for Asterisk
This commit add Calendaring support to Asterisk for iCalendar, CalDAV, and MS
Exchange calendars. Exchange support has only been tested on Exchange Server 2k3
and does not support forms-based authentication at this time (patches *very*
welcome). Exchange support is also currently missing the ability to return a
list of a meting's attendees (again, patches are very, very welcome).

Features include:
  Querying a calendar for events over a specific time range
  Checking a calendar's busy status via the dialplan
  Writing calendar events via the dialplan (CalDAV and Exchange only)
  Handling calendar event notifications through the dialplan

(closes issue #14771)
Tested by: lmadsen, twilson, Shivaprakash

Review: https://reviewboard.asterisk.org/r/58


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 19:57:18 +00:00
Russell Bryant cc8da4eff3 Merged revisions 196826 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r196826 | russell | 2009-05-26 13:14:36 -0500 (Tue, 26 May 2009) | 9 lines
  
  Resolve a file handle leak.
  
  The frames here should have always been freed.  However, out of luck, there was
  never any memory leaked.  However, after file streams became reference counted,
  this code would leak the file stream for the file being read.
  
  (closes issue #15181)
  Reported by: jkroon
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 18:20:57 +00:00
Sean Bright 3abe8a963e Add new ast_complete_applications function so that we can use it with the
'channel originate ... application <app>' CLI command.

(And yeah, I cleaned up some whitespace in res_clioriginate.c... big whoop,
wanna fight about it!?)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 14:36:11 +00:00
Eliel C. Sardanons 5518c1b171 Move AGI static documentation to the new AstXML form.
Move AGI commands documentation to XML docs:
'set priority'
'set variable'
'stream file'
'control stream file'
'tdd mode'
'verbose'
'wait for digit'
'speech create'
'speech set'
'speech destroy'
'speech load grammar'
'speech unload grammar'
'speech activate grammar'
'speech deactivate grammar'
'speech recognize'



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-24 16:17:31 +00:00
Eliel C. Sardanons be4798f0b3 Move static AGI commands documentation to XML.
Move AGI commands ('say datetime', 'send image', 'send text', 'set autohangup',
'set callerid', 'set context', 'set extension') documentation to the AstXML
form.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-23 21:11:31 +00:00
Eliel C. Sardanons ad08eeaabf Moved static documentation to the AstXML form.
Moved AGI commands static documentation to XML docs ('say alpha', 'say digits',
'say number', 'say phonetic', 'say date' and 'say time').



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 19:11:44 +00:00
Eliel C. Sardanons 2c882626a0 Implement a new element in AstXML for AMI actions documentation.
A new xml element was created to manage the AMI actions documentation,
using AstXML.
To register a manager action using XML documentation it is now possible
using ast_manager_register_xml().
The CLI command 'manager show command' can be used to show the parsed
documentation.

Example manager xml documentation:
<manager name="ami action name" language="en_US">
    <synopsis>
        AMI action synopsis.
    </synopsis>
    <syntax>
        <xi:include xpointer="xpointer(...)" /> <-- for ActionID
        <parameter name="header1" required="true">
	    <para>Description</para>
	</parameter>
	...
    </syntax>
    <description>
        <para>AMI action description</para>
    </description>
    <see-also>
    	...
    </see-also>
</manager>



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 17:52:35 +00:00
Sean Bright fb39d11e6f Fix res_agi compilation after the const-ify the world merge.
Since we are dealing with a 'const char * const' now, we have to create a
temporary copy of the string to work on rather than the original.  Fix inspired
by reporter.  Reviewed by everyone-and-their-mother in #asterisk-dev.

(closes issue #15184)
Reported by: andrew


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 16:51:22 +00:00
Sean Bright fcda626f3c Fix build under dev mode and remove some casts that are no longer necessary as
a result of the const-ify the world patch.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 16:10:33 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Tilghman Lesher bdcafc1ab4 Recorded merge of revisions 195366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines
  
  Add a similar dependency on SMDI for voicemail as already exists for ADSI.
  (closes issue #14846)
   Reported by: pj
   Patches: 
         20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
         20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
         20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 20:52:33 +00:00
Eliel C. Sardanons 75cd3f4918 Move AGI documentation from static to the XML form.
Move the AGI commands 'receive text', 'receive char' and 'record'
static documentation to XML docs.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 20:18:43 +00:00
Joshua Colp 1179ecf165 Merged revisions 194208 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194208 | file | 2009-05-13 10:38:01 -0300 (Wed, 13 May 2009) | 11 lines
  
  Fix RFC2833 issues with DTMF getting duplicated and with duration wrapping over.
  
  (closes issue #14815)
  Reported by: geoff2010
  Patches:
        v1-14815.patch uploaded by dimas (license 88)
  Tested by: geoff2010, file, dimas, ZX81, moliveras
  (closes issue #14460)
  Reported by: moliveras
  Tested by: moliveras
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-13 13:39:10 +00:00
Kevin P. Fleming 1c988d8996 add 'const' qualifiers in various places where they should have been
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 13:59:35 +00:00
Russell Bryant 174697b7d1 Fix some timer state corruption.
In res_timer_timerfd, handle the case that set_rate gets called while a timer
is still in continuous mode.  In this case, we want to remember the configured
rate, but not actually set it until continuous mode has been disabled.

Thanks to dvossel for finding and helping to debug the problem.

(closes issue #15080)
Reported by: dvossel
Tested by: dvossel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-11 22:04:40 +00:00
Joshua Colp 4d840c93b6 Make the code that prevents an infinite loop from happening into a case insensitive check.
(thanks eliel)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-06 16:09:27 +00:00
Joshua Colp 38a5f51006 Fix an infinite loop with tab completion of CLI aliases that reference themselves.
(closes issue #15020)
Reported by: junky


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-06 14:35:47 +00:00
Tilghman Lesher e0aba74fa9 Restore 'asyncagi break' command to 1.6.1 and higher.
(closes issue #14985)
 Reported by: nikkk
 Patches: 
       20090428__bug14985.diff.txt uploaded by tilghman (license 14)
       20090429__bug14985__1.6.1.diff.txt uploaded by tilghman (license 14)
 Tested by: nikkk


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04 19:29:13 +00:00
Jeff Peeler c675733e6c fix typos
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 22:56:55 +00:00
Tilghman Lesher a866a75900 Merge str_substitution branch.
This branch adds additional methods to dialplan functions, whereby the result
buffers are now dynamic buffers, which can be expanded to the size of any
result.  No longer are variable substitutions limited to 4095 bytes of data.
In addition, the common case of needing buffers much smaller than that will
enable substitution to only take up the amount of memory actually needed.
The existing variable substitution routines are still available, but users
of those API calls should transition to using the dynamic-buffer APIs.
Reviewboard: http://reviewboard.digium.com/r/174/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 18:53:01 +00:00
Russell Bryant 639ece2a31 Merged revisions 190661-190662 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r190661 | russell | 2009-04-27 14:00:54 -0500 (Mon, 27 Apr 2009) | 9 lines

Resolve a crash in res_smdi when used with chan_dahdi.

When chan_dahdi goes to get an SMDI message, it provides no search criteria.
It just grabs the next message that arrives.  This code was written with the
SMDI dialplan functions in mind, since that is now the preferred method of
using SMDI.  However, this broke support of it being used from chan_dahdi.

(closes AST-212)

........
r190662 | russell | 2009-04-27 14:03:59 -0500 (Mon, 27 Apr 2009) | 2 lines

Fix a typo from 190661.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 19:08:12 +00:00
Russell Bryant cba19c8a67 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

Review: http://reviewboard.digium.com/r/203/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 14:04:26 +00:00
Tilghman Lesher ce6ebaef97 Support HTTP digest authentication for the http manager interface.
(closes issue #10961)
 Reported by: ys
 Patches: 
       digest_auth_r148468_v5.diff uploaded by ys (license 281)
       SVN branch http://svn.digium.com/svn/asterisk/team/group/manager_http_auth
 Tested by: ys, twilson, tilghman
 Review: http://reviewboard.digium.com/r/223/
 Reviewed by: tilghman,russellb,mmichelson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23 20:36:35 +00:00
Sean Bright e742390706 Merged revisions 189462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189462 | seanbright | 2009-04-20 16:58:39 -0400 (Mon, 20 Apr 2009) | 13 lines
  
  Properly handle @s within hints in AEL.
  
  AEL was not handling the case of a device hint containing an @ symbol, which
  caused parking hints (e.g. hint(park:exten@context)) to error out the parser.
  This patch makes AEL treat the @ the same way it treats colon and ampersand
  now, meaning the characters are included in verbatim.
  
  (closes issue #14941)
  Reported by: bpgoldsb
  Patches:
        bug14941.patch uploaded by seanbright (license 71)
  Tested by: bpgoldsb
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 21:09:59 +00:00