Commit Graph

49 Commits

Author SHA1 Message Date
Richard Mudgett 8e45c743d1 Merged revisions 293418 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r293418 | rmudgett | 2010-10-29 20:53:29 -0500 (Fri, 29 Oct 2010) | 16 lines
  
  Merged revisions 293417 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r293417 | rmudgett | 2010-10-29 20:49:15 -0500 (Fri, 29 Oct 2010) | 9 lines
    
    Merged revisions 293416 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r293416 | rmudgett | 2010-10-29 20:45:49 -0500 (Fri, 29 Oct 2010) | 1 line
      
      Remove some more code that serves no purpose.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-30 01:55:15 +00:00
Richard Mudgett 611b8d72c9 Merged revisions 293341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r293341 | rmudgett | 2010-10-29 19:46:41 -0500 (Fri, 29 Oct 2010) | 16 lines
  
  Merged revisions 293340 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r293340 | rmudgett | 2010-10-29 19:40:10 -0500 (Fri, 29 Oct 2010) | 9 lines
    
    Merged revisions 293339 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r293339 | rmudgett | 2010-10-29 19:34:12 -0500 (Fri, 29 Oct 2010) | 1 line
      
      Remove some code that serves no purpose.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-30 00:50:32 +00:00
Richard Mudgett f91cda9566 Merged revisions 291656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r291656 | rmudgett | 2010-10-13 18:45:11 -0500 (Wed, 13 Oct 2010) | 34 lines
  
  Merged revisions 291655 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r291655 | rmudgett | 2010-10-13 18:36:50 -0500 (Wed, 13 Oct 2010) | 27 lines
    
    Merged revisions 291643 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r291643 | rmudgett | 2010-10-13 18:29:58 -0500 (Wed, 13 Oct 2010) | 20 lines
      
      Deadlock between dahdi_exception() and dahdi_indicate().
      
      There is a deadlock between dahdi_exception() and dahdi_indicate() for
      analog ports.  The call-waiting and three-way-calling feature can
      experience deadlock if these features are trying to do something and an
      event from the bridged channel happens at the same time.
      
      Deadlock avoidance code added to obtain necessary channel locks before
      attemting an operation with call-waiting and three-way-calling.
      
      (closes issue #16847)
      Reported by: shin-shoryuken
      Patches:
            issue_16847_v1.4.patch uploaded by rmudgett (license 664)
            issue_16847_v1.6.2.patch uploaded by rmudgett (license 664)
            issue_16847_v1.8_v2.patch uploaded by rmudgett (license 664)
      Tested by: alecdavis, rmudgett
      
      Review: https://reviewboard.asterisk.org/r/971/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-13 23:52:41 +00:00
Jeff Peeler 41b95ee887 Merged revisions 286931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r286931 | jpeeler | 2010-09-15 14:22:15 -0500 (Wed, 15 Sep 2010) | 16 lines
  
  Add parking extension for non-default parking lots.
  
  This is a new feature that allows for parking to custom parking lots to be
  accessed directly, rather than with channel variables or by changing the
  default parking lot. The extension is set with the parkext option just as the
  default parking lot is done. Also, the manager action has been updated to
  optionally allow a specified parking lot.
  
  (closes issue #14882)
  Reported by: vmikhnevych
  Patches: 
        patch_14882.txt uploaded by mnick (license 874)
        modified by me
  
  Review: https://reviewboard.asterisk.org/r/884/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 19:23:56 +00:00
Richard Mudgett b3fa5ec3be Merged revisions 286904-286905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r286904 | rmudgett | 2010-09-15 13:28:05 -0500 (Wed, 15 Sep 2010) | 12 lines
  
  Unable to originate calls using E&M over T1.
  
  When originating a call from Unit Under Test to Reference Unit using E&M
  RBS signaling mode, I get the following warning message: "Ring/Off-hook in
  strange state 3 on channel 1".
  
  Fixed the sig_analog outgoing flag.  It was never set when sig_analog was
  extracted from chan_dahdi.
  
  JIRA SWP-2191
  JIRA AST-408
........
  r286905 | rmudgett | 2010-09-15 13:29:21 -0500 (Wed, 15 Sep 2010) | 1 line
  
  Simplify some code in sig_analog.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 18:30:54 +00:00
Richard Mudgett b8a71201dc Merged revisions 281870 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r281870 | rmudgett | 2010-08-11 15:30:29 -0500 (Wed, 11 Aug 2010) | 4 lines
  
  Fix a call to analog_set_pulsedial() not setting 0 or 1 only.
  
  * Also a couple minor tweaks.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@281871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-11 20:38:57 +00:00
Alec L Davis 8b3c00a824 missed FXS kewl start polarityswitch when finally on hook.
(issue #17318)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 11:01:14 +00:00
Alec L Davis 85bfe38f2f Support FXS module Polarity Reversal on remote party Answer and Hangup
FXS lines normally connect to a telephone. However, when FXS lines are routed
to an external PBX or Key System to act as "external" or "CO" lines, it is
extremely difficult, if not impossible for the external PBX to know when
the call has been disconnected without receiving a polarity reversal on the line.

Now using answeronpolarityswitch and hanguponpolarityswitch keywords that
previously were used only for FXO ports, now applies like functionality for
an FXS port, but from the connected equipment's point of view.

(closes issue #17318)
Reported by: armeniki
Patches: 
      fxs_linepolarity.diff5.txt uploaded by alecdavis (license 585)
Tested by: alecdavis

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-22 23:14:50 +00:00
Tzafrir Cohen 16b4813599 Fix invalid test for rxisoffhook in FXO channels
This fixes some cases of no outgoing calls on FXO before an incoming call.

Remove an unnecessary testing of an "off-hook" bit from DAHDI for FXO
(KS/GS) channels.In some cases the bit would not be initialized properly
before the first inbound call and thus prevent an outgoing call.

If those tests are actually required by anybody, they should define
DAHDI_CHECK_HOOKSTATE in channels/sig_analog.c .

(closes issue #14577)
Reported by: jkroon
Patches:
      asterisk_chan_dahdi_hookstate_fix_trunk_new.diff uploaded by frawd (license 610)
Tested by: frawd

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21 17:44:20 +00:00
Jeff Peeler 58061391a1 Fix regression with distinctive ring detection.
The issue here is that passing an array to a function prohibits the ARRAY_LEN
macro from returning the real size. To avoid this the size is now defined and
use of ARRAY_LEN is avoided.

(closes issue #15718)
Reported by: alecdavis
Patches: 
      bug15718.patch uploaded by jpeeler (license 325)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 14:39:07 +00:00
Richard Mudgett cf7bbcc4c6 Expand the caller ANI field to an ast_party_id
Expand the ani field in ast_party_caller and ast_party_connected_line to
an ast_party_id.

This is an extension to the ast_callerid restructuring patch in review:
https://reviewboard.asterisk.org/r/702/

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 16:58:03 +00:00
Richard Mudgett ec37ffbdaf ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
Jeff Peeler 0ef5550742 Change expected operation from error to debug message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-17 15:34:08 +00:00
Jeff Peeler 00433d60e6 Fix no call waiting caller ID
Clearing the callwaitcas flag in analog_call was causing the incoming D digit
to be ignored which triggers sending the caller ID.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 16:45:07 +00:00
Russell Bryant 3194c061a7 Don't blow up if an ast_channel doesn't get allocated.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-15 22:48:12 +00:00
Richard Mudgett 159f0d4b24 The inalarm flag is not passed up from the sig_analog and sig_pri submodules.
The CLI "dahdi show channel" command was not correctly reporting the
InAlarm status.

The inalarm flag is now consistently passed between chan_dahdi and
submodules.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@261007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-04 21:10:58 +00:00
Jeff Peeler 6dd80de93d Merged revisions 260434 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r260434 | jpeeler | 2010-04-30 17:22:46 -0500 (Fri, 30 Apr 2010) | 11 lines
  
  Ensure channel state is not incorrectly set in the case of a very early answer.
  
  The needringing bit was being read in dahdi_read after answering thereby
  setting the state to ringing from up. This clears needringing upon answering
  so that is no longer possible.
  
  (closes issue #17067)
  Reported by: tzafrir
  Patches: 
        needringing.diff uploaded by tzafrir (license 46)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@260437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-30 22:36:49 +00:00
Richard Mudgett a3ce3441bb Merged revisions 260195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r260195 | rmudgett | 2010-04-29 17:11:47 -0500 (Thu, 29 Apr 2010) | 26 lines
  
  DTMF CallerID detection problems.
  
  The code handling DTMF CallerID drops digits on long CallerID numbers and
  may timeout waiting for the first ring with shorter numbers.
  
  The DTMF emulation mode was not turned off when processing DTMF CallerID.
  When the emulation code gets behind in processing the DTMF digits it can
  skip a digit.
  
  For shorter numbers, the timeout may have been too short.  I increased it
  from 2 seconds to 4 seconds.  Four seconds is a typical time between rings
  for many countries.
  
  (closes issue #16460)
  Reported by: sum
  Patches:
        issue16460.patch uploaded by rmudgett (license 664)
        issue16460_v1.6.2.patch uploaded by rmudgett (license 664)
  Tested by: sum, rmudgett
  
  Review: https://reviewboard.asterisk.org/r/634/
  
  JIRA SWP-562
  JIRA AST-334
  JIRA SWP-901
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@260231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-29 22:44:14 +00:00
Mark Michelson e24661fd18 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
2010-04-09 15:31:32 +00:00
Richard Mudgett b1ccb1a44e Simplified dahdi_request() channel selection failed reason/cause code.
Also avoid potential crash because cause could be NULL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-10 16:55:34 +00:00
Jeff Peeler e8a99a9962 Merged revisions 250480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r250480 | jpeeler | 2010-03-03 13:04:11 -0600 (Wed, 03 Mar 2010) | 15 lines
  
  Make sure to clear red alarm after polarity reversal.
  
  From the issue:
  The automatic overnight line tests (or manual ones) used on UK (BT) lines causes
  a red alarm on a dahdi / TDM400P connected channel. This is because the line
  uses voltage tests (battery loss) and polarity reversal. The polarity reversal
  causes chan_dahdi to initiate v23 CallerID processing but during this the event
  DAHDI_EVENT_NOALARM is ignored so that the alarm is never cleared.
  
  (closes issue #14163)
  Reported by: jedi98
  Patches: 
        chan_dahdi-1.4-inalarm.diff uploaded by jedi98 (license 653)
  Tested by: mattbrown, Chainsaw, mikeeccleston
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03 19:06:06 +00:00
Jeff Peeler 568c057c4c Extend max call limit duration from 24.8 days to 292+ million years.
If the limit was set past MAX_INT upon answering, the call was immediately
hung up due to overflow from the return of ast_tvdiff_ms (in ast_check_hangup).
The time calculation functions ast_tvdiff_sec and ast_tvdiff_ms have been
changed to return an int64_t to prevent overflow. Also the reporter suggested
adding a message indicating the reason for the call hanging up. Given that the
new limit is so much higher, the message (which would only really be useful in
the overflow scenario) has been made a debug message only.

(closes issue #16006)
Reported by: viraptor


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-18 22:31:25 +00:00
Richard Mudgett c5cfc2a867 Removed unused parameters from analog_available() and sig_pri_available().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-05 18:57:29 +00:00
Kevin P. Fleming ef9be94b35 Change all refererences to 1.6.3 to be 1.8, since that will be the next feature release
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-21 18:51:17 +00:00
Jeff Peeler 50b7338d02 Fix call forwarding for analog phones.
(closes issue #16440)
Reported by: mmichelson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-17 00:52:03 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Jeff Peeler 10e8ee1746 Add a few missing events to analog_handle_event.
The reported bug was actually only for pulsedigit, dtmfup, and dtmfdown
handling. Also added recognition for fax events (just some verbose output) and
fixed handling for the ec_disabled_event. In order to make comparing the analog
version of events to the DAHDI events easier, the ordering has been changed to
follow that of the DAHDI events.

(closes issue #15924)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-05 19:20:36 +00:00
Jeff Peeler 843a724373 Merged revisions 218401 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r218401 | jpeeler | 2009-09-14 16:47:11 -0500 (Mon, 14 Sep 2009) | 11 lines
  
  Fix handling of DAHDI_EVENT_REMOVED event to prevent crash in do_monitor.
  
  After talking to rmudgett about some of his recent iflist locking changes, it
  was determined that the only place that would destroy a channel without being
  explicitly to do so was in handle_init_event. The loop to walk the interface
  list has been modified to wait to destroy the channel until the dahdi_pvt of
  the channel to be destroyed is no longer needed.
  
  (closes issue #15378)
  Reported by: samy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-14 22:38:25 +00:00
Jeff Peeler 3a718192c6 Allow do not disturb to be set on analog channels via the CLI and AMI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 23:29:14 +00:00
Jeff Peeler 5561ba19aa Stop caller id transmission when offhook event detected.
This fixes the problem that would occur if an analog phone was picked up while
the caller id was being sent. The caller id before sent the whole spill even
after pickup and is now corrected.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 20:18:30 +00:00
Richard Mudgett fd561e871f Fix memory leak of sig_xxx private structures.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 23:37:57 +00:00
Doug Bailey 8430c87faa Added detection DTMF CID without polarity change alert.
Added detection of DTMF tone energy levels on FXO channels in chan_dahdi
monitoring loop so DTMF CID can be detected without the need of a polarity
change precursor.  

(closes issue #9096)
Reported by: fleed
Patches:
      9096-chan_dahdi-trunk.diff uploaded by dbailey (license 819)
Tested by: cyberplant, sum, maturs


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 19:40:37 +00:00
Doug Bailey eff8dd9a2f Fix issue where DTMF CID detect was placing channels into signed linear mode
made analog_set_linear_mode return back the mode that was being overwritten 
so it could be restored later. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 19:49:43 +00:00
Richard Mudgett 0d2ef8ac5c Merged revisions 212430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

Fix uninitialized variable causing random MWI indications.

(closes issue #15727)
Reported by: doda
Patches:
      dahdi_changes.patch uploaded by doda (license 853)

........
  r212430 | rmudgett | 2009-08-17 10:36:28 -0500 (Mon, 17 Aug 2009) | 1 line
  
  Fix uninitialized variable.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 15:42:51 +00:00
Jeff Peeler e60773a298 Add braces where missing and a few whitespace fixes in sig_analog
(closes issue #15678)
Reported by: alecdavis
Patches:
      sig_analog_mainly_braces.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-14 23:07:51 +00:00
Jeff Peeler 132204459c More code that somehow got left out of sig_analog
* confirmanswer option now respected
* check and set waiting for dialtone timer
* unneeded needcallerid flag removed from analog_subchannel
* ss_astchan does not need to be a void pointer
* swap_channels callback updated to trunk
* analog_hangup now resets channel to default law


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-14 22:39:11 +00:00
Jeff Peeler b65c0edd52 Fix chan_dahdi option ringtimeout
dahdi_read relies on the dahdi_pvt copy of ringt which was not getting set
in sig_analog. This patch adds a callback to do so.

(closes issue #15288)
Reported by: alecdavis
Patches:
      chan_dahdi.ringtimeout.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 20:47:45 +00:00
Richard Mudgett d669ba24d7 Miscellaneous minor fixes to sig_analog.
*  Sanity adjustments to __analog_ss_thread for sig_analog environment.
*  Deleted some duplicated code.
*  Fixed analog_ss_thread_start passing the wrong pointer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 20:15:11 +00:00
Richard Mudgett 95d037edad Trim trailing whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 16:24:13 +00:00
Jeff Peeler 6ac23c3eca Merged revisions 207827 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207827 | jpeeler | 2009-07-21 15:16:55 -0500 (Tue, 21 Jul 2009) | 9 lines
  
  Wait for wink before dialing when using E&M wink signaling
  
  There was already code for other signaling types in dahdi_handle_event to
  handle dialing if a dial operation dial string was present. Simply add
  SIG_EMWINK to the list.
  
  (closes issue #14434)
  Reported by: araasch
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 20:26:02 +00:00
Jeff Peeler 8270339965 Fix segfault in sig_analog when using callwaiting, respect callwaiting options
Sig_analog handles allocating the sub channel for callwaiting, so no longer try
to do it in chan_dahdi. Modified analog_alloc_sub to only mark the sub as
allocated upon success of the alloc_sub callback, which was responsible for the
segfault. Also, the callwaiting and callwaitingcallerid options were being
unconditionally set to true. Now, the options are properly set from
chan_dahdi.conf.

(closes issue #15508)
Reported by: elguero
Tested by: elguero



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-17 17:02:44 +00:00
Jeff Peeler 646cd02c09 The dialing flag was mistakingly removed from sig_pri.
This readds the proper setting of the flag and is really a continuation of
r205731. The flag was being set properly in sig_analog, but use of the 
newly added set_dialing callback allowed for some simplification in
chan_dahdi.

(closes issue #15486)
Reported by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-15 22:02:55 +00:00
Jeff Peeler b9e898017e Restore some missing functionality to sig_analog.
The main purpose of this commit is to restore missing functionality present in 
the ss_thread before all the sig related work was done. Two of the biggest
missing things were distinctive ring detection and cid handling for V23.
fxsoffhookstate and associated mwi variables have been moved inside sig_analog
as they were not being set properly as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14 20:01:10 +00:00
Matthew Nicholson cf8395002d Fix a deadlock in sig_analog
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-07 18:24:13 +00:00
Matthew Nicholson 5e2a5d16b6 Add CEL transfer events to analog (chan_dahdi) transfers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-06 23:24:57 +00:00
Jeff Peeler 5ebf0f3c50 Check if polarityonanswerdelay has elapsed before setting a channel as answered
after a polarity reversal.

Previously on a polarity switch event chan_dahdi would set the channel
immediately as answered. This would cause problems if a polarity reversal
occurred when the line was picked up as the dial would not have yet occurred. 
Now if the polarity reversal occurs before delay has elapsed after coming off
hook or an answer, it is ignored. Also, some refactoring was done in
_handle_event.

(closes issue #13917)
Reported by: alecdavis
Patches:
      chan_dahdi.bug13917.feb09.diff2.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Jeff Peeler 5c7da226e4 New signaling module to handle PRI/BRI operations in chan_dahdi
This merge splits the PRI/BRI signaling logic out of chan_dahdi.c into
sig_pri.c. Functionality in theory should not change (mostly). A few trivial
changes were made in sig_analog with verbose messages and commenting.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-25 19:54:12 +00:00
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