asterisk/asterisk.git
10 years agoUpdate supported file extensions in doxygen.
Leif Madsen [Tue, 20 Apr 2010 12:38:47 +0000 (12:38 +0000)]
Update supported file extensions in doxygen.

Updated the doxygen \arg line after looking at the file for some other Asterisk documentation
and noticing they weren't up to date. Thanks to seanbright for looking at the code for me :)

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

10 years agoChange log message to match severity.
Jason Parker [Mon, 19 Apr 2010 21:57:56 +0000 (21:57 +0000)]
Change log message to match severity.

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

10 years agoDon't consider a missing indications.conf to be a critical error.
Jason Parker [Mon, 19 Apr 2010 21:49:30 +0000 (21:49 +0000)]
Don't consider a missing indications.conf to be a critical error.

There were many changes in revision 176627 which would avoid the error that a
missing config would have caused.  Other than this, there are no other config
files (including asterisk.conf, surprisingly) that are required.

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

10 years agoBad merge fix
Tilghman Lesher [Mon, 19 Apr 2010 19:23:41 +0000 (19:23 +0000)]
Bad merge fix

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

10 years agoBlocked revisions 257856 via svnmerge
Jeff Peeler [Mon, 19 Apr 2010 19:10:18 +0000 (19:10 +0000)]
Blocked revisions 257856 via svnmerge

........
  r257856 | jpeeler | 2010-04-19 14:09:46 -0500 (Mon, 19 Apr 2010) | 1 line

  make app_voicemail compile with IMAP_STORAGE
........

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

10 years agoCommit compromise I suggested on review 608.
Mark Michelson [Mon, 19 Apr 2010 18:42:31 +0000 (18:42 +0000)]
Commit compromise I suggested on review 608.

This allows for multiple SRV queries to be done
from the dialplan for the same service on a single call while
still allowing one to bypass the call to SRVQUERY if they so
please.

Taking action since no comments had been left for a while.
This can easily be reverted if needed. External tests
still pass.

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

10 years agoFix incomplete CDR merge from r195881
Terry Wilson [Mon, 19 Apr 2010 17:57:41 +0000 (17:57 +0000)]
Fix incomplete CDR merge from r195881

Because res/res_features.c was removed and main/cdr.c added, these changes
didn't make it to trunk and the 1.6.x branches

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

10 years agoRemoving unused configuration parameters
Tilghman Lesher [Sun, 18 Apr 2010 17:25:53 +0000 (17:25 +0000)]
Removing unused configuration parameters

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

10 years agoMerged revisions 257686 via svnmerge from
Dwayne M. Hubbard [Fri, 16 Apr 2010 21:22:30 +0000 (21:22 +0000)]
Merged revisions 257686 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r257686 | dhubbard | 2010-04-16 16:15:43 -0500 (Fri, 16 Apr 2010) | 21 lines

  Make the mixmonitor thread process audio frames faster

  Mantis issue 17078 reports MixMonitor recordings have shorter durations than
  the call duration.  This was because the mixmonitor thread was not processing
  frames from the audiohook fast enough.  The mixmonitor thread would slowly fall
  behind the most recent audio frame and when the channel hangs up, the mixmonitor
  thread would exit without processing the same number of frames as the channel;
  leaving the mixmonitor recording shorter than actual call duration.

  This revision fixes this issue by moving the ast_audiohook_trigger_wait() and
  the subsequent audiohook.status check into the block where the
  ast_audiohook_read_frame() function returns NULL.

  (closes issue #17078)
  Reported by: geoff2010
  Patches:
        dw-M17078.patch uploaded by dhubbard (license 733)
  Tested by: dhubbard, geoff2010

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

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

10 years agoMake sure to fail a monitor if we receive a negative response for a CC SUBSCRIBE.
Mark Michelson [Fri, 16 Apr 2010 19:50:43 +0000 (19:50 +0000)]
Make sure to fail a monitor if we receive a negative response for a CC SUBSCRIBE.

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

10 years agoEnable PRI SERVICE message support in chan_dahdi for the 'national' switchtype
Dwayne M. Hubbard [Fri, 16 Apr 2010 19:25:30 +0000 (19:25 +0000)]
Enable PRI SERVICE message support in chan_dahdi for the 'national' switchtype

Revision 1072 of libpri added SERVICE message support for the 'national'
switchtype. The attached patch enables the use of 'pri service' CLI commands
on dahdi channels that are configured for the 'national' switchtype.

(closes issue #17142)
Reported by: dhubbard
Patches:
      dw-ni2.patch uploaded by dhubbard (license 733)
Tested by: elguero, dhubbard

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

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

10 years agoMerged revisions 257544 via svnmerge from
Tilghman Lesher [Thu, 15 Apr 2010 21:26:19 +0000 (21:26 +0000)]
Merged revisions 257544 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r257544 | tilghman | 2010-04-15 16:23:24 -0500 (Thu, 15 Apr 2010) | 6 lines

  Allow application options with arguments to contain parentheses, through a variety of escaping techniques.

  Fixes SWP-1194 (ABE-2143).

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

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

10 years agoMerged revisions 257467 via svnmerge from
Tilghman Lesher [Thu, 15 Apr 2010 20:30:15 +0000 (20:30 +0000)]
Merged revisions 257467 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r257467 | tilghman | 2010-04-15 15:24:50 -0500 (Thu, 15 Apr 2010) | 13 lines

  Don't recreate peer, when responding to a repeated deregistration attempt.

  When a reply to a deregistration is lost in transmit, the client retries the
  deregistration.  Previously, this would cause a realtime/autocreate peer to be
  loaded back into memory, after it had already been correctly purged.  Instead,
  we just want to resend the reply without loading the peer.

  (closes issue #16908)
   Reported by: kkm
   Patches:
         20100412__issue16908.diff.txt uploaded by tilghman (license 14)
   Tested by: kkm
........

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

10 years agoMerged revisions 257426 via svnmerge from
Leif Madsen [Thu, 15 Apr 2010 19:41:05 +0000 (19:41 +0000)]
Merged revisions 257426 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r257426 | lmadsen | 2010-04-15 14:40:33 -0500 (Thu, 15 Apr 2010) | 13 lines

  Update backtrace.txt documentation.

  Update the backtrace.txt documentation so it conforms to the same layout as
  other documents we've been working on recently. Additionally, add a bunch of
  new information about gathering backtraces for crashes and deadlocks, along
  with ways of verifying your file before uploading it. Create a couple of one
  line commands for people to generate the files we need.

  (closes issue #17190)
  Reported by: lmadsen
  Patches:
        backtrace.txt.patch-2 uploaded by lmadsen (license 10)
  Tested by: lmadsen, pabelanger
........

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

10 years agoMerged revisions 257342 via svnmerge from
Leif Madsen [Thu, 15 Apr 2010 13:44:38 +0000 (13:44 +0000)]
Merged revisions 257342 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r257342 | lmadsen | 2010-04-15 08:41:45 -0500 (Thu, 15 Apr 2010) | 1 line

  Update address of the bug tracker.
........

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

10 years agoBlocked revisions 257266 via svnmerge
Tilghman Lesher [Wed, 14 Apr 2010 23:08:52 +0000 (23:08 +0000)]
Blocked revisions 257266 via svnmerge

........
  r257266 | tilghman | 2010-04-14 18:08:11 -0500 (Wed, 14 Apr 2010) | 10 lines

  When forwarding a message, ensure that prepending works correctly.

  This is a regression in 1.4, only.

  (closes issue #17103)
   Reported by: mglazer
   Patches:
         20100408__issue17103.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........

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

10 years agoYet another issue where the conversion of the application delimiter to comma caused...
Tilghman Lesher [Wed, 14 Apr 2010 22:57:35 +0000 (22:57 +0000)]
Yet another issue where the conversion of the application delimiter to comma caused an issue.

Application arguments within the feature map could possibly contain a comma,
which conflicts with the syntax of the features.conf configuration file.  This
patch allows the argument to be wrapped in parentheses or quoted, to allow the
application arguments to be interpreted as a single configuration parameter.

(closes issue #16646)
 Reported by: pinga-fogo
 Patches:
       20100414__issue16646.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman

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

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

10 years agoAlso unref the pvt when we delete the provisional keepalive job.
Tilghman Lesher [Tue, 13 Apr 2010 19:17:48 +0000 (19:17 +0000)]
Also unref the pvt when we delete the provisional keepalive job.

(closes issue #16774)
 Reported by: kowalma
 Patches:
       20100315__issue16774.diff.txt uploaded by tilghman (license 14)
 Tested by: falves11, jamicque

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

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

10 years agoMerged revisions 257070 via svnmerge from
Matthew Nicholson [Tue, 13 Apr 2010 18:10:30 +0000 (18:10 +0000)]
Merged revisions 257070 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r257070 | mnicholson | 2010-04-13 11:46:30 -0500 (Tue, 13 Apr 2010) | 9 lines

  Add an option to restore past broken behavor of the Events manager action

  Before r238915, certain values for the EventMask parameter of the Events action would result in no response being returned.  This patch adds an option to restore that broken behavior.  Also while fixing this bug I discovered that passing an empty EventMasks parameter would also result in no response being returned, this has been fixed as well while being preserved when the broken behavior is requested.

  (closes issue #17023)
  Reported by: nblasgen

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

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

10 years agoEnsure that we can have commas within cdr values.
Tilghman Lesher [Tue, 13 Apr 2010 16:33:21 +0000 (16:33 +0000)]
Ensure that we can have commas within cdr values.

(closes issue #17001)
 Reported by: snuffy
 Patches:
       20100412__issue17001.diff.txt uploaded by tilghman (license 14)
 Tested by: snuffy

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

10 years agoUpdate sample dialstrings in sip.conf.sample file.
Mark Michelson [Tue, 13 Apr 2010 16:18:16 +0000 (16:18 +0000)]
Update sample dialstrings in sip.conf.sample file.

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

10 years agoAddress Russell's comments on func_srv from reviewboard.
Mark Michelson [Tue, 13 Apr 2010 16:15:36 +0000 (16:15 +0000)]
Address Russell's comments on func_srv from reviewboard.

* Change copyright date
* Place channel in autoservice when doing SRV lookup
* Get rid of trailing whitespace
* Change logic in load_module function

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

10 years agoFix issue where recall would not happen when it should.
Mark Michelson [Mon, 12 Apr 2010 22:27:07 +0000 (22:27 +0000)]
Fix issue where recall would not happen when it should.

Specifically, the situation would happen when multiple
callers would request CC for a single generically-monitored
device. If the monitored device became available but the
caller did not answer the recall, then there was nothing
that would poke the CC core to let it know that it should
attempt to recall someone else instead.

After careful consideration, I came to the conclusion that
the only area of Asterisk that needed to be touched was the
generic CC monitor. All other types of CC would require something
outside of Asterisk to invoke a recall for a separate device.

This was accomplished by changing the generic monitor destructor
to poke other generic monitor instances if the device is currently
available and the specific instance was currently not suspended.

In order to not accidentally trigger recalls at bad times, the
fit_for_recall flag was also added to the generic_monitor_instance_list
struct. This gets set as soon as a monitored device becomes available.
It gets cleared if a CCNR request triggers the creation of a new
generic monitor instance. By doing this, we don't accidentally try
to recall a device when the monitored device was being monitored
for CCNR and never actually became available for recall in the first
place.

This error was discovered by Steve Pitts during in-house testing
at Digium.

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

10 years agoMerged revisions 256900 via svnmerge from
Leif Madsen [Mon, 12 Apr 2010 17:29:53 +0000 (17:29 +0000)]
Merged revisions 256900 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r256900 | lmadsen | 2010-04-12 12:29:26 -0500 (Mon, 12 Apr 2010) | 15 lines

  Add How-To document on collecting debugging info for issues.asterisk.org

  Paul Belanger has been helping a lot with bug tracking recently and created
  this document that we can now point to when additional debugging information
  is required. This document will help those filing issues to know how to get
  the information required when filing their issues. This will make things
  easier on the developers.

  Initial text and changes by pabelanger. Tweaks and editing by myself.

  (closes issue #17159)
  Reported by: pabelanger
  Patches:
        HOWTO_collect_debug_information.txt.patch uploaded by lmadsen (license 10)
  Tested by: tzafrir, pabelanger, lmadsen
........

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

10 years agoRemove silly debug message that is not useful.
Leif Madsen [Mon, 12 Apr 2010 16:16:43 +0000 (16:16 +0000)]
Remove silly debug message that is not useful.

(issue #17159)

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

10 years agogives channel reference before unlocking it and using setvar helper.
David Vossel [Mon, 12 Apr 2010 14:47:16 +0000 (14:47 +0000)]
gives channel reference before unlocking it and using setvar helper.

To guarantee the channel is valid when calling setvar on the MASTER_CHANNEL
dialplan function, a channel reference must be taken before unlocking. Thanks
to russell for pointing out the error.

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

10 years agoCLI command logger set level auto complete.
Leif Madsen [Mon, 12 Apr 2010 14:39:37 +0000 (14:39 +0000)]
CLI command logger set level auto complete.

A simple patch to enable auto tab complete.

(closes issue #17152)
Reported by: pabelanger
Patches:
      0017152.patch uploaded by pabelanger (license 224)

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

10 years agotest_substitution expects func_curl to be present to work.
Russell Bryant [Mon, 12 Apr 2010 02:19:02 +0000 (02:19 +0000)]
test_substitution expects func_curl to be present to work.

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

10 years agoAdd ASTERISK_FILE_VERSION() macro
Russell Bryant [Sun, 11 Apr 2010 22:04:01 +0000 (22:04 +0000)]
Add ASTERISK_FILE_VERSION() macro

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

10 years agofix hyphen vs. minus in man pages
Tzafrir Cohen [Sat, 10 Apr 2010 08:33:57 +0000 (08:33 +0000)]
fix hyphen vs. minus in man pages

In troff '-' is used for a hyphen. A minus is denoted by '\-' . This is
normally also used for a dash.

This patch converts all '-'-s that are minuses or dashes to '\-'.

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

10 years agoRemove status_response callbacks where they are not needed.
Mark Michelson [Fri, 9 Apr 2010 22:20:22 +0000 (22:20 +0000)]
Remove status_response callbacks where they are not needed.

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

10 years agoPrevent crash when originating a call to a local channel.
Mark Michelson [Fri, 9 Apr 2010 21:41:30 +0000 (21:41 +0000)]
Prevent crash when originating a call to a local channel.

Call completion code tries to grab the call completion parameters
from the requesting channel during local_request. When originating
a call to a local channel, however, this channel is NULL. This
was causing an issue for me when trying to run a test script.

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

10 years agoMerge CCSS architecture document from CCSS branch.
Richard Mudgett [Fri, 9 Apr 2010 19:46:54 +0000 (19:46 +0000)]
Merge CCSS architecture document from CCSS branch.

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

10 years agoRemove PRI CCSS BUGBUG message and update configure script.
Richard Mudgett [Fri, 9 Apr 2010 16:43:30 +0000 (16:43 +0000)]
Remove PRI CCSS BUGBUG message and update configure script.

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

10 years agoAdd routines for parsing SIP URIs consistently.
Mark Michelson [Fri, 9 Apr 2010 16:04:16 +0000 (16:04 +0000)]
Add routines for parsing SIP URIs consistently.

From the original issue report opened by Nick Lewis:
Many sip headers in many sip methods contain the ABNF structure
 name-andor-addr = name-addr / addr-spec
 Examples include the to-header, from-header, contact-header, replyto-header

 At the moment chan_sip.c makes various different attempts to parse this name-andor-addr structure for each header type and for each sip method with sometimes limited degrees of success.

 I recommend that this name-andor-addr structure be parsed by a dedicated function and that it be used irrespective of the specific method or header that contains the name-andor-addr structure

Nick has also included unit tests for verifying these routines as well, so...heck yeah.

(closes issue #16708)
Reported by: Nick_Lewis
Patches:
      reqresp_parser-nameandoraddr2.patch uploaded by Nick Lewis (license 657

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

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

10 years agoFix some compiler errors that popped up after the CCSS merge.
Mark Michelson [Fri, 9 Apr 2010 15:56:55 +0000 (15:56 +0000)]
Fix some compiler errors that popped up after the CCSS merge.

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

10 years agoMerge Call completion support into trunk.
Mark Michelson [Fri, 9 Apr 2010 15:31:32 +0000 (15:31 +0000)]
Merge Call completion support into trunk.

From Reviewboard:
CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date
overview of the architecture can be found in the file doc/CCSS_architecture.pdf
in the CCSS branch. Off the top of my head, the big differences between what is
implemented and what is in the document are as follows:

1. We did not end up modifying the Hangup application at all.
2. The document states that a single call completion monitor may be used across
   multiple calls to the same device. This proved to not be such a good idea
   when implementing protocol-specific monitors, and so we ended up using one
   monitor per-device per-call.
3. There are some configuration options which were conceived after the document
   was written. These are documented in the ccss.conf.sample that is on this
   review request.

For some basic understanding of terminology used throughout this code, see the
ccss.tex document that is on this review.

This implements CCBS and CCNR in several flavors.

First up is a "generic" implementation, which can work over any channel technology
provided that the channel technology can accurately report device state. Call
completion is requested using the dialplan application CallCompletionRequest and can
be canceled using CallCompletionCancel. Device state subscriptions are used in order
to monitor the state of called parties.

Next, there is a SIP-specific implementation of call completion. This method uses the
methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion
using SIP signaling. There are a few things to note here:

* The agent/monitor terminology used throughout Asterisk sometimes is the reverse of
  what is defined in the referenced draft.

* Implementation of the draft required support for SIP PUBLISH. I attempted to write
  this in a generic-enough fashion such that if someone were to want to write PUBLISH
  support for other event packages, such as dialog-state or presence, most of the effort
  would be in writing callbacks specific to the event package.

* A subportion of supporting PUBLISH reception was that we had to implement a PIDF
  parser. The PIDF support added is a bit minimal. I first wrote a validation
  routine to ensure that the PIDF document is formatted properly. The rest of the
  PIDF reading is done in-line in the call-completion-specific PUBLISH-handling
  code. In other words, while there is PIDF support here, it is not in any state
  where it could easily be applied to other event packages as is.

Finally, there are a variety of ISDN-related call completion protocols supported. These
were written by Richard Mudgett, and as such I can't really say much about their
implementation. There are notes in the CHANGES file that indicate the ISDN protocols
over which call completion is supported.

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

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

10 years agofunc_srv and explicit specification of a remote IP for SIP.
Mark Michelson [Fri, 9 Apr 2010 14:37:50 +0000 (14:37 +0000)]
func_srv and explicit specification of a remote IP for SIP.

From Review Board:
There are two interrelated changes here.

First, there is the introduction of func_srv. This adds two new read-only
dialplan functions, SRVQUERY and SRVRESULT. They work very similarly to the
ENUMQUERY and ENUMRESULT functions, except that this allows one to query SRV
records instead. In order to facilitate this work, I added a couple of new API
calls to srv.h. ast_srv_get_record_count tells the number of records returned
by an SRV lookup. This number is calculated at the time of the SRV lookup.
ast_srv_get_nth_record allows one to get a numbered SRV record.

Second, there is the modification to chan_sip that allows one to specify a
hostname or IP address (along with a port) to send an outgoing INVITE to when
dialing a SIP peer. This goes hand-in-hand with func_srv. You can query SRV
records and then use the host and port from the results to dial via a specific
host instead of what is configured in sip.conf.

Review: https://reviewboard.asterisk.org/r/608
SWP-1200

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

10 years agoEnsure that linker version scripts (used for symbol export control) always exist.
Kevin P. Fleming [Thu, 8 Apr 2010 16:35:10 +0000 (16:35 +0000)]
Ensure that linker version scripts (used for symbol export control) always exist.

Using wildcard matching in the Makefile is not adequate to determine whether
an export file should exist for a module or not, so instead we'll just
create one if the module needs one, or copy the default one if it does not.

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

10 years agoMac OS X does not support comparing a mutex to its initializer. Create a test for...
Tilghman Lesher [Tue, 6 Apr 2010 19:28:42 +0000 (19:28 +0000)]
Mac OS X does not support comparing a mutex to its initializer.  Create a test for this.

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

10 years agofixes deadlock in chan_sip caused by usage of MASTER_CHANNEL dialplan function
David Vossel [Tue, 6 Apr 2010 14:42:10 +0000 (14:42 +0000)]
fixes deadlock in chan_sip caused by usage of MASTER_CHANNEL dialplan function

(closes issue #16767)
Reported by: lmsteffan
Patches:
      deadlock_16767v3.diff uploaded by dvossel (license 671)

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

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

10 years agoMerged revisions 256225 via svnmerge from
Richard Mudgett [Tue, 6 Apr 2010 00:39:44 +0000 (00:39 +0000)]
Merged revisions 256225 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r256225 | rmudgett | 2010-04-05 19:10:16 -0500 (Mon, 05 Apr 2010) | 5 lines

  DAHDI/PRI call to pri_channel_bridge() not protected by PRI lock.

  SWP-1231
  ABE-2163
........

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

10 years agoFix for localchannel.tex to allow PDFs to be generated again.
Leif Madsen [Mon, 5 Apr 2010 15:14:53 +0000 (15:14 +0000)]
Fix for localchannel.tex to allow PDFs to be generated again.

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

10 years agoConsolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.
Richard Mudgett [Sat, 3 Apr 2010 02:12:33 +0000 (02:12 +0000)]
Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.

SWP-1229
ABE-2161

* Ensure chan_local.c:local_call() will not leak cid.cid_dnid when
copying.

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

10 years agoUsing the Dial application f option when the call is forwarded will likely crash.
Richard Mudgett [Sat, 3 Apr 2010 01:42:32 +0000 (01:42 +0000)]
Using the Dial application f option when the call is forwarded will likely crash.

Fix app_dial.c:do_forward() OPT_FORCECLID setting cid.cid_num with a stack
allocated string instead of a heap allocated string.

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

10 years agoExport MEETMEBOOKID and fix pin-less conferences with realtime conferences
Russell Bryant [Fri, 2 Apr 2010 23:55:57 +0000 (23:55 +0000)]
Export MEETMEBOOKID and fix pin-less conferences with realtime conferences

(closes issue #16866)
Reported by: DEA
Patches:
      rt-meetme-options.txt uploaded by DEA (license 3)
Tested by: DEA

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

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

10 years agoMerged revisions 256014 via svnmerge from
Russell Bryant [Fri, 2 Apr 2010 23:46:45 +0000 (23:46 +0000)]
Merged revisions 256014 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r256014 | russell | 2010-04-02 18:45:56 -0500 (Fri, 02 Apr 2010) | 9 lines

  Resolve a deadlock that occurs due to a pointless call to ast_bridged_channel()

  (closes issue #16840)
  Reported by: bzing2
  Patches:
        patch.txt uploaded by bzing2 (license 902)
        issue_16840.rev1.diff uploaded by russell (license 2)
  Tested by: bzing2, russell
........

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

10 years agoMerged revisions 256009 via svnmerge from
Russell Bryant [Fri, 2 Apr 2010 23:30:58 +0000 (23:30 +0000)]
Merged revisions 256009 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r256009 | russell | 2010-04-02 18:30:15 -0500 (Fri, 02 Apr 2010) | 2 lines

  Remove extremely verbose debug message.
........

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

10 years agoPass the PID of the Asterisk process, not the PID of the canary.
Tilghman Lesher [Fri, 2 Apr 2010 20:19:01 +0000 (20:19 +0000)]
Pass the PID of the Asterisk process, not the PID of the canary.

(closes issue #17065)
 Reported by: globalnetinc
 Patches:
       astcanary.patch uploaded by makoto (license 38)
 Tested by: frawd, globalnetinc

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

10 years agoAllow symbol export filtering to work properly on platforms that have symbol prefixes.
Kevin P. Fleming [Fri, 2 Apr 2010 18:57:58 +0000 (18:57 +0000)]
Allow symbol export filtering to work properly on platforms that have symbol prefixes.

Some platforms prefix externally-visible symbols in object files generated
from C sources (most commonly, '_' is the prefix). On these platforms,
the existing symbol export filtering process ends up suppressing all the symbols
that are supposed to be left visible. This patch allows the prefix string
to be supplied to the top-level Makefile in the LINKER_SYMBOL_PREFIX variable,
and then generates the linker scripts as required to include the prefix
supplied.

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

10 years agoIgnore Redial softkey when no previous dialed number is known
Michiel van Baak [Fri, 2 Apr 2010 06:45:54 +0000 (06:45 +0000)]
Ignore Redial softkey when no previous dialed number is known

(closes issue #17126)
Reported by: wedhorn
Patches:
      skinny79xx_redial1.diff uploaded by wedhorn (license 30)

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

10 years agoCleanup transmit_* functions
Michiel van Baak [Fri, 2 Apr 2010 06:43:31 +0000 (06:43 +0000)]
Cleanup transmit_* functions

Bulk lot of generally trivial changes for cleaning up the transmit stuff. Line state request has been modified for line only responses.

(closes issue #16994)
Reported by: wedhorn
Patches:
      skinny-clean07.diff uploaded by wedhorn (license 30)
Tested by: wedhorn

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

10 years agoFix DEBUG_THREADS build on Darwin.
Tilghman Lesher [Thu, 1 Apr 2010 18:16:37 +0000 (18:16 +0000)]
Fix DEBUG_THREADS build on Darwin.

(closes issue #16828)
 Reported by: oej
 Patches:
       20100331__issue16828.diff.txt uploaded by tilghman (license 14)

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

10 years agoRemoved documentation of the non existent 'both' option to 'faxdetect' in sip.conf
Matthew Nicholson [Thu, 1 Apr 2010 16:09:26 +0000 (16:09 +0000)]
Removed documentation of the non existent 'both' option to 'faxdetect' in sip.conf

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

10 years agoFix improper comaparison of anonymous URI when getting P-Asserted-Identity.
Mark Michelson [Wed, 31 Mar 2010 22:35:20 +0000 (22:35 +0000)]
Fix improper comaparison of anonymous URI when getting P-Asserted-Identity.

There was a bug where we split the URI on the @ sign and then attempted
to compare to "anonymous@anonymous.invalid" afterwards. This comparison
could never evaluate true. So now we keep a copy of the URI prior to the
split so that the comparison is valid.

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

10 years agoRecorded merge of revisions 255591 via svnmerge from
Tilghman Lesher [Wed, 31 Mar 2010 19:13:02 +0000 (19:13 +0000)]
Recorded merge of revisions 255591 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r255591 | tilghman | 2010-03-31 14:09:46 -0500 (Wed, 31 Mar 2010) | 15 lines

  Ensure line terminators in email are consistent.

  Fixes an issue with certain Mail Transport Agents, where attachments are not
  interpreted correctly.

  (closes issue #16557)
   Reported by: jcovert
   Patches:
         20100308__issue16557__1.4.diff.txt uploaded by tilghman (license 14)
         20100308__issue16557__1.6.0.diff.txt uploaded by tilghman (license 14)
         20100308__issue16557__trunk.diff.txt uploaded by tilghman (license 14)
   Tested by: ebroad, zktech

  Reviewboard: https://reviewboard.asterisk.org/r/544/
........

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

10 years agoAdd documentation clarifying when 't' and 'T' can be used.
Leif Madsen [Wed, 31 Mar 2010 17:48:09 +0000 (17:48 +0000)]
Add documentation clarifying when 't' and 'T' can be used.

(closes issue #17021)
Reported by: kovzol
Tested by: lmadsen, kovzol, davidw, ebroad

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

10 years agoMerged revisions 255409 via svnmerge from
Russell Bryant [Tue, 30 Mar 2010 20:56:26 +0000 (20:56 +0000)]
Merged revisions 255409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r255409 | russell | 2010-03-30 15:56:00 -0500 (Tue, 30 Mar 2010) | 2 lines

  Don't kill Asterisk if the H323 listener does not start.
........

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

10 years agoMerged revisions 255322 via svnmerge from
Russell Bryant [Tue, 30 Mar 2010 16:07:49 +0000 (16:07 +0000)]
Merged revisions 255322 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r255322 | russell | 2010-03-30 11:06:06 -0500 (Tue, 30 Mar 2010) | 2 lines

  Don't make Asterisk not start if pbx_dundi fails to initialize.
........

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

10 years agoThis patch adds custom device state handling for ConfBridge conferences,
Jared Smith [Mon, 29 Mar 2010 14:07:44 +0000 (14:07 +0000)]
This patch adds custom device state handling for ConfBridge conferences,
matching the devstate handling of the MeetMe conferences.

Review: https://reviewboard.asterisk.org/r/572/
Closes issue #16972

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

10 years agoRemove a debugging log entry.
Russell Bryant [Mon, 29 Mar 2010 05:10:41 +0000 (05:10 +0000)]
Remove a debugging log entry.

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

10 years agocorrections in gk interface, small fixes in call clearing.
Alexandr Anikin [Sat, 27 Mar 2010 23:51:13 +0000 (23:51 +0000)]
corrections in gk interface, small fixes in call clearing.

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

10 years agoWe need to inclde sys/wait.h on OpenBSD to get WEXITSTATUS.
Sean Bright [Sat, 27 Mar 2010 14:44:58 +0000 (14:44 +0000)]
We need to inclde sys/wait.h on OpenBSD to get WEXITSTATUS.

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

10 years agoinotify support for pbx_spool
Tilghman Lesher [Sat, 27 Mar 2010 06:09:26 +0000 (06:09 +0000)]
inotify support for pbx_spool

This should give a good speed boost, in that one particular thread isn't waking
up once a second to read directory contents.

Reviewboard: https://reviewboard.asterisk.org/r/137/

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

10 years agoReplace some documentation from 1.6.x back into trunk.
Leif Madsen [Fri, 26 Mar 2010 19:27:56 +0000 (19:27 +0000)]
Replace some documentation from 1.6.x back into trunk.

This documentation associated wth tlsbindaddr is still useful so lets
synchronize it between trunk and 1.6.x branches.

(issue #17054)

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

10 years agoUpdate confusing documentation for tlsbindaddr.
Leif Madsen [Fri, 26 Mar 2010 19:07:38 +0000 (19:07 +0000)]
Update confusing documentation for tlsbindaddr.

Update some confusing documentation for the tlsbindaddr
option in sip.conf.sample. Point at a link instead which
has better documentation.

(closes issue #17054)
Reported by: klaus3000

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

10 years agoWork around a bug in dash on Ubuntu by checking the number of arguments before shift...
Sean Bright [Fri, 26 Mar 2010 16:27:56 +0000 (16:27 +0000)]
Work around a bug in dash on Ubuntu by checking the number of arguments before shift'ing.

Reported and tested by pabelanger.

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

10 years agoUse "local" instead of "system" header file inclusion.
Kevin P. Fleming [Thu, 25 Mar 2010 23:38:58 +0000 (23:38 +0000)]
Use "local" instead of "system" header file inclusion.

Now that these files are in the tree, they should prefer the tree's local
copy of all Asterisk headers over any that may be installed.

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

10 years agoFix a number of other build problems on Mac OS X.
Russell Bryant [Thu, 25 Mar 2010 21:39:04 +0000 (21:39 +0000)]
Fix a number of other build problems on Mac OS X.

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

10 years agoMerged revisions 254800 via svnmerge from
Jason Parker [Thu, 25 Mar 2010 20:41:49 +0000 (20:41 +0000)]
Merged revisions 254800 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r254800 | qwell | 2010-03-25 15:41:15 -0500 (Thu, 25 Mar 2010) | 1 line

  Don't remove local copies of utils in uninstall.
........

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

10 years agoResolve compiler warning on FreeBSD.
Russell Bryant [Thu, 25 Mar 2010 20:41:34 +0000 (20:41 +0000)]
Resolve compiler warning on FreeBSD.

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

10 years agoFix chan_ooh323 so it works on Mac OS X, as well.
Russell Bryant [Thu, 25 Mar 2010 20:40:48 +0000 (20:40 +0000)]
Fix chan_ooh323 so it works on Mac OS X, as well.

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

10 years agochan_usbradio depends on alsa.
Russell Bryant [Thu, 25 Mar 2010 20:08:40 +0000 (20:08 +0000)]
chan_usbradio depends on alsa.

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

10 years agoBlocked revisions 254714 via svnmerge
Jason Parker [Thu, 25 Mar 2010 19:40:25 +0000 (19:40 +0000)]
Blocked revisions 254714 via svnmerge

........
  r254714 | qwell | 2010-03-25 14:39:23 -0500 (Thu, 25 Mar 2010) | 4 lines

  Fix DEBUG_THREADS issue with out-of-tree modules.

  Take 2, without ABI breakage this time.
........

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

10 years agoBump cleancount due to ast_channel change.
Kevin P. Fleming [Thu, 25 Mar 2010 18:38:53 +0000 (18:38 +0000)]
Bump cleancount due to ast_channel change.

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

10 years agoRemove no-longer-used (and unsafe) field in ast_channel for linked lists.
Kevin P. Fleming [Thu, 25 Mar 2010 18:38:27 +0000 (18:38 +0000)]
Remove no-longer-used (and unsafe) field in ast_channel for linked lists.

The ast_channel structure had a field used for linking a channel into a
linked list, but now that ast_channel structures are ao2 objects, this is
no longer needed, and could be harmful as ao2 objects really shouldn't
ever be placed into linked lists (since those lists don't assist with
reference count management on the objects).

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

10 years agoGet chan_ooh323 building again after recent build system changes.
Kevin P. Fleming [Thu, 25 Mar 2010 18:34:32 +0000 (18:34 +0000)]
Get chan_ooh323 building again after recent build system changes.

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

10 years agoAdd unit test for testing ACL functionality.
Mark Michelson [Thu, 25 Mar 2010 17:52:20 +0000 (17:52 +0000)]
Add unit test for testing ACL functionality.

There are two unit tests contained here.

1. "Invalid ACL" This attempts to read a bunch of badly formatted ACL entries
and add them to a host access rule. The goal of this test is to be sure that
all invalid entries are rejected as they should be.

2. "ACL" This sets up four ACLs. One is a permit all, one is a deny all, and
the other two have specific rules about which subnets are allowed and which
are not. Then a set of test addresses is used to determine whether we would
allow those addresses to access us when each ACL is applied. This test, by the
way, was what resulted in AST-2010-003's creation.

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

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

10 years agoMerged revisions 254552 via svnmerge from
Mark Michelson [Thu, 25 Mar 2010 17:42:36 +0000 (17:42 +0000)]
Merged revisions 254552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r254552 | mmichelson | 2010-03-25 12:33:35 -0500 (Thu, 25 Mar 2010) | 5 lines

  Add doxygen for acl.h

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

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

10 years agoAdd new rtpsource options to the CHANNEL function.
Mark Michelson [Thu, 25 Mar 2010 17:29:47 +0000 (17:29 +0000)]
Add new rtpsource options to the CHANNEL function.

This adds rtpsource options analogous to the rtpdest
functions that already exist. In addition, this fixes
potential crashes which could result due to trying to
read values from nonexistent RTP streams.

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

10 years agoRecorded merge of revisions 254452 via svnmerge from
Mark Michelson [Thu, 25 Mar 2010 16:04:48 +0000 (16:04 +0000)]
Recorded merge of revisions 254452 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r254452 | mmichelson | 2010-03-25 10:59:56 -0500 (Thu, 25 Mar 2010) | 44 lines

  Several fixes regarding RFC2833 DTMF detection.

  Here is a copy and paste of the details from my request on
  reviewboard that dealt with these changes:

  Fix 1. The first change in place is to fix Mantis issue 15811, which deals with a situation where Asterisk will incorrectly interpret out of order RFC2833 frames as duplicate DTMF digits. For instance, we would receive a sequence like:

  seqno 1: DTMF 1
  seqno 2: DTMF 1
  seqno 3: DTMF 1
  seqno 4: DTMF 1
  seqno 6: DTMF 1 (end)
  seqno 5: DTMF 1
  seqno 7: DTMF 1 (end)
  seqno 8: DTMF 1 (end)

  Prior to this patch when we received the frame with seqno 5, we would interpret this as a new DTMF 1. With this patch, we will check the seqno of the incoming digit and not process the frame if the seqno is lower than the last recorded seqno. Note that we do not record the seqno of the dropped DTMF frame for future processing. While the above situation is what was designed to be fixed, the patch is written in such a way that the following would also be fixed too:

  seqno  9: DTMF 1
  seqno 10: DTMF 1 (end)
  seqno 11: DTMF 1 (end)
  seqno 13: DTMF 2
  seqno 12: DTMF 1 (end)
  seqno 14: DTMF 2
  seqno 15: DTMF 2 (end)
  seqno 16: DTMF 2 (end)
  seqno 17: DTMF 2 (end)

  In this second situation, the beginning of the DTMF 2 arrives before the final end frame of the DTMF 1. With the patch, seqno 12 is no processed and thus we properly interpret the DTMF.

  Fix 2. The second change in place is to fix an issue like the following:

  seqno 1: DTMF 1
  seqno 2: DTMF 1
  seqno 3: DTMF 1 (end) *packet lost*
  seqno 4: DTMF 1 (end) *packet lost*
  seqno 5: DTMF 1 (end) *packet lost*
  seqno 6: DTMF 2

  When we receive seqno 6, we had code in place that was supposed to properly end the previously unended DTMF 1. The problem was that the code was essentially a no-op. The code would set up an end frame for the DTMF 1 but would immediately overwrite the frame with the begin for DTMF 2. I changed process_dtmf_rfc2833() so that instead of returning a single frame, it is given as an output parameter a list of frames. Each frame that needs to be returned is appended to this list.

  Fix 3. The final change is a minor one where an AST_CONTROL_SRCCHANGE frame could get lost. If we process a cisco DTMF or an RFC 3389 frame and no frame was returned, then we would return &ast_null_frame. The problem is that earlier in the function, we may have generated an AST_CONTROL_SRCCHANGE frame and put it in the list of frames we wish to return. This frame would be lost in such a case. The patch fixes this problem
........

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

10 years agoMerged revisions 254451 via svnmerge from
Terry Wilson [Thu, 25 Mar 2010 16:03:51 +0000 (16:03 +0000)]
Merged revisions 254451 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r254451 | twilson | 2010-03-25 10:57:29 -0500 (Thu, 25 Mar 2010) | 2 lines

  Handle new SRCCHANGE control message here too
........

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

10 years agoImprove handling of T.38 re-INVITEs that arrive before a T.38-capable
Kevin P. Fleming [Thu, 25 Mar 2010 15:27:31 +0000 (15:27 +0000)]
Improve handling of T.38 re-INVITEs that arrive before a T.38-capable
application is executing on a channel.

This patch addresses an issue found during working with end-users
using res_fax. If an incoming call is answered in the dialplan, or
jumps to the 'fax' extension due to reception of a CNG tone (with
faxdetect enabled), and then the remote endpoint sends a T.38
re-INVITE, it is possible for the channel's T.38 state to be
'T38_STATE_NEGOTIATING' when the application starts up. Unfortunately,
even if the application wants to use T.38, it can't respond to the
peer's negotiation request, because the AST_CONTROL_T38_PARAMETERS
control frame that chan_sip sent originally has been lost, and the
application needs the content of that frame to be able to formulate a
reply.

This patch adds a new 'request' type to AST_CONTROL_T38_PARAMETERS,
AST_T38_REQUEST_PARMS. If the application sends this request, chan_sip
will re-send the original control frame (with
AST_T38_REQUEST_NEGOTIATE as the request type), and the application
can respond as normal. If this occurs within the five second timeout
in chan_sip, the automatic cancellation of the peer reinvite will be
stopped, and the application will 'own' the negotiation process from
that point onwards.

This also improves the code path in chan_sip to allow sip_indicate(),
when called for AST_CONTROL_T38_PARAMETERS, to be able to return a
non-zero response, which should have been in place before since the
control frame *can* fail to be processed properly. It also modifies
ast_indicate() to return whatever result the channel driver returned
for this control frame, rather than converting all non-zero results
into '-1'. Finally, the new request type intentionally returns a
positive value, so that an application that sends
AST_T38_REQUEST_PARMS can know for certain whether the channel driver
accepted it and will be replying with a control frame of its own, or
whether it was ignored (if the sip_indicate()/ast_indicate() path had
properly supported failure responses before, this would not be
necessary).

This patch also modifies res_fax to take advantage of the new request.

In addition, this patch makes sip_t38_abort() actually lock the
private structure before doing its work... bad programmer, no donut.

This patch also enhances chan_sip's 'faxdetect' support to allow
triggering on T.38 re-INVITEs received as well as CNG tone detection.

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

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

10 years agohandle_speechset has 4 arguments.
Leif Madsen [Thu, 25 Mar 2010 15:21:26 +0000 (15:21 +0000)]
handle_speechset has 4 arguments.

Update code to reflect that handle_speechset has 4 arguments.

(closes issue #17093)
Reported by: gpatri
Patches:
      res_agi.patch uploaded by gpatri (license 1014)
Tested by: pabelanger, mmichelson

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

10 years agoremove unneeded explicit channel in dahdi ioctls
Tzafrir Cohen [Thu, 25 Mar 2010 10:09:24 +0000 (10:09 +0000)]
remove unneeded explicit channel in dahdi ioctls

This patch removes some cases where the channel number for an ioctl was
passed as a member in a struct rather then through the file descriptor.

The gain setting functions passed around a channel which is always 0,
and thus this parameter is simply dropped.

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

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

10 years agoFix potential invalid reads that could occur in pbx.c
Mark Michelson [Wed, 24 Mar 2010 21:10:38 +0000 (21:10 +0000)]
Fix potential invalid reads that could occur in pbx.c

Here is a cut and paste of my review request for this change:
This past weekend, Russell ran our current suite of unit tests for Asterisk
under valgrind. The PBX pattern match test caused valgrind to spew forth two
invalid read errors. This patch contains two changes that shut valgrind up and
do not cause any new memory leaks.

Change 1: In ast_context_remove_extension_callerid2, valgrind reported an
invalid read in the for loop close to the function's end. Specifically, one of
the the strcmp calls in the loop control was reading invalid memory. This was
because the caller of ast_context_remove_extension_callerid2 (__ast_context
destroy in this case) passed as a parameter a shallow copy of an ast_exten's
exten field. This same ast_exten was what was destroyed inside the for loop,
thus any iterations of the for loop beyond the destruction of the ast_exten
would result in invalid reads. My fix for this is to make a copy of the
ast_exten's exten field and pass the copy to
ast_context_remove_extension_callerid2. In addition, I have also acted
similarly with the ast_exten's matchcid field. Since in this case a NULL is
handled quite differently than an empty string, I needed to be a bit more
careful with its handling.

Change 2: In __ast_context_destroy, we iterated over a hashtab and called
ast_context_remove_extension_callerid2 on each item. Specifically, the hashtab
over which we were iterating was an ast_exten's peer_table. Inside of
ast_context_remove_extension_callerid2, we could possibly destroy this
ast_exten, which also caused the hashtab to be freed. Attempting to call
ast_hashtab_end_traversal on the hashtab iterator caused an invalid read to
occur when trying to read the iterator->tab->do_locking field since
iterator->tab had already been freed. My handling of this problem is a bit less
straightforward. With each iteration over the hashtab's contents, we set a
variable called "end_traversal" based on the return of
ast_context_remove_extension_callerid2. If 0 is ever returned, then we know
that the extension was found and destroyed. Because of this, we cannot call
ast_hashtab_end_traversal because we will be guaranteeing a read of invalid
memory. In such a case, we forego calling ast_hashtab_end_traversal and instead
call ast_free on the hashtab iterator.

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

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

10 years agoAllow configuration of minsecs and nextaftercmd per mailbox.
Jeff Peeler [Wed, 24 Mar 2010 18:13:29 +0000 (18:13 +0000)]
Allow configuration of minsecs and nextaftercmd per mailbox.

Previously only configurable globally. A unit test has also been written to
provide protection against parse failures for supported mailbox options.

(closes issue #16864)
Reported by: kobaz
Patches:
      voicemail2.patch uploaded by kobaz (license 834)

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

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

10 years agoMerged revisions 254235 via svnmerge from
Jeff Peeler [Wed, 24 Mar 2010 17:15:05 +0000 (17:15 +0000)]
Merged revisions 254235 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r254235 | jpeeler | 2010-03-23 19:37:23 -0500 (Tue, 23 Mar 2010) | 72 lines

  Ensure that monitor recordings are written to the correct location (again)

  This is an extension to 248860. As such the dialplan test has been extended:

  ; non absolute path, not combined
  exten => 5040, 1, monitor(wav,tmp/jeff/monitor_test)
  exten => 5040, n, dial(sip/5001)
  ; absolute path, not combined
  exten => 5041, 1, monitor(wav,/tmp/jeff/monitor_test2)
  exten => 5041, n, dial(sip/5001)
  ; no path, not combined
  exten => 5042, 1, monitor(wav,monitor_test3)
  exten => 5042, n, dial(sip/5001)
  ; combined: changemonitor from non absolute to no path (leaves tmp/jeff)
  exten => 5043, 1, monitor(wav,tmp/jeff/monitor_test4,m)
  exten => 5043, n, changemonitor(monitor_test5)
  exten => 5043, n, dial(sip/5001)
  ; combined: changemonitor from no path to non absolute path
  exten => 5044, 1, monitor(wav,monitor_test6,m)
  exten => 5044, n, changemonitor(tmp/jeff/monitor_test7) ; this wasn't possible before
  exten => 5044, n, dial(sip/5001)
  ; non absolute path, combined
  exten => 5045, 1, monitor(wav,tmp/jeff/monitor_test8,m)
  exten => 5045, n, dial(sip/5001)
  ; absolute path, combined
  exten => 5046, 1, monitor(wav,/tmp/jeff/monitor_test9,m)
  exten => 5046, n, dial(sip/5001)
  ; no path, combined
  exten => 5047, 1, monitor(wav,monitor_test10,m)
  exten => 5047, n, dial(sip/5001)
  ; combined: changemonitor from non absolute to absolute (leaves tmp/jeff)
  exten => 5048, 1, monitor(wav,tmp/jeff/monitor_test11,m)
  exten => 5048, n, changemonitor(/tmp/jeff/monitor_test12)
  exten => 5048, n, dial(sip/5001)
  ; combined: changemonitor from absolute to non absolute (leaves /tmp/jeff)
  exten => 5049, 1, monitor(wav,/tmp/jeff/monitor_test13,m)
  exten => 5049, n, changemonitor(tmp/jeff/monitor_test14)
  exten => 5049, n, dial(sip/5001)
  ; combined: changemonitor from no path to absolute
  exten => 5050, 1, monitor(wav,monitor_test15,m)
  exten => 5050, n, changemonitor(/tmp/jeff/monitor_test16)
  exten => 5050, n, dial(sip/5001)
  ; combined: changemonitor from absolute to no path (leaves /tmp/jeff)
  exten => 5051, 1, monitor(wav,/tmp/jeff/monitor_test17,m)
  exten => 5051, n, changemonitor(monitor_test18)
  exten => 5051, n, dial(sip/5001)
  ; not combined: changemonitor from non absolute to no path (leaves tmp/jeff)
  exten => 5052, 1, monitor(wav,tmp/jeff/monitor_test19)
  exten => 5052, n, changemonitor(monitor_test20)
  exten => 5052, n, dial(sip/5001)
  ; not combined: changemonitor from no path to non absolute
  exten => 5053, 1, monitor(wav,monitor_test21)
  exten => 5053, n, changemonitor(tmp/jeff/monitor_test22)
  exten => 5053, n, dial(sip/5001)
  ; not combined: changemonitor from non absolute to absolute (leaves tmp/jeff)
  exten => 5054, 1, monitor(wav,tmp/jeff/monitor_test23)
  exten => 5054, n, changemonitor(/tmp/jeff/monitor_test24)
  exten => 5054, n, dial(sip/5001)
  ; not combined: changemonitor from absolute to non absolute (leaves /tmp/jeff)
  exten => 5055, 1, monitor(wav,/tmp/jeff/monitor_test24)
  exten => 5055, n, changemonitor(tmp/jeff/monitor_test25)
  exten => 5055, n, dial(sip/5001)
  ; not combined: changemonitor from no path to absolute
  exten => 5056, 1, monitor(wav,monitor_test26)
  exten => 5056, n, changemonitor(/tmp/jeff/monitor_test27)
  exten => 5056, n, dial(sip/5001)
  ; not combined: changemonitor from absolute to no path (leaves /tmp/jeff)
  exten => 5057, 1, monitor(wav,/tmp/jeff/monitor_test28)
  exten => 5057, n, changemonitor(monitor_test29)
  exten => 5057, n, dial(sip/5001)
........

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

10 years agomake 'core show settings' should show all settable directories
Tzafrir Cohen [Tue, 23 Mar 2010 22:48:03 +0000 (22:48 +0000)]
make 'core show settings' should show all settable directories

(closes issue #17086)
Reported by: tzafrir
Patches:
      asterisk_extra_settings_dirs.diff uploaded by tzafrir (license 46)

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

10 years agoPut test output for a failure in a CDATA section in the XML results.
Russell Bryant [Tue, 23 Mar 2010 22:35:56 +0000 (22:35 +0000)]
Put test output for a failure in a CDATA section in the XML results.

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

10 years agoExit native bridging early for greater timing accuracy with warnings
Jeff Peeler [Tue, 23 Mar 2010 21:17:23 +0000 (21:17 +0000)]
Exit native bridging early for greater timing accuracy with warnings

This changes native bridging to break one millisecond early so that the more
accurate timeval calculations done in the generic bridge can be performed using
the bridge config. Currently the time between exiting native bridging slightly
late can sometimes cause a large enough discrepancy for warnings to be missed.
For the record, 1.4 does not attempt to native bridge at all when warnings are
enabled.

(closes issue #15815)
Reported by: adomjan

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

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

10 years agoBlocked revisions 254046 via svnmerge
Jason Parker [Tue, 23 Mar 2010 21:09:32 +0000 (21:09 +0000)]
Blocked revisions 254046 via svnmerge

........
  r254046 | qwell | 2010-03-23 16:07:54 -0500 (Tue, 23 Mar 2010) | 9 lines

  Allow out-of-tree modules to load, regardless of DEBUG_THREADS/DEBUG_CHANNEL_LOCKS differences.

  This can be guaranteed by forcing the ABI to no longer change when these compiler flags are set.
  An unfortunate side-effect to this is that there is an ABI change here.  However, there is some
  mitigation.  Existing modules *will* fail to load since they would require functions that no
  longer exist.

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

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

10 years agoRemove unused structure member in app_queue.
Sean Bright [Tue, 23 Mar 2010 20:52:35 +0000 (20:52 +0000)]
Remove unused structure member in app_queue.

(closes issue #15494)
Reported by: makoto

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

10 years agoChange the name of the category 'TEST' to match the name of the subdir
Tzafrir Cohen [Tue, 23 Mar 2010 19:19:52 +0000 (19:19 +0000)]
Change the name of the category 'TEST' to match the name of the subdir

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

10 years agoDon't act like an http write failed when it didn't
Terry Wilson [Tue, 23 Mar 2010 16:52:53 +0000 (16:52 +0000)]
Don't act like an http write failed when it didn't

fwrite returns the number of items written, not the number of bytes

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

10 years agoChange per-file debug and verbose levels to be per-module, the way
Kevin P. Fleming [Tue, 23 Mar 2010 14:22:27 +0000 (14:22 +0000)]
Change per-file debug and verbose levels to be per-module, the way
users expect them to work.

'core set debug' and 'core set verbose' can optionally change the
level for a specific filename; however, this is actually for a
specific source file name, not the module that source file is included
in. With examples like chan_sip, chan_iax2, chan_misdn and others
consisting of multiple source files, this will not lead to the
behavior that users expect. If they want to set the debug level for
chan_sip, they want it set for all of chan_sip, and not to have to
also set it for reqresp_parser and other files that comprise the
chan_sip module.

This patch changes this functionality to be module-name based instead
of file-name based.

To make this work, some Makefile modifications were required to ensure
that the AST_MODULE definition is present in each object file produced
for each module as well.

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

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

10 years agoInitialize channels prior to loading "preload" modules.
Mark Michelson [Mon, 22 Mar 2010 20:32:15 +0000 (20:32 +0000)]
Initialize channels prior to loading "preload" modules.

We can have bad results when a module, upon being loaded, attempts
to reference the channels container if the container hasn't yet
been initialized. I saw this happen by trying to preload pbx_config.so
and having a hint defined which referenced a non-existent SIP peer.

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

10 years agoMerged revisions 253799 via svnmerge from
Matthew Nicholson [Mon, 22 Mar 2010 19:52:52 +0000 (19:52 +0000)]
Merged revisions 253799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r253799 | mnicholson | 2010-03-22 14:50:00 -0500 (Mon, 22 Mar 2010) | 4 lines

  Unconditionally copy the caller's account code to the called party.

  (related to issue #16331)
........

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

10 years agoUpdate query should be an UPDATE, not a SELECT.
Tilghman Lesher [Mon, 22 Mar 2010 19:05:27 +0000 (19:05 +0000)]
Update query should be an UPDATE, not a SELECT.

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

10 years agoReturn the list for later manipulation. This fixes an issue with the update procedure.
Tilghman Lesher [Mon, 22 Mar 2010 18:58:48 +0000 (18:58 +0000)]
Return the list for later manipulation.  This fixes an issue with the update procedure.

Debugging with mmichelson.

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