dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

241 Commits

Author SHA1 Message Date
rmudgett f42e29b281 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: http://svn.digium.com/svn/asterisk/trunk@256104 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-03 02:12:33 +00:00
tzafrir 5b30493cd4 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: http://svn.digium.com/svn/asterisk/trunk@254406 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-25 10:09:24 +00:00
russell be1d1b35d7 Use SHRT_MAX instead of MAXSHORT.
These changes fix build issues I had with this module on FreeBSD.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253536 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-20 11:33:30 +00:00
moy 1901952554 add missing mfcr2_skip_category setting
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252088 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12 21:57:40 +00:00
rmudgett 9a7a28ec90 Doxegen this chan_dahdi lock.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251946 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12 19:05:40 +00:00
rmudgett a2d1b3bb81 Minor tweaks and comment updates to chan_dahdi.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251821 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-11 18:07:16 +00:00
rmudgett 090c22992b Simplified dahdi_request() channel selection failed reason/cause code.
Also avoid potential crash because cause could be NULL.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251585 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10 16:55:34 +00:00
rmudgett 8bb352d623 Reduce the amount of database access for HAVE_PRI_SERVICE_MESSAGES.
Rework HAVE_PRI_SERVICE_MESSAGES to not use the active values directly
from the database.  Database access is likely expensive.  Database access
now only happens on initialization, destruction, and when the B channel is
taken in or out of service.

This change is not related to call waiting but it would cause the search
for a call waiting interface to be very expensive and slow down D channel
message servicing.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251538 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10 03:16:50 +00:00
rmudgett 869624a523 Removed cdrflags from ast_channel structure.
Only chan_dahdi set a value in cdrflags.  Everyone else just copied it
around the system.  Noone cared about any value it may have contained.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250565 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03 19:38:06 +00:00
jpeeler de908247c7 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: http://svn.digium.com/svn/asterisk/trunk@250481 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03 19:06:06 +00:00
jpeeler 3212543aeb Add new config option to control AMI alarm event reporting in chan_dahdi.
New config parameter "reportalarms" added in chan_dahdi.conf which supports the
following possible values:
"channels": report each channel alarms (current behavior, default for backward compatibility)
"spans": report an "SpanAlarm" event when the span of any configured channel is alarmed
"all": report channel and span alarms (aggregated behavior)
"none": do not report any alarms

(closes issue #16709)
Reported by: nahuelgreco
Patches: 
      chan_dahdi.c.reportalarms.patch uploaded by nahuelgreco (license 162)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250392 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03 17:37:30 +00:00
dvossel 3b12e80473 fixes adaptive jitterbuffer configuration
When configuring the adaptive jitterbuffer, the target_extra
value not only could not be set from the configuration, but was
not even being set to its proper default.  This value is required
in order for the adaptive jitterbuffer to work correctly.  To resolve
this a config option has been added to expose this value to the conf
files, and a default value is provided when no config specific value
is present.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249893 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02 19:08:38 +00:00
alecdavis e51972cc68 fix asterisk setting of pritimers from chan_dahdi.conf
regression since sig_pri split.

(issue #16909)
Reported by: alecdavis
Patches: 
      pritimer.asterisk.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249759 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02 06:56:14 +00:00
moy d4bb82d493 mfcr2 issue 0016844 - Fix portability bit fields and make mfcr2_immediate_accept work again, reported and patched by korihor
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248003 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-19 18:38:34 +00:00
rmudgett 665ac28114 Restore triedtopribridge flag code removed in -r211197.
Ooops.  Failed to note that we were inside a for loop and
pri_channel_bridge() needs to be executed only once.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246669 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-15 22:08:23 +00:00
tilghman 78d06b3e35 The chanvar= setting should inherit the entire list of variables, not just the first one.
(closes issue #16359)
 Reported by: raarts
 Patches: 
       dahdi-setvars.diff uploaded by raarts (license 937)
 Tested by: raarts


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@244505 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-03 18:34:29 +00:00
jpeeler 93d7808948 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: http://svn.digium.com/svn/asterisk/trunk@241143 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-18 22:31:25 +00:00
rmudgett 8da6746f8b Removed unused parameters from analog_available() and sig_pri_available().
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@237804 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-05 18:57:29 +00:00
kpfleming 09a7be92ae Change all refererences to 1.6.3 to be 1.8, since that will be the next feature release
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@235904 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-21 18:51:17 +00:00
jpeeler 99fdb13470 Fix call forwarding for analog phones.
(closes issue #16440)
Reported by: mmichelson


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@235382 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-17 00:52:03 +00:00
jpeeler 573194c9fe Merged revisions 232090 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r232090 | jpeeler | 2009-12-01 18:42:58 -0600 (Tue, 01 Dec 2009) | 10 lines
  
  Do not modify the gain settings on data calls.
  
  (The digital flag actually represents a data call.)
  
  (closes issue #15972)
  Reported by: udosw
  Patches: 
        transcap_digital_fix.diff.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@232091 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02 00:45:18 +00:00
tilghman f4d89e410a More 32->64 bit codec conversions.
In the process of swapping ULAW to a place in the extended codec space, we
found several unhandled cases, where a 32-bit integer was still being used to
handle a codec field.  Most of these have been fixed with this commit, although
there is at least one case (codec_dahdi) which depends upon outside headers to
be altered before a conversion can be made.
(Fixes AST-278, SWP-459)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@231850 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01 20:27:37 +00:00
jpeeler 1900a766f7 Fix problem on digital channels due to digital flag not getting set
Changed areas in sig_pri to set the digital flag using a callback that will
also set the corresponding flag in chan_dahdi. Modified dahdi_request slightly
so that if a bearer is marked as digital, that information is available when
creating the new channel.

(closes issue #16151)
Reported by: alecdavis
Patch based on bug_16151.diff.txt uploaded by alecdavis (license 585)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@231058 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-24 17:12:25 +00:00
rmudgett 0f12615286 Created standard location to add options to chan_dahdi for ISDN dialing.
Dial(DAHDI/g1[/extension[/options]])
Current options:
K(<keypad_digits>)
R Reverse charging indication (Collect calls)

The earlier Dial(DAHDI/g1[/K<keypad_digits>][/extension] format was
variable and did not allow for the easy addition of more options.

The earlier 'C' prefix character for reverse charge indiation would
conflict with the a-d DTMF digits if ISDN uses them.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228691 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06 22:32:17 +00:00
jpeeler 8e1f30dc15 fix trunk building
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227643 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04 16:25:15 +00:00
tilghman 3bacd4082e Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04 14:05:12 +00:00
rmudgett 225f4a7ea1 DAHDI ISDN channel names will not allow device state to work. (Interim solution.)
Since ISDN works like SIP and not analog ports in regard to devices, the
device state based on the ISDN channel number could not work.  This has
not been an issue until the advent of PTMP NT mode.  Previously, ISDN
lines were used as trunks and did not have to keep track of specific
devices.

As an interim solution until device states are properly implemented, the
channel name is being changed to the following format to use the generic
device state support:
DAHDI/i<span>/<number>[:<subaddress>]-<sequence-number>

Dialplan hints would thus be:
exten => xxx,hint,DAHDI/i2/5551212

This will work with the following restrictions:
*  The number of devices/phones cannot exceed the number of B channels.
(i.e., BRI has 2)
*  Each device/phone can only have one number.  No shared MSN's.
*  The phones/devices probably should not use subaddressing.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@226882 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-02 17:34:22 +00:00
rmudgett d9cdfa12c3 Cleanup some flags on DAHDI PRI channel hangup.
*  Cleanup some flags on DAHDI PRI channel hangup. (sig_pri split)
*  Make sure the outgoing flag is cleared if a new channel fails to get
created for outgoing calls.
*  Remove some unused flags since sig_pri was split.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@226648 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-30 23:26:41 +00:00
rmudgett 119cfd907f Make conditionals create previous code when libpri/ss7 are present.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@225872 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-26 16:07:09 +00:00
tzafrir e3b8c49f5d span numbers in pri debug / error messages
Prefix PRI trace messages with the span number. This makes the trace
readable even when you have a multi-port device.

(closes issue #15054)
Reported by: tzafrir
Patches:
      dahdi_pri_debug_spannum.diff uploaded by tzafrir (license 46)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@225836 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-26 13:29:54 +00:00
tzafrir 53699afbb7 Re-arange code a bit to build in dev-mode without ss7
No change of functionality here. Just localized a variable and indented
code into blocks.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@225803 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-26 11:34:06 +00:00
tzafrir 7eaa3b83ad Make chan_dahdi build even without PRI / SS7
(Note: still some strange build warnings without SS7 in dev-mode)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@225767 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-26 09:40:49 +00:00
rmudgett 4ad439617d Add to chan_dahdi ISDN HOLD, Call deflection, and keypad facility support.
* Added handling of received HOLD/RETRIEVE messages and the optional ability
  to transfer a held call on disconnect similar to an analog phone.
* Added CallRerouting/CallDeflection support for Q.SIG, ETSI PTP, ETSI PTMP.
  Will reroute/deflect an outgoing call when receive the message.
  Can use the DAHDISendCallreroutingFacility to send the message for the
  supported switches.
* Added ability to send/receive keypad digits in the SETUP message.
  Send keypad digits in SETUP message: Dial(DAHDI/g1[/K<keypad_digits>][/extension])
  Access any received keypad digits in SETUP message by: ${CHANNEL(keypad_digits)}
* Added support for BRI PTMP NT mode.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@225692 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-23 16:57:33 +00:00
mnicholson c246fa7865 Add dynamic range compression support for analog channels.
(closes issue AST-29)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@224637 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-19 22:02:41 +00:00
jpeeler 92c0c97b67 fix typo, sorry
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@224335 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-17 02:01:36 +00:00
jpeeler f9da7c70a1 Merged revisions 224330 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r224330 | jpeeler | 2009-10-16 20:32:47 -0500 (Fri, 16 Oct 2009) | 13 lines
  
  Fix stale caller id data from being reported in AMI NewChannel event
  
  The problem here is that chan_dahdi is designed in such a way to set
  certain values in the dahdi_pvt only once. One of those such values
  is the configured caller id data in chan_dahdi.conf. For PRI, the
  configured caller id data could be overwritten during a call. Instead
  of saving the data and restoring, it was decided that for all non-analog
  channels it was simply best to not set the configured caller id in the
  first place and also clear it at the end of the call.
  
  (closes issue #15883)
  Reported by: jsmith
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@224331 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-17 01:36:08 +00:00
jpeeler f1bedb0db3 Change ringt (ring timeout) styles to be consistent across chan_dahdi.
(closes issue #15684)
Reported by: alecdavis
Patches: 
      chan_dahdi.bug15684.diff2.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222652 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-07 20:08:14 +00:00
jpeeler e0fa564f1b Merged revisions 222462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222462 | jpeeler | 2009-10-06 18:51:19 -0500 (Tue, 06 Oct 2009) | 8 lines
  
  Add missing unlock(s) in dahdi_read
  
  (two cases in trunk)
  
  (closes issue #15683)
  Reported by: alecdavis
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222463 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06 23:56:01 +00:00
jpeeler 41e7baf28b Fix 222298 (crash during destruction of second channel when variable set with
setvar).

I mistakenly reasoned that setvar would be used on all channels. Since it can
be set per channel, give each dahdi channel a copy of the variable.

(related to #15899)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222351 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06 20:35:19 +00:00
jpeeler 074498cb9b Fix crash during destruction of second channel when variable set with setvar.
The setvar line in chan_dahdi.conf is shared among all the channels, so make
sure to only free the resources only when the last channel is destroyed.

(closes issue #15899)
Reported by: tzafrir



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222298 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06 19:24:59 +00:00
tzafrir 1805a24b82 Make sure digit events are not reported as "ERROR"
dahdievent_to_analogevent used a simple switch statement to convert DAHDI
event numbers to "ANALOG_*" event numbers. However "digit" events
(DAHDI_EVENT_PULSEDIGIT, DAHDI_EVENT_DTMFDOWN, DAHDI_EVENT_DTMFUP)
are accompannied by the digit in the low word of the event number.

This fix makes dahdievent_to_analogevent() return the event number as-is
for such an event.

This is also required to fix #15924 (in addition to r222108).  


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222237 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06 16:17:30 +00:00
jpeeler 9a43d9b1fc 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: http://svn.digium.com/svn/asterisk/trunk@222108 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-05 19:20:36 +00:00
rmudgett e5c9046575 Prevent deadlock if chan_dahdi attempts to change PRI channel names.
The PRI channels can no longer change the channel name if a different B
channel is selected during call negotiation.  To prevent using the channel
name to infer what B channel a call is using and to avoid name collisions,
the channel name format is changed.

The new channel naming for PRI channels is:
DAHDI/ISDN-<span>-<sequence-number>


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@221701 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-01 19:48:58 +00:00
rmudgett df2f3c7fcd Miscellaneous minor changes.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@220792 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-28 21:02:20 +00:00
jpeeler 9e59862a57 Add some changes related to 218430.
* Remove thread_spawned in handle_init_event since it was never used
* Always check handle_init_event in case a channel is destroyed


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@218583 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-15 16:12:49 +00:00
tzafrir 3db1a68fa6 Fix false error message on DAHDI_EVENT_REMOVED (RESULT_SUCCESS == 0)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@218465 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-15 10:24:55 +00:00
jpeeler de5d26c346 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: http://svn.digium.com/svn/asterisk/trunk@218430 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-14 22:38:25 +00:00
rmudgett ef7b0cc05f Add support for multiple interface lists.
Also unlink the sig_pri_pri.pvts[] pointer in destroy_dahdi_pvt().


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@218365 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-14 20:08:11 +00:00
moy 8a61c0c034 get rid of mfcr2 monitor thread condition, is problematic
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@218150 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-13 05:51:46 +00:00
jpeeler 2b5aca0054 Cleanup approach in 217804 and don't reach inside the sig_pvt.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@217987 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-10 23:49:09 +00:00