summaryrefslogtreecommitdiff
path: root/channels/sig_analog.c
AgeCommit message (Collapse)Author
2016-02-01build_system: Fix some warnings highlighted by clangGeorge Joseph
Fix some warnings found with clang. Change-Id: I5195b6189b148c2ee3ed4a19d015a6d4ef3e77bd
2015-03-13Logger: Convert 'struct ast_callid' to unsigned int.Corey Farrell
Switch logger callid's from AO2 objects to simple integers. This helps in two ways. Copying integers is faster than referencing AO2 objects, so this will result in a small reduction in logger overhead. This also erases the possibility of an infinate loop caused by an invalid callid in threadstorage. ASTERISK-24833 #comment Committed callid conversion to trunk. Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4466/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-06chan_dahdi/sig_analog: Fix distinctive ring detection to suck less.Richard Mudgett
The distinctive ring feature interferes with detecting Caller ID and appears to have been broken for years. What happens is if you have a ring-ring cadence as used in the UK you get too many DAHDI events for the distinctive ring pattern array and Caller ID detection is aborted. I think when Zapata/DAHDI added the ring begin event it broke distinctive ring. More events happen than before and the code does no filtering of which event times are recorded in the pattern array. * Made distinctive ring only record the ringt count when the ring ends instead of on just any DAHDI event. Distinctive ring can be ring, ring-ring, ring-ring-ring, or different ring durations for the up to three rings. * Fixed the distinctive ring detection enable (chan_dahdi.conf option usedistinctiveringdetection) to be per port instead of somewhat per port and somewhat global. This has been broken since v1.8. * Fixed using the default distinctive ring context when the detected pattern does not match any configured dringX patterns. The default context did not get set when the previous call was a matched distinctive ring pattern and the current call is not matched. This has been broken since v1.8. * Made distinctive ring have no effect on Caller ID detection when it is disabled. Caller ID detection just monitors for 10 seconds before giving up. * Fixed leak of struct callerid_state memory when a polarity reversal during Caller ID detection causes the incoming call to be aborted. DAHDI-1143 AST-1545 ASTERISK-24825 #close Reported by: Richard Mudgett ASTERISK-17588 Reported by: Daniel Flounders Review: https://reviewboard.asterisk.org/r/4444/ ........ Merged revisions 432530 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432534 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-20chan_dahdi/sig_analog: Put log message strings on one line.Richard Mudgett
With the log messages on one line, you can search for the log message seen in the log and expect to find it. ........ Merged revisions 432032 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432034 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-19chan_dahdi: Remove some dead code.Richard Mudgett
........ Merged revisions 431992 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 431993 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-18chan_dahdi: Populate CALLERID(ani2) for incoming calls in featdmf signaling ↵Richard Mudgett
mode. For the featdmf signaling mode the incoming MF Caller-ID information is formatted as follows: *${CALLERID(ani2)}${CALLERID(ani)}#*${EXTEN}# Rather than discarding the ani2 digits, populate the CALLERID(ani2) value with what is received instead. AST-1368 #close Reported by: Denis Martinez Patches: extract_ani2_for_featdmf_v11.patch (license #5621) patch uploaded by Richard Mudgett ........ Merged revisions 429783 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429784 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-21res_smdi: convert to astobj2Corey Farrell
Remove functions: ast_smdi_interface_unref ast_smdi_md_message_putback ast_smdi_mwi_message_putback ast_smdi_md_message destructor ast_smdi_mwi_message destructor Includes for astobj.h are removed everywhere it's possible. ASTERISK-24066 #close Review: https://reviewboard.asterisk.org/r/3758/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22res_pjsip_refer: Fix bugs involving Parking/PJSIP/transfersJonathan Rose
PJSIP would never send the final 200 Notify for a blind transfer when transferring to parking. This patch fixes that. In addition, it fixes a reference leak when performing blind transfers to non-bridging extensions. Review: https://reviewboard.asterisk.org/r/3485/ ........ Merged revisions 414400 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09Allow Asterisk to compile under GCC 4.10Kinsey Moore
This resolves a large number of compiler warnings from GCC 4.10 which cause the build to fail under dev mode. The vast majority are signed/unsigned mismatches in printf-style format strings. ........ Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18channel locking: Add locking for channel snapshot creationKevin Harwell
Original commit message by mmichelson (asterisk 12 r403311): "This adds channel locks around calls to create channel snapshots as well as other functions which operate on a channel and then end up creating a channel snapshot. Functions that expect the channel to be locked prior to being called have had their documentation updated to indicate such." The above was initially committed and then reverted at r403398. The problem was found to be in core_local.c in the publish_local_bridge_message function. The ast_unreal_lock_all function locks and adds a reference to the returned channels and while they were being unlocked they were not being unreffed when no longer needed. Fixed by unreffing the channels. Also in bridge.c a lock was obtained on "other->chan", but then an attempt was made to unlock "other" and not the previously locked channel. Fixed by unlocking "other->chan" (closes issue ASTERISK-22709) Reported by: John Bigelow ........ Merged revisions 404237 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05Reverting r403311. It's causing ARI tests to hang.David M. Lee
........ Merged revisions 403398 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03Add channel locking for channel snapshot creation.Mark Michelson
This adds channel locks around calls to create channel snapshots as well as other functions which operate on a channel and then end up creating a channel snapshot. Functions that expect the channel to be locked prior to being called have had their documentation updated to indicate such. ........ Merged revisions 403311 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-01chan_dahdi: Fix analog parking using flash-hook.Richard Mudgett
Transferring an analog call using a flash-hook to parking would fail to park the call and result in an invalid ao2 object unref. * Park the correct bridged channel. ........ Merged revisions 400236 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27Fix uninitialized value in struct ast_control_pvt_cause_code usage.Richard Mudgett
........ Merged revisions 397744 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 397745 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-17Allow res_parking to be unloadableKinsey Moore
This change protects accesses of res_parking such that it can unload safely once transient uses of its registered functions are complete. The parking API has been restructured such that its consumers do not have access to the vtable exposed by the parking provider, but instead route through stubs to prevent consumers from holding on to function pointers. This adds calls to all the parking unload functions and moves application loading and unloading into functions in parking_applications.c similar to the rest of the parts of res_parking. Review: https://reviewboard.asterisk.org/r/2763/ (closes issue ASTERISK-22142) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Fixed chan_dahdi compilation failureDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Support externally initiated parking requests; remove some dead codeMatthew Jordan
This patch does the following: * It adds support for externally initiated parking requests. In particular, chan_skinny has a protocol level message that initiates a call park. This patch now supports that option, as well as the protocol specific mechanisms in chan_dahdi/sig_analog and chan_mgcp. * A parking bridge features virtual table has been added that provides access to the parking functionality that the Bridging API needs. This includes requests to park an entire 'call' (with little or no additional information, thank you chan_skinny), perform a blind transfer to a parking extension, determine if an extension is a parking extension, as well as the actual "do the parking" request from the Bridging API. * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new functions * The removal of some - but not all - dead parking code from features.c This also fixed blind transferring a multi-party bridge to a parking lot (which was implemented, but had at least one code path where using the parking features kK might not have worked) Review: https://reviewboard.asterisk.org/r/2710 (closes issue ASTERISK-22134) Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25A great big renaming patchMatthew Jordan
This patch renames the bridging* files to bridge*. This may seem pedantic and silly, but it fits better in line with current Asterisk naming conventions: * channel is not "channeling" * monitor is not "monitoring" etc. A bridge is an object. It is a first class citizen in Asterisk. "Bridging" is the act of using a bridge on a set of channels - and the API that fulfills that role is more than just the action. (closes issue ASTERISK-22130) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20Add transfer support to CELKinsey Moore
This adds CEL support for blind and attended transfers and call pickup. During the course of adding this functionality I noticed that CONF_ENTER, CONF_EXIT, and BRIDGE_TO_CONF events are particularly useless without a bridge identifier, so I added that as well. This adds tests for blind transfers, several types of attended transfers, and call pickup. The extra field in CEL records now consists of a JSON blob whose fields are defined on a per-event basis. Review: https://reviewboard.asterisk.org/r/2658/ (closes issue ASTERISK-21565) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01Refactor extraneous channel eventsKinsey Moore
This change removes JitterBufStats, ChannelReload, and ChannelUpdate and refactors the following events to travel over Stasis-Core: * LocalBridge * DAHDIChannel * AlarmClear * SpanAlarmClear * Alarm * SpanAlarm * DNDState * MCID * SIPQualifyPeerDone * SessionTimeout Review: https://reviewboard.asterisk.org/r/2627/ (closes issue ASTERISK-21476) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07Refactor chan_dahdi/sig_analog/sig_pri and chan_misdn to use the common ↵Richard Mudgett
transfer functions. (closes issue ASTERISK-21523) Reported by: Matt Jordan (closes issue ASTERISK-21524) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2600/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06Refactor the features configuration scheme.Mark Michelson
Features configuration is handled in its own API in features_config.h and features_config.c. This way, features configuration is accessible to anything that needs it. In addition, features configuration has been altered to be more channel-oriented. Most callers of features API code will be supplying a channel so that the individual channel's settings will be acquired rather than the global setting. Missing from this commit is XML documentation for the features configuration. That will be handled in a separate commit. Review: https://reviewboard.asterisk.org/r/2578/ (issue ASTERISK-21542) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Split Hold event into Hold/Unhold, and move it into core.Jason Parker
(closes issue ASTERISK-21487) Review: https://reviewboard.asterisk.org/r/2565/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Remove some unnecessary calls to ast_bridged_channel() in ↵Richard Mudgett
chan_dahdi.c/sig_analog.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-07Multiple revisions 375993-375994Mark Michelson
........ r375993 | mmichelson | 2012-11-07 11:01:13 -0600 (Wed, 07 Nov 2012) | 30 lines Fix misuses of timeouts throughout the code. Prior to this change, a common method for determining if a timeout was reached was to call a function such as ast_waitfor_n() and inspect the out parameter that told how many milliseconds were left, then use that as the input to ast_waitfor_n() on the next go-around. The problem with this is that in some cases, submillisecond timeouts can occur, resulting in the out parameter not decreasing any. When this happens thousands of times, the result is that the timeout takes much longer than intended to be reached. As an example, I had a situation where a 3 second timeout took multiple days to finally end since most wakeups from ast_waitfor_n() were under a millisecond. This patch seeks to fix this pattern throughout the code. Now we log the time when an operation began and find the difference in wall clock time between now and when the event started. This means that sub-millisecond timeouts now cannot play havoc when trying to determine if something has timed out. Part of this fix also includes changing the function ast_waitfor() so that it is possible for it to return less than zero when a negative timeout is given to it. This makes it actually possible to detect errors in ast_waitfor() when there is no timeout. (closes issue ASTERISK-20414) reported by David M. Lee Review: https://reviewboard.asterisk.org/r/2135/ ........ r375994 | mmichelson | 2012-11-07 11:08:44 -0600 (Wed, 07 Nov 2012) | 3 lines Remove some debugging that accidentally made it in the last commit. ........ Merged revisions 375993-375994 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375995 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376014 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28Add pause one second W dial modifier.Richard Mudgett
* The following dialplan applications now recognize 'W' to pause sending DTMF for one second in addition to the previously existing 'w' that paused sending DTMF for half a second. Dial, ExternalIVR, and SendDTMF. * The chan_dahdi analog port dialing and deferred DTMF dialing for PRI now distinguishes between 'w' and 'W'. The 'w' pauses dialing for half a second. The 'W' pauses dialing for one second. * Created dahdi_dial_str() in chan_dahdi that eliminated a lot of duplicated dialing code and diagnostic messages for the channel driver. (closes issue ASTERISK-20039) Reported by: Jeremiah Gowdy Patches: jgowdy-wait-6-22-2012.diff (license #5621) patch uploaded by Jeremiah Gowdy Expanded patch to add support in chan_dahdi. Tested by: rmudgett git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15Add HANGUPCAUSE information to callee channelsKinsey Moore
This adds HANGUPCAUSE information to called channels so that hangup handlers can, in conjunction with predial dialplan execution, access the hangupcause information when the dialed channel hangs up on a one-to-one basis instead of a many-to-one basis as with HANGUPCAUSE usage on the caller channel. Review: https://reviewboard.asterisk.org/r/2069/ (closes issue ASTERISK-20198) ........ Merged revisions 371258 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08Convert sig_analog to use a global callback table.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08Fix the analog dial *0 flash-hook of bridged peer feature.Richard Mudgett
The flash-hook the bridged peer feature now correctly determines if the bridged peer is another chan_dahdi channel, that it is an analog channel, and that it has the correct signaling for an FXO port. It now also flash-hooks the correct channel. ........ Merged revisions 370900 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370901 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-20Add hangupcause translation supportKinsey Moore
The HANGUPCAUSE hash (trunk only) meant to replace SIP_CAUSE has now been replaced with the HANGUPCAUSE and HANGUPCAUSE_KEYS dialplan functions to better facilitate access to the AST_CAUSE translations for technology-specific cause codes. The HangupCauseClear application has also been added to remove this data from the channel. (closes issue SWP-4738) Review: https://reviewboard.asterisk.org/r/2025/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-12Add missing ast_hangup() calls on some analog exception paths.Richard Mudgett
Make starting analog_ss_thread() or __analog_ss_thread() failure paths hangup the channel. ........ Merged revisions 370017 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370025 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-11Fix validation errors when producing documentation using default build scriptMatthew Jordan
The awk script parses out the first instance of the DOCUMENTATION tag that it finds within a file. If a file did not previously have a DOCUMENTATION tag but received one due to it having an AMI event, then the XML fragment associated with the AMI event was erroneously placed in the resulting XML file. Without the python scripts, these XML fragments will not validate. This patch adds DOCUMENTATION tags at the top of those files that did not previously have them to prevent the awk script from pulling AMI event documentation. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-10Add some additional documentation for core AMI eventsMatthew Jordan
This patch adds some basic documentation for a number of modules. This includes core source files in Asterisk (those in main), as well as chan_agent, chan_dahdi, chan_local, sig_analog, and sig_pri. The DTD has also been updated to allow referencing of AMI commands. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-06Remove unnecessary generation of informational cause framesKinsey Moore
It is not necessary to generate information cause code frames on every protocol event that occurs. This removes all the instances where the frame was not conveying a cause code and was instead just conveying a protocol-specific message. This also corrects the generation of the message associated with disconnects for MFC/R2 to use the MFC/R2 specific text for the disconnect cause. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-26Unique Call ID logging Phases III and IVJonathan Rose
Adds call ID logging changes to specific channel drivers that weren't handled handled in phase II of Call ID Logging. Also covers logging for threads for threads created by systems that may be involved with many different calls. Extra special thanks to Richard for rigorous review of chan_dahdi and its various signalling modules. review: https://reviewboard.asterisk.org/r/1927/ review: https://reviewboard.asterisk.org/r/1950/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Add HANGUPCAUSE hash support for analog and PRI DAHDI subtechsKinsey Moore
This is part of the DAHDI support for the Asterisk 11 "Who Hung Up?" project and covers the implementation for the technologies implemented in sig_analog.c and sig_pri.c. Tested on a local machine to verify protocol and cause information is available. Review: https://reviewboard.asterisk.org/r/1953/ (issue SWP-4222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11Fix deadlock potential with ast_set_hangupsource() calls.Richard Mudgett
Calling ast_set_hangupsource() with the channel lock held can result in a deadlock because the function also locks the bridged channel. (issue ASTERISK-19537) (closes issue AST-891) Reported by: Guenther Kelleter Tested by: Guenther Kelleter (closes issue ASTERISK-19801) Reported by: Alec Davis ........ Merged revisions 368759 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368760 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-06Fix POTS flash hook to orignate a second call deadlock.Richard Mudgett
A deadlock can occur when a POTS phone tries to flash hook to originate a second call for 3-way or transfer. If another process is scanning the channels container when the POTS line flash hooks then a deadlock will occur. * Release the channel and private locks when creating a new channel as a result of a flash hook. (closes issue ASTERISK-19842) Reported by: rmudgett Tested by: rmudgett ........ Merged revisions 368644 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368645 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Coverity Report: Fix issues for error type CHECKED_RETURN for coreJonathan Rose
(issue ASTERISK-19658) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1905/ ........ Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Finalize ast_channel opaquificationTerry Wilson
Review: https://reviewboard.asterisk.org/r/1786/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01Opaquify ast_channel typedefs, fd arrays, and softhangup flagTerry Wilson
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-18push 'outgoing' flag from sig_XXX up to chan_dahdiAlec L Davis
'p->outgoing' in chan_dahdi and sig_analog wern't kept in sync, particulary FXS ast_hangup didn't clear the 'outgoing' flag. sig_pri and sig_ss7 were keeping 'outgoing' flag insync. Now provides a callback for all the low level sig_XXX modules. (issue ASTERISK-19316) alecdavis (license 585) Reported by: Jeremy Pepper Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1747/ ........ Merged revisions 355850 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355851 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13Opaquify char * and char[] in ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3