summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2009-02-17Merge a large set of updates to the Asterisk indications API.Russell Bryant
This patch includes a number of changes to the indications API. The primary motivation for this work was to improve stability. The object management in this API was significantly flawed, and a number of trivial situations could cause crashes. The changes included are: 1) Remove the module res_indications. This included the critical functionality that actually loaded the indications configuration. I have seen many people have Asterisk problems because they accidentally did not have an indications.conf present and loaded. Now, this code is in the core, and Asterisk will fail to start without indications configuration. There was one part of res_indications, the dialplan applications, which did belong in a module, and have been moved to a new module, app_playtones. 2) Object management has been significantly changed. Tone zones are now managed using astobj2, and it is no longer possible to crash Asterisk by issuing a reload that destroys tone zones while they are in use. 3) The API documentation has been filled out. 4) The API has been updated to follow our naming conventions. 5) Various bits of code throughout the tree have been updated to account for the API update. 6) Configuration parsing has been mostly re-written. 7) "Code cleanup" The code is from svn/asterisk/team/russell/indications/. Review: http://reviewboard.digium.com/r/149/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 176216 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176216 | kpfleming | 2009-02-16 15:10:38 -0600 (Mon, 16 Feb 2009) | 3 lines fix a flaw in the ast_string_field_build() family of API calls; these functions made no attempt to reuse the space already allocated to a field, so every time the field was written it would allocate new space, leading to what appeared to be a memory leak. ........ r176254 | kpfleming | 2009-02-16 15:41:46 -0600 (Mon, 16 Feb 2009) | 3 lines correct a logic error in the last stringfields commit... don't mark additional space as allocated if the string was built using already-allocated space ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16Merged revisions 175921 via svnmerge from Michiel van Baak
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175921 | mvanbaak | 2009-02-16 00:37:03 +0100 (Mon, 16 Feb 2009) | 3 lines fix mis-spelling of the word registered. Reported by De_Mon on #asterisk-dev. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15Make ast_sched_report() and ast_sched_dump() thread safe.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15Fix a number of problems with ast_sched_report().Russell Bryant
1) It had numerous coding guidelines violations with regards to formatting. 2) It allocated memory using ast_calloc() that was never freed. 3) It didn't check for failure from the allocation. 4) It used sprintf() and strcat() to build the result, doing zero checking to prevent writing past the end of the provided buffer. The function also lacks API documentation, but that has not been addressed in this commit. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Add basic (passthrough, playback, record) support for ITU G.722.1 and ↵Kevin P. Fleming
G.722.1C (also known as Siren7 and Siren14) This patch adds passthrough, file recording and file playback support for the codecs listed above, with negotiation over SIP/SDP supported. Due to Asterisk's current limitation of treating a codec/bitrate combination as a unique codec, only G.722.1 at 32 kbps and G.722.1C at 48 kbps are supported. Along the way, some related work was done: 1) The rtpPayloadType structure definition, used as a return result for an API call in rtp.h, was moved from rtp.c to rtp.h so that the API call was actually usable. The only previous used of the API all was chan_h323.c, which had a duplicate of the structure definition instead of doing it the right way. 2) The hardcoded SDP sample rates for various codecs in chan_sip.c were removed, in favor of storing these sample rates in rtp.c along with the codec definitions there. A new API call was added to allow retrieval of the sample rate for a given codec. 3) Some basic 'a=fmtp' parsing for SDP was added to chan_sip, because chan_sip *must* decline any media streams offered for these codecs that are not at the bitrates that we support (otherwise Bad Things (TM) would result). Review: http://reviewboard.digium.com/r/158/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Make lock information for ao2_trylock be more useful and gnarlyMark Michelson
Core show locks information involving an ao2_trylock did not show the function that called ao2_trylock, but would instead show ao2_trylock as the source of the lock. This is not useful when trying to debug locking issues. One bizarre note is that this logic is already in 1.4 but somehow did not get merged to trunk or the 1.6.X branches. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11Fix 'd' option for app_dial and add new option to Answer applicationMark Michelson
The 'd' option would not work for channel types which use RTP to transport DTMF digits. The only way to allow for this to work was to answer the channel if we saw that this option was enabled. I realized that this may cause issues with CDRs, specifically with giving false dispositions and answer times. I therefore modified ast_answer to take another parameter which would tell if the CDR should be marked answered. I also extended this to the Answer application so that the channel may be answered but not CDRified if desired. I also modified app_dictate and app_waitforsilence to only answer the channel if it is not already up, to help not allow for faulty CDR answer times. All of these changes are going into Asterisk trunk. For 1.6.0 and 1.6.1, however, all the changes except for the change to the Answer application will go in since we do not introduce new features into stable branches (closes issue #14164) Reported by: DennisD Patches: 14164.patch uploaded by putnopvut (license 60) Tested by: putnopvut Review: http://reviewboard.digium.com/r/145 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10improve slinfactory API to remove implicit sample rate and require explicit ↵Kevin P. Fleming
sample rate selection by creator of the slinfactory git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-06Add a common implementation of a scheduler context with a dedicated thread.Russell Bryant
This commit expands the Asterisk scheduler API to include a common implementation of a scheduler context being processed by a dedicated thread. chan_iax2 has been updated to use this new code. Also, as a result, this resolves some race conditions related to the previous chan_iax2 scheduler handling. Related to rev 171452 which resolved the same issues in 1.4. Code from team/russell/sched_thread2 Review: http://reviewboard.digium.com/r/129/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04Merged revisions 173211 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173211 | jpeeler | 2009-02-03 15:57:01 -0600 (Tue, 03 Feb 2009) | 17 lines Parking attempts made to one end of a bridge no longer will hang up due to a parking failure. Parking attempts made using either one-touch, or doing either a blind or assisted transfer to the parking extension now keep up the bridge instead of hanging up the attempted parked party. Normal causes for the parking attempt to fail includes the specific specified extension (via PARKINGEXTEN) not being available or if all the parking spaces are currently in use. To avoid having to reverse a masquerade park_space_reserve was made to provide foresight if a parking attempt will succeed and if so reserve the parking space. (closes issue #13494) Reported by: mdu113 Reviewed by Russell: http://reviewboard.digium.com/r/133/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-031. Make OS X compile cleanly with app_stack.Tilghman Lesher
2. Use curl to download sound files, as curl is installed natively on OS X, whereas wget and fetch are not. (closes issue #14332) Reported by: oej Tested by: Corydon76 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-02This reverts the changes I made for 11583; willSteve Murphy
reviewboard this before committing again... reopened 11583 until all Russell's issues are resolved. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-02This change allows the disconnect feature (as in "one-touch" in features.c)Steve Murphy
to be used within the dial app, before a call is bridged. Many thanks to sobomax for submitting this patch. Quoting from bug 11582: "So the goal of the patch was to use the user configured feature code during the call setup phase. The original ast_feature_interpret() function is not well suited for this purpose as it uses much call bridge specific data and doesn't separate a detection of feature from a feature handler call. So a new function ast_feature_detect() has been extracted off the ast_feature_interpret() function but keeping the original logic intact except some insignificant changes to locking. "Having created the ast_feature_detect() function the possibility to use feature detection in almost any place of the asterisk code. So a call to this function has been added to wait_for_answer() function of app_dial.so module. This code doesn't call the feature handler however and uses old call leg disconnect logic to make the changes as small and simple as possible to prevent unexpected problems. A disconnect feature currently is the only one supported during call setup as other features as call parking and call transfer don't make much sense during call setup. However if need in some of the features would arise it is much easier to implement as the infrastructure changes are already in place with this patch." I have cleaned up the patch somewhat, and verified that the existing functionality is not harmed, and that the new functionality works. Terry has committed his stuff, and there were no conflicts (see 14274). (closes issue #11583) Reported by: sobomax Patches: patch-apps__app_dial.c uploaded by sobomax (license 359) patch-include__asterisk__features.h uploaded by sobomax (license 359) patch-res__res_features.c uploaded by sobomax (license 359) enable-features-during-call-setup.diff uploaded by sobomax (license 359) 11583.newdiff uploaded by murf (license 17) enable-features-during-call-setup-1.diff uploaded by sobomax (license 359) 11583.latest-patch uploaded by murf (license 17) Tested by: sobomax, murf git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-30Fix redefinition of flag in channel.hMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-30Merged revisions 172517 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r172517 | twilson | 2009-01-30 11:47:41 -0600 (Fri, 30 Jan 2009) | 37 lines Fix feature inheritance with builtin features When using builtin features like parking and transfers, the AST_FEATURE_* flags would not be set correctly for all instances when either performing a builtin attended transfer, or parking a call and getting the timeout callback. Also, there was no way on a per-call basis to specify what features someone should have on picking up a parked call (since that doesn't involve the Dial() command). There was a global option for setting whether or not all users who pickup a parked call should have AST_FEATURE_REDIRECT set, but nothing for DISCONNECT, AUTOMON, or PARKCALL. This patch: 1) adds the BRIDGE_FEATURES dialplan variable which can be set either in the dialplan or with setvar in channels that support it. This variable can be set to any combination of 't', 'k', 'w', and 'h' (case insensitive matching of the equivalent dial options), to set what features should be activated on this channel. The patch moves the setting of the features datastores into the bridging code instead of app_dial to help facilitate this. 2) adds global options parkedcallparking, parkedcallhangup, and parkedcallrecording to be similar to the parkedcalltransfers option for globally setting features. 3) has builtin_atxfer call builtin_parkcall if being transfered to the parking extension since tracking everything through multiple masquerades, etc. is difficult and error-prone 4) attempts to fix all cases of return calls from parking and completed builtin transfers not having the correct permissions (closes issue #14274) Reported by: aragon Patches: fix_feature_inheritence.diff.txt uploaded by otherwiseguy (license 396) Tested by: aragon, otherwiseguy Review http://reviewboard.digium.com/r/138/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29Fixed some doxygen commentsRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29Fix "cancel answered elsewhere" through app_queue with members in chan_local.Olle Johansson
Also, implement a private cause code (as suggested by Tilghman). This works with chan_sip, but doesn't propagate through chan_local. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29- Make sure we set setvar= variables on outbound calls too, not only inbound ↵Olle Johansson
calls. - Also, change a function in app.c to return a userful value instead of always returning 0. Patch by fnordian, changed by Corydon76 and myself. This does not close the bug report, as fnordian had an additional change we're still discussing. (related to issue #14059) Reported by: fnordian Patches: chan_sip_hfield.patch uploaded by fnordian (license 110) 20090116__bug14059.diff.txt uploaded by Corydon76 (license 14) Tested by: fnordian, Corydon76, oej git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28Merged revisions 172030 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r172030 | murf | 2009-01-28 11:51:16 -0700 (Wed, 28 Jan 2009) | 46 lines This patch fixes h-exten running misbehavior in manager-redirected situations. What it does: 1. A new Flag value is defined in include/asterisk/channel.h, AST_FLAG_BRIDGE_HANGUP_DONT, which used as a messenge to the bridge hangup exten code not to run the h-exten there (nor publish the bridge cdr there). It will done at the pbx-loop level instead. 2. In the manager Redirect code, I set this flag on the channel if the channel has a non-null pbx pointer. I did the same for the second (chan2) channel, which gets run if name2 is set... and the first succeeds. 3. I restored the ending of the cdr for the pbx loop h-exten running code. Don't know why it was removed in the first place. 4. The first attempt at the fix for this bug was to place code directly in the async_goto routine, which was called from a large number of places, and could affect a large number of cases, so I tested that fix against a fair number of transfer scenarios, both with and without the patch. In the process, I saw that putting the fix in async_goto seemed not to affect any of the blind or attended scenarios, but still, I was was highly concerned that some other scenarios I had not tested might be negatively impacted, so I refined the patch to its current scope, and jmls tested both. In the process, tho, I saw that blind xfers in one situation, when the one-touch blind-xfer feature is used by the peer, we got strange h-exten behavior. So, I inserted code to swap CDRs and to set the HANGUP_DONT field, to get uniform behavior. 5. I added code to the bridge to obey the HANGUP_DONT flag, skipping both publishing the bridge CDR, and running the h-exten; they will be done at the pbx-loop (higher) level instead. 6. I removed all the debug logs from the patch before committing. 7. I moved the AUTOLOOP set/reset in the h-exten code in res_features so it's only done if the h-exten is going to be run. A very minor performance improvement, but technically correct. (closes issue #14241) Reported by: jmls Patches: 14241_redirect_no_bridgeCDR_or_h_exten_via_transfer uploaded by murf (license 17) Tested by: murf, jmls ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-25Change ARRAY_LEN() to be more C++ safe.Russell Bryant
When the second part of this macro is written as 0[a] instead of a[0], it will force a failure if the macro is used on a C++ object that overloads the [] operator. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22change VMWI to use new DAHDI_VMWI ioctl call. Doug Bailey
Change configure script to detect the new ioctl call data structure. (issue #14104) Reported by: alecdavis Patches: mwiioctl_structure_asterisk.diff4.txt uploaded by dbailey (license ) Tested by: alecdavis, dbailey git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22Merged revisions 169943 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r169943 | tilghman | 2009-01-21 18:43:31 -0600 (Wed, 21 Jan 2009) | 9 lines AST_RWLOCK_INIT_VALUE is always defined. What we really wanted to ask is whether autoconf detected a static initializer value. This fixes rwlocks on all such platforms (mainly, Mac OS X). (closes issue #13767) Reported by: jcovert Patches: 20090121__bug13767.diff.txt uploaded by Corydon76 (license 14) Tested by: jcovert, Corydon76 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19ast_str_SQLGetData is *not* part of the ast_str API, it's part of the ↵Kevin P. Fleming
ast_odbc API and just happens to use an ast_str as the buffer; move all of it to res_odbc.c and res_odbc.h, renaming appropriately along the way fix some minor coding style issues in strings.h and add some attribute_pure annotations to functions in the ast_str API git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-17Fix qualify for TCP peerTerry Wilson
(closes issue #14192) Reported by: pabelanger Patches: asterisk-bug14192.diff.txt uploaded by jamesgolovich (license 176) Tested by: jamesgolovich git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-16Merged revisions 168828 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168828 | tilghman | 2009-01-16 12:41:35 -0600 (Fri, 16 Jan 2009) | 6 lines Fix the conjugation of Russian and Ukrainian languages. (related to issue #12475) Reported by: chappell Patches: vm_multilang.patch uploaded by chappell (license 8) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15Resolve issue with negative vs non-negative length parameters.Tilghman Lesher
(closes issue #14245) Reported by: dveiga git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13Add option to hide console connect messagesTerry Wilson
(closes issue #14222) Reported by: jamesgolovich Patches: asterisk-hideconnect.diff.txt uploaded by jamesgolovich (license 176) Tested by: otherwiseguy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13Merged revisions 168561 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines Revert unnecessary indications API change from rev 122314 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12Some platforms (notably, the BSDs) have a more efficient implementation calledTilghman Lesher
closefrom(3). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09When using ast_str with a non-ast_str-enabled API, we need to update the bufferTilghman Lesher
or otherwise, we cannot use ast_str_strlen(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31Mostly just whitespace, but also convert 'CVS' to 'SVN' in a coupleSean Bright
places and fix a few typos I found in the CODING_GUIDELINES. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23Merged revisions 166093 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 In order to merge this 1.4 patch into trunk, I had to resolve some conflicts and wait for Russell to make some changes to res_agi. I re-ran all the tests; 39 calls in all, and made fairly careful notes and comparisons: I don't want this to blow up some aspect of asterisk; I completely removed the KEEPALIVE from the pbx.h decls. The first 3 scenarios involving feature park; feature xfer to 700; hookflash park to Park() app call all behave the same, don't appear to leave hung channels, and no crashes. ........ r166093 | murf | 2008-12-19 15:30:32 -0700 (Fri, 19 Dec 2008) | 131 lines This merges the masqpark branch into 1.4 These changes eliminate the need for (and use of) the KEEPALIVE return code in res_features.c; There are other places that use this result code for similar purposes at a higher level, these appear to be left alone in 1.4, but attacked in trunk. The reason these changes are being made in 1.4, is that parking ends a channel's life, in some situations, and the code in the bridge (and some other places), was not checking the result code properly, and dereferencing the channel pointer, which could lead to memory corruption and crashes. Calling the masq_park function eliminates this danger in higher levels. A series of previous commits have replaced some parking calls with masq_park, but this patch puts them ALL to rest, (except one, purposely left alone because a masquerade is done anyway), and gets rid of the code that tests the KEEPALIVE result, and the NOHANGUP_PEER result codes. While bug 13820 inspired this work, this patch does not solve all the problems mentioned there. I have tested this patch (again) to make sure I have not introduced regressions. Crashes that occurred when a parked party hung up while the parking party was listening to the numbers of the parking stall being assigned, is eliminated. These are the cases where parking code may be activated: 1. Feature one touch (eg. *3) 2. Feature blind xfer to parking lot (eg ##700) 3. Run Park() app from dialplan (eg sip xfer to 700) (eg. dahdi hookflash xfer to 700) 4. Run Park via manager. The interesting testing cases for parking are: I. A calls B, A parks B a. B hangs up while A is getting the numbers announced. b. B hangs up after A gets the announcement, but before the parking time expires c. B waits, time expires, A is redialed, A answers, B and A are connected, after which, B hangs up. d. C picks up B while still in parking lot. II. A calls B, B parks A a. A hangs up while B is getting the numbers announced. b. A hangs up after B gets the announcement, but before the parking time expires c. A waits, time expires, B is redialed, B answers, A and B are connected, after which, A hangs up. d. C picks up A while still in parking lot. Testing this throroughly involves acting all the permutations of I and II, in situations 1,2,3, and 4. Since I added a few more changes (ALL references to KEEPALIVE in the bridge code eliimated (I missed one earlier), I retested most of the above cases, and no crashes. H-extension weirdness. Current h-extension execution is not completely correct for several of the cases. For the case where A calls B, and A parks B, the 'h' exten is run on A's channel as soon as the park is accomplished. This is expected behavior. But when A calls B, and B parks A, this will be current behavior: After B parks A, B is hung up by the system, and the 'h' (hangup) exten gets run, but the channel mentioned will be a derivative of A's... Thus, if A is DAHDI/1, and B is DAHDI/2, the h-extension will be run on channel Parked/DAHDI/1-1<ZOMBIE>, and the start/answer/end info will be those relating to Channel A. And, in the case where A is reconnected to B after the park time expires, when both parties hang up after the joyful reunion, no h-exten will be run at all. In the case where C picks up A from the parking lot, when either A or C hang up, the h-exten will be run for the C channel. CDR's are a separate issue, and not addressed here. As to WHY this strange behavior occurs, the answer lies in the procedure followed to accomplish handing over the channel to the parking manager thread. This procedure is called masquerading. In the process, a duplicate copy of the channel is created, and most of the active data is given to the new copy. The original channel gets its name changed to XXX<ZOMBIE> and keeps the PBX information for the sake of the original thread (preserving its role as a call originator, if it had this role to begin with), while the new channel is without this info and becomes a call target (a "peer"). In this case, the parking lot manager thread is handed the new (masqueraded) channel. It will not run an h-exten on the channel if it hangs up while in the parking lot. The h exten will be run on the original channel instead, in the original thread, after the bridge completes. See bug 13820 for our intentions as to how to clean up the h exten behavior. Review: http://reviewboard.digium.com/r/29/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22Introduce ast_careful_fwrite() and use in AMI to prevent partial writes.Russell Bryant
This patch introduces a function to do careful writes on a file stream which will handle timeouts and partial writes. It is currently used in AMI to address the issue that has been reported. However, there are probably a few other places where this could be used. (closes issue #13546) Reported by: srt Tested by: russell http://reviewboard.digium.com/r/104/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-20Make a note about formatting the review URL in commit messagesRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19Adding a new dialplan function AUDIOHOOK_INHERITMark Michelson
This function is being added as a method to allow for an audiohook to move to a new channel during a channel masquerade. The most obvious use for such a facility is for MixMonitor when a transfer is performed. Prior to the addition of this functionality, if a channel running MixMonitor was transferred by another party, then the recording would stop once the transfer had completed. By using AUDIOHOOK_INHERIT, you can make MixMonitor continue recording the call even after the transfer has completed. It has also been determined that since this is seen by most as a bug fix and is not an invasive change, this functionality will also be backported to 1.4 and merged into the 1.6.0 branches, even though they are feature-frozen. (closes issue #13538) Reported by: mbit Patches: 13538.patch uploaded by putnopvut (license 60) Tested by: putnopvut Review: http://reviewboard.digium.com/r/102/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19Add configuration support for half_full DAHDI buffer policyMatthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19Disable some automatic links generated by doxygen.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19Introduce commit message formatting guidelines.Russell Bryant
This documents the recommended outline to use for commit message. It also covers information on special tags that can be used in commit messages, as well as the template functionality that is available on bugs.digium.com. Review: http://reviewboard.digium.com/r/96/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18Remove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial.Russell Bryant
This is part of an effort to completely remove AST_PBX_KEEPALIVE and other similar return codes from the source. While this usage was perfectly safe, there are others that are problematic. Since we know ahead of time that we do not want to PBX to destroy the channel, the PBX API has been changed so that information can be provided as an argument, instead, thus removing the need for the KEEPALIVE return value. Further changes to get rid of KEEPALIVE and related code is being done by murf. There is a patch up for that on review 29. Review: http://reviewboard.digium.com/r/98/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18Remove duplicate code from the ast_str API. We now use __AST_STR_* toEliel C. Sardanons
access 'struct ast_str' members, but this must only be used inside the API implementation. (closes issue #14098) Reported by: eliel Patches: ast_str.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16Add timezone to the possible fields in a timespec.Tilghman Lesher
(closes issue #14028) Reported by: mostyn Patches: timezone-v2.patch uploaded by mostyn (license 398) (with additional code guideline fixes and a memory leak fix by me - license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16introduce 'core show sysinfo' for systems that dont have the Linux-ish ↵Michiel van Baak
sysinfo stuff but do have sysctl. (closes issue #13433) Reported by: mvanbaak Patches: 2008121300_sysinfosysctl.diff.txt uploaded by mvanbaak (license 7) with two free calls replaced with ast_free based on feedback on reviewboard Review: http://reviewboard.digium.com/r/91/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16Merged revisions 164736 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r164736 | russell | 2008-12-16 11:06:29 -0600 (Tue, 16 Dec 2008) | 14 lines Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS. One issue was that the ast_mutex_* API was being used within the context of the thread local data destructors. We would go off and allocate more thread local data while the pthread lib was in the middle of destroying it all. This led to a memory leak. Another issue was an invalid argument being provided to the the object_add API call. (closes issue #13678) Reported by: ys Tested by: Russell ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15Merged revisions 164422 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r164422 | mmichelson | 2008-12-15 13:53:08 -0600 (Mon, 15 Dec 2008) | 3 lines Add the deadlock note to ast_spawn_extension as well ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15Merged revisions 164416 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r164416 | mmichelson | 2008-12-15 13:45:07 -0600 (Mon, 15 Dec 2008) | 4 lines Add notes to autoservice and pbx doxygen regarding a potential deadlock scenario so that it is avoided in the future ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15Revert ast_str opacity in chan_sip for now, since something wasn't quite rightTilghman Lesher
in the merge. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15I was getting this warning during a compileSteve Murphy
on a 64-bit machine running ubuntu server 8.10, and gcc-4.3.2: [CXXi] chan_vpb.ii -> chan_vpb.oo cc1plus: warnings being treated as errors In file included from /home/murf/asterisk/trunk/include/asterisk/utils.h:671, from chan_vpb.cc:46: /home/murf/asterisk/trunk/include/asterisk/strings.h: In function ‘char* ast_str_truncate(ast_str*, ssize_t)’: /home/murf/asterisk/trunk/include/asterisk/strings.h:479: error: comparison between signed and unsigned integer expressions make[1]: *** [chan_vpb.oo] Error 1 make: *** [channels] Error 2 which this fix silences git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15Fix a couple more build issues related to ast_str_opaqueRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15Make app_fax compatible with newer versions of spandsp. This remains ↵Joshua Colp
backwards compatible with earlier versions though so do not fret. (closes issue #14073) Reported by: seandarcy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164257 65c4cc65-6c06-0410-ace0-fbb531ad65f3