]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
13 years agoAdd "send to voicemail" Digium phone functionality to Asterisk.
Mark Michelson [Mon, 21 May 2012 19:16:37 +0000 (19:16 +0000)] 
Add "send to voicemail" Digium phone functionality to Asterisk.

This change accommodates two methods by which calls can be directed to
a user's voicemail.

* Incoming calls can be redirected to any user's voicemail.
* Established calls can be blind transferred to any user's voicemail.

Digium phones indicate the desire to direct a call to voicemail by using
a Diversion header with a reason parameter of "send_to_vm".

This patch adds the "send_to_vm" reason as a valid redirecting reason. In
addition, chan_sip.c has been modified to update redirecting information
on the transferred channel by reading a Diversion header on a REFER request.

(closes issue AST-871)
Reported by Malcolm Davenport

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@367162 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd support for folders in MixMonitor 'm' option. Backport manager actions.
Jason Parker [Fri, 4 May 2012 21:28:27 +0000 (21:28 +0000)] 
Add support for folders in MixMonitor 'm' option.  Backport manager actions.

The manager actions are needed, so MixMonitor can be executed on existing
channels.

(issue DPMA-68)
........

Merged revisions 365395 from http://svn.asterisk.org/svn/asterisk/certified/branches/1.8.11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@365396 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoPopulate file extensions for mixmonitor recordings properly.
Mark Michelson [Thu, 3 May 2012 20:54:34 +0000 (20:54 +0000)] 
Populate file extensions for mixmonitor recordings properly.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@365297 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMultiple revisions 361208,361211,361270,361330,361333,361381,361422,361472,361522...
Jason Parker [Thu, 3 May 2012 20:06:49 +0000 (20:06 +0000)] 
Multiple revisions 361208,361211,361270,361330,361333,361381,361422,361472,361522,361560,361607,361658,361706,361754,361804,361855,361907,361956,361981,362080,362084,362152,362202,362205,362264,362305,362356-362357,362360,362364,362377,362429,362496,362537,362587,362678,362681,362730,362816,362869,362918,362998,363212,363376,363429,363688,363734,363789,363876,363935,363987,364047,364065,364109,364163,364204,364259,364285,364342,364365,364369,364536,364579,364650-364651,364777,364787,364845,364900,364903,364965,365014,365083

........
  r361208 | jrose | 2012-04-04 14:30:09 -0500 (Wed, 04 Apr 2012) | 10 lines

  Make 'help devstate change' display properly (get rid of excess comma)

  (closes issue ASTERISK-19444)
  Reported by: Makoto Dei
  Patches:
   devstate-change-usage-truncate.patch uploaded by Makoto Dei (license 5027)
  ........

  Merged revisions 361201 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361211 | jrose | 2012-04-04 15:00:23 -0500 (Wed, 04 Apr 2012) | 12 lines

  Fix some stuff involving calls to memcpy and memset

  The important parts of the patch were already applied through other updates.

  (closes issue ASTERISK-19445)
  Reported by: Makoto Dei
  Patches:
   memset-memcpy-length.patch uploaded by Makoto Dei (license 5027)
  ........

  Merged revisions 361210 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361270 | jrose | 2012-04-05 11:53:35 -0500 (Thu, 05 Apr 2012) | 10 lines

  Fix MusicOnHold in MeetMe so that it always uses the class if it's been defined

  There were a few instances of restarting music on hold in meetme that would cause
  Asterisk to revert to the default class of music on hold for no adequate reason.

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

  Merged revisions 361269 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361330 | kmoore | 2012-04-06 08:31:51 -0500 (Fri, 06 Apr 2012) | 11 lines

  Remove unnecessary error message in app_dial.c

  The error message for failure to stop autoservice after a gosub or macro call
  during a dial was removed for macro while Asterisk 1.4 was still being actively
  developed. The corresponding gosub error message was never removed.

  (closes issue ASTERISK-19551)
  ........

  Merged revisions 361329 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361333 | mjordan | 2012-04-06 09:01:33 -0500 (Fri, 06 Apr 2012) | 11 lines

  Fix a typo in the warning messages for an ignored media stream

  Added a '\n' to the warning messages when we ignore a media stream due to the
  port number being '0'.

  (closes issue ASTERISK-19646)
  Reported by: Badalian Vyacheslav
  ........

  Merged revisions 361332 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361381 | russell | 2012-04-06 10:49:19 -0500 (Fri, 06 Apr 2012) | 5 lines

  Remove a few more files related to chan_usbradio and app_rpt.
  ........

  Merged revisions 361380 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361422 | pabelanger | 2012-04-06 11:31:18 -0500 (Fri, 06 Apr 2012) | 14 lines

  Multiple revisions 361403,361412

  ........
    r361403 | pabelanger | 2012-04-06 12:24:36 -0400 (Fri, 06 Apr 2012) | 2 lines

    Fix typo in svn:keywords
  ........
    r361412 | pabelanger | 2012-04-06 12:27:30 -0400 (Fri, 06 Apr 2012) | 2 lines

    Fix typo in svn:keywords
  ........

  Merged revisions 361403,361412 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361472 | kmoore | 2012-04-06 13:13:04 -0500 (Fri, 06 Apr 2012) | 5 lines

  Add missing newlines to CLI logging
  ........

  Merged revisions 361471 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361522 | rmudgett | 2012-04-06 14:47:29 -0500 (Fri, 06 Apr 2012) | 8 lines

  Don't add an empty MESSAGE_DATA(key) header if it doesn't already exist.

  Doing Set(MESSAGE_DATA(key)=) would add an empty key header if the key
  header did not already exist.  If it already existed it would delete it.

  * Made msg_set_var_full() exit early if the named variable did not already
  exist and the value to set is empty.
........
  r361560 | mjordan | 2012-04-06 15:32:13 -0500 (Fri, 06 Apr 2012) | 13 lines

  Fix memory leak when using MeetMeAdmin 'e' option with user specified

  A memory leak/reference counting leak occurs if the MeetMeAdmin 'e' command
  (eject last user that joined) is used in conjunction with a specified user.
  Regardless of the command being executed, if a user is specified for the
  command, MeetMeAdmin will look up that user.  Because the 'e' option kicks
  the last user that joined, as opposed to the one specified, the reference to
  the user specified by the command would be leaked when the user variable
  was assigned to the last user that joined.
  ........

  Merged revisions 361558 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361607 | mjordan | 2012-04-06 17:00:11 -0500 (Fri, 06 Apr 2012) | 12 lines

  Fix memory leak in res_calendar_ews when event email address node is empty

  If the XML calendar data returned by a Microsoft Exchange Web Service
  specifies an XML Event E-Mail Address ("EmailAddress"), and no e-mail address
  is provided, a condition existed where an ast_calendar_attendee struct would
  be allocated but not appended to the list of attendees.  Because of that,
  the memory associated with the attendee would never be freed.  This patch
  frees the memory if no e-mail address is provided.
  ........

  Merged revisions 361606 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361658 | mjordan | 2012-04-09 14:42:53 -0500 (Mon, 09 Apr 2012) | 15 lines

  Change SHARED function to use a safe traversal when modifying a variable

  When the SHARED function modifies a variable, it removes it from its list of
  variables and reinserts the new value at the head of the list of variables.
  Doing this inside a standard list traversal can be dangerous, as the
  standard list traversal does not account for the list being changed.  While
  the code in question should not cause a use after free violation due to its
  breaking out of the loop after freeing the variable, it could lead to a
  maintenance issue if the loop was modified.  This also fixes a violation
  reported by a static analysis tool, which also makes this code easier to
  maintain in the future.
  ........

  Merged revisions 361657 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361706 | mjordan | 2012-04-09 15:54:55 -0500 (Mon, 09 Apr 2012) | 17 lines

  Prevent invalid access of free'd memory if DAHDI channel during an MWI event

  In the MWI processing loop, when a valid event occurs the temporary caller ID
  information is deallocated.  If a new DAHDI channel is successfully created,
  the event is passed up to the analog_ss_thread without error and the loop
  exits.  If, however, the DAHDI channel is not created, then the caller ID
  struct has been free'd, and the gains reset to their previous level.  This
  will almost certainly cause an invalid access to the free'd memory, either
  in subsequent calls to callerid_free or calls to callerid_feed.

  This patch makes it so that we only free the caller ID structure if a
  DAHDI channel is successfully created, and we bump the gains back up
  if we fail to make a DAHDI channel.
  ........

  Merged revisions 361705 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361754 | mjordan | 2012-04-09 16:44:30 -0500 (Mon, 09 Apr 2012) | 12 lines

  Allow func_curl to exit gracefully if list allocation fails during write

  If the global_curl_info data structure could not be allocated, the
  datastore associated with the operation would be free'd, but the function
  would not return.  This would later dereference the datastore, almost
  certainly causing Asterisk to crash.  With this patch, if the data
  structure is not allocated the method will return an error code, and
  not attempt any further operation.
  ........

  Merged revisions 361753 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361804 | mjordan | 2012-04-10 14:57:30 -0500 (Tue, 10 Apr 2012) | 10 lines

  Fix crash caused by unloading or reloading of res_http_post

  When unlinking itself from the registered HTTP URIs, res_http_post could
  inadvertently free all URIs registered with the HTTP server.  This patch
  modifies the unregister method to only free the URI that is actually
  being unregistered, as opposed to all of them.
  ........

  Merged revisions 361803 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361855 | rmudgett | 2012-04-10 16:47:42 -0500 (Tue, 10 Apr 2012) | 19 lines

  Prevent invalid access of free'd memory if DAHDI channel during an MWI event

  In the MWI processing loop, when a valid event occurs the temporary caller ID
  information is deallocated.  If a new DAHDI channel is successfully created,
  the event is passed up to the analog_ss_thread without error and the loop
  exits.  If, however, the DAHDI channel is not created, then the caller ID
  struct has been free'd, and the gains reset to their previous level.  This
  will almost certainly cause an invalid access to the free'd memory, either
  in subsequent calls to callerid_free or calls to callerid_feed.

  * Rework the -r361705 patch to better manage the cs and mtd allocated
  resources.

  * Fixed use of mwimonitoractive flag to be correct if the mwi_thread()
  fails to start.
  ........

  Merged revisions 361854 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361907 | jrose | 2012-04-11 11:07:50 -0500 (Wed, 11 Apr 2012) | 10 lines

  Change default value of 'ignorebusy' on Queue members so that behavior is more like 1.8

  Prior to this patch, in order to restore that behavior, a function would have
  to be used on the QueueMember to make the ringinuse option do anything, which
  is pretty unreasonable.

  (closes issue ASTERISK-19536)
  reported by: Philippe Lindheimer
  Review: https://reviewboard.asterisk.org/r/1860/
........
  r361956 | kmoore | 2012-04-12 10:01:13 -0500 (Thu, 12 Apr 2012) | 13 lines

  Simplify build system architecture optimization

  This change to the build system rips out any usage of PROC along with
  architecture-specific optimizations in favor of using -march=native where it is
  supported.  This fixes broken builds on 64bit Intel systems and results in
  better optimized code on systems running GCC 4.2+.

  Review: https://reviewboard.asterisk.org/r/1852/
  (closes issue ASTERISK-19462)
  ........

  Merged revisions 361955 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r361981 | kmoore | 2012-04-12 11:22:28 -0500 (Thu, 12 Apr 2012) | 12 lines

  Make trunkfreq take effect when set

  Previously, setting trunkfreq had no effect on initial load or on reload and
  only ever used the default value.  This causes trunkfreq to be used
  appropriately on initial load and reload.

  (closes issue ASTERISK-19521)
Patch-by: Jaco Kroon
  ........

  Merged revisions 361972 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362080 | jrose | 2012-04-13 10:30:22 -0500 (Fri, 13 Apr 2012) | 10 lines

  Send relative path named recordings to the meetme directory instead of sounds

  Prior to this patch, no effort was made to parse the path name to determine a proper
  destination for recordings of MeetMe's r option. This fixes that.

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

  Merged revisions 362079 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362084 | jrose | 2012-04-13 11:04:22 -0500 (Fri, 13 Apr 2012) | 15 lines

  Make ForkCDR e option not set end time of the newly forked CDR log

  Prior to this patch, ForkCDR's e option would immediately set the end time of the forked
  CDR to that of the CDR that is being terminated. This resulted in the new CDR's end time
  being roughly the same as it's beginning time (which is in turn roughly the same as the
  original's end time).

  (closes issue ASTERISK-19164)
  Reported by: Steve Davies
  Patches:
   cdr_fork_end.v10.patch uploaded by Steve Davies (license 5012)
  ........

  Merged revisions 362082 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362152 | mjordan | 2012-04-16 14:39:32 -0500 (Mon, 16 Apr 2012) | 19 lines

  Check for IO stream failures in various format's truncate/seek operations

  For the formats that support seek and/or truncate operations, many of
  the C library calls used to determine or set the current position indicator
  in the file stream were not being checked.  In some situations, if an error
  occurred, a negative value would be returned from the library call.  This
  could then be interpreted inappropriately as positional data.

  This patch checks the return values from these library calls before
  using them in subsequent operations.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

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

  Merged revisions 362151 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362202 | mjordan | 2012-04-16 16:40:29 -0500 (Mon, 16 Apr 2012) | 18 lines

  Fix handling of negative return code when storing voicemails in ODBC storage

  When storing a voicemail message using an ODBC connection to a database, the
  voicemail message is first stored on disk.  The sound file associated with
  the message is read into memory before being transmitted to the database.
  When this occurs, a failure in the C library's lseek function would cause a
  negative value to be passed to the mmap as the size of the memory map to
  create.  This would almost certainly cause the creation of the memory map to
  fail, resulting in the message being lost.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

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

  Merged revisions 362201 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362205 | mjordan | 2012-04-16 16:57:19 -0500 (Mon, 16 Apr 2012) | 25 lines

  Fix negative return handling in channel drivers

  In chan_agent, while handling a channel indicate, the agent channel driver
  must obtain a lock on both the agent channel, as well as the channel the
  agent channel is using.  To do so, it attempts to lock the other channel
  first, then unlock the agent channel which is locked prior to entry into
  the indicate handler.  If this unlock fails with a negative return value,
  which can occur if the object passed to agent_indicate is an invalid ao2
  object or is NULL, the return value is passed directly to strerror, which
  can only accept positive integer values.

  In chan_dahdi, the return value of dahdi_get_index is used to directly
  index into the sub-channel array.  If dahd_get_index returns a negative
  value, it would use that value to index into the array, which could cause
  an invalid memory access.  If dahdi_get_index returns a negative number,
  we now default to SUB_REAL.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

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

  Merged revisions 362204 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362264 | elguero | 2012-04-17 09:53:04 -0500 (Tue, 17 Apr 2012) | 23 lines

  Turn off warning message when bind address is set to any.

  When a bind address is set to an ANY address (udpbindport=::), a warning message
  is displayed stating that "Address remapping activated in sip.conf but we're
  using IPv6, which doesn't need it.  Please remove 'localnet' and/or 'externaddr'
  settings."  But if one is running dual stack, we shouldn't be told to turn those
  settings off.

  This patch checks if the bind address is an ANY address or not.  The warning
  message will now only be displayed if the bind address is NOT an ANY address and
  IPv6 is being used.

  Also, updated the copyright year.

  (closes issue ASTERISK-19456)
  Reported by: Michael L. Young
  Tested by: Michael L. Young
  Patches:
    chan_sip_ipv6_message.diff uploaded by Michael L. Young (license 5026)
  ........

  Merged revisions 362253 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362305 | mjordan | 2012-04-17 13:27:44 -0500 (Tue, 17 Apr 2012) | 15 lines

  Fix error that caused seek format operations to set max file size to '1' or '0'

  A very inappropriate placement of a ')' (introduced in r362151) caused the
  maximum size of a file to be set as the result of a comparison operation, as
  opposed to the result of the ftello operation.  This resulted in seeking being
  restricted to the beginning of the file, or 1 byte into the file.  Thanks to
  the Asterisk Test Suite for properly freaking out about this on at least one
  test.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan
  ........

  Merged revisions 362304 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362356 | mjordan | 2012-04-17 15:56:05 -0500 (Tue, 17 Apr 2012) | 17 lines

  Fix places where a negative return from ftello could be used as invalid input

  In a variety of locations in both reading and writing a file, the result
  from the C library function ftello is used as input to other functions.  For
  the parameters and functions in question, a negative value is invalid input.
  This patch checks the return value from the ftello function to determine if
  we were able to determine the current position in the file stream and, if not,
  fail gracefully.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

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

  Merged revisions 362355 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362357 | jrose | 2012-04-17 15:57:36 -0500 (Tue, 17 Apr 2012) | 12 lines

  Make use of va_args more appropriate to form in various res_config modules plus utils.

  A number of va_copy operations weren't matched with a corresponding va_end in res_config_odbc. Also, there was a potential for va_end to be invoked twice on the same va_arg in utils, which would mean invoking va_end on an undefined variable... which is bad.
  va_end is removed from various functions in config_pgsql and config_curl since they aren't making their own copy.  The invokers of those functions are responsible for calling va_end on them.

  (issue ASTERISK-19451)
  Reported by: Walter Doekes
  Review: https://reviewboard.asterisk.org/r/1848/
  ........

  Merged revisions 362354 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362360 | mjordan | 2012-04-17 16:07:29 -0500 (Tue, 17 Apr 2012) | 24 lines

  Fix places in main where a negative return value could impact execution

  This patch addresses a number of modules in main that did not handle the
  negative return value from function calls adequately, or were not sufficiently
  clear that the conditions leading to improper handling of the return values
  could not occur.  This includes:

  * asterisk.c: A negative return value from the read function would be used
  directly as an index into a buffer.  We now check for success of the read
  function prior to using its result as an index.

  * manager.c: Check for failures in mkstemp and lseek when handling the
  temporary file created for processing data returned from a CLI command in
  action_command.  Also check that the result of an lseek is sanitized prior
  to using it as the size of a memory map to allocate.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

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

  Merged revisions 362359 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362364 | mjordan | 2012-04-17 16:11:25 -0500 (Tue, 17 Apr 2012) | 29 lines

  Fix places in resources where a negative return value could impact execution

  This patch addresses a number of modules in resources that did not handle the
  negative return value from function calls adequately.  This includes:

  * res_agi.c: if the result of the read function is a negative number,
  indicating some failure, the result would instead be treated as the number
  of bytes read.  This patch now treats negative results in the same manner
  as an end of file condition, with the exception that it also logs the
  error code indicated by the return.

  * res_musiconhold.c: if spawn_mp3 fails to assign a file descriptor to srcfd,
  and instead assigns a negative value, that file descriptor could later be
  passed to functions that require a valid file descriptor.  If spawn_mp3 fails,
  we now immediately retry instead of continuing in the logic.

  * res_rtp_asterisk.c: if no codec can be matched between two RTP instances
  in a peer to peer bridge, we immediately return instead of attempting to
  use the codec payload type as an index to determine the appropriate negotiated
  codec.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

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

  Merged revisions 362362 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362377 | mjordan | 2012-04-17 16:22:37 -0500 (Tue, 17 Apr 2012) | 13 lines

  Handle case where an unknown format is used to get the preferred codec size

  In ast_codec_pref_getsize, if an unknown format is passed to the method,
  no preferred codec will be selected and a negative number will be used to
  index into the format list.  The method now logs an unknown format as a
  warning, and returns an empty format list.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

  Review: https://reviewboard.asterisk.org/r/1863/
........
  r362429 | rmudgett | 2012-04-18 11:27:51 -0500 (Wed, 18 Apr 2012) | 19 lines

  Add ability to ignore layer 1 alarms for BRI PTMP lines.

  Several telcos bring the BRI PTMP layer 1 down when the line is idle.
  When layer 1 goes down, Asterisk cannot make outgoing calls.  Incoming
  calls could fail as well because the alarm processing is handled by a
  different code path than the Q.931 messages.

  * Add the layer1_presence configuration option to ignore layer 1 alarms
  when the telco brings layer 1 down.  This option can be configured by span
  while the similar DAHDI driver teignorered=1 option is system wide.  This
  option unlike layer2_persistence does not require libpri v1.4.13 or newer.

  Related to JIRA AST-598

  JIRA ABE-2845
  ........

  Merged revisions 362428 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362496 | mjordan | 2012-04-18 21:27:08 -0500 (Wed, 18 Apr 2012) | 50 lines

  Fix a variety of potential buffer overflows

  * chan_mobile: Fixed an overrun where the cind_state buffer (an integer array
    of size 16) would be overrun due to improper bounds checking. At worst, the
    buffer can be overrun by a total of 48 bytes (assuming 4-byte integers),
    which would still leave it within the allocated memory of struct hfp.  This
    would corrupt other elements in that struct but not necessarily cause any
    further issues.

  * app_sms: The array imsg is of size 250, while the array (ud) that the data
    is copied into is of size 160.  If the size of the inbound message is
    greater then 160, up to 90 bytes could be overrun in ud.  This would corrupt
    the user data header (array udh) adjacent to ud.

  * chan_unistim: A number of invalid memmoves are corrected.  These would move
    data (which may or may not be valid) into the ends of these buffers.

  * asterisk: ast_console_toggle_loglevel does not check that the console log
    level being set is less then or equal to the allowed log levels of 32.

  * format_pref: In ast_codec_pref_prepend, if any occurrence of the specified
    codec is not found, the value used to index into the array pref->order
    would be one greater then the maximum size of the array.

  * jitterbuf: If the element being placed into the jitter buffer lands in the
    last available slot in the jitter history buffer, the insertion sort attempts
    to move the last entry in the buffer into one slot past the maximum length
    of the buffer.  Note that this occurred for both the min and max jitter
    history buffers.

  * tdd: If a read from fsk_serial returns a character that is greater then 32,
    an attempt to read past one of the statically defined arrays containing the
    values that character maps to would occur.

  * localtime: struct ast_time and tm are not the same size - ast_time is larger,
    although it contains the elements of tm within it in the same layout.  Hence,
    when using memcpy to copy the contents of tm into ast_time, the size of tm
    should be used, as opposed to the size of ast_time.

  * extconf: this treats ast_timing's minmask array as if it had a length of 48,
    when it has defined the size of the array as 24.  pbx.h defines minmask as
    having a size of 48.

  (issue ASTERISK-19668)
  Reported by: Matt Jordan
  ........

  Merged revisions 362485 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362537 | twilson | 2012-04-19 09:31:59 -0500 (Thu, 19 Apr 2012) | 14 lines

  Handle multiple commands per connection via netconsole

  Asterisk would accept multiple NULL-delimited CLI commands via the
  netconsole socket, but would occasionally miss a command due to the
  command not being completely read into the buffer. This patch ensures
  that any partial commands get moved to the front of the read buffer,
  appended to, and properly sent.

  (closes issue ASTERISK-18308)
  Review: https://reviewboard.asterisk.org/r/1876/
  ........

  Merged revisions 362536 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362587 | seanbright | 2012-04-19 11:04:21 -0500 (Thu, 19 Apr 2012) | 12 lines

  Prevent a crash in ExternalIVR when the 'S' command is sent first.

  If the first command sent from an ExternalIVR client is an 'S' command, we were
  blindly removing the first element from the play list and deferencing it, even
  if it was NULL.  This corrects that and also locks appropriately in one place.

  (issue ASTERISK-17889)
  Reported by: Chris Maciejewski
  ........

  Merged revisions 362586 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362678 | rmudgett | 2012-04-19 16:00:21 -0500 (Thu, 19 Apr 2012) | 5 lines

  Update membermacro and membergosub documentation in queues.conf.sample.
  ........

  Merged revisions 362677 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362681 | elguero | 2012-04-19 16:11:35 -0500 (Thu, 19 Apr 2012) | 9 lines

  Add leading and trailing backslashes

  A couple of unit tests did not have have leading or trailing backslashes when
  setting their test category resulting in a warning message being displayed.
  Added the backslash where needed.
  ........

  Merged revisions 362680 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362730 | wdoekes | 2012-04-19 16:59:43 -0500 (Thu, 19 Apr 2012) | 5 lines

  Fix documentation for ${VERSION(ASTERISK_VERSION_NUM)}.
  ........

  Merged revisions 362729 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362816 | twilson | 2012-04-20 09:49:42 -0500 (Fri, 20 Apr 2012) | 13 lines

  Document Speech* apps hangup on failure and suggest TryExec

  The Speech API apps return -1 on failure, which will hang up the channel. This
  may not be desirable behavior for some, but it isn't something that can be
  changed without breaking people's dialplans or writing an option to all of the
  Speech apps that does what TryExec already does. This patch documents the
  hangup behavior of the apps, and suggests TryExec as the solution.

  (closes issue AST-813)
  ........

  Merged revisions 362815 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362869 | twilson | 2012-04-20 11:12:34 -0500 (Fri, 20 Apr 2012) | 11 lines

  OpenBSD doesn't have rawmemchr, use strchr

  (closes issue ASTERISK-19758)
  Reported by: Barry Miller
  Tested by: Terry Wilson
  Patches:
    362758-diff uploaded by Barry Miller (license 5434)
  ........

  Merged revisions 362868 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r362918 | elguero | 2012-04-20 11:47:51 -0500 (Fri, 20 Apr 2012) | 11 lines

  Add missing payload type to events API

  The Security Events Framework API was changed while adding the generation of
  security events in chan_sip.  A payload type and name was missed from being
  added to struct ie_maps.

  (closes issue ASTERISK-19759)
  Reported by: Michael L. Young
  Patches:
      issue-asterisk-19759.diff uploaded by Michael L. Young (license 5026)
........
  r362998 | rmudgett | 2012-04-20 20:45:13 -0500 (Fri, 20 Apr 2012) | 5 lines

  Update app_dial M and U option GOTO return value documentation.
  ........

  Merged revisions 362997 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363212 | tilghman | 2012-04-23 11:06:53 -0500 (Mon, 23 Apr 2012) | 8 lines

  On some platforms, O_RDONLY is not a flag to be checked, but merely the absence of O_RDWR and O_WRONLY.

  The POSIX specification does not mandate how these 3 flags must be specified,
  only that one of the three must be specified in every call.
  ........

  Merged revisions 363209 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363376 | rmudgett | 2012-04-24 19:01:21 -0500 (Tue, 24 Apr 2012) | 5 lines

  Hangup affected channel in error paths of bridge_call_thread().
  ........

  Merged revisions 363375 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363429 | rmudgett | 2012-04-24 20:23:08 -0500 (Tue, 24 Apr 2012) | 27 lines

  Fix recalled party B feature flags for a failed DTMF atxfer.

  1) B calls A with Dial option T
  2) B DTMF atxfer to C
  3) B hangs up
  4) C does not answer
  5) B is called back
  6) B answers
  7) B cannot initiate transfers anymore

  * Add dial features datastore to recalled party B channel that is a copy
  of the original party B channel's dial features datastore.

  * Extracted add_features_datastore() from add_features_datastores().

  * Renamed struct ast_dial_features features_caller and features_callee
  members to my_features and peer_features respectively.  These better names
  eliminate the need for some explanatory comments.

  * Simplified code accessing the struct ast_dial_features datastore.

  (closes issue ASTERISK-19383)
  Reported by: lgfsantos
  ........

  Merged revisions 363428 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363688 | rmudgett | 2012-04-25 14:47:44 -0500 (Wed, 25 Apr 2012) | 19 lines

  Clear ISDN channel resetting state if the peer continues to use it.

  Some ISDN switches occasionally fail to send a RESTART ACKNOWLEDGE in
  response to a RESTART request.

  * Made the second SETUP received after sending a RESTART request clear the
  channel resetting state as if the peer had sent the expected RESTART
  ACKNOWLEDGE before continuing to process the SETUP.  The peer may not be
  sending the expected RESTART ACKNOWLEDGE.

  (issue ASTERISK-19608)
  (issue AST-844)
  (issue AST-815)
  Patches:
        jira_ast_815_v1.8.patch (license #5621) patch uploaded by rmudgett (modified)
  ........

  Merged revisions 363687 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363734 | rmudgett | 2012-04-25 15:48:22 -0500 (Wed, 25 Apr 2012) | 18 lines

  Make DAHDISendCallreroutingFacility wait 5 seconds for a reply before disconnecting the call.

  Some switches may not handle the call-deflection/call-rerouting message if
  the call is disconnected too soon after being sent.  Asteisk was not
  waiting for any reply before disconnecting the call.

  * Added a 5 second delay before disconnecting the call to wait for a
  potential response if the peer does not disconnect first.

  (closes issue ASTERISK-19708)
  Reported by: mehdi Shirazi
  Patches:
        jira_asterisk_19708_v1.8.patch (license #5621) patch uploaded by rmudgett
  Tested by: rmudgett
  ........

  Merged revisions 363730 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363789 | rmudgett | 2012-04-25 17:59:46 -0500 (Wed, 25 Apr 2012) | 5 lines

  Update Pickup application documentation.
  ........

  Merged revisions 363788 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363876 | rmudgett | 2012-04-25 22:11:45 -0500 (Wed, 25 Apr 2012) | 5 lines

  Update Pickup application documentation. (Even better)
  ........

  Merged revisions 363875 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363935 | alecdavis | 2012-04-26 04:46:38 -0500 (Thu, 26 Apr 2012) | 14 lines

  chan_sip: [general] maxforwards, not checked for a value greater than 255

  The peer maxforwards is checked for both '< 1' and '> 255',
  but the default 'maxforwards' in the [general] section is only checked for '< 1'

  alecdavis (license 585)
  Reported by: alecdavis
  Tested by: alecdavis

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

  Merged revisions 363934 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363987 | kmoore | 2012-04-26 08:27:34 -0500 (Thu, 26 Apr 2012) | 15 lines

  Fix reference leaks involving SIP Replaces transfers

  The reference held for SIP blind transfers using the Replaces header in an
  INVITE was never freed on success and also failed to be freed in some error
  conditions.  This caused a file descriptor leak since the RTP structures in use
  at the time of the transfer were never freed.  This reference leak and another
  relating to subscriptions in the same code path have now been corrected.

  (Closes issue ASTERISK-19579)
  Reported by: Maciej Krajewski
  Tested by: Maciej Karjewski
  ........

  Merged revisions 363986 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364047 | twilson | 2012-04-26 14:30:55 -0500 (Thu, 26 Apr 2012) | 8 lines

  Add more constness to the end_buf pointer in the netconsole

  issue ASTERISK-18308
  Review: https://reviewboard.asterisk.org/r/1876/
  ........

  Merged revisions 364046 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364065 | rmudgett | 2012-04-26 15:25:05 -0500 (Thu, 26 Apr 2012) | 24 lines

  Fix DTMF atxfer running h exten after the wrong bridge ends.

  When party B does an attended transfer of party A to party C, the
  attending bridge between party B and C should not be running an h exten
  when the bridge ends.  Running an h exten now sets a softhangup flag to
  ensure that an AGI will run in dead AGI mode.

  * Set the AST_FLAG_BRIDGE_HANGUP_DONT on the party B channel for the
  attending bridge between party B and C.

  (closes issue AST-870)

  (closes issue ASTERISK-19717)
  Reported by: Mario

  (closes issue ASTERISK-19633)
  Reported by: Andrey Solovyev
  Patches:
        jira_asterisk_19633_v1.8.patch (license #5621) patch uploaded by rmudgett
  Tested by: rmudgett, Andrey Solovyev, Mario
  ........

  Merged revisions 364060 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364109 | rmudgett | 2012-04-26 16:10:46 -0500 (Thu, 26 Apr 2012) | 5 lines

  Update Pickup application documentation. (With feeling this time.)
  ........

  Merged revisions 364108 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364163 | schmidts | 2012-04-27 07:54:19 -0500 (Fri, 27 Apr 2012) | 3 lines

  fix a wrong behavior of alarm timezones in caldav and icalendar when an alarm doesnt use utc. This change uses the same timezone from the start time.
........
  r364204 | mjordan | 2012-04-27 09:44:13 -0500 (Fri, 27 Apr 2012) | 23 lines

  Allow for reloading SRTP crypto keys within the same SIP dialog

  As a continuation of the patch in r356604, which allowed for the
  reloading of SRTP keys in re-INVITE transfer scenarios, this patch
  addresses the more common case where a new key is requested within
  the context of a current SIP dialog.  This can occur, for example, when
  certain phones request a SIP hold.

  Previously, once a dialog was associated with an SRTP object, any
  subsequent attempt to process crypto keys in any SDP offer - either
  the current one or a new offer in a new SIP request - were ignored.  This
  patch changes this behavior to only ignore subsequent crypto keys within
  the current SDP offer, but allows future SDP offers to change the keys.

  (issue ASTERISK-19253)
  Reported by: Thomas Arimont
  Tested by: Thomas Arimont

  Review: https://reviewboard.asteriskorg/r/1885/
  ........

  Merged revisions 364203 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364259 | kmoore | 2012-04-27 13:58:34 -0500 (Fri, 27 Apr 2012) | 14 lines

  Allow SIP pvts involved in Replaces transfers to fall out of reference sooner

  Unref the SIP pvt stored in the refer structure as soon as it is no longer
  needed so that the pvt and associated file descriptors can be freed sooner.
  This change makes a reference decrement unnecessary in code that handles SIP
  BYE/Also transfers which should not touch the reference anyway.

  (Closes issue ASTERISK-19579)
  Reported by: Maciej Krajewski
  Tested by: Maciej Krajewski
  ........

  Merged revisions 364258 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364285 | mjordan | 2012-04-27 14:30:19 -0500 (Fri, 27 Apr 2012) | 43 lines

  Prevent overflow in calculation in ast_tvdiff_ms on 32-bit machines

  The method ast_tvdiff_ms attempts to calculate the difference, in milliseconds,
  between two timeval structs, and return the difference in a 64-bit integer.
  Unfortunately, it assumes that the long tv_sec/tv_usec members in the timeval
  struct are large enough to hold the calculated values before it returns.  On
  64-bit machines, this might be the case, as a long may be 64-bits.  On 32-bit
  machines, however, a long may be less (32-bits), in which case, the calculation
  can overflow.

  This overflow caused significant problems in MixMonitor, which uses the method
  to determine if an audio factory, which has not presented audio to an audiohook,
  is merely late in providing said audio or will never provide audio.  In an
  overflow situation, the audiohook would incorrectly determine that an audio
  factory that will never provide audio is merely late instead.  This led to
  situations where a MixMonitor never recorded any audio.  Note that this happened
  most frequently when that MixMonitor was started by the ConfBridge application
  itself, or when the MixMonitor was attached to a Local channel.

  (issue ASTERISK-19497)
  Reported by: Ben Klang
  Tested by: Ben Klang
  Patches:
    32-bit-time-overflow-10-2012-04-26.diff (license #6283) by mjordan

  (closes issue ASTERISK-19727)
  Reported by: Mark Murawski
  Tested by: Michael L. Young
  Patches:
    32-bit-time-overflow-2012-04-27.diff (license #6283) by mjordan)

  (closes issue ASTERISK-19471)
  Reported by: feyfre
  Tested by: feyfre

  (issue ASTERISK-19426)
  Reported by: Johan Wilfer

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

  Merged revisions 364277 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364342 | mmichelson | 2012-04-27 16:58:06 -0500 (Fri, 27 Apr 2012) | 10 lines

  Don't attempt to make use of the dynamic_exclude_static ACL if DNS lookup fails.

  (closes issue ASTERISK-18321)
  Reported by Dan Lukes
  Patches:
   ASTERISK-18321.patch by Mark Michelson (license #5049)
  ........

  Merged revisions 364341 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364365 | twilson | 2012-04-27 17:31:01 -0500 (Fri, 27 Apr 2012) | 11 lines

  Fix ast_parse_arg numeric type range checking and add tests

  ast_parse_arg wasn't checking for strto* parse errors or limiting
  the results by the actual range of the numeric types. This patch fixes
  that and adds unit tests as well.

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

  Merged revisions 364340 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364369 | twilson | 2012-04-27 17:33:10 -0500 (Fri, 27 Apr 2012) | 2 lines

  Add missing test_config.c
........
  r364536 | elguero | 2012-04-28 21:21:10 -0500 (Sat, 28 Apr 2012) | 13 lines

  Fix configuring custom sound_leader_has_left in confbridge.conf

  The configuration option to specify a custom sound_leader_has_left file for a
  conference bridge was not being parsed.  This patch fixes it so that a custom
  sound file will now be used.

  (closes issue ASTERISK-19771)
  Reported by: Pawel Kuzak
  Tested by: Pawel Kuzak, Michael L. Young
  Patches: leaderhasleft_sound.dpatch uploaded by Pawel Kuzak (license 6380)

  Review: https://reviewboard.asterisk.org/r/1884/
........
  r364579 | mjordan | 2012-04-29 14:43:53 -0500 (Sun, 29 Apr 2012) | 15 lines

  Fix error that caused truncate operations to fail

  Another very inappropriate placement of a ')' (again introduced in r362151)
  caused the various truncate operations to attempt to truncate the sound file
  at a position of '0'.

  (issue ASTERISK-19655)
  Reported by: Matt Jordan

  (issue ASTERISK-19810)
  Reported by: colbec
  ........

  Merged revisions 364578 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364650 | markm | 2012-04-30 11:43:11 -0500 (Mon, 30 Apr 2012) | 15 lines

  Merged revisions 364635 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.8

  ........
    r364635 | markm | 2012-04-30 11:51:12 -0400 (Mon, 30 Apr 2012) | 10 lines

    Sanatize result from bfd_find_nearest_line (BETTER_BACKTRACES)

    bfd_find_nearest_line can possibly set file to null resulting in a crash when strrchr(file) runs

    (closes issue ASTERISK-19815)
    Reported by Mark Murawski
    Tested by Mark Murawski
  ........
........
  r364651 | may | 2012-04-30 11:48:57 -0500 (Mon, 30 Apr 2012) | 10 lines

  Fix use freed pointer in return value from call thread

  (issue ASTERISK-19663)
  Reported by: Matt Jordan
  Patches:
    ASTERISK-19663-ooh323.patch (License #5415)
  ........

  Merged revisions 364649 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364777 | jrose | 2012-05-01 13:23:08 -0500 (Tue, 01 May 2012) | 13 lines

  Fix bad check in voicemail functions for ast_inboxcount2_func

  Check looks for ast_inboxcount_func instead of ast_inboxcount2_func on
  ast_inboxcount2_func calls.

  (closes issue ASTERISK-19718)
  Reported by: Corey Farrell
  Patches:
   ast_app_inboxcount2-null-refcheck.patch uploaded by Corey Farrell (license 5909)
  ........

  Merged revisions 364769 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364787 | kmoore | 2012-05-01 14:07:09 -0500 (Tue, 01 May 2012) | 12 lines

  Play conf-placeintoconf message to the correct channel

  Correct the code in app_confbridge to play the conf-placeintoconf message to
  the marked user entering the bridge instead of to the conference while the
  marked user hears silence.

  (closes issue ASTERISK-19641)
Reported-by: Mark A Walters
  ........

  Merged revisions 364786 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364845 | rmudgett | 2012-05-01 16:50:32 -0500 (Tue, 01 May 2012) | 7 lines

  * Fix error path resouce leak in local_request().

  * Restructure local_request() to reduce indentation.
  ........

  Merged revisions 364840 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364900 | mmichelson | 2012-05-01 18:10:16 -0500 (Tue, 01 May 2012) | 16 lines

  Fix Coverity-reported ARRAY_VS_SINGLETON error.

  As it turned out, this wasn't a huge deal. We were calling
  ast_app_parse_options() for a set of options of which none
  took arguments. The proper thing to do for this case is to
  pass NULL for the "args" parameter here. We were instead passing
  a seemingly-randomly chosen char * from the function. While this
  would never get written to, you can rest assured things would
  have gotten bad had new options (which took arguments) been added
  to func_volume.

  (closes issue ASTERISK-19656)
  ........

  Merged revisions 364899 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364903 | rmudgett | 2012-05-01 18:14:12 -0500 (Tue, 01 May 2012) | 10 lines

  Fixed __ao2_ref() validating user_data twice.

  (closes issue ASTERISK-19755)
  Reported by: Gunther Kelleter
  Patches:
        ao2_ref.patch (license #6372) patch uploaded by Gunther Kelleter
  ........

  Merged revisions 364902 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364965 | mjordan | 2012-05-01 21:44:15 -0500 (Tue, 01 May 2012) | 11 lines

  Only log a failure to get read/write samples from factories if it didn't happen

  In audiohook_read_frame_both, anytime samples are obtained from the read/write
  factories a debug statement is logged stating that samples were not obtained
  from the factories.  This statement used to only occur if option_debug was
  turned on and no samples were obtained; in some refactoring when the
  option_debug statement was removed, the "else" clause was removed as well.

  This patch makes it so that those debug log statements only occur if the
  condition leading up to them actually happened.
........
  r365014 | elguero | 2012-05-02 11:16:03 -0500 (Wed, 02 May 2012) | 18 lines

  Update security events unit tests

  The security events framework API was changed in Asterisk 10 but the unit tests
  were not updated at the same time.

  This patch does the following:
  * Adds two more security events that were added to the API
  * Add challenge, received_challenge and received_hash in the inval_password
    security event unit test

  (issue ASTERISK-19760)
  Reported by: Michael L. Young
  Tested by: Michael L. Young
  Patches:
  issue-asterisk-19760-branch10.diff uploaded by Michael L. Young (license 5026)

  Review: https://reviewboard.asterisk.org/r/1877/
........
  r365083 | twilson | 2012-05-02 12:29:54 -0500 (Wed, 02 May 2012) | 33 lines

  Multiple revisions 365006,365068

  ........
    r365006 | twilson | 2012-05-02 10:49:03 -0500 (Wed, 02 May 2012) | 12 lines

    Fix a CEL LINKEDID_END race and local channel linkedids

    This patch has the ;2 channel inherit the linkedid of the ;1 channel and fixes
    the race condition by no longer scanning the channel list for "other" channels
    with the same linkedid. Instead, cel.c has an ao2 container of linkedid strings
    and uses the refcount of the string as a counter of how many channels with the
    linkedid exist. Not only does this eliminate the race condition, but it also
    allows us to look up the linkedid by the hashed key instead of traversing the
    entire channel list.

    Review: https://reviewboard.asterisk.org/r/1895/
  ........
    r365068 | twilson | 2012-05-02 12:02:39 -0500 (Wed, 02 May 2012) | 11 lines

    Don't leak a ref if out of memory and can't link the linkedid

    If the ao2_link fails, we are most likely out of memory and bad things
    are going to happen. Before those bad things happen, make sure to clean
    up the linkedid references.

    This patch also adds a comment explaining why linkedid can't be passed
    to both local channel allocations and combines two ao2_ref calls into 1.

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

  Merged revisions 365006,365068 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 361208,361211,361270,361330,361333,361381,361422,361472,361522,361560,361607,361658,361706,361754,361804,361855,361907,361956,361981,362080,362084,362152,362202,362205,362264,362305,362356-362357,362360,362364,362377,362429,362496,362537,362587,362678,362681,362730,362816,362869,362918,362998,363212,363376,363429,363688,363734,363789,363876,363935,363987,364047,364065,364109,364163,364204,364259,364285,364342,364365,364369,364536,364579,364650-364651,364777,364787,364845,364900,364903,364965,365014,365083 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@365264 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMultiple revisions 361143,363103-363104,363107,363156,364707
Jason Parker [Thu, 3 May 2012 19:14:45 +0000 (19:14 +0000)] 
Multiple revisions 361143,363103-363104,363107,363156,364707

........
  r361143 | jrose | 2012-04-04 11:38:12 -0500 (Wed, 04 Apr 2012) | 12 lines

  Replace GNU old-style field designator extensions to fix clang warnings

  (issue ASTERISK-19540)
  Reported by: Makoto Dei
  Patches:
   clang-gnu-designator.patch uploaded by Makoto Dei (license 5027)
  ........
  Also add from the patch the portion in res_fax_spandsp that didn't apply to 1.8

  Merged revisions 361142 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  (closes issue ASTERISK-19540)
........
  r363103 | mjordan | 2012-04-23 08:40:23 -0500 (Mon, 23 Apr 2012) | 19 lines

  AST-2012-005: Fix remotely exploitable heap overflow in keypad button handling

  When handling a keypad button message event, the received digit is placed into
  a fixed length buffer that acts as a queue.  When a new message event is
  received, the length of that buffer is not checked before placing the new digit
  on the end of the queue.  The situation exists where sufficient keypad button
  message events would occur that would cause the buffer to be overrun.  This
  patch explicitly checks that there is sufficient room in the buffer before
  appending a new digit.

  (closes issue ASTERISK-19592)
  Reported by: Russell Bryant
  ........

  Merged revisions 363100 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
  ........

  Merged revisions 363102 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363104 | mjordan | 2012-04-23 08:48:48 -0500 (Mon, 23 Apr 2012) | 10 lines

  Reference skinny_subchannel object instead of skinny_device for r363103

  The check-in to resolve ASTERISK-19592 (r363103) failed to switch to the
  skinny_subchannel object instead of the skinny_device when attempting to
  reference the buffer for the keypad digits.  This patch fixes that.

  (issue ASTERISK-19592)
  Reported by: Russell Bryant
........
  r363107 | mjordan | 2012-04-23 09:07:29 -0500 (Mon, 23 Apr 2012) | 19 lines

  AST-2012-006: Fix crash in UPDATE handling when no channel owner exists

  If Asterisk receives a SIP UPDATE request after a call has been terminated and
  the channel has been destroyed but before the SIP dialog has been destroyed, a
  condition exists where a connected line update would be attempted on a
  non-existing channel.  This would cause Asterisk to crash.  The patch resolves
  this by first ensuring that the SIP dialog has an owning channel before
  attempting a connected line update.  If an UPDATE request is received and no
  channel is associated with the dialog, a 481 response is sent.

  (closes issue ASTERISK-19770)
  Reported by: Thomas Arimont
  Tested by: Matt Jordan
  Patches:
    ASTERISK-19278-2012-04-16.diff uploaded by Matt Jordan (license 6283)
  ........

  Merged revisions 363106 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r363156 | jrose | 2012-04-23 09:39:48 -0500 (Mon, 23 Apr 2012) | 23 lines

  AST-2012-004: Fix an error that allows AMI users to run shell commands sans authorization.

  As detailed in the advisory, AMI users without write authorization for SYSTEM class AMI
  actions were able to run system commands by going through other AMI commands which did
  not require that authorization. Specifically, GetVar and Status allowed users to do this
  by setting their variable/s options to the SHELL or EVAL functions.
  Also, within 1.8, 10, and trunk there was a similar flaw with the Originate action that
  allowed users with originate permission to run MixMonitor and supply a shell command
  in the Data argument. That flaw is fixed in those versions of this patch.

  (closes issue ASTERISK-17465)
  Reported By: David Woolley
  Patches:
   162_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
   18_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
   10_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
  ........

  Merged revisions 363117 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
  ........

  Merged revisions 363141 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364707 | mmichelson | 2012-04-30 14:42:35 -0500 (Mon, 30 Apr 2012) | 17 lines

  Revert improved identities sent in dialog-info NOTIFY requests in r360862

  Revision 360862 was intended to improve identities sent in dialog-info
  NOTIFY requests. Some users reported that hint became broken once this
  was done. It's not clear exactly what part of the patch has caused this
  regression, but broken hints are bad.

  For now, this revision is being reverted so that the next releases of
  Asterisk do not have bad behavior in them. The original reported issue
  will have to be fixed differently in the next version of Asterisk.

  (issue ASTERISK-16735)
  ........

  Merged revisions 364706 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 361143,363103-363104,363107,363156,364707 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@365214 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoSave the address on which a MESSAGE was received, so it can be used in MESSAGE()
Jason Parker [Wed, 2 May 2012 15:57:39 +0000 (15:57 +0000)] 
Save the address on which a MESSAGE was received, so it can be used in MESSAGE()

This is useful in cases where chan_sip may be listening on multiple addresses.

(issue DPMA-127)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@365009 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoPrevent a potential crash when using manager hooks.
Jason Parker [Tue, 1 May 2012 21:46:23 +0000 (21:46 +0000)] 
Prevent a potential crash when using manager hooks.

Found by me while poking at DPMA-127.
........

Merged revisions 364841 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 364842 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@364843 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoRemove folder_dir from voicemail snapshots API.
Jason Parker [Tue, 1 May 2012 17:53:46 +0000 (17:53 +0000)] 
Remove folder_dir from voicemail snapshots API.

It was both unused (except in tests, where it was fudged) and unnecessary.

(closes issue AST-842)
........

Merged revisions 364761 from http://svn.asterisk.org/svn/asterisk/certified/branches/1.8.11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@364766 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoThe 10-digiumphones version of revision 362673 to 1.8-digiumphones
Mark Michelson [Thu, 19 Apr 2012 20:35:46 +0000 (20:35 +0000)] 
The 10-digiumphones version of revision 362673 to 1.8-digiumphones

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@362674 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoinit merge prop
Jason Parker [Fri, 13 Apr 2012 17:48:11 +0000 (17:48 +0000)] 
init merge prop

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@362134 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd branch-10-merged property
Matthew Jordan [Fri, 13 Apr 2012 17:29:38 +0000 (17:29 +0000)] 
Add branch-10-merged property

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@362133 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoFix bugs in voicemail APIs and add unit tests.
Mark Michelson [Mon, 9 Apr 2012 21:32:17 +0000 (21:32 +0000)] 
Fix bugs in voicemail APIs and add unit tests.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361748 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUpdate Func MESSAGE() and AMI MessageSend documentation.
Richard Mudgett [Fri, 6 Apr 2012 19:16:56 +0000 (19:16 +0000)] 
Update Func MESSAGE() and AMI MessageSend documentation.

* Document MESSAGE(custom_data)

* Update AMI MessageSend documentation

* Eliminate a shadowed variable name in msg_func_write() for custom_data.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361503 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd unit tests for func_presencestate and config hooks.
Mark Michelson [Thu, 5 Apr 2012 17:48:47 +0000 (17:48 +0000)] 
Add unit tests for func_presencestate and config hooks.

These tests were originally written for the trunk merge of Digium
phone support to Asterisk, but this branch can benefit from these
tests too.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361293 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoFix a compiler error in pbx.c
Mark Michelson [Thu, 5 Apr 2012 17:40:24 +0000 (17:40 +0000)] 
Fix a compiler error in pbx.c

This places a function declaration before its first invocation.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361292 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoOnly add the device portion of a hint when adding a hintdevice.
Mark Michelson [Wed, 4 Apr 2012 21:25:05 +0000 (21:25 +0000)] 
Only add the device portion of a hint when adding a hintdevice.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361263 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoFix compiler errors.
Mark Michelson [Wed, 4 Apr 2012 21:20:35 +0000 (21:20 +0000)] 
Fix compiler errors.

Next up is to do some testing to be sure things are sane.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361262 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoChanges to the channels directory for Digium phone support.
Mark Michelson [Wed, 4 Apr 2012 20:50:55 +0000 (20:50 +0000)] 
Changes to the channels directory for Digium phone support.

Next step: Get this poopoo compiling!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361261 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd tests for Digium phone support.
Mark Michelson [Wed, 4 Apr 2012 20:22:21 +0000 (20:22 +0000)] 
Add tests for Digium phone support.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361228 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoapps changes necessary for Digium phone support.
Mark Michelson [Wed, 4 Apr 2012 20:18:15 +0000 (20:18 +0000)] 
apps changes necessary for Digium phone support.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361216 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd Digium phone changes for the funcs directory.
Mark Michelson [Wed, 4 Apr 2012 19:28:20 +0000 (19:28 +0000)] 
Add Digium phone changes for the funcs directory.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361207 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd Digium phone changes for the include/asterisk directory
Mark Michelson [Wed, 4 Apr 2012 19:26:30 +0000 (19:26 +0000)] 
Add Digium phone changes for the include/asterisk directory

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361206 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd phone changes for message.c
Mark Michelson [Wed, 4 Apr 2012 19:11:47 +0000 (19:11 +0000)] 
Add phone changes for message.c

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361200 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUpdate everything in the main directory for Digium phone additions.
Mark Michelson [Wed, 4 Apr 2012 19:05:22 +0000 (19:05 +0000)] 
Update everything in the main directory for Digium phone additions.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361199 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUpdate sample config files.
Mark Michelson [Wed, 4 Apr 2012 18:24:43 +0000 (18:24 +0000)] 
Update sample config files.

This just involved updating manager.conf.sample to have the new
"message" write permission.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361178 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoCreate a Digium phones branch of Asterisk 10.
Mark Michelson [Wed, 4 Apr 2012 15:40:06 +0000 (15:40 +0000)] 
Create a Digium phones branch of Asterisk 10.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@361140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMake the MeetMeAdmin N command (mute all nonadmins) not mute admins
Jonathan Rose [Wed, 4 Apr 2012 13:43:53 +0000 (13:43 +0000)] 
Make the MeetMeAdmin N command (mute all nonadmins) not mute admins

(Closes Issue ASTERISK-19335)
Reported by: Johan Wilfer
Review: https://reviewboard.asterisk.org/r/1843/
........

Merged revisions 361090 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix the display of documentation for Transfer
Kinsey Moore [Tue, 3 Apr 2012 20:08:47 +0000 (20:08 +0000)] 
Fix the display of documentation for Transfer

This came up while fixing documentation generation for many other cases where
the argument separator was not being displayed properly.  Now that it is
displayed properly, it shows up in the wrong place for Transfer since the '/'
is only required if Tech is present.

(related to issue ASTERISK-18168)
........

Merged revisions 361040 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoStop sending out RTCP if RTP is inactive
Kinsey Moore [Mon, 2 Apr 2012 22:22:07 +0000 (22:22 +0000)] 
Stop sending out RTCP if RTP is inactive

This change prevents Asterisk from sending RTCP receiver reports during a
remote bridge since it is no longer receiving media and should not be
reporting anything.

(related to ASTERISK-19366)
........

Merged revisions 360987 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix logger deadlock on Asterisk shutdown.
Richard Mudgett [Fri, 30 Mar 2012 21:29:43 +0000 (21:29 +0000)] 
Fix logger deadlock on Asterisk shutdown.

The logger_thread() had an exit path that failed to release the logmsgs
list lock.

* Make logger_thread() exit path unlock the logmsgs list lock.

* Made ast_log() not queue any messages to the logmsgs list if the
close_logger_thread flag is set.

(issue ASTERISK-19463)
Reported by: Matt Jordan
........

Merged revisions 360933 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix potential race condition during call pickup.
Mark Michelson [Thu, 29 Mar 2012 23:33:59 +0000 (23:33 +0000)] 
Fix potential race condition during call pickup.

Prior to this patch, a connected line update was queued during
call pickup and then an answer frame was queued. The original
caller would presumably then have his connected line updated
and then the call would be answered.

In actuality, the answer frame was not how the call ended up
being answered. Rather, an odd section in app_dial that checks
if the called channel's state is up.

The result is that the order of the connected line update and
the answer were variable. In most cases, this wasn't actually
a bad thing. However, if the 'I' option was passed to dial, the
connected line update would be inhibited.

The fix is to queued the connected line after the answer frame is
queued. This way the race in app_dial is between two
conditions resulting in an answer. This way the connected line
update occurs after the answer every time.

(closes issue ASTERISK-19183)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
    Mark Michelson
Patches:
    ASTERISK-19183.patch uploaded by Mark Michelson (license 5049)
........

Merged revisions 360884 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoImprove accuracy of identifying information sent in dialog-info SIP NOTIFY requests.
Mark Michelson [Thu, 29 Mar 2012 23:05:42 +0000 (23:05 +0000)] 
Improve accuracy of identifying information sent in dialog-info SIP NOTIFY requests.

This change makes use of connected party information in addition to caller ID in order
to populate local and remote XML elements in the dialog-info NOTIFYs.

(closes issue ASTERISK-16735)
Reported by: Maciej Krajewski
Tested by: Maciej Krajewski
Patches:
    local_remote_hint2.diff uploaded by Mark Michelson (license 5049)
........

Merged revisions 360862 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoDestroy configs when they are no longer used
Terry Wilson [Wed, 28 Mar 2012 19:20:04 +0000 (19:20 +0000)] 
Destroy configs when they are no longer used

https://reviewboard.asterisk.org/r/1834/
........

Merged revisions 360712 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoMake a debug message regarding subscription changes more accurate.
Mark Michelson [Tue, 27 Mar 2012 18:23:11 +0000 (18:23 +0000)] 
Make a debug message regarding subscription changes more accurate.

I was getting confused during some testing why Asterisk was saying that
a subscription was being added when it was clearly being removed. This
fixes that confusion.
........

Merged revisions 360625 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoUpdates config with bootstrap where I changed configure.ac in r360488
Jonathan Rose [Tue, 27 Mar 2012 14:35:40 +0000 (14:35 +0000)] 
Updates config with bootstrap where I changed configure.ac in r360488

(issue ASTERISK-17842)
Reported by: Bryon Clark
........

Merged revisions 360574 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix BETTER_BACKTRACES library detection for Fedora/RedHat/CentOS
Jonathan Rose [Mon, 26 Mar 2012 19:43:34 +0000 (19:43 +0000)] 
Fix BETTER_BACKTRACES library detection for Fedora/RedHat/CentOS

(closes ASTERISK-17842)
Reported by: Bryon Clark
Patches:
20110512__issue19278.diff.txt uploaded by Tilghman Lesher (license 5003)
configure_bfd_with_dl_and_iberty.patch uploaded by Bryon Clark (license 6157)
........

Merged revisions 360488 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoUpdate CHANGES for r360471
Paul Belanger [Mon, 26 Mar 2012 18:41:05 +0000 (18:41 +0000)] 
Update CHANGES for r360471
........

Merged revisions 360474 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoBlocked revisions 360473
Paul Belanger [Mon, 26 Mar 2012 18:39:16 +0000 (18:39 +0000)] 
Blocked revisions 360473

........
Fix Asterisk version typo

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

13 years agoIncrease verbosity level for ast_verb messages
Paul Belanger [Mon, 26 Mar 2012 18:26:51 +0000 (18:26 +0000)] 
Increase verbosity level for ast_verb messages

While this does not fix the issue of the CLI being flooded by 'doing
dnsmgr_lookup' messages, increasing the verbosity level above 5 should help
minimize it.
........

Merged revisions 360471 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agofunc_curl: Fix leak of an ast_str in error handling code path.
Russell Bryant [Sat, 24 Mar 2012 23:47:42 +0000 (23:47 +0000)] 
func_curl: Fix leak of an ast_str in error handling code path.
........

Merged revisions 360413 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoapp_page: Fix a memory leak on every Page().
Russell Bryant [Sat, 24 Mar 2012 03:10:22 +0000 (03:10 +0000)] 
app_page: Fix a memory leak on every Page().

dial_list is a dynamically allocated array that is allocated at the beginning
of Page() based on how many devices will be dialed.  This was never being freed.
........

Merged revisions 360363 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoapp_jack: fix datastore memory leak in error handling path.
Russell Bryant [Sat, 24 Mar 2012 03:02:15 +0000 (03:02 +0000)] 
app_jack: fix datastore memory leak in error handling path.
........

Merged revisions 360360 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoMultiple revisions 360356-360357
Russell Bryant [Sat, 24 Mar 2012 02:38:59 +0000 (02:38 +0000)] 
Multiple revisions 360356-360357

........
  r360356 | russell | 2012-03-23 22:33:36 -0400 (Fri, 23 Mar 2012) | 6 lines

  expression parser: Fix (theoretical) memory leak.

  Fix a memory leak that is very unlikely to actually happen.  If a malloc()
  succeeded, but the following strdup() failed, the memory from the original
  malloc() would be leaked.
........
  r360357 | russell | 2012-03-23 22:34:39 -0400 (Fri, 23 Mar 2012) | 6 lines

  Rebuild parsers.

  This is needed to include the last fix to main/ast_expr2.y.  The changes look
  much bigger as this regeneration of the code was done with newer versions of
  flex and bison.
........

Merged revisions 360356-360357 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoMake number not available presentation also set screening to network provided.
Richard Mudgett [Sat, 24 Mar 2012 00:37:13 +0000 (00:37 +0000)] 
Make number not available presentation also set screening to network provided.

Q.951 indicates that when the presentation indicator is "Number not
available due to interworking" for a number then the screening indicator
field should be "Network provided".

* Made ast_party_id_presentation() return AST_PRES_NUMBER_NOT_AVAILABLE
when the presentation is "Number not available due to interworking".  This
fix makes Asterisk consistent and it also makes it consistent with earlier
branches as far as this presentation value is concerned.

* Made pri_to_ast_presentation() and ast_to_pri_presentation() conversions
handle the "Number not available due to interworking" case better in
sig_pri.c.  This change is possible because the minimum required libpri
version (v1.4.11) has the necessary defines in libpri.h.
........

Merged revisions 360309 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoAdd missing initialization of update_redirecting in chan_sip.c
Richard Mudgett [Fri, 23 Mar 2012 22:49:51 +0000 (22:49 +0000)] 
Add missing initialization of update_redirecting in chan_sip.c
........

Merged revisions 360262 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoUpdate install_prereq script to include missing GSM library for debian amd move SQLite3.
Jonathan Rose [Wed, 21 Mar 2012 14:52:43 +0000 (14:52 +0000)] 
Update install_prereq script to include missing GSM library for debian amd move SQLite3.

(closes issue ASTERISK-19367)
Reported by: Andrew Latham
Patches:
debian_install_prereq.diff uploaded by Andrew Latham (license 5985)
........

Merged revisions 360138 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoAlso detect gmime 2.6
Tzafrir Cohen [Wed, 21 Mar 2012 14:21:14 +0000 (14:21 +0000)] 
Also detect gmime 2.6

Also detect gmime version 2.6 (Michael Biebl)

Signed-off-by: Tzafrir Cohen (License #5035) <tzafrir.cohen@xorcom.com>
........

Merged revisions 360087 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoEnsure Asterisk sends a BYE when pending on the final response to a re-INVITE
Matthew Jordan [Wed, 21 Mar 2012 13:28:17 +0000 (13:28 +0000)] 
Ensure Asterisk sends a BYE when pending on the final response to a re-INVITE

When Asterisk detects a hangup and cannot send a BYE due to a pending
INVITE, it sets the pendingbye flag and waits for the final response to that
INVITE.  When the response is received, it transmits the BYE.  If, however,
that INVITE request is a pending re-INVITE, it needs to first send a CANCEL
request to terminate the pending re-INVITE.  In that circumstance, Asterisk
was, in some scenarios, clearing the pendingbye flag after processing the
CANCEL request and not checking for a pending BYE when receiving the final
487 response to the INVITE.

This patch ensures that if the pendingbye flag is set, it is honored
regardless of the nature of the INVITE request currently in flight.

(closes issue ASTERISK-19365)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
Patches:
  bugASTERISK-19365_2012_03_08.patch uploaded by mjordan (license 6283)

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

Merged revisions 360086 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoPrevent Echo() from relaying control, null, and modem frames
Kinsey Moore [Tue, 20 Mar 2012 20:37:46 +0000 (20:37 +0000)] 
Prevent Echo() from relaying control, null, and modem frames

Echo()'s description states that it echoes audio, video, and DTMF except for #
while it actually echoes any frame that it receives other than DTMF #.  This
was causing frame storms in the test suite in some circumstances where Echo()
was attached to both ends of a pair of local channels and control frames
were being periodically generated.  Echo()'s behavior and description have
been modifed so that it only echoes media and non-# DTMF frames.
........

Merged revisions 360033 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agochan_iax2: Emit Port alongside Post in PeerStatus AMI Event.
Sean Bright [Tue, 20 Mar 2012 18:11:41 +0000 (18:11 +0000)] 
chan_iax2: Emit Port alongside Post in PeerStatus AMI Event.

The PeerStatus event for IAX2 channels currently includes a header named Post
which should have been Port.  So include Port along with Post when emitting the
event.  We'll remove Post in trunk.

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

13 years agoAllow AMI action callback to be reentrant.
Richard Mudgett [Tue, 20 Mar 2012 17:25:44 +0000 (17:25 +0000)] 
Allow AMI action callback to be reentrant.

Fix AMI module reload deadlock regression from ASTERISK-18479 when it
tried to fix the race between calling an AMI action callback and
unregistering that action.  Refixes ASTERISK-13784 broken by
ASTERISK-17785 change.

Locking the ao2 object guaranteed that there were no active callbacks that
mattered when ast_manager_unregister() was called.  Unfortunately, this
causes the deadlock situation.  The patch stops locking the ao2 object to
allow multiple threads to invoke the callback re-entrantly.  There is no
way to guarantee a module unload will not crash because of an active
callback.  The code attempts to minimize the chance with the registered
flag and the maximum 5 second delay before ast_manager_unregister()
returns.

The trunk version of the patch changes the API to fix the race condition
correctly to prevent the module code from unloading from memory while an
action callback is active.

* Don't hold the lock while calling the AMI action callback.

(closes issue ASTERISK-19487)
Reported by: Philippe Lindheimer

Review: https://reviewboard.asterisk.org/r/1818/
Review: https://reviewboard.asterisk.org/r/1820/
........

Merged revisions 359979 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoPrevent chanspy from binding to zombie channels
Jonathan Rose [Fri, 16 Mar 2012 20:20:25 +0000 (20:20 +0000)] 
Prevent chanspy from binding to zombie channels

This patch addresses a bug with chanspy on local channels which roughly 50% of the time
would create a situation where chanspy can latch onto a zombie channel, keeping the zombie
alive forever and causing the channel doing the spying to never be able to hang up.

(closes issue ASTERISK-19493)
Reported by: lvl
Review: https://reviewboard.asterisk.org/r/1819/
........

Merged revisions 359892 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoMissed lastinvite CSeq int to uint32_t change
Alec L Davis [Fri, 16 Mar 2012 08:24:50 +0000 (08:24 +0000)] 
Missed lastinvite CSeq int to uint32_t change
from Review: https://reviewboard.asterisk.org/r/1699/
........

Merged revisions 359809 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix remotely exploitable stack overflow in HTTP manager
Matthew Jordan [Thu, 15 Mar 2012 19:06:09 +0000 (19:06 +0000)] 
Fix remotely exploitable stack overflow in HTTP manager

There exists a remotely exploitable stack buffer overflow in HTTP digest
authentication handling in Asterisk.  The particular method in question
is only utilized by HTTP AMI.  When parsing the digest information, the
length of the string is not checked when it is copied into temporary buffers
allocated on the stack.

This patch fixes this behavior by parsing out pre-defined key/value pairs
and avoiding unnecessary copies to the stack.

(closes issue ASTERISK-19542)
Reported by: Russell Bryant
Tested by: Matt Jordan
........

Merged revisions 359706 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix remotely exploitable stack overrun in Milliwatt
Matthew Jordan [Thu, 15 Mar 2012 18:50:17 +0000 (18:50 +0000)] 
Fix remotely exploitable stack overrun in Milliwatt

Milliwatt is vulnerable to a remotely exploitable stack overrun when using
the 'o' option.  This occurs due to the milliwatt_generate function not
accounting for AST_FRIENDLY_OFFSET when calculating the maximum number of
samples it can put in the output buffer.

This patch resolves this issue by taking into account AST_FRIENDLY_OFFSET
when determining the maximum number of samples allowed.  Note that at no
point is remote code execution possible.  The data that is written into the
buffer is the pre-defined Milliwatt data, and not custom data.

(closes issue ASTERISK-19541)
Reported by: Russell Bryant
Tested by: Matt Jordan
Patches:
  milliwatt_stack_overrun.rev1.txt by Russell Bryant (license 6283)
  Note that this patch was written by Russell, even though Matt uploaded it
........

Merged revisions 359645 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
........

Merged revisions 359656 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoAdd missing connected line macro calls to initial dial for Dial and Queue apps.
Richard Mudgett [Thu, 15 Mar 2012 18:22:01 +0000 (18:22 +0000)] 
Add missing connected line macro calls to initial dial for Dial and Queue apps.

The connected line interception macros do not get executed when the
outgoing channel is initially created and that channel's caller-id is
implicitly imported into the incoming channel's connected line data.  If
you are using the interception macros, you would expect that they get run
for every change to a channel's connected line information outside of
normal dialplan execution.

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

Merged revisions 359609 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agochan_iax2: Fix use of uninitialized sockaddr_in in try_transfer().
Russell Bryant [Thu, 15 Mar 2012 00:53:23 +0000 (00:53 +0000)] 
chan_iax2: Fix use of uninitialized sockaddr_in in try_transfer().

Initialize a struct sockaddr_in in try_transfer() so that the code isn't
(potentially) trying to read from it while uninitialized.
........

Merged revisions 359558 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoBlocked revisions 359534
Russell Bryant [Thu, 15 Mar 2012 00:25:58 +0000 (00:25 +0000)] 
Blocked revisions 359534

........
chan_gtalk: Fix use of uninitialized vars in config handling.

Fix potential use of context, parkinglot, and prefs before they are
initialized.

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

13 years agochan_gtalk: Fix potential use of uninitialized variable.
Russell Bryant [Wed, 14 Mar 2012 23:46:21 +0000 (23:46 +0000)] 
chan_gtalk: Fix potential use of uninitialized variable.

Avoid potential use of idroster in gtalk_alloc() before it has been
initialized.
........

Merged revisions 359508 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoapp_chanisavail: Fix use of uninitialized variable.
Russell Bryant [Wed, 14 Mar 2012 23:28:32 +0000 (23:28 +0000)] 
app_chanisavail: Fix use of uninitialized variable.

Ensure that status is set before it is used by resetting it during each loop
iteration.  This could have resulted in incorrect results from this app.
........

Merged revisions 359486 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoudptl: Ensure fec[] in udptl_build_packet() is initialized.
Russell Bryant [Wed, 14 Mar 2012 23:02:43 +0000 (23:02 +0000)] 
udptl: Ensure fec[] in udptl_build_packet() is initialized.

Scan results indicated that this array could be used uninitialized.  At a quick
look, it looks correct.  In any case, initializing it is a Good Thing (tm).
........

Merged revisions 359457 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoapp.h: Always initialize AST_DECLARE_APP_ARGS().
Russell Bryant [Wed, 14 Mar 2012 22:37:01 +0000 (22:37 +0000)] 
app.h: Always initialize AST_DECLARE_APP_ARGS().

This patch ensures that the struct defined by AST_DECLARE_APP_ARGS() is always
fully initialized.  I'm not sure if this fixes any real bugs, but it silences
a bunch of warnings from coverity, and is generally a good thing to do anyway.
........

Merged revisions 359452 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix deadlock potential with some ast_indicate/ast_indicate_data calls.
Richard Mudgett [Wed, 14 Mar 2012 22:28:35 +0000 (22:28 +0000)] 
Fix deadlock potential with some ast_indicate/ast_indicate_data calls.

Calling ast_indicate()/ast_indicate_data() with the channel lock held can
result in a deadlock with a local channel because of how local channels
need to avoid deadlock.
........

Merged revisions 359451 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix incorrect jitter buffer overflow due to missed resynchronizations
Matthew Jordan [Wed, 14 Mar 2012 17:42:16 +0000 (17:42 +0000)] 
Fix incorrect jitter buffer overflow due to missed resynchronizations

When a change in time occurs, such that the timestamps associated with frames
being placed into an adaptive jitter buffer (implemented in jitterbuf.c)
are significantly different then the previously inserted frames, the jitter
buffer checks to see if it needs to be resynched to the new time frame.  If
three consecutive packets break the threshold, the jitter buffer resynchs
itself to the new timestamps.  This currently only occurs when history is
calculated, and hence only on JB_TYPE_VOICE frames.

JB_TYPE_CONTROL frames, on the other hand, are never passed to the history
calculations.  Because of this, if the jump in time is greater then the
maximum allowed length of the jitter buffer, the JB_TYPE_CONTROL frames are
dropped and no resynchronization occurs.  Alterntively, if the overfill
logic is not triggered, the JB_TYPE_CONTROL frame will be placed into the
buffer, but with a time reference that is not applicable.  Subsequent
JB_TYPE_VOICE frames will quickly trigger the overflow logic until reads
from the jitter buffer reach the errant JB_TYPE_CONTROL frame.

This patch allows JB_TYPE_CONTROL frames to resynch the jitter buffer.  As
JB_TYPE_CONTROL frames are unlikely to occur in multiples, it perform the
resynchronization on any JB_TYPE_CONTROL frame that breaks the resynch
threshold.

Note that this only impacts chan_iax2, as other consumers of the adaptive
jitter buffer use the abstract jitter buffer API, which does not use
JB_TYPE_CONTROL frames.

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

(closes issue ASTERISK-18964)
Reported by: Kris Shaw
Tested by: Kris Shaw, Matt Jordan
Patches:
  jitterbuffer-2012-2-26.diff uploaded by Kris Shaw (license 5722)
........

Merged revisions 359356 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix Dial m and r options and forked calls generating warnings for voice frames.
Richard Mudgett [Wed, 14 Mar 2012 17:24:00 +0000 (17:24 +0000)] 
Fix Dial m and r options and forked calls generating warnings for voice frames.

When connected line support was added, the wait_for_answer() variable
single changed its meaning slightly.  Unfortunately, the places where
single was used did not necessarily get updated to reflect that change.
Also audio/video frames were sent to all forked calls when the endpoints
were never made compatible.

* Don't pass audio/video media frames when the channels have not been made
compatible.

* Added handling of AST_CONTROL_SRCCHANGE to app_dial.c.

* Fixed app_dial.c passing on AST_CONTROL_HOLD because that frame can also
pass a requested MOH class.

(closes issue ASTERISK-16901)
Reported by: Chris Gentle

(closes issue ASTERISK-17541)
Reported by: clint

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

Merged revisions 359344 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix bogus reads/writes of console log levels in asterisk.c
Russell Bryant [Wed, 14 Mar 2012 10:54:50 +0000 (10:54 +0000)] 
Fix bogus reads/writes of console log levels in asterisk.c

This patch updates the NUMLOGLEVELS define in logger.h to 32, to match the fact
that logger.c implements 32 log levels (because of the custom log level stuff).
asterisk.c uses this define to size an array of levels per remote console.

This array is modified in ast_console_toggle_loglevel(), which is called by the
"logger set level" CLI command.  While the documentation for the CLI command
doesn't make it terribly obvious, you can use this CLI command to toggle a
custom log level on a remote console, as well.  However, doing so led to an
invalid array index in asterisk.c.

This array is read from any time a log message is written to a console.  So,
all custom log level messages resulted in a bogus read if a remote console
was connected.
........

Merged revisions 359259 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix invalid reads/writes due to incorrect sizeof().
Russell Bryant [Wed, 14 Mar 2012 10:04:03 +0000 (10:04 +0000)] 
Fix invalid reads/writes due to incorrect sizeof().

These few places in the code used sizeof() on h_addr in struct hostent.
This is sizeof(char *).  The correct way to get the size of this address is to
use h_length.  This error would result in reads/writes of 8 bytes instead of 4
on 64-bit machines.
........

Merged revisions 359211 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix inaccurate sizeof() in sched.c.
Russell Bryant [Wed, 14 Mar 2012 01:33:58 +0000 (01:33 +0000)] 
Fix inaccurate sizeof() in sched.c.

This code just needed sizeof(int), not sizeof(int *).
........

Merged revisions 359157 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix incorrect sizeof() in astman.
Russell Bryant [Wed, 14 Mar 2012 00:44:04 +0000 (00:44 +0000)] 
Fix incorrect sizeof() in astman.
........

Merged revisions 359116 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix incorrect usage of sizeof() in res_crypto.
Russell Bryant [Wed, 14 Mar 2012 00:38:26 +0000 (00:38 +0000)] 
Fix incorrect usage of sizeof() in res_crypto.

In this case, just remove the memset().  There was a redundant memset that is
done correctly just 2 lines later.
........

Merged revisions 359110 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix broken usage of sizeof() in res_adsi.
Russell Bryant [Wed, 14 Mar 2012 00:28:36 +0000 (00:28 +0000)] 
Fix broken usage of sizeof() in res_adsi.
........

Merged revisions 359088 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix incorrect sizeof() usage in features.c.
Russell Bryant [Wed, 14 Mar 2012 00:21:18 +0000 (00:21 +0000)] 
Fix incorrect sizeof() usage in features.c.

This didn't actually result in a bug anywhere, luckily.  The only place
where the result of these memcpys was used is in app_dial, and the only
field that it read out of ast_call_feature was the first one, which is an
int, so these memcpys always copied just enough to avoid a problem.
........

Merged revisions 359069 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix incorrect sizeof() on a pointer in MD5Final().
Russell Bryant [Wed, 14 Mar 2012 00:09:44 +0000 (00:09 +0000)] 
Fix incorrect sizeof() on a pointer in MD5Final().
........

Merged revisions 359059 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoDon't use a buffer after it goes out of scope.
Russell Bryant [Tue, 13 Mar 2012 23:59:35 +0000 (23:59 +0000)] 
Don't use a buffer after it goes out of scope.

's' is set to 'workspace'.  Make sure 'workspace' doesn't go out of scope while
the reference to it via 's' is still used.
........

Merged revisions 359056 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoDump cache of published events when a node joins the cluster.
Russell Bryant [Tue, 13 Mar 2012 23:46:23 +0000 (23:46 +0000)] 
Dump cache of published events when a node joins the cluster.

Also use a more reliable method for stopping the poll() thread.
........

Merged revisions 359053 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoRemove chan_usbradio and app_rpt.
Russell Bryant [Tue, 13 Mar 2012 23:38:01 +0000 (23:38 +0000)] 
Remove chan_usbradio and app_rpt.

These modules are being maintained outside of the tree and have been for a long
time now, so it doesn't make sense to keep them here.

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

Merged revisions 359050 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix setting CDR variables in the hangup extension
Terry Wilson [Tue, 13 Mar 2012 20:36:06 +0000 (20:36 +0000)] 
Fix setting CDR variables in the hangup extension

A previous CDR fix for setting CDR variables during a bridge via
custom dialplan features broke setting CDR variables in the
hangup extension. This patch fixes the issue.

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

Merged revisions 358978 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoMake hints for invalid SIP devices return Unavail, not idle
Terry Wilson [Tue, 13 Mar 2012 20:00:03 +0000 (20:00 +0000)] 
Make hints for invalid SIP devices return Unavail, not idle

This patch drastically simplifies the device state aggegation code.
The old method was not only overly complex, but also made it impossible
to return AST_DEVICE_INVALID from the aggregation code. The unit test
update is as a result of fixing that bug.

The SIP change stems from a bug introduced by removing a DNS lookup
for hostname-based SIP channels.

(closes issue ASTERISK-16702)
Review: https://reviewboard.asterisk.org/r/1808/
........

Merged revisions 358943 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoRequested changes documenting the fixed AEL functionality.
Tilghman Lesher [Tue, 13 Mar 2012 16:58:57 +0000 (16:58 +0000)] 
Requested changes documenting the fixed AEL functionality.
........

Merged revisions 358859 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoEnable macros in 1.8 to find the next highest "h" extension in a context, like in...
Tilghman Lesher [Tue, 13 Mar 2012 07:48:01 +0000 (07:48 +0000)] 
Enable macros in 1.8 to find the next highest "h" extension in a context, like in 1.4.

This change restores functionality that was present in 1.4, when AEL macros
were implemented with the Macro dialplan application.  Macros are fraught with
functionality issues, because they consume a large portion of the underlying
application stack.  This limits the ability of AEL users to call many layers
of subroutines, an issue which Gosub does not have (originally tested to
100,000 levels deep).  Therefore, starting in 1.6.0, AEL macros were
implemented with Gosub.

However, there were some implicit behaviors of Macro, which were not replicated
at the same time as with the transition to Gosub, one of which is documented in
the related issue.  In particular, the "h" extension is designed to execute not
in the Macro context, but in the topmost calling context.  Due to legacy issues
with a misapplied bugfix many years ago, when a macro exited in 1.4, it looks
in all calling contexts, bubbling up from the deepest level until it finds an
"h" extension.

Since AEL hides the complexity of the underlying dialplan logic from the AEL
programmer, it's reasonable to assume that this behavior should not change in
the transition from Asterisk 1.4 LTS to Asterisk 1.8 LTS, lest we break
working AEL configurations in the transition to Asterisk 1.8 LTS.  This fix
is the result, which implements a search for the "h" extension in all calling
Gosub contexts.

Fixes ASTERISK-19336

Patch: 20120308__ael_bugfix_for_trunk__2.diff (License #5003) by Tilghman Lesher
(with slight modifications for 1.8)

Tested by: Johan Wilfer

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

Merged revisions 358810 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoMake transfer not ignore port information with SIP.
Jonathan Rose [Thu, 8 Mar 2012 16:50:45 +0000 (16:50 +0000)] 
Make transfer not ignore port information with SIP.

Attempting to transfer with SIP to an address like 1XXXXX@ip.ad.re.ss:5061 would fail
because port would be cut from the host string and ignored. This simply keeps chan_sip
from cutting off the port number during these kinds of transfers.

(closes issue ASTERISK-19321)
Reported by: Federico Alves
Review: https://reviewboard.asterisk.org/r/1790/diff/#index_header
........

Merged revisions 358643 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoChange directly setting _softhangup in sig_ss7.c to use ast_softhangup_nolock().
Richard Mudgett [Wed, 7 Mar 2012 18:28:09 +0000 (18:28 +0000)] 
Change directly setting _softhangup in sig_ss7.c to use ast_softhangup_nolock().

Update to:
(issue ASTERISK-19372)
........

Merged revisions 358530 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoReturn g729 and g723.1 frames with the number of samples set properly.
Sean Bright [Wed, 7 Mar 2012 16:13:45 +0000 (16:13 +0000)] 
Return g729 and g723.1 frames with the number of samples set properly.

If the wctc4xxp returns more than a single packet, we need to update the number
of samples in the returned frame accordingly.

Acked-by: Shaun Ruffell <sruffell@digium.com>
........

Merged revisions 358484 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoSet snarkiness = 0 in cdr_adaptive_odbc.conf.sample
Terry Wilson [Wed, 7 Mar 2012 15:17:55 +0000 (15:17 +0000)] 
Set snarkiness = 0 in cdr_adaptive_odbc.conf.sample
........

Merged revisions 358438 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoAdd detection for ODBC WCHAR fields
Terry Wilson [Wed, 7 Mar 2012 15:07:04 +0000 (15:07 +0000)] 
Add detection for ODBC WCHAR fields

Without detecting these types, cel_odbc blows up when the character
set for the table is utf8. This also wraps cdr_adaptive_odbc's use of
those types in the HAVE_ODBC_WCHAR #ifdef seen in other parts of the
code.
........

Merged revisions 358435 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix ring cadance setup for outgoing calls on FXS ports.
Richard Mudgett [Tue, 6 Mar 2012 17:46:19 +0000 (17:46 +0000)] 
Fix ring cadance setup for outgoing calls on FXS ports.

* Fix referencing the wrong variable in chan_dahdi.c:my_set_cadence().

Thanks to Sean Bright for compiling with -Wshadow and finding this bug.
........

Merged revisions 358377 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoDrop SS7 call if not connected yet when INCOMPLETE/BUSY/CONGESTION.
Richard Mudgett [Mon, 5 Mar 2012 22:24:04 +0000 (22:24 +0000)] 
Drop SS7 call if not connected yet when INCOMPLETE/BUSY/CONGESTION.

SS7 is a trunk protocol and should clear a failed call as soon as
possible.

* Made SS7 hangup a call immediately if it has not connected yet for
INCOMPLETE/BUSY/CONGESTION causes.  Otherwise, play an appropriate inband
tone.

(closes issue ASTERISK-19372)
Reported by: Igor Nikolaev
........

Merged revisions 358278 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoSetup DSP when SS7 call is connected or early media is available.
Richard Mudgett [Mon, 5 Mar 2012 21:38:50 +0000 (21:38 +0000)] 
Setup DSP when SS7 call is connected or early media is available.

Outgoing SS7 calls fail to detect incoming DTMF so any bridged channel
that requires out-of-band DTMF will not work.

* Added sig_ss7_open_media() calls at appropriate places in sig_ss7.c.
The new call converts conditionaled out unconverted code and shows that
the code really did something useful.

* Improved some chan_dahdi DTMF debug messages to help track DTMF
handling.

(closes issue ASTERISK-19312)
Reported by: Igor Nikolaev
........

Merged revisions 358260 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoEliminate double close of file descriptor in manager.c
Jonathan Rose [Mon, 5 Mar 2012 18:58:40 +0000 (18:58 +0000)] 
Eliminate double close of file descriptor in manager.c

The process_output function in manager.c attempted to call fclose and close immediately
afterwards. Since fclose implies close, this resulted in a potential double free on file
descriptors. This patch changes that behavior and also adds error checking to fclose and
close depending on which was deemed necessary. Also error messages. Thanks to Rosen
Iliev for pointing out the location of the problem.

(closes issue ASTERISK-18453)
Reported By: Jaco Kroon
Review: https://reviewboard.asterisk.org/r/1793/
........

Merged revisions 358214 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoDefer sending the connected line reinvite if a reinvite is already in progress.
Joshua Colp [Mon, 5 Mar 2012 16:42:44 +0000 (16:42 +0000)] 
Defer sending the connected line reinvite if a reinvite is already in progress.

(issue ASTERISK-19355)
Reported by: tomaso

(closes issue AST-825)
........

Merged revisions 358162 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoEnsure Asterisk acknowledges ACKs to 4xx on Replaces errors
Kinsey Moore [Mon, 5 Mar 2012 15:59:46 +0000 (15:59 +0000)] 
Ensure Asterisk acknowledges ACKs to 4xx on Replaces errors

Asterisk was not setting pendinginvite in the upper half of
handle_request_invite such that the 4xx was retransmitted repeatedly even
though an ack was received for every retransmission.

(closes issue ASTERISK-19303)
Reported by: Jon Tsiros
Patches:
  fix-19303.patch uploaded by Jeremiah Gowdy (license 6358)

........

Merged revisions 358115 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix unused-but-set-variable warnings
Terry Wilson [Fri, 2 Mar 2012 23:28:21 +0000 (23:28 +0000)] 
Fix unused-but-set-variable warnings

All of these were pretty obviously unused. Some were unused because
the code that used them was #if 0'd. In those cases, I just commented
out the unused-but-set variables.
........

Merged revisions 358029 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoCorrect some set-but-unused variable warnings in the mISDN library.
Terry Wilson [Fri, 2 Mar 2012 23:23:01 +0000 (23:23 +0000)] 
Correct some set-but-unused variable warnings in the mISDN library.

(from kpfleming's commit to trunk r356292)
........

Merged revisions 358011 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoMake chan_usbradio compile under dev mode
Terry Wilson [Fri, 2 Mar 2012 22:14:15 +0000 (22:14 +0000)] 
Make chan_usbradio compile under dev mode

x=++x and x=x=1? Really?
........

Merged revisions 357986 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix case-sensitivity for device-specific event subscriptions and CCSS
Kinsey Moore [Fri, 2 Mar 2012 21:03:11 +0000 (21:03 +0000)] 
Fix case-sensitivity for device-specific event subscriptions and CCSS

This change fixes case-sensitivity for device-specific subscriptions such that
the technology identifier is case-insensitive while the remainder of the device
string is still case-sensitive.  This should also preserve the original case of
the device string as passed in to the event system.  CCSS is the only feature
affected as it is the only consumer of device-specific event subscriptions.

The second part of this patch addresses similar case-sensitivity issues within
CCSS itself that prevented it from functioning correctly after the fix to the
events system.

This adds a unit test to verify that the event system works as expected.

(closes issue ASTERISK-19422)
Review: https://reviewboard.asterisk.org/r/1780/
........

Merged revisions 357940 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoRemove ISDN hold restriction for non-bridged calls.
Richard Mudgett [Fri, 2 Mar 2012 18:37:15 +0000 (18:37 +0000)] 
Remove ISDN hold restriction for non-bridged calls.

The check if an ISDN call is bridged before it could be placed on hold is
not necessary and is overly restrictive.  The check was originally done to
prevent problems with call transfers in case a user tried to transfer a
call connected to an application to another call connected to an
application.  The ISDN transfer code has not required this restriction for
quite some time because ECT could transfer any two active calls to each
other.

* Remove ISDN hold restriction for calls connected to applications.

* Made ast_waitfordigit_full() ignore AST_CONTROL_HOLD and
AST_CONTROL_UNHOLD instead of generating a warning message.

(closes issue ASTERISK-19388)
Reported by: Birger Harzenetter
Tested by: rmudgett
........

Merged revisions 357894 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoThe default value for mohinterpret is the empty string, so when resetting to
Sean Bright [Fri, 2 Mar 2012 15:59:50 +0000 (15:59 +0000)] 
The default value for mohinterpret is the empty string, so when resetting to
default values don't explicitly set the value to "default."
........

Merged revisions 357811 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix channel reference leak in ChanSpy.
Richard Mudgett [Fri, 2 Mar 2012 15:50:59 +0000 (15:50 +0000)] 
Fix channel reference leak in ChanSpy.

* Fix next_channel() channel reference leak in ChanSpy.

(closes issue ASTERISK-19461)
Reported by: Irontec
Patches:
      app_chanspy_iteartor_next_unref.patch (license #6213) patch uploaded by Irontec

(issue ASTERISK-17515)
........

Merged revisions 357809 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoFix race condition that can cause important control frames (such as a hangup) to...
Mark Michelson [Fri, 2 Mar 2012 01:05:23 +0000 (01:05 +0000)] 
Fix race condition that can cause important control frames (such as a hangup) to be missed.

This takes two actions.

1. Move the reading of the alertpipe in __ast_read() to immediately before the
removal of frames from the readq. This means we won't do something silly like
read from the alertpipe, then ignore the fact that there's a frame to get from
the readq since channel's fdno is the AST_TIMING_FD.

2. When ast_settimeout() sets the rate to 0 and the timingfunc to NULL, if the
channel's fdno is the AST_TIMING_FD, then set the fdno to -1. This is because
if the rate is 0 and the timingfunc is NULL, it means that the channel's timing
fd is being invalidated, so any pending reads should not occur.

This may actually solve more issues than the referenced one below, but it's not
known at this time for sure.

(closes issue ASTERISK-19223)
reported by Frank-Michael Wittig

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

Merged revisions 357761 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

13 years agoPrevent outbound SIP NOTIFY packets from displaying a port of 0
Kinsey Moore [Thu, 1 Mar 2012 14:18:49 +0000 (14:18 +0000)] 
Prevent outbound SIP NOTIFY packets from displaying a port of 0

In the change from 1.6.2 to 1.8, ast_sockaddr was introduced which changed the
behavior of ast_find_ourip such that port number was wiped out.  This caused
the port in internip (which is used for Contact and Call-ID on NOTIFYs) to be
0.  This change causes ast_find_ourip to be port-preserving again.

(closes issue ASTERISK-19430)
........

Merged revisions 357665 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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