Commit Graph

233 Commits

Author SHA1 Message Date
Jeff Peeler aaf5eb105e New signaling module to handle analog operations in chan_dahdi
This branch splits all the analog signaling logic out of chan_dahdi.c into
sig_analog.c. Functionality in theory should not change at all. As noted
in the code, there is still some unused code remaining that will be cleaned
up in a later commit.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 19:19:51 +00:00
Tilghman Lesher 98ce0e5b6c Eliminate several needless checks and fix a few memory leaks
(closes issue #14833)
 Reported by: contactmayankjain
 Patches: 
       all_changes.patch uploaded by contactmayankjain (license 740)
       slightly modified by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 15:35:23 +00:00
Moises Silva b93c1a2df5 set MFCR2_CATEGORY just when starting the pbx
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-23 04:27:47 +00:00
Eliel C. Sardanons 2c882626a0 Implement a new element in AstXML for AMI actions documentation.
A new xml element was created to manage the AMI actions documentation,
using AstXML.
To register a manager action using XML documentation it is now possible
using ast_manager_register_xml().
The CLI command 'manager show command' can be used to show the parsed
documentation.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 17:52:35 +00:00
Russell Bryant 76e9c034be resolve compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 16:20:16 +00:00
Sean Bright fcda626f3c Fix build under dev mode and remove some casts that are no longer necessary as
a result of the const-ify the world patch.


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

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

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

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Richard Mudgett 0163194d93 The facilityenable parameter does not have anything to do with pritimer parameters.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 16:29:06 +00:00
Kevin P. Fleming 1c988d8996 add 'const' qualifiers in various places where they should have been
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 13:59:35 +00:00
Matthew Fredrickson 965b0f328e Revert CPC patch for now, until I decide whether or not it all should be merged into libss7/1.0 (It's still in the bug13495 branch and in libss7/trunk)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 17:33:42 +00:00
Sean Bright a0766f8113 Conditional include ioctl's to change EC policy based on DAHDI caps.
This feels like a sane change (wouldn't compile without this addition), but I'm
not intimately familiar with this code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 16:43:59 +00:00
Kevin P. Fleming d9d2779008 Add buffer and echo canceller control to CHANNEL() dialplan function for DAHDI channels
Adds ability for CHANNEL() dialplan function, when used on DAHDI channels,
to temporarily change the number of buffers and/or the buffer policy, and also
to enable, disable, or switch the echo canceller between FAX/data and voice
modes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 21:42:35 +00:00
Matthew Fredrickson a082ad616f Add support setting CPC from channel variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-28 22:07:24 +00:00
Matthew Fredrickson 6389ec15fb Make sure that we do not clear the down flag on the BRI during PTMP link transients
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-28 22:05:05 +00:00
Russell Bryant cba19c8a67 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

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

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

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

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

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

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

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

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 14:04:26 +00:00
Joshua Colp b0347267b3 Merged revisions 188937 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r188937 | file | 2009-04-17 11:25:57 -0300 (Fri, 17 Apr 2009) | 4 lines
  
  Fix a situation where the DAHDI channel private structure lock was not unlocked when it should have been.
  
  (issue AST-210)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-17 14:26:53 +00:00
Joshua Colp ac48378d28 Fix a bug with the dahdi_setoption callback in chan_dahdi.
This function incorrectly reported success even if the option was
unsupported. This was exposed by the options to change the underlying
channel format. The function now returns a failure if the option
is unsupported.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-16 13:42:52 +00:00
David Vossel b2e77d5f5d Merged revisions 188646 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r188646 | dvossel | 2009-04-15 17:08:40 -0500 (Wed, 15 Apr 2009) | 12 lines
  
  National prefix inserted even when caller ID not available
  
  When the caller ID is restricted, the expected behavior is for the caller id to be blank.  In chan_dahdi, the national prefix is placed onto the callers number even if its restricted (empty) causing the caller id to be the national prefix rather than blank.
  
  (closes issue #13207)
  Reported by: shawkris
  Patches:
        national_prefix.diff uploaded by dvossel (license 671)
  
  Review: http://reviewboard.digium.com/r/220/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-15 22:10:04 +00:00
Jeff Peeler 2fd695d23c Don't try to do anything in pri_check_restart with service messages unless
libpri supports it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-15 14:57:20 +00:00
Jeff Peeler 50ecc19ca0 change some capitalization
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14 16:49:12 +00:00
Jeff Peeler 1172c38647 Add service maintenance message support
This is the companion commit to libpri r732. Service messages are now supported
for switch types 4ess/5ess. A new option service_message_support has been added
to chan_dahdi.conf and is noted in the sample config file. The service message
support is turned off by default. The current implementation relies on AstDB
to keep track of channel state, which allows the statuses to be preserved
across Asterisk restarts. Below is a description of the storage format.

The state and reason for the service state are in the form <state>:<reason>,
where:
<state> ::= { 'O' }  // 'O' – Out Of Service
<reason> ::= { '0' | '1' | '2' | '3' }, where:
'0' – No reason (backwards compatibility)
'1' – NEAR END
'2' – FAR END
'3' – both NEAR and FAR END

The new CLI commands to handle channel service state are:
pri service disable channel <chan>
pri service enable channel <chan>

Many people contributed to the development of this functionality. Because I
entered at the very end I do not know the exact history. Special thanks to 
all who moved the bug forward one way or another:
cmaj, PCadach, markster, mattf, drmac, MikeJ, serge-v, murf, kanelbullar, Seb7,
tilghman, lmadsen, and especially dhubbard (he answered lots of my questions
and did a large portion of the work)

(closes issue #3450)
Reported by: cmaj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14 15:54:16 +00:00
Mark Michelson 6f53ed4c67 This commit introduces COLP/CONP and Redirecting party information into Asterisk.
The channel drivers which have been most heavily tested with these enhancements are
chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be
introduced in a later commit. chan_skinny has code added to it here, but according
to user pj, the support on chan_skinny is not working as of now. This will be fixed in
a later commit.

A special thanks goes out to bugtracker user gareth for getting the ball rolling and
providing the initial support for this work. Without his initial work on this, this would
not have been nearly as painless as it was.

This functionality has been tested by Digium's product quality department, as well as a
customer site running thousands of calls every day. In addition, many many many many bugtracker
users have tested this, too.

(closes issue #8824)
Reported by: gareth

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 22:41:46 +00:00
Kevin P. Fleming 3525e37e63 Merged revisions 186458 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186458 | kpfleming | 2009-04-03 15:19:20 -0500 (Fri, 03 Apr 2009) | 5 lines
  
  Fix a bug where DAHDI/Zaptel channels would not properly switch formats when requested
  
  Don't offer AST_FORMAT_SLINEAR on DAHDI/Zaptel channels... while it could provide a slight performance benefit, the translation core in Asterisk has some flaws when a channel driver offers multiple raw formats. this fix is much simpler than fixing the translation core to solve that issue (although that will be done later).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 20:20:01 +00:00
Kevin P. Fleming 612fc2e7e3 Merged revisions 186081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186081 | kpfleming | 2009-04-02 12:21:29 -0500 (Thu, 02 Apr 2009) | 3 lines
  
  ensure that the buffer passed to DAHDI_SET_BUFINFO is fully initialized
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 17:26:07 +00:00
Kevin P. Fleming d99d2f22cd Merged revisions 185952 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r185952 | kpfleming | 2009-04-02 08:43:43 -0500 (Thu, 02 Apr 2009) | 5 lines
  
  the DAHDI_GETCONF, DAHDI_SETCONF and DAHDI_GET_PARAMS ioctls were recently corrected to show that they do, in fact, read data from userspace as part of their work. due to this fix, valgrind now reports a number of cases where chan_dahdi passed an uninitialized (or partially) buffer to these ioctls, which could lead to unexpected behavior.
  
  this patch corrects chan_dahdi to ensure that buffers passed to these ioctls are always fully initialized.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 13:51:44 +00:00
Russell Bryant ee77b475f2 Improve performance of the ast_event cache functionality.
This code comes from svn/asterisk/team/russell/event_performance/.

Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.

1) Asterisk 1.6.1 introduces some additional logic to be able to handle
   distributed device state.  This functionality comes at a cost.
   One relatively minor change in this patch is that the extra processing
   required for distributed device state is now completely bypassed if
   it's not needed.

2) One of the things that I noticed when profiling this code was that a
   _lot_ of time was spent doing string comparisons.  I changed the way
   strings are represented in an event to include a hash value at the front.
   So, before doing a string comparison, we do an integer comparison on the
   hash.

3) Finally, the code that handles the event cache has been re-written.
   I tried to do this in a such a way that it had minimal impact on the API.
   I did have to change one API call, though - ast_event_queue_and_cache().
   However, the way it works now is nicer, IMO.  Each type of event that
   can be cached (MWI, device state) has its own hash table and rules for
   hashing and comparing objects.  This by far made the biggest impact on
   performance.

For additional details regarding this code and how it was tested, please see the
review request.

(closes issue #14738)
Reported by: russell

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 21:57:19 +00:00
Leif Madsen 18b4508c8e Fixes a documentation error introduced during the CLI cleanup at AstriDevCon 2008.
(closes issue #14655)
Reported by: ulogic
Patches:
      chan_dahdi.patch uploaded by ulogic (license 728)
Tested by: lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-23 18:06:40 +00:00
Eliel C. Sardanons 830602bc69 Remove duplicate <description> inside the xml documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-20 12:12:49 +00:00
Tilghman Lesher 2e516d0c26 Merged revisions 183319 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183319 | tilghman | 2009-03-19 14:15:33 -0500 (Thu, 19 Mar 2009) | 8 lines
  
  Delay signalling progress until a PRI channel really signals progress.
  (closes issue #13034)
   Reported by: klaus3000
   Patches: 
         20090316__bug13034.diff.txt uploaded by tilghman (license 14)
         patch_trunk_183progress_klaus3000.txt uploaded by klaus3000 (license 65)
   Tested by: klaus3000
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 19:17:31 +00:00
Kevin P. Fleming 4f390ec024 Merged revisions 182882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182882 | kpfleming | 2009-03-18 06:31:41 -0500 (Wed, 18 Mar 2009) | 3 lines
  
  fix another symbol namespace issue (reported by Andrew on asterisk-dev)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 11:40:11 +00:00
Richard Mudgett 7cfc92cc32 OPENR2 uses an incorrect string value if the extension delimiter is not present.
*  Fixed OPENR2 using an incorrect string value if the extension
delimiter is not present in the Dial() function.  This was fixed for
SS7 and PRI in trunk -r172400.
*  Made OPENR2 stripmsd behavior the same as the SS7, PRI, and others.
*  Removed trailing whitespace that appeared with OPENR2.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 01:54:53 +00:00
Russell Bryant 77a6840fd3 Add MFC/R2 support for chan_dahdi.
This commit introduces official support for R2 signaling in chan_dahdi.  The
modifications to chan_dahdi, and the supporting library, LibOpenR2, were both
written by Moises Silva.

Many users are using this code, or a variant of it, in Asterisk 1.2, 1.4 and 1.6
in Brazil, México and Argentina. An unknown number of users (but at least 1) 
are using it in each of the following countries: Colombia, Nepal, Thailand, 
Venezuela, Perú, and probably others.

To use this code, LibOpenR2 must be installed from http://www.libopenr2.org/.
Information about configuration can be found in configs/chan_dahdi.conf.sample.

The code committed is the most up to date version, which was being maintained
in svn/asterisk/team/moy/mfcr2/.

I would also like to include a Thank You to the many others that tested this
code beyond those listed in this commit message.  These are the names that I
could find in the mantis issue.

(closes issue #12509)
Reported by: moy
Patches:
      chan_zap-mfr2.patch uploaded by moy (license 222)
Tested by: moy, korihor, viniciusfontes, Skarmeth, loloski, asbestoshead, titogarrido, heliocoelhojr, konsultex, ncorrare, ecarruda, rtorresduque, PTorres, ychen

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16 20:35:58 +00:00
Tilghman Lesher 6cc10eb351 Can't set debug level 2 (intense debugging) unless the syntax matches
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 17:44:51 +00:00
Dwayne M. Hubbard d11e6f0591 Add dynamic fax buffer configuration option to chan_dahdi.conf
When the 'faxdetect' configuration option is used, one may also want to use
the 'faxbuffers' configuration option in chan_dahdi.conf.  This option will
dynamically use the configured 'faxbuffers' buffer policy on a channel for
the life of the call following the detection of fax tones.  The faxbuffers
buffer policy will be reverted during call teardown.

An example use of 'faxbuffers' is below.  This example would switch to using
6 buffers with a full buffer policy.

faxbuffers=>6,full


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 00:13:38 +00:00
Joshua Colp fa389ab17a Don't subscribe to a mailbox on pseudo channels. It is futile. This solves an issue where duplicated pseudo channels would cause a crash because the first one would unsubscribe and the next one would also try to unsubscribe the same subscription.
(closes issue #14322)
Reported by: amessina


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-06 19:28:53 +00:00
Richard Mudgett e70fc3d136 Broke up the large conditional blocks so it is easy to see if a function is compiled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-03 17:35:37 +00:00
Richard Mudgett 97b4e9cf2a channels/chan_dahdi.c
*  Added doxygen comments to the major dahdi structures.
*  Fixed PRI and SS7 using an incorrect string value if the extension
delimiter is not present in the Dial() function.
*  Fixed SS7 not checking if the dialed extension is at least as long
as the stripmsd option.
*  Fixed PRI not handling unknown TON/NPI prefix letters correctly.
*  Fixed some uninitialized string variables on FXS ports.

configs/chan_dahdi.conf.sample
*  Updated some documentation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29 20:38:34 +00:00
Tilghman Lesher ca052f64d0 Merged revisions 171963 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r171963 | tilghman | 2009-01-28 11:25:18 -0600 (Wed, 28 Jan 2009) | 2 lines
  
  Clarify log message (suggested by manxpower on #asterisk-dev)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28 17:27:40 +00:00
Matthew Fredrickson 7a69506727 Don't complain about lack of D-channels on PTMP connections
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-27 23:28:51 +00:00
Doug Bailey 906d665477 Handle new VMWI ioctl structure (Now there are two VMWI ioctl calls.)
(issue #14104)
Reported by: alecdavis
Tested by: dbailey



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-27 15:23:40 +00:00
Matthew Fredrickson f5ee4e99fa We should not do restart messages if we're in PTMP mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-23 17:03:41 +00:00
Doug Bailey de63e93a39 MWI messages included in CID spill was not being properly handled and prevented the call from being processed
(issue #14313)
Reported by: seandarcy
Tested by: dbailey


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-23 16:35:30 +00:00
Matthew Fredrickson 55fd5f2d2d Make sure we don't set the channel to be inalarm for a D-channel drop on PTMP connections
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 23:23:22 +00:00
Doug Bailey 9a28a07739 change VMWI to use new DAHDI_VMWI ioctl call.
Change configure script to detect the new ioctl call data structure.    
(issue #14104)
Reported by: alecdavis
Patches:
      mwiioctl_structure_asterisk.diff4.txt uploaded by dbailey (license )
Tested by: alecdavis, dbailey


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 15:49:24 +00:00
Richard Mudgett 2da6670f10 * Adjust some conditionals to balance curly braces.
*  Other minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 02:10:41 +00:00
Richard Mudgett e13016057e Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 00:23:30 +00:00
Mark Michelson f6bb99a5c5 Test commit for test issue #14303
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-21 23:20:27 +00:00
Doug Bailey 42d4853f61 Get rid of magic number and replace with DAHDI_VMWI_NUMBER_MASK when
determining the number of messages pending for MWI call


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19 18:22:44 +00:00
Doug Bailey 82d76adeb8 Add enhanced MWI generation to take advantage of new dahdi line reversal MWI ability.
(closes issue #14104)
Reported by: alecdavis
Patches:
      asttrunk-14104.diff2.txt uploaded by dbailey (license )
      chan_dahdi.rpas_and_fsk.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis, dbailey


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19 16:33:41 +00:00
Doug Bailey 65120a3b33 Add discriminator for when ring pulse alert signal is used to preface MWI spills
This prevents the situation when MWI messages are added to caller ID spills causing the channel to be hung up


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-17 18:26:44 +00:00
Doug Bailey 5d2a24d138 This fixes a problem where MWI FSK spills were being injected onto off hook fxs lines.
(closes issue #14143)
Reported by: alecdavis
Patches:
      chan_dahdi-14143.patch.txt uploaded by dbailey (license )
Tested by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 21:19:45 +00:00
Tilghman Lesher a4505c6e1f Convert dialplan application DAHDISendCallreroutingFacility to use commas.
(closes issue #13836)
 Reported by: eliel
 Patches: 
       chan_dahdi.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 19:44:19 +00:00
Doug Bailey 08e142b1e7 Cleanup fsk spill if off hook is detected during mwi spill.
Correct logic error in handling events when sending mwi spill 
(closes issue #14143)
Reported by: alecdavis
Patches:
      chan_dahdi.handle_init_event2.diff.txt uploaded by dbailey



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 17:05:37 +00:00
Mark Michelson 4412a4ba24 Change some incorrect syntax for pri set debug and correct
an off-by-one error in ss7 set debug command



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 21:52:02 +00:00
Mark Michelson 61c0d20d20 Merged revisions 166380 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r166380 | mmichelson | 2008-12-22 14:56:29 -0600 (Mon, 22 Dec 2008) | 36 lines

Fix a deadlock relating to channel locks and autoservice

It has been discovered that if a channel is locked prior
to a call to ast_autoservice_stop, then it is likely that
a deadlock will occur. The reason is that the call to 
ast_autoservice_stop has a check built into it to be sure
that the thread running autoservice is not currently trying
to manipulate the channel we are about to pull out of 
autoservice.

The autoservice thread, however, cannot advance beyond where
it currently is, though, because it is trying to acquire
the lock of the channel for which autoservice is attempting
to be stopped.

The gist of all this is that a channel MUST NOT be locked
when attempting to stop autoservice on the channel.

In this particular case, the channel was locked by a call
to ast_read. A call to ast_exists_extension led to autoservice
being started and stopped due to the existence of dialplan
switches.

It may be that there are future commits which handle the same
symptoms but in a different location, but based on my looks through
the code, it is very rare to see a construct such as this one.

(closes issue #14057)
Reported by: rtrauntvein
Patches:
      14057v3.patch uploaded by putnopvut (license 60)
Tested by: rtrauntvein

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


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 21:08:03 +00:00
Matthew Fredrickson 775033301a Add configuration support for half_full DAHDI buffer policy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 21:44:18 +00:00
Joshua Colp 654ea55a65 Numerous documentation updates.
(closes issue #13970)
Reported by: pkempgen
Patches:
      __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:21:44 +00:00
Russell Bryant f546396c0f Fix usage of the DAHDI_VMWI ioctl.
(closes issue #14090)
Reported by: alecdavis
Patches:
      chan_dahdi.VMWI_ioctl.diff.txt uploaded by alecdavis (license 585)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 14:17:45 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Steve Murphy 0692660afc demote always-appearing debug message (for certain boards) to ast_debug lev 3 msg instead
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 19:16:32 +00:00
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Jeff Peeler 41a4bdd1a6 remove duplicate comment that I accidentally merged
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 18:04:51 +00:00
Jeff Peeler b4d8a5b771 (closes issue #13786)
Reported by: tzafrir

Readding DAHDI_CHECK_HOOKSTATE define that was removed in r134260 which fixes not being able to make outgoing calls on some FXO adapters:
http://lists.digium.com/pipermail/asterisk-users/2008-November/thread.html#221553



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 18:00:24 +00:00
Tilghman Lesher bb80c835e0 Add an option, waitfordialtone, for UK analog lines which do not end a call
until the originating line hangs up.
(closes issue #12382)
 Reported by: one47
 Patches: 
       zap-waitfordialtone-trunk.080901.patch uploaded by one47 (license 23)
       zap-waitfordialtone-bra-1.4.21.2.patch uploaded by fleed (license 463)
 Tested by: fleed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 22:45:59 +00:00
Matthew Fredrickson 8cb6ecdd24 Fix for #13963. Make physical channel mapping unconfigured default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 21:06:59 +00:00
Matthew Fredrickson cb90752b0d Remove some useless locking and make sure we hangup channels on a link when we get a GRS.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 16:34:33 +00:00
Tilghman Lesher 85c6ae76ab Command offsets were not changed correctly when the command syntax for
'pri set debug' was changed from 'pri debug'.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 19:10:28 +00:00
Tilghman Lesher ca3cf9f488 Send call release with unallocated cause instead of normal call clearing, when
invalid extension is called.
(closes issue #13408)
 Reported by: adomjan
 Patches: 
       chan_dahdi.c-ss7-unallocated-2 uploaded by adomjan (license 487)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 20:13:32 +00:00
Kevin P. Fleming f08ab8278c put ifdef protection around the rest of the libpri function calls that were added at the same time as progress_with_cause
move parsing of the qsig channel mapping configuration option outside ifdef HAVE_PRI_INBANDDISCONNECT and into a properly ifdef'd block



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-06 20:51:26 +00:00
Matthew Fredrickson 5250201d8b Make compilation of chan_dahdi so that it does not require the new pri_progress_with_cause function to have libpri support work.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 20:45:03 +00:00
Eliel C. Sardanons 46d7e8dafa Add XML documentation for:
Applications
     - DAHDISendKeypadFacility()
     - DAHDISendCallreroutingFacility()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 14:38:20 +00:00
Kevin P. Fleming 2dc21e951b fix one more warning missed because i did not have new enough libpri installed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 19:39:41 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Jeff Peeler 33f576f1a1 Merged revisions 152286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152286 | jpeeler | 2008-10-27 18:28:49 -0500 (Mon, 27 Oct 2008) | 2 lines

Buffer policy setting for half is not needed.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 23:31:39 +00:00
Mark Michelson 0748be1052 Change some logical ands to bitwise ands and add
messages alerting that a channel is being ignored
if the PROC_DAHDI_NOCHAN option is set in process_dahdi.

(closes issue #13759)
Reported by: smurfix
Patches:
      dahdi.patch uploaded by smurfix (license 547)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-22 20:05:14 +00:00
Matthew Fredrickson 3e83151375 Merge in patch for #13454. Includes CallRereouting dialplan application, option for discard of remote hold messages, and using the alternate logical channel mapping in Q.SIG instead of the default physical channel mapping.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17 17:25:58 +00:00
Michiel van Baak 5232acb8c0 fix some CLI commands we borked during devcon2008
Thanks rmudget for letting me know and providing hints on how to fix it best.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 17:01:24 +00:00
Kevin P. Fleming 5651afcdaa Merged revisions 147681 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r147681 | kpfleming | 2008-10-08 17:22:09 -0500 (Wed, 08 Oct 2008) | 3 lines
  
  when parsing a text configuration option, ensure that the buffer on the stack is actually large enough to hold the legal values of that option, and also ensure that sscanf() knows to stop parsing if it would overrun the buffer (without these changes, specifying "buffers=...,immediate" would overflow the buffer on the stack, and could not have worked as expected)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-08 22:26:55 +00:00
Sean Bright d1f257ba53 Move the DAHDI-to-DAHDI operator mode check from app_dial into chan_dahdi
so we don't have to hardcode anything.

(closes issue #13636)
Reported by: seanbright
Patches:
      13636.diff uploaded by seanbright (license 71)
Reviewed by: russellb, putnopvut


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07 21:34:44 +00:00
Michiel van Baak 90751b16ca Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 23:32:14 +00:00
Kevin P. Fleming de6656902d rename chandup() and clarify its usage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 17:08:12 +00:00
Michiel van Baak f1b673eef0 fix a couple of CLI commands that did not have a help description.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 00:49:24 +00:00
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Doug Bailey 3aca08d924 Move the mwi send thread functionality back into the do_monitor thread so that it is easier to manage CID spill resources when do_monitor needs to be killed.
(closes issue #13213)
Reported by: bbryant



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 21:59:31 +00:00
Jeff Peeler be000109dc Merged revisions 140056 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140056 | jpeeler | 2008-08-26 10:57:02 -0500 (Tue, 26 Aug 2008) | 9 lines

(closes issue #12071)
Reported by: tzafrir
Patches:
      dahdi_close.diff uploaded by tzafrir (license 46)
Tested by: tzafrir, jpeeler

This patch fixes closing open file descriptors in the case of an error.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 18:48:55 +00:00
Jeff Peeler a9af5a81c9 Merged revisions 139387 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139387 | jpeeler | 2008-08-21 18:39:31 -0500 (Thu, 21 Aug 2008) | 3 lines

Fixes loop that could possibly never exit in the event of a channel never being able to be opened or specify after a restart.
(closes issue #11017)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-21 23:41:50 +00:00
Jeff Peeler f10e6dec36 add missing define for SS7 in dahdi_restart
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-18 02:13:04 +00:00
Tilghman Lesher 6d7ee132e3 Fix compilation warnings (found with dev-mode)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-16 13:07:08 +00:00
Jeff Peeler a4db659925 Merged revisions 138360 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r138360 | jpeeler | 2008-08-15 20:12:18 -0500 (Fri, 15 Aug 2008) | 1 line

fixes use count to properly decrement if an active dahdi channel is destroyed allowing module to be unloaded
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-16 01:13:26 +00:00
Jeff Peeler 729cb1d390 Merged revisions 138119,138151,138238 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r138119 | jpeeler | 2008-08-15 14:21:51 -0500 (Fri, 15 Aug 2008) | 4 lines

Fixes the dahdi restart functionality. Dahdi restart allows one to restart all DAHDI channels, even if they are currently in use. This is different from unloading and then loading the module since unloading requires the use count to be zero. Reloading the module is different in that the signalling is not changed from what it was originally configured. Also, this fixes not closing all the file descriptors for D-channels upon module unload (which would prevent loading the module afterwards).

(closes issue #11017)

........
r138151 | jpeeler | 2008-08-15 14:41:29 -0500 (Fri, 15 Aug 2008) | 1 line

declared static mutexes using AST_MUTEX_DEFINE_STATIC macro
........
r138238 | jpeeler | 2008-08-15 16:28:26 -0500 (Fri, 15 Aug 2008) | 1 line

initialize condition variable ss_thread_complete using ast_cond_init
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15 23:46:09 +00:00
Jeff Peeler 7fb2ed4c53 rename all zfd instances in chan_dahdi to dfd to match 1.4 (left over from DAHDI transition)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15 20:12:19 +00:00
Tilghman Lesher 4a99c9e158 Merged revisions 137847 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r137847 | tilghman | 2008-08-14 11:47:30 -0500 (Thu, 14 Aug 2008) | 9 lines

When creating the secondary subchannel name, it is necessary to compare to
the existing channel name without the "Zap/" or "DAHDI/" prefix, since our
test string is also without that prefix.
(closes issue #13027)
 Reported by: dferrer
 Patches: 
       chan_zap-1.4.21.1_fix2.patch uploaded by dferrer (license 525)
       (Slightly modified by me, to compensate for both names)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-14 16:52:43 +00:00
Sean Bright 5275342c5e Biggest offender? chan_dahdi.c! More RSW merging.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-09 13:13:48 +00:00
Dwayne M. Hubbard c096a6bee0 use ARRAY_LEN
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-08 15:58:38 +00:00
Kevin P. Fleming 0ce79e5a06 build against the now-typedef-free dahdi/user.h, and remove some #ifdefs for features that will always be present in DAHDI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-29 22:22:13 +00:00
Kevin P. Fleming 6291cd19bf remove remaining Zaptel references in various places
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-28 16:42:00 +00:00
Tilghman Lesher 0c23159464 Deprecate *_device_state_* APIs in favor of *_devstate_* APIs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@133860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-25 21:20:03 +00:00
Jason Parker fabba06d02 Merged revisions 133295 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r133295 | qwell | 2008-07-23 16:49:03 -0500 (Wed, 23 Jul 2008) | 1 line

inbandrelease is gone - it's now inbanddisconnect
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@133296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 21:50:20 +00:00
Mark Michelson ce391f2945 Merged revisions 133038 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r133038 | mmichelson | 2008-07-23 12:50:01 -0500 (Wed, 23 Jul 2008) | 7 lines

Small cleanup. Move the declaration of the DAHDI_SPANINFO
variable to the block where it is used. This allows one
less #ifdef HAVE_PRI to clutter things up.

Thanks to Tzafrir for pointing this out on #asterisk-dev


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@133041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 17:54:03 +00:00
Kevin P. Fleming 35cf5f8984 correct fix made in r132777... the code *did* compile in dev-mode, as long as libpri was installed and enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 22:14:37 +00:00
Mark Michelson 7ab615da6f Get chan_dahdi to compile in devmode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 21:52:24 +00:00
Kevin P. Fleming f9074f1d95 Merged revisions 132712 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r132712 | kpfleming | 2008-07-22 16:17:23 -0500 (Tue, 22 Jul 2008) | 6 lines

ensure that if any alarms exist at channel creation time, they are handled identically to if they occurred later, so that later alarm clearing will work properly and 'make sense'

(closes issue #12160)
Reported by: tzafrir


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 21:21:56 +00:00
Kevin P. Fleming 8115a6a9bf Merged revisions 132641 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r132641 | kpfleming | 2008-07-22 14:49:11 -0500 (Tue, 22 Jul 2008) | 2 lines

use renamed libpri API call for controlling this feature (was improperly named before)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 19:59:10 +00:00
Kevin P. Fleming 54e959b486 Merged revisions 132571 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r132571 | kpfleming | 2008-07-21 17:45:16 -0500 (Mon, 21 Jul 2008) | 2 lines

teach chan_dahdi how to find the D-channel on BRI spans, and don't attempt to use channel 24 as a D-channel on spans of unexpected sizes

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 22:51:16 +00:00
Jeff Peeler 08bcb84c01 make buffers config option (chan_dahdi.conf) parsing safer and added logging in case of failure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 15:33:13 +00:00
Matthew Fredrickson 69fee2f71f Make sure we break the poll so that messages queued will be sent on the SS7 when using CLI commands for blocking and blocking of CICs and linksets.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 18:50:00 +00:00
Jeff Peeler db5c40005c Add configuration option to chan_dahdi.conf to allow buffering policy and number of buffers to be configured per channel. Syntax:
buffers=<num of buffers>,<policy>

Where the number of buffers is some non-negative integer and the policy is either "full", "half", or "immediate".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-17 22:40:00 +00:00
Tilghman Lesher f4722d0ff0 Merged revisions 131790 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131790 | tilghman | 2008-07-17 15:35:44 -0500 (Thu, 17 Jul 2008) | 7 lines

Revert part of issue #5620 (revision 6965) as it appears that it was in error.
This should fix talk call progress on analog lines.
(closes issue #12178)
 Reported by: michael-fig
 Patches: 
       20080717__bug12178.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-17 20:37:14 +00:00
Matthew Fredrickson 8635eecdc9 Support new TRANSPORT definitions in libss7
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 21:36:26 +00:00
Tilghman Lesher 9cd11917c5 Fix trunk breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 19:40:55 +00:00
Brett Bryant 5b7933fe5e Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054)
Reported by: pabelanger
Patches:
      ARRAY_LEN.patch2 uploaded by pabelanger (license 224)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:09:35 +00:00
Kevin P. Fleming b968349e19 Merged revisions 130039 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130039 | kpfleming | 2008-07-11 10:41:56 -0500 (Fri, 11 Jul 2008) | 4 lines

add support for a configuration parameter for 'inband audio during RELEASE', which is currently mandatory in libpri-1.4.4 but will become configurable in libpri-1.4.5 later today

(related to issue #13042)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 15:57:17 +00:00
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +00:00
Matthew Fredrickson 268ca4a5bb It would help if we actually parsed the ss7_explicitacm option in the config file...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-05 03:39:07 +00:00
Matthew Fredrickson 199067da4f Add option to wait to be able to explicitly send ACM via the Proceeding() application in the dialplan. Also minor documentation update explaining how to setup multiple signalling links within a linkset
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-05 03:26:42 +00:00
Steve Murphy bc2cfb3e81 Merged revisions 127663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127663 | murf | 2008-07-02 18:16:25 -0600 (Wed, 02 Jul 2008) | 30 lines

The CDRfix4/5/6 omnibus cdr fixes.

(closes issue #10927)
Reported by: murf
Tested by: murf, deeperror

(closes issue #12907)
Reported by: falves11
Tested by: murf, falves11


(closes issue #11849)
Reported by: greyvoip

As to 11849, I think these changes fix the core problems 
brought up in that bug, but perhaps not the more global
problems created by the limitations of CDR's themselves
not being oriented around transfers.

Reopen if necc, but bug reports are not the best
medium for enhancement discussions. We need to start
a second-generation CDR standardization effort to cover
transfers.

(closes issue #11093)
Reported by: rossbeer
Tested by: greyvoip, murf



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 17:16:44 +00:00
Matthew Fredrickson 5862f66c88 Add support to see MTP2 down events when the link layer drops in SS7
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-30 20:25:46 +00:00
Matthew Fredrickson 512a022a95 Revert this part of the fix. We'll fix it in libss7
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27 19:05:40 +00:00
Matthew Fredrickson a68a212f53 Obviously somebody didn't compile with libss7 support when doing the DAHDI conversion.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27 19:00:44 +00:00
Matthew Fredrickson 1b9d5d96e3 Add support for new commands to block/unblock all CICs on a linkset
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27 18:32:17 +00:00
Kevin P. Fleming 72e59c18f2 Merged revisions 125327 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125327 | kpfleming | 2008-06-26 10:30:33 -0500 (Thu, 26 Jun 2008) | 5 lines

ensure that (whenever possible) if we generate a log message because an ioctl() call to DAHDI/Zaptel failed, that we include the reason it failed by including the stringified error number

(issue AST-80)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 15:50:07 +00:00
Kevin P. Fleming fd4a60c459 Merged revisions 125132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue #12911)
Reported by: tzafrir


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 23:05:28 +00:00
Tilghman Lesher 94c4089f4e More expansion of the deadlock avoidance macro, including a macro to do locking
of the channel lock


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 02:34:11 +00:00
Tilghman Lesher 15093f2a63 Merged revisions 124965 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r124965 | tilghman | 2008-06-24 19:46:24 -0500 (Tue, 24 Jun 2008) | 7 lines

Pvt deadlock causes some channels to get stuck in Reserved status.
(closes issue #12621)
 Reported by: fabianoheringer
 Patches: 
       20080612__bug12621.diff.txt uploaded by Corydon76 (license 14)
 Tested by: fabianoheringer

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 01:08:37 +00:00
Tilghman Lesher e746aa2043 Merged revisions 124182 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r124182 | tilghman | 2008-06-19 17:53:22 -0500 (Thu, 19 Jun 2008) | 7 lines

It's possible for a hangup to be received, even just after the initial cid
spill.
(closes issue #12453)
 Reported by: Alex728
 Patches: 
       20080604__bug12453.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 22:59:41 +00:00
Jeff Peeler c837af5e28 Fix some (more) variables that were forgotten to be renamed, related to 117658
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 23:05:18 +00:00
Doug Bailey 2690378411 Clean up code that handles fsk mwi message generation by pulling it from do_monitor and creating its own thread.
Added RP-AS mwi message generation using patches from meneault as a basis. 

(closes issue #8587)
Reported by: meneault
Tested by: meneault



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 21:42:46 +00:00
Tilghman Lesher ddfac77569 Oopsie, breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 21:31:43 +00:00
Jeff Peeler 121c046ba5 Fix some variables that were forgotten to be renamed, related to 117658
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 21:15:12 +00:00
Tilghman Lesher 596f8b5186 Merged revisions 123113 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123113 | tilghman | 2008-06-16 14:50:12 -0500 (Mon, 16 Jun 2008) | 2 lines

Port "hasvoicemail" change from SIP to other channel drivers

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 19:57:05 +00:00
Jeff Peeler d9faeb6177 Fix pseudo channel allocation errors on startup when using SS7. (from mattf r121914, moving from chan_zap to chan_dahdi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:49:37 +00:00
Jeff Peeler c8b2bd8817 Make sure we hangup any calls we have and NULL out the ss7call value when we get a reset circuit message. Fixes crash bug. (from mattf r121857, moving from chan_zap to chan_dahdi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:39:38 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00