asterisk/asterisk.git
10 years agoAllow cdr_custom to write to multiple files instead of just one.
Sean Bright [Mon, 18 May 2009 14:54:43 +0000 (14:54 +0000)]
Allow cdr_custom to write to multiple files instead of just one.

Up to now, cdr_custom would only accept a single filename/format from
cdr_custom.conf.  This change allows you to specify multiple filename
& format directives.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195165 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoWarn about the use of the application WaitExten() within a Macro().
Eliel C. Sardanons [Mon, 18 May 2009 14:45:23 +0000 (14:45 +0000)]
Warn about the use of the application WaitExten() within a Macro().

Update applications documentation to warn the user about the use of the
WaitExten() application within a Macro(). Recommend the use of Read()
instead.

(closes issue #14444)
Reported by: ewieling

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195162 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 195095 via svnmerge from
Joshua Colp [Mon, 18 May 2009 13:56:16 +0000 (13:56 +0000)]
Merged revisions 195095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195095 | file | 2009-05-18 10:53:39 -0300 (Mon, 18 May 2009) | 5 lines

  Fix a bug where the codecs of the called party leg were not properly sent back to the caller call leg when reinvited.

  (closes issue #13569)
  Reported by: bkw918
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug where specifying an empty outboundproxy would cause packets to get sent...
Joshua Colp [Mon, 18 May 2009 13:36:17 +0000 (13:36 +0000)]
Fix a bug where specifying an empty outboundproxy would cause packets to get sent to ourself.

(closes issue #15106)
Reported by: timeshell

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195089 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDo not avoid loading the XML documentation if not XInclude substitution is done.
Eliel C. Sardanons [Mon, 18 May 2009 13:30:34 +0000 (13:30 +0000)]
Do not avoid loading the XML documentation if not XInclude substitution is done.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195075 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRecorded merge of revisions 195020 via svnmerge from
Russell Bryant [Mon, 18 May 2009 12:59:11 +0000 (12:59 +0000)]
Recorded merge of revisions 195020 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195020 | russell | 2009-05-18 07:57:46 -0500 (Mon, 18 May 2009) | 5 lines

  Don't try to unlock a bogus channel.

  (closes issue #15144)
  Reported by: cristiandimache
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195021 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAllow to include sections of other parts of the xml documentation.
Eliel C. Sardanons [Sat, 16 May 2009 20:01:22 +0000 (20:01 +0000)]
Allow to include sections of other parts of the xml documentation.

Avoid duplicating xml documentation by allowing to include other parts of
the xml documentation using XInclude.
Example:
   <xi:include xpointer="xpointer(/docs/function[@name='CHANNEL']/synopsis)" />
(Insert this line to include the synopsis of the CHANNEL function xml
documentation).

It is also possible to include documentation from other files in the
'documentation/' directory using the href="" attribute inside a xinclude
element.

(closes issue #15107)
Reported by: lmadsen

(issue #14444)
Reported by: ewieling

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194982 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a missing unlock in case of error, and a missing free().
Eliel C. Sardanons [Sat, 16 May 2009 18:32:11 +0000 (18:32 +0000)]
Fix a missing unlock in case of error, and a missing free().

Always free the allocated memory for a string field, because
we are always using it (not only when xmldocs are enabled).
Also if there is an error allocating memory for the string field
remember to unlock the list of registered applications, before returning.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194945 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 194873 via svnmerge from
David Vossel [Fri, 15 May 2009 22:44:44 +0000 (22:44 +0000)]
Merged revisions 194873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194873 | dvossel | 2009-05-15 17:43:13 -0500 (Fri, 15 May 2009) | 17 lines

  IAX2 REGAUTH loop

  IAX was not sending REGREJ to terminate invalid registrations.  Instead it sent another REGAUTH if the authentication challenge failed.  This caused a loop of REGREQ and REGAUTH frames.

  (Related to Security fix AST-2009-001)

  (closes issue #14867)
  Reported by: aragon
  Tested by: dvossel

  (closes issue #14717)
  Reported by: mobeck
  Patches:
        regauth_loop_update_patch.diff uploaded by dvossel (license 671)
  Tested by: dvossel
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194874 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 194557,194685 via svnmerge from
David Vossel [Fri, 15 May 2009 20:52:12 +0000 (20:52 +0000)]
Merged revisions 194557,194685 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194557 | dvossel | 2009-05-14 17:59:43 -0500 (Thu, 14 May 2009) | 10 lines

  IAX2 "Ghost" Channels

  There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.

  (closes issue #14207)
  Reported by: clive18

  Review: https://reviewboard.asterisk.org/r/246/
........
  r194685 | dvossel | 2009-05-15 10:40:37 -0500 (Fri, 15 May 2009) | 6 lines

  Update to previous IAX2 "Ghost" Channels patch.

  Fixed some comments made on reviewboard for the previous patch.

  (issue #14207)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194833 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 194764 via svnmerge from
Russell Bryant [Fri, 15 May 2009 18:43:42 +0000 (18:43 +0000)]
Merged revisions 194764 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r194764 | russell | 2009-05-15 13:43:18 -0500 (Fri, 15 May 2009) | 2 lines

Fix some spelling fail.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194765 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoShuttle some bits around to address some gain issues with G.722.
Russell Bryant [Fri, 15 May 2009 17:59:08 +0000 (17:59 +0000)]
Shuttle some bits around to address some gain issues with G.722.

(closes AST-209)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194722 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFurther simplify codec_g722 build.
Russell Bryant [Fri, 15 May 2009 17:37:12 +0000 (17:37 +0000)]
Further simplify codec_g722 build.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194718 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoActually force running make for g722.
Russell Bryant [Fri, 15 May 2009 17:24:39 +0000 (17:24 +0000)]
Actually force running make for g722.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194714 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoadd eliel
Michiel van Baak [Fri, 15 May 2009 13:43:24 +0000 (13:43 +0000)]
add eliel

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194649 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAllow to specify an enumlist inside an enum.
Eliel C. Sardanons [Fri, 15 May 2009 13:23:37 +0000 (13:23 +0000)]
Allow to specify an enumlist inside an enum.

It was not possible to use an enumlist inside an enum:
<enumlist>
   <enum name="aa">
      <enumlist>
         ...
      </enumlist>
   </enum>
</enumlist>
Now we will be able to insert as many levels as we want.

(closes issue #15112)
Reported by: lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194635 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd ability for modules to dynamically register logger levels
Kevin P. Fleming [Fri, 15 May 2009 13:13:47 +0000 (13:13 +0000)]
Add ability for modules to dynamically register logger levels

This patch adds the ability for modules to dynamically create logger levels for their own use; these are named levels just like the built-in levels, and can be directed to any destination that the logger can send any level to, by including their names in logger.conf.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194610 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 194509 via svnmerge from
Kevin P. Fleming [Thu, 14 May 2009 22:26:02 +0000 (22:26 +0000)]
Merged revisions 194509 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194509 | kpfleming | 2009-05-14 17:23:49 -0500 (Thu, 14 May 2009) | 1 line

  Update URL to Reviewboard
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194520 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 194484 via svnmerge from
Mark Michelson [Thu, 14 May 2009 22:20:51 +0000 (22:20 +0000)]
Merged revisions 194484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194484 | mmichelson | 2009-05-14 17:17:55 -0500 (Thu, 14 May 2009) | 24 lines

  Fix a race condition where a reinvite could trigger a 482 response.

  The loop detection/spiral detection code in chan_sip used the owner
  channel's state as a criterion for determining if the incoming INVITE
  is a looped request. The problem with this is that the INVITE-handling
  code happens in a different thread than the thread that marks the owner
  channel as being up. As a result, if a reinvite were to come in very quickly,
  say from another Asterisk on the same LAN, it was possible for the reinvite
  to arrive before the owner channel had been set to the up state.

  This patch corrects the problem by using the invitestate of the sip_pvt
  instead, since that can be guaranteed to be set correctly by the time
  the reinvite arrives. Since there is a switch statement further in the
  INVITE-handling code, the AST_STATE_RINGING state also checks the invitestate
  of the sip_pvt in case we should actually be treating the channel as if it were
  up already.

  (closes issue #12215)
  Reported by: jpyle
  Patches:
        12215_confirmed.patch uploaded by mmichelson (license 60)
  Tested by: lmadsen
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194496 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd outgoing_colp misdn.conf port parameter.
Richard Mudgett [Thu, 14 May 2009 22:03:49 +0000 (22:03 +0000)]
Add outgoing_colp misdn.conf port parameter.

Select what to do with outgoing COLP information on this port.
0 - Send out COLP information unaltered. (default)
1 - Force COLP to restricted on all outgoing COLP information.
2 - Do not send COLP information.
outgoing_colp=0

Also fixed sending the EctInform message so it always has the
required redirectionNumber parameter when the status is active.

JIRA ABE-1853

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194479 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a typo where an equality check should be an assignment.
Russell Bryant [Thu, 14 May 2009 21:24:17 +0000 (21:24 +0000)]
Fix a typo where an equality check should be an assignment.

(closes issue #15103)
Reported by: lmsteffan
Patches:
      transfer_crash.patch uploaded by lmsteffan (license 779)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug where the 'T' option to Meetme did not work.
Joshua Colp [Thu, 14 May 2009 17:05:33 +0000 (17:05 +0000)]
Fix a bug where the 'T' option to Meetme did not work.

(closes issue #15031)
Reported by: Stochastic
(closes issue #13801)
Reported by: justdave

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194434 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoIf the timing ended on a zero, then we would loop forever.
Tilghman Lesher [Thu, 14 May 2009 16:22:14 +0000 (16:22 +0000)]
If the timing ended on a zero, then we would loop forever.
(closes issue #14983)
 Reported by: teox
 Patches:
       20090513__issue14983.diff.txt uploaded by tilghman (license 14)
 Tested by: teox

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 194356 via svnmerge
Mark Michelson [Wed, 13 May 2009 19:42:51 +0000 (19:42 +0000)]
Blocked revisions 194356 via svnmerge

........
  r194356 | mmichelson | 2009-05-13 14:41:44 -0500 (Wed, 13 May 2009) | 13 lines

  Remove an extraneous unlocking operation from ast_channel_free.

  In the case that we could not remove the desired channel from the
  list of channels, there was an extra call to unlock the channel list.
  Since we unlock the list later on in the function anyway, this results
  in the list being unlocked twice yet only being locked once.

  (closes issue #15098)
  Reported by: tim_ringenbach
  Patches:
        remove_extra_unlock.diff uploaded by tim (license 540)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194357 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDo not lock the 'sessions' container, lock the allocated 'session'.
Eliel C. Sardanons [Wed, 13 May 2009 15:02:10 +0000 (15:02 +0000)]
Do not lock the 'sessions' container, lock the allocated 'session'.

There was a typo in the structure being locked, and we were locking the
'sessions' container instead of the 'session' structure thar we are modifying.
Reported by seanbright on #asterisk-dev, thanks!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194283 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 194208 via svnmerge from
Joshua Colp [Wed, 13 May 2009 13:39:10 +0000 (13:39 +0000)]
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

10 years agoMerged revisions 194137 via svnmerge from
Tilghman Lesher [Wed, 13 May 2009 00:52:49 +0000 (00:52 +0000)]
Merged revisions 194137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194137 | tilghman | 2009-05-12 19:52:03 -0500 (Tue, 12 May 2009) | 7 lines

  Fix logic for how to proceed with a single digit extension.
  (closes issue #15091)
   Reported by: andrew
   Patches:
         20090512__issue15091.diff.txt uploaded by tilghman (license 14)
   Tested by: andrew
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194138 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoTwo fixes found while debugging with ast_backtrace():
Tilghman Lesher [Wed, 13 May 2009 00:13:43 +0000 (00:13 +0000)]
Two fixes found while debugging with ast_backtrace():

1) If MALLOC_DEBUG is used when concurrently using ast_backtrace, the free()
used in that routine will trigger an error, because the memory was allocated
internally to libc, where we could not intercept that call to wrap it.
Therefore, it's not memory we knew about, and the free is reported as an
error.

2) Now that channels are objects, the old hack of initializing a channel
to all zeroes no longer works, since we may try to call something like
ast_channel_lock() within a function on that reference.  In that case, it's
reported as an error, because the pointer isn't an object reference.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194101 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a crash when logging out from the AMI and avoid astobj2 warning messages.
Eliel C. Sardanons [Tue, 12 May 2009 22:49:13 +0000 (22:49 +0000)]
Fix a crash when logging out from the AMI and avoid astobj2 warning messages.

When the user logout the session was being destroyed twice and the file
descriptor was being closed twice. The sessions reference counter wasn't
used in a proper way.
The 'mansession' structure was being treated as an astobj2 and we were
calling ao2_lock/ao2_unlock causing astobj2 report a warning message and
not locking the structure.
Also we were using an ugly naming convention 'destroy_session',
'session_destroy', 'free_session', ... all this "duplicated" code was merged.

(closes issue #14974)
Reported by: pj
Patches:
      manager.diff2 uploaded by eliel (license 64)
      Tested by: dhubbard, eliel, mnicholson

(closes issue #15088)
Reported by: eliel

Review: http://reviewboard.asterisk.org/r/248/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194060 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 194028 via svnmerge from
Matthew Nicholson [Tue, 12 May 2009 22:32:13 +0000 (22:32 +0000)]
Merged revisions 194028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194028 | mnicholson | 2009-05-12 17:15:45 -0500 (Tue, 12 May 2009) | 16 lines

  This change modifies app_queue to properly generate CDR records in failure
  situations.

  This involves setting a proper cdr disposition coresponding to the given
  failure condition and ensuring the proper information is stored in the cdr
  record.

  (closes issue #13691)
  Reported by: dferrer
  Tested by: mnicholson

  (closes issue #13637)
  Reported by: atis
  Tested by: atis
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194057 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 193955 via svnmerge from
Tilghman Lesher [Tue, 12 May 2009 20:40:22 +0000 (20:40 +0000)]
Merged revisions 193955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193955 | tilghman | 2009-05-12 15:39:21 -0500 (Tue, 12 May 2009) | 6 lines

  Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
  (closes issue #14508)
   Reported by: tiziano
   Patches:
         20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193956 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUpdate spiral support in trunk and 1.6.X to match what is in 1.4.
Mark Michelson [Tue, 12 May 2009 20:28:13 +0000 (20:28 +0000)]
Update spiral support in trunk and 1.6.X to match what is in 1.4.

In 1.4, a SIP spiral is treated the same way as a call forward. This
works much better than what is currently in trunk and 1.6.X. The code
in trunk and 1.6.X did not create a new call to the recipient of the spiral,
instead trying to continue the same call. In addition to just being plain
wrong, this also had the side effect of only being able to spiral calls
to other SIP channels.

With this in place, as long as call forwards are honored, SIP spirals
will work properly. This means that it will work for outbound calls
made  by the Queue, Dial, and Page applications. For originated calls and
spool calls, however, the spiral will not work properly until a generic
call forward mechanism is introduced into Asterisk.

(relates to issue #13630)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193954 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 193880 via svnmerge
Mark Michelson [Tue, 12 May 2009 18:20:14 +0000 (18:20 +0000)]
Blocked revisions 193880 via svnmerge

........
  r193880 | mmichelson | 2009-05-12 13:18:44 -0500 (Tue, 12 May 2009) | 12 lines

  Set the invitestate to INV_CANCELLED only if we are actually sending a SIP CANCEL.

  The problem was that the hangup code was setting the invitestate too early. The result of
  this was that we would always send a CANCEL request, even if it was not an appropriate
  time to do so (e.g. we have not yet received a provisional response for our INVITE).

  Note that this same fix had been applied to trunk and the 1.6.X branches starting with
  revision 155467. This is why you will see this revision being blocked from those places.

  AST-216
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoConvert a THREADSTORAGE object into a simple malloc'd object (as suggested by Russell...
Tilghman Lesher [Tue, 12 May 2009 17:29:33 +0000 (17:29 +0000)]
Convert a THREADSTORAGE object into a simple malloc'd object (as suggested by Russell on -dev)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193870 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoadd 'const' qualifiers in various places where they should have been
Kevin P. Fleming [Tue, 12 May 2009 13:59:35 +0000 (13:59 +0000)]
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

10 years agoFound and fixed a memory leak
Tilghman Lesher [Mon, 11 May 2009 23:04:14 +0000 (23:04 +0000)]
Found and fixed a memory leak

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193757 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRecorded merge of revisions 193755 via svnmerge from
Tilghman Lesher [Mon, 11 May 2009 22:50:47 +0000 (22:50 +0000)]
Recorded merge of revisions 193755 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193755 | tilghman | 2009-05-11 17:48:20 -0500 (Mon, 11 May 2009) | 18 lines

  Move 300 bytes around on the stack, to make more room for an extension buffer.
  This allows more concurrent extensions to be copied for a single voicemail,
  without creating a possibility of upsetting existing users, where a dialplan
  could run out of stack space where it had run fine before.  Alternatively,
  we could have allocated off the heap, but that is a larger change and would
  have increased the chance for instability introduced by this change.

  This is really solved starting in 1.6.0.11, as the use of an ast_str buffer
  allows an unlimited number of extensions (up to available memory).  We
  additionally create a new warning message when the buffer length is exceeded,
  permitting administrators to see an issue after the fact, whereas previously
  the list was silently truncated.
  (closes issue #14739)
   Reported by: p_lindheimer
   Patches:
         20090417__bug14739.diff.txt uploaded by tilghman (license 14)
   Tested by: p_lindheimer
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193756 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix some timer state corruption.
Russell Bryant [Mon, 11 May 2009 22:04:40 +0000 (22:04 +0000)]
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

10 years agoDon't nullify an ast_str pointer.
Tilghman Lesher [Mon, 11 May 2009 19:32:13 +0000 (19:32 +0000)]
Don't nullify an ast_str pointer.
(closes issue #15061)
 Reported by: alecdavis

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193678 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 193613 via svnmerge from
Richard Mudgett [Mon, 11 May 2009 19:11:29 +0000 (19:11 +0000)]
Merged revisions 193613 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193613 | rmudgett | 2009-05-11 14:09:00 -0500 (Mon, 11 May 2009) | 12 lines

  Sent wrong message to clear a call we started if the other end has not responed yet.

  In the state MISDN_CALLING (i.e. SETUP was sent but no answer has arrived yet),
  it is not allowed to clear the call with RELEASE_COMPLETE.  It must be
  cleared with DISCONNECT.  A RELEASE_COMPLETE is only allowed as an answer
  to a SETUP.  (See Q.931 ch. 5.3.2, 5.3.2.a, 5.3.2.b)

  Patches:
      chan-misdn-ccstate7.patch uploaded by customer.

  JIRA ABE-1862
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193614 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRecorded merge of revisions 193544 via svnmerge from
Leif Madsen [Mon, 11 May 2009 18:01:44 +0000 (18:01 +0000)]
Recorded merge of revisions 193544 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193544 | lmadsen | 2009-05-11 13:35:17 -0400 (Mon, 11 May 2009) | 7 lines

  Document CHANNEL(transfercapability) in CLI documentation.

  (issue #15073)
  Reported by: pkempgen
  Patches:
        20090511__issue15073.diff.txt uploaded by tilghman (license 14)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193545 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug where receiving a control frame of subclass -1 would cause certain channels...
Joshua Colp [Sun, 10 May 2009 17:07:46 +0000 (17:07 +0000)]
Fix a bug where receiving a control frame of subclass -1 would cause certain channels to get hung up.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193502 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMinor documentation update for ast_event_queue().
Russell Bryant [Sat, 9 May 2009 11:33:09 +0000 (11:33 +0000)]
Minor documentation update for ast_event_queue().

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193461 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDeclare private data as static.
Russell Bryant [Sat, 9 May 2009 11:30:15 +0000 (11:30 +0000)]
Declare private data as static.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193459 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoTCP not matching valid peer.
David Vossel [Fri, 8 May 2009 20:32:51 +0000 (20:32 +0000)]
TCP not matching valid peer.

find_peer() does not find a valid peer when using pvt->recv as the sockaddr_in argument.  Because of the way TCP works, the port number in pvt->recv is not what we're looking for at all.  There is currently only one place that find_peer searches for a peer using the sockaddr_in argument.  If the peer is not found after using pvt->recv (works for UDP since the port number will be correct), a temp sockaddr_in struct is made using the Contact header in the sip_request.  This has the correct port number in it.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193387 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoReset the members' call counts when resetting queue statistics.
Mark Michelson [Fri, 8 May 2009 19:50:44 +0000 (19:50 +0000)]
Reset the members' call counts when resetting queue statistics.

This helps to prevent odd scenarios where a queue will claim to have
taken 0 calls, but the members appear to have taken a non-zero amount.

(closes issue #15068)
Reported by: sum
Patches:
      patchreset.patch uploaded by sum (license 766)
Tested by: sum

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193349 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix the spelling of UNAVAILABLE in func_devstate CLI completion.
Sean Bright [Fri, 8 May 2009 15:18:40 +0000 (15:18 +0000)]
Fix the spelling of UNAVAILABLE in func_devstate CLI completion.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193274 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 193262 via svnmerge from
David Vossel [Fri, 8 May 2009 14:52:19 +0000 (14:52 +0000)]
Merged revisions 193262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines

  "misdn show config" segfaults asterisk, if no MSN lists

  (closes issue #14976)
  Reported by: alecdavis
  Patches:
        misdn_config.diff.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis, FabienToune
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193263 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 193193 via svnmerge from
Kevin P. Fleming [Fri, 8 May 2009 14:06:15 +0000 (14:06 +0000)]
Merged revisions 193193 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193193 | kpfleming | 2009-05-08 09:03:28 -0500 (Fri, 08 May 2009) | 7 lines

  Make absolute paths for logger channels work properly

  (Note: This is not a new feature, it was previously undocumented and broken.)

  The Asterisk logger has a feature to support absolute pathnames for logger channels, but the code implementing the feature was broken. This has been fixed, and the absolute path feature is now documented in the sample logger.conf.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193194 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 193119 via svnmerge from
Tilghman Lesher [Thu, 7 May 2009 23:42:28 +0000 (23:42 +0000)]
Merged revisions 193119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193119 | tilghman | 2009-05-07 18:41:11 -0500 (Thu, 07 May 2009) | 19 lines

  Fix Background within a Macro for FreePBX.
  If the single digit DTMF is an extension in the specified context, then
  go there and signal no DTMF.  Otherwise, we should exit with that DTMF.
  If we're in Macro, we'll exit and seek that DTMF as the beginning of an
  extension in the Macro's calling context.  If we're not in Macro, then
  we'll simply seek that extension in the calling context.  Previously,
  someone complained about the behavior as it related to the interior of a
  Gosub routine, and the fix (#14011) inadvertently broke FreePBX
  (#14940).  This change should fix both of these situations, but with the
  possible incompatibility that if a single digit extension does not exist
  (but a longer extension COULD have matched), it would have previously
  gone immediately to the "i" extension, but will now need to wait for a
  timeout.
  (closes issue #14940)
   Reported by: p_lindheimer
   Patches:
         20090420__bug14940.diff.txt uploaded by tilghman (license 14)
   Tested by: p_lindheimer
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193120 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 193050 via svnmerge from
Richard Mudgett [Thu, 7 May 2009 22:24:04 +0000 (22:24 +0000)]
Merged revisions 193050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193050 | rmudgett | 2009-05-07 17:17:06 -0500 (Thu, 07 May 2009) | 5 lines

  Give a more helpful message when an incoming call's dialed extension does not match.

  Added the dialed extension and context to the chan_misdn messages warning
  that the dialed number cannot be matched in the dialplan.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193077 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoSecond result should not contain data from the first result.
Tilghman Lesher [Thu, 7 May 2009 17:51:13 +0000 (17:51 +0000)]
Second result should not contain data from the first result.
(closes issue #15039)
 Reported by: jims
 Patches:
       20090506__issue15039.diff.txt uploaded by tilghman (license 14)
 Tested by: jims

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193006 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoSend DTMF frame before playing back audio.
Tilghman Lesher [Thu, 7 May 2009 17:13:36 +0000 (17:13 +0000)]
Send DTMF frame before playing back audio.
(closes issue #14858)
 Reported by: barryf
 Patches:
       20090507__bug14858.diff.txt uploaded by tilghman (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192938 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 192932 via svnmerge from
Tilghman Lesher [Thu, 7 May 2009 16:43:56 +0000 (16:43 +0000)]
Merged revisions 192932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192932 | tilghman | 2009-05-07 11:29:08 -0500 (Thu, 07 May 2009) | 10 lines

  Eliminate repetition of fullcontact during reconstruction.
  If the fullcontact field appears in both the sippeers and the
  sipregs table, then during reconstruction of the field, it will
  otherwise be doubled.
  (closes issue #14754)
   Reported by: Alexei Gradinari
   Patches:
         20090506__bug14754.diff.txt uploaded by tilghman (license 14)
   Tested by: lmadsen
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192933 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 192858 via svnmerge from
Jeff Peeler [Wed, 6 May 2009 22:17:27 +0000 (22:17 +0000)]
Merged revisions 192858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192858 | jpeeler | 2009-05-06 17:15:19 -0500 (Wed, 06 May 2009) | 10 lines

  Make ParkedCall application stop execution of the dialplan after hang up

  Just changed park_exec to always return non-zero. I really wasn't entirely sure
  at first if this was a bug. Decided it was since it would be surprising when
  not using ParkedCall in the dialplan to hang up and have dialplan execution
  continue.

  (closes issue #14555)
  Reported by: francesco_r
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192861 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoIf no extension was found in the pattern tree, don't crash.
Jeff Peeler [Wed, 6 May 2009 22:02:46 +0000 (22:02 +0000)]
If no extension was found in the pattern tree, don't crash.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192853 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug where a timer would be created but not acknowledged.
Joshua Colp [Wed, 6 May 2009 17:38:51 +0000 (17:38 +0000)]
Fix a bug where a timer would be created but not acknowledged.

This scenario crept up if chan_iax2 was loaded with no configuration file present.
It would create a timer and tell it to go at an interval but the thread that normally
acknowledges it would not be created because no configuration file was present. The timer
will now be closed if no configuration file is present.

(closes issue #15014)
Reported by: madkins

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd numbers in Urdu, the national language of Pakistan
Tilghman Lesher [Wed, 6 May 2009 16:28:02 +0000 (16:28 +0000)]
Add numbers in Urdu, the national language of Pakistan
(closes issue #15034)
 Reported by: nasirq
 Patches:
       ast_say_number_full_ur-patch.c uploaded by nasirq (license 772)
       urdu.ods uploaded by nasirq (license 772)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192772 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMake the code that prevents an infinite loop from happening into a case insensitive...
Joshua Colp [Wed, 6 May 2009 16:09:27 +0000 (16:09 +0000)]
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

10 years agoFix an infinite loop with tab completion of CLI aliases that reference themselves.
Joshua Colp [Wed, 6 May 2009 14:35:47 +0000 (14:35 +0000)]
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

10 years agoMerged revisions 192633 via svnmerge from
Joshua Colp [Wed, 6 May 2009 13:34:35 +0000 (13:34 +0000)]
Merged revisions 192633 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192633 | file | 2009-05-06 10:30:51 -0300 (Wed, 06 May 2009) | 7 lines

  Update some old logic to stop both begin and end DTMF frames from reaching the core if rfc2833 is not enabled.

  (closes issue #15036)
  Reported by: dimas
  Patches:
        v1-15036.patch uploaded by dimas (license 88)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192634 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFixed crashes from issue8824 review board channel locking changes.
Richard Mudgett [Tue, 5 May 2009 20:54:07 +0000 (20:54 +0000)]
Fixed crashes from issue8824 review board channel locking changes.

The local struct ast_party_connected_line connected_caller variable
was uninitialized when the copy function was called.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192590 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 192524 via svnmerge from
Sean Bright [Tue, 5 May 2009 19:57:49 +0000 (19:57 +0000)]
Merged revisions 192524 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192524 | seanbright | 2009-05-05 15:56:11 -0400 (Tue, 05 May 2009) | 11 lines

  Fix Javascript error when using astman.js in Internet Explorer.

  Internet Explorer (tested with 7.0) does not like trailing commas on constructs
  like object initializers, so get rid of them to avoid some errors.

  (closes issue #15026)
  Reported by: rajnishgiri
  Patches:
        bug15026.patch uploaded by seanbright (license 71)
  Tested by: seanbright
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192525 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 192454 via svnmerge from
Joshua Colp [Tue, 5 May 2009 18:23:58 +0000 (18:23 +0000)]
Merged revisions 192454 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192454 | file | 2009-05-05 15:22:27 -0300 (Tue, 05 May 2009) | 8 lines

  Fix an incorrect assumption that certain values on the channel will always exist when they may not.

  The CDR code involved with bridges wrongly assumed that the currently executing application and data
  values will always exist. It is possible for this to be false when call forwarding is involved.

  (closes issue #14984)
  Reported by: gincantalupo
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192462 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 192429 via svnmerge from
Joshua Colp [Tue, 5 May 2009 17:46:51 +0000 (17:46 +0000)]
Merged revisions 192429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192429 | file | 2009-05-05 14:43:30 -0300 (Tue, 05 May 2009) | 5 lines

  Fix a bug where the followme application would continue trying numbers after the caller hung up.

  (closes issue #13624)
  Reported by: sgenyuk
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRevert CPC patch for now, until I decide whether or not it all should be merged into...
Matthew Fredrickson [Tue, 5 May 2009 17:33:42 +0000 (17:33 +0000)]
Revert CPC patch for now, until I decide whether or not it all should be merged into libss7/1.0 (It's still in the bug13495 branch and in libss7/trunk)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192427 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug with setting t38pt_udptl at the user or peer level.
Joshua Colp [Tue, 5 May 2009 14:22:47 +0000 (14:22 +0000)]
Fix a bug with setting t38pt_udptl at the user or peer level.

If an incoming call authenticated as a user or peer and t38pt_udptl was
not set to yes in general then no UDPTL session would be present and any
T38 related things would fail. This commit changes it so that if after
authenticating T38 is enabled but no UDPTL session is present one will be
created.

(issue AST-215)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192387 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd a more efficient way of allocating structures that use stringfields
Kevin P. Fleming [Tue, 5 May 2009 14:17:18 +0000 (14:17 +0000)]
Add a more efficient way of allocating structures that use stringfields

This commit adds an API call that can be used to allocate a structure along with this stringfield storage in a single allocation.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192362 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoCorrect some flaws in the memory accounting code for stringfields and ao2 objects
Kevin P. Fleming [Tue, 5 May 2009 13:18:21 +0000 (13:18 +0000)]
Correct some flaws in the memory accounting code for stringfields and ao2 objects

Under some conditions, the memory allocation for stringfields and ao2 objects would not have supplied valid file/function names for MALLOC_DEBUG tracking, so this commit corrects that.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192357 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoProperly account for memory allocated for channels and datastores
Kevin P. Fleming [Tue, 5 May 2009 10:34:19 +0000 (10:34 +0000)]
Properly account for memory allocated for channels and datastores

As in previous commits, when channels are allocated (with ast_channel_alloc) or datastores are allocated (with ast_datastore_alloc) properly account for the memory being owned by the caller, instead of the allocator function itself.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192318 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoEnsure that string pools allocated to hold stringfields are properly accounted in...
Kevin P. Fleming [Tue, 5 May 2009 08:51:06 +0000 (08:51 +0000)]
Ensure that string pools allocated to hold stringfields are properly accounted in MALLOC_DEBUG mode

This commit modifies the stringfield pool allocator to remember the 'owner' of the stringfield manager the pool is being allocated for, and ensures that pools allocated in the future when fields are populated are owned by that file/function.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192279 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 192213 via svnmerge from
David Vossel [Mon, 4 May 2009 22:44:51 +0000 (22:44 +0000)]
Merged revisions 192213 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192213 | dvossel | 2009-05-04 17:37:31 -0500 (Mon, 04 May 2009) | 11 lines

  global mohinterpret setting is ignored

  mohinterpret and mohsuggest global variables were not copied over during build_users and build_peers.

  (closes issue #14728)
  Reported by: dimas
  Patches:
        v1-14728.patch uploaded by dimas (license 88)
  Tested by: dimas, dvossel
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192214 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRestore 'asyncagi break' command to 1.6.1 and higher.
Tilghman Lesher [Mon, 4 May 2009 19:29:13 +0000 (19:29 +0000)]
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

10 years agoPass libraries in LIBS, not LDFLAGS.
Tilghman Lesher [Mon, 4 May 2009 18:42:56 +0000 (18:42 +0000)]
Pass libraries in LIBS, not LDFLAGS.
(closes issue #14671)
 Reported by: Chainsaw
 Patches:
       asterisk-1.6.0.6-toolcheck-libs-not-ldflags.patch uploaded by Chainsaw (license 723)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192132 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoCommit documentation changes related to issue #14801.
Leif Madsen [Mon, 4 May 2009 17:42:56 +0000 (17:42 +0000)]
Commit documentation changes related to issue #14801.

(issue #14801)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoEnsure that astobj2 memory allocations are properly accounted for when MALLOC_DEBUG...
Kevin P. Fleming [Mon, 4 May 2009 16:24:16 +0000 (16:24 +0000)]
Ensure that astobj2 memory allocations are properly accounted for when MALLOC_DEBUG is used

This commit ensures that all astobj2 allocated objects are properly accounted for in MALLOC_DEBUG mode by passing down the file/function/line information from the module/function that actually called the astobj2 allocation function.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192059 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDo not re-define _POSIX_C_SOURCE if it was already defined.
Eliel C. Sardanons [Mon, 4 May 2009 15:35:35 +0000 (15:35 +0000)]
Do not re-define _POSIX_C_SOURCE if it was already defined.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192032 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMinor changes in test modules
Kevin P. Fleming [Mon, 4 May 2009 12:52:44 +0000 (12:52 +0000)]
Minor changes in test modules

Correct command description in test_sched.c and include asterisk/cli.h in test_skel.c, since it's highly unlikely that a test module will *not* want to provide CLI commands to execute the tests

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191997 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoEnsure that by default only one console channel driver is loaded
Kevin P. Fleming [Mon, 4 May 2009 09:57:36 +0000 (09:57 +0000)]
Ensure that by default only one console channel driver is loaded

This configuration file was changed to ensure that only one console channel driver
(chan_oss) is loaded by default, but the change would only work if chan_console
was not built. Now it will work as expected; if chan_alsa or chan_console are built
and installed, they will not be loaded unless explicity requested.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191955 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd 'bitflags'-style information elements to event framework
Kevin P. Fleming [Sun, 3 May 2009 14:28:59 +0000 (14:28 +0000)]
Add 'bitflags'-style information elements to event framework

This patch add a new payload type for information elements, a set
of bit flags. The payload is transported as a 32-bit unsigned integer
but when matching is performed between events and subscribers,
the matching is done by using a bitwise AND instead of numeric value
comparison.

Review: http://reviewboard.asterisk.org/r/242/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191919 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRemove unnecessary compiler flag
Russell Bryant [Sun, 3 May 2009 14:05:10 +0000 (14:05 +0000)]
Remove unnecessary compiler flag

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191884 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDo a bit of code cleanup.
Russell Bryant [Sat, 2 May 2009 21:15:18 +0000 (21:15 +0000)]
Do a bit of code cleanup.

 - convert handling of IE PLTYPEs to switch statements
 - add braces to various small blocks
 - remove a bit of trailing whitespace
 - remove a couple of unnecessary ast_strdupa() uses

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191848 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRemove rarely-used event_log/LOG_EVENT support
Kevin P. Fleming [Sat, 2 May 2009 19:02:22 +0000 (19:02 +0000)]
Remove rarely-used event_log/LOG_EVENT support

In discussions today at the Europe Asterisk Developer Meet-Up, we determined that
the event_log was used in only 9 places in the entire tree, and really was not needed
at all. The users have been converted to use LOG_NOTICE, or the messages have been
removed since other messages were already in place that provided the same information.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191785 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 191778 via svnmerge
Mark Michelson [Sat, 2 May 2009 18:54:52 +0000 (18:54 +0000)]
Blocked revisions 191778 via svnmerge

........
  r191778 | mmichelson | 2009-05-02 13:48:20 -0500 (Sat, 02 May 2009) | 11 lines

  Fix a bug which resulted from the Hebrew voicemail commit.

  This fixes a case where a certain message could get played twice.

  (closes issue #13155)
  Reported by: greenfieldtech
  Patches:
        app_voicemail.c.multi-lang-patch uploaded by greenfieldtech (license 369)
  Tested by: greenfieldtech
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191781 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix an error in queue_log file rotation optimization code
Kevin P. Fleming [Sat, 2 May 2009 18:39:48 +0000 (18:39 +0000)]
Fix an error in queue_log file rotation optimization code

This code was copy-and-pasted without properly changing references to event_rotate into queue_rotate, so under some conditions the log rotation would rotate queue_log even though it was not necessary.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191775 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoConditional include ioctl's to change EC policy based on DAHDI caps.
Sean Bright [Sat, 2 May 2009 16:43:59 +0000 (16:43 +0000)]
Conditional include ioctl's to change EC policy based on DAHDI caps.

This feels like a sane change (wouldn't compile without this addition), but I'm
not intimately familiar with this code.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191739 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUpdate copyright year to 2009
Sean Bright [Sat, 2 May 2009 15:45:07 +0000 (15:45 +0000)]
Update copyright year to 2009

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191700 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 191628-191629 via svnmerge
Mark Michelson [Sat, 2 May 2009 10:46:02 +0000 (10:46 +0000)]
Blocked revisions 191628-191629 via svnmerge

........
  r191628 | mmichelson | 2009-05-02 05:21:00 -0500 (Sat, 02 May 2009) | 8 lines

  Move static buffers to outside for loops in app_chanspy.

  Similar to seanbright's commit 191422, this moves some static buffers
  to be defined outside of for loops since it is undefined if memory
  will be re-used or if the stack will grow with each iteration of the
  loop.
........
  r191629 | mmichelson | 2009-05-02 05:45:24 -0500 (Sat, 02 May 2009) | 3 lines

  Kevin has informed me that thi sort of thing is not necessary.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191630 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 191559 via svnmerge from
Tilghman Lesher [Fri, 1 May 2009 20:01:21 +0000 (20:01 +0000)]
Merged revisions 191559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r191559 | tilghman | 2009-05-01 15:00:23 -0500 (Fri, 01 May 2009) | 6 lines

  SIP Response 410 maps to cause code 22 (or 23), not 1.
  (closes issue #14993)
   Reported by: BigJimmy
   Patches:
         causepatch uploaded by BigJimmy (license 371)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoSet debug message back to DEBUG level.
Tilghman Lesher [Fri, 1 May 2009 18:18:00 +0000 (18:18 +0000)]
Set debug message back to DEBUG level.
(closes issue #15007)
 Reported by: hulber

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191494 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 191488 via svnmerge from
Jeff Peeler [Fri, 1 May 2009 18:09:23 +0000 (18:09 +0000)]
Merged revisions 191488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r191488 | jpeeler | 2009-05-01 12:40:46 -0500 (Fri, 01 May 2009) | 9 lines

  Fix DTMF not being sent to other side after a partial feature match

  This fixes a regression from commit 176701. The issue was that
  ast_generic_bridge never exited after the feature digit timeout had elapsed,
  which prevented the queued DTMF from being sent to the other side.

  This issue was reported to me directly.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191489 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 191041,191422 via svnmerge
Sean Bright [Fri, 1 May 2009 15:46:39 +0000 (15:46 +0000)]
Blocked revisions 191041,191422 via svnmerge

........
  r191041 | seanbright | 2009-04-29 11:23:07 -0400 (Wed, 29 Apr 2009) | 6 lines

  Fix a crash in app_queue with very long member lists.

  A user reported via #asterisk that with very long lists of members, a crash
  occurs in ast_strdupa, so just use a single buffer and ast_copy_string instead
  of stack allocating copys of each interface name.
........
  r191422 | seanbright | 2009-05-01 11:42:48 -0400 (Fri, 01 May 2009) | 7 lines

  Move the defintion of the a couple arrays out of loops.

  According to Kevin, it is unspecified as to whether a variable defined inside
  a block is allocated once by the compiler or for each pass through the block
  (loops being the only interesting case), so just define these before we get
  into our loop to be sure.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191423 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDrop my IRC nickname.
Joshua Colp [Fri, 1 May 2009 14:58:59 +0000 (14:58 +0000)]
Drop my IRC nickname.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191419 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMade security features optional.
TransNexus OSP Development [Fri, 1 May 2009 09:50:11 +0000 (09:50 +0000)]
Made security features optional.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191418 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd buffer and echo canceller control to CHANNEL() dialplan function for DAHDI channels
Kevin P. Fleming [Thu, 30 Apr 2009 21:42:35 +0000 (21:42 +0000)]
Add buffer and echo canceller control to CHANNEL() dialplan function for DAHDI channels

Adds ability for CHANNEL() dialplan function, when used on DAHDI channels,
to temporarily change the number of buffers and/or the buffer policy, and also
to enable, disable, or switch the echo canceller between FAX/data and voice
modes.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191411 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDetect eaccess (or euidaccess) before using it.
Tilghman Lesher [Thu, 30 Apr 2009 17:40:58 +0000 (17:40 +0000)]
Detect eaccess (or euidaccess) before using it.
Reported by Andrew Lindh via the -dev list.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191367 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdded routing number support.
TransNexus OSP Development [Thu, 30 Apr 2009 09:11:23 +0000 (09:11 +0000)]
Added routing number support.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191332 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFixed not report source network ID and not export destination network ID issues.
TransNexus OSP Development [Thu, 30 Apr 2009 07:20:59 +0000 (07:20 +0000)]
Fixed not report source network ID and not export destination network ID issues.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191300 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoChange working directory to / under certain conditions.
Tilghman Lesher [Thu, 30 Apr 2009 06:47:13 +0000 (06:47 +0000)]
Change working directory to / under certain conditions.
If backgrounding and no core will be produced, then changing the directory
won't break anything; likewise, if the CWD isn't accessible by the current
user, then a core wasn't possible anyway.
(closes issue #14831)
 Reported by: chris-mac
 Patches:
       20090428__bug14831.diff.txt uploaded by tilghman (license 14)
       20090430__bug14831.diff.txt uploaded by tilghman (license 14)
 Tested by: chris-mac

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191283 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRecorded merge of revisions 191220 via svnmerge from
Tilghman Lesher [Wed, 29 Apr 2009 23:12:19 +0000 (23:12 +0000)]
Recorded merge of revisions 191220 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r191220 | tilghman | 2009-04-29 18:10:54 -0500 (Wed, 29 Apr 2009) | 2 lines

  Allow H.323 to compile with FDLEAK checking enabled.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191221 65c4cc65-6c06-0410-ace0-fbb531ad65f3