aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
AgeCommit message (Collapse)AuthorFilesLines
2010-09-10An outgoing call may not get hung up if a pre-connect incoming ISDN call is ↵rmudgett1-0/+16
disconnected. If the ISDN link a pre-connect incoming call is using fails or is reset, the outgoing leg may not hang up or be delayed in hanging up. (Causes: PRI_CAUSE_NETWORK_OUT_OF_ORDER, PRI_CAUSE_DESTINATION_OUT_OF_ORDER, and PRI_CAUSE_NORMAL_TEMPORARY_FAILURE.) Just hang up the call if the incoming call leg hangs up before connecting for any reason. It makes no sense to send a BUSY or CONGESTION control frame to the outgoing call leg under these circumstances. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@286113 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-09Transmit silence when reading DTMF in ast_readstring.qwell1-2/+2
Otherwise, you could get issues with DTMF timeouts causing hangups. (closes issue #17370) Reported by: makoto Patches: channel-readstring-silence-generator.patch uploaded by makoto (license 38) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@285742 f38db490-d61c-443f-a65b-d21fe96a405b
2010-08-03Prevent DAHDI channels from overriding the callerid, once it's been set by ↵tilghman1-3/+3
the user. (closes issue #16661) Reported by: jstapleton Patches: 20100414__issue16661.diff.txt uploaded by tilghman (license 14) 20100415__issue16661__1.6.2.diff.txt uploaded by tilghman (license 14) Tested by: jstapleton git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@280811 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-22DNID does not get cleard on a new call when using immediate=yes with ISDN ↵rmudgett1-4/+4
signaling. When you are using chan_dahdi ISDN signaling with immediate=yes and a call comes in without a DNID then you get the DNID of a previous call. Chan_dahdi does not touch the DNID field on a new call if it does not have a DNID. Made always copy the DNID from the new call. The patches backport the relevant changes from trunk -r210387. (closes issue #17568) Reported by: wuwu Patches: issue17568_v1.4.patch uploaded by rmudgett (license 664) issue17568_v1.6.2.patch uploaded by rmudgett (license 664) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@278701 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16priexclusive in chan_dahdi.conf ignored when reloading dahdi modulermudgett1-2/+4
During a reload, the priexclusive and outsignalling parameters are not read in from the config file as intended. Unfortunately, they get set to defaults as a result. This patch makes sure that they do not get set to defaults during a reload. (closes issue #17441) Reported by: mtryfoss Patches: issue17441_v1.4.patch uploaded by rmudgett (license 664) issue17441_v1.6.2.patch uploaded by rmudgett (license 664) issue17441_trunk.patch uploaded by rmudgett (license 664) Tested by: rmudgett git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@277419 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-07Close the DAHDI FD on error when processing chan_dahdi toneduration config ↵rmudgett1-0/+1
parameter. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@274579 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-02Have the DEADLOCK_AVOIDANCE macro warn when an unlock fails, to help catch ↵tilghman1-1/+5
potentially large software bugs. (closes issue #17407) Reported by: pdf Patches: 20100527__issue17407.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/751/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273793 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-02Fix various typos, reported by Lintiantzafrir1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273640 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-24ss_thread calls pri_grab without lock during overlap dialrmudgett1-0/+2
Recent changes to chan_dahdi with relation to overlap dialing call pri_grab without first obtaining a lock. (closes issue #17414) Reported by: pdf Patches: bug17414.patch uploaded by jpeeler (license 325) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272446 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-18Eliminate deadlock potential in dahdi_fixup().jpeeler1-2/+2
(This is a backport of 269307, committed to trunk by rmudgett.) Calling dahdi_indicate() when the channel private lock is already held can cause a deadlock if the PRI lock is needed because dahdi_indicate() will also get the channel private lock. The pri_grab() function assumes that the channel private lock is held once to avoid deadlock. (closes issue #17261) Reported by: aragon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@271335 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-15fixes FXS port still ringing when answered, as reported by Tzafrir on dev-list.alecdavis1-0/+1
(issue #17067) Reported by: tzafrir Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@270404 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-26add dahdi_func_write to zap_tech structuredvossel1-0/+1
This was supposed to be committed with r263292, the back-port of teh DAHDI buffer policy dial string option git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@266140 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-25fixes build issue with zapteldvossel1-0/+2
(closes issue #17394) Reported by: aragon Patches: half_buffer_fix.diff uploaded by dvossel (license 671) Tested by: aragon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@265613 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17backport of DAHDI buffer policy dial string optiondvossel1-21/+100
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@263292 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-30Ensure channel state is not incorrectly set in the case of a very early answer.jpeeler1-1/+1
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: http://svn.digium.com/svn/asterisk/branches/1.4@260434 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-29DTMF CallerID detection problems.rmudgett1-12/+22
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: http://svn.digium.com/svn/asterisk/branches/1.4@260195 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-27DAHDI "WARNING" message is confusing and vaguermudgett1-3/+14
"WARNING[28406]: chan_dahdi.c:6873 ss_thread: CallerID feed failed: Success" Changed the warning to "Failed to decode CallerID on channel 'name'". The message before it is likely more specific about why the CallerID decode failed. SWP-501 AST-283 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@259531 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-27hidecalleridname parameter in chan_dahdi.confrmudgett1-0/+1
Issue #7321 implements a new chan_dahdi configuration option. However, a change mentioned in the issue was never implemented. This is the change that will allow the feature to work. I added a note to chan_dahdi.conf.sample about the feature. (closes issue #17143) Reported by: djensen99 Patches: diff.txt uploaded by djensen99 (license NA) (One line change) Tested by: djensen99 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@259270 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-06DAHDI/PRI call to pri_channel_bridge() not protected by PRI lock.rmudgett1-7/+8
SWP-1231 ABE-2163 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@256225 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-20Resolve a number of FreeBSD build issues.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@253631 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12Forward declaring dahdi_pri was already done.rmudgett1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@251997 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12Make chan_dahdi wakeup_sub() prototype not conditional.rmudgett1-5/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@251986 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03Make sure to clear red alarm after polarity reversal.jpeeler1-0/+12
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/branches/1.4@250480 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-27overlap receiving: automatically send CALL PROCEEDING when dialplan startsalecdavis1-1/+14
Following Q.931 5.2.4 When the user has determined that sufficient call information has been received the user shall stop T302 and send CALL PROCEEDING to the network. Previously timeouts were possible if the dialplan took a long time to issue any response back to the network. Verified that our local TELCO also does the same. (issue #16789) Reported by: alecdavis Patches: based on overlap_receiving_trunk.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis (closes issue #16789) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@249365 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02Do not modify the gain settings on data calls.jpeeler1-1/+5
(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/branches/1.4@232090 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-03Make sure the outgoing flag is cleared if a new channel fails to get created ↵rmudgett1-0/+3
for outgoing calls. This is the relevant portion of asterisk/trunk -r226648 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@227275 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-17Fix stale caller id data from being reported in AMI NewChannel eventjpeeler1-2/+9
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/branches/1.4@224330 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-16Never released PRI channels when using Busy() or Congestion() dialplan apps.rmudgett1-4/+12
When the Busy() or Congestion() application is used towards ISDN (an ISDN progress is sent), the responding ISDN Disconnect or Release may contain the ISDN cause user busy or one of the congestion causes. In chan_dahdi.c these causes will only set the needbusy or needcongestion flags and not activate the softhangup procedure. Unfortunately only the latter can interrupt the endless wait loop of Busy()/Congestion(). Result: PRI channels staying in state busy for the rest of asterisk life or until the other end times out and forces the call to clear. (in issue 0014292) Reported by: tomaso Patches: disc_rel_userbusy.patch uploaded by tomaso (license 564) (This patch is unrelated to the issue.) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@224260 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-13Fix PRI timer T309 operationjeang1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@223955 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06Add missing unlock(s) in dahdi_readjpeeler1-1/+4
(two cases in trunk) (closes issue #15683) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@222462 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06Fix potential crash when entire span request is received.jpeeler1-2/+2
The variable index used in this scenario for accessing the dahdi_pvts was wrong and was most likely copied from the several other places it is used correctly. (closes issue #15998) Reported by: tsearle Patches: dahdi_reset_crash.patch uploaded by tsearle (license 373) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@222393 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-15Fix small memory leak in handle_init_event by always destroying the pthreadjpeeler1-0/+3
attr before returning. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@218623 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-14Fix handling of DAHDI_EVENT_REMOVED event to prevent crash in do_monitor.jpeeler1-16/+25
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/branches/1.4@218401 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-17Fix uninitialized variable.rmudgett1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@212430 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-17/+17
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@211528 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-05Dialplan starts execution before the channel setup is complete.rmudgett1-45/+59
* Issue 15655: For the case where dialing is complete for an incoming call, dahdi_new() was asked to start the PBX and then the code set more channel variables. If the dialplan hungup before these channel variables got set, asterisk would likely crash. * Fixed potential for overlap incoming call to erroneously set channel variables as global dialplan variables if the ast_channel structure failed to get allocated. * Added missing set of CALLINGSUBADDR in the dialing is complete case. (closes issue #15655) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@210575 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-03Fixes dialplan wildcard extension taking precedence over call pickup code.dbrooks1-29/+29
Prior to this patch, a wildcard extension in the dialplan (for example, _*.) would take precedence over picking up a call in the channel's pickup group. This patch simply moves the block of code handling pickup group matching to above the extension matching code. (closes issue #14735) Reported by: stevedavies Review: https://reviewboard.asterisk.org/r/319/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@210067 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-23Only set the priindication setting when not performing a reloadjpeeler1-1/+1
(closes issue #14696) Reported by: fdecher git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@208380 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-21Wait for wink before dialing when using E&M wink signalingjpeeler1-3/+3
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: http://svn.digium.com/svn/asterisk/branches/1.4@207827 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-21Revert r207573, this approach could potentially block for an unacceptable jpeeler1-55/+1
amount of time. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@207786 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-20Wait for wink before dialing when using E&M wink signalingjpeeler1-1/+55
This patch adds a new dahdi_wait function to specifically wait for the wink event. If the wink is not eventually received the channel is hung up. (closes issue #14434) Reported by: araasch Patches: emwinkmod uploaded by araasch (license 693) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@207573 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-17Fix format specifier to print out an unsigned long long.jpeeler1-1/+1
Yep, it's even ifdefed out code. But it made it to the RR list... (closes issue #14726) Reported by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@207155 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-17Enhance configuration option for overlapdial allowing direction choicejpeeler1-11/+29
Previously overlap dialing could only be turned on or off for both incoming and outgoing calls. New parameters incoming, outgoing, and both have been added to allow further control. There is no change in default behavior with these new options and allows in band DTMF to be accepted in one direction if required. (closes issue #14471) Reported by: eboscani git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@207092 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-09No audio on calls from Asterisk to various ISDN devices until DTMF sent by ↵rmudgett1-0/+1
caller. Add missing clearing of the dialing flag when the ISDN call is CONNECTED. (i.e. When libpri generates the event PRI_EVENT_ANSWER.) (closes issue #15420) Reported by: scottbmilne Patches: bug15420-1.4.25.1-diff2.txt uploaded by alecdavis (license 585) Tested by: scottbmilne, alecdavis (closes issue #15416) Reported by: avinoash (closes issue #15389) Reported by: alecdavis This patch should also fix the following issue: (issue #15205) Reported by: vinsik git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@205728 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-27The ISDN CPE side should not exclusively pick B channels normally.rmudgett1-8/+5
Before this patch, Asterisk unconditionally picked B channels exclusively on the CPE side and normally allowed alternative B channels on the network side. Now Asterisk does the opposite. Reasons for the CPE side to normally not pick B channels exclusively: * For CPE point-to-multipoint mode (i.e. phone side), the CPE side does not have enough information to exclusively pick B channels. (There may be other devices on the line.) * Q.931 gives preference to the network side picking B channels. * Some telcos require the CPE side to not pick B channels exclusively. (closes issue #14383) Reported by: mbrancaleoni git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@203908 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26Make sure to recreate the dahdi pseudo channel after dahdi restartjpeeler1-1/+1
(closes issue #14477) Reported by: timking git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@203848 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-24Improved chan_dahdi.conf pritimer error checking.rmudgett1-15/+26
Valid format is: pritimer=timer_name,timer_value * Fixed segfault if the ',' is missing. * Completely check the range returned by pri_timer2idx() to prevent possible access outside array bounds. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@203036 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17Fix a situation where the DAHDI channel private structure lock was not ↵file1-0/+1
unlocked when it should have been. (issue AST-210) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@188937 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-15National prefix inserted even when caller ID not availabledvossel1-0/+7
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: http://svn.digium.com/svn/asterisk/branches/1.4@188646 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10Support "signaling" in addition to "signalling".russell1-2/+2
The sample configuration file has references to both spellings. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@187865 f38db490-d61c-443f-a65b-d21fe96a405b