aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2009-01-10small commit to test new serverkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168382 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-10small commit to test new serverkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168379 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09update to use new sound file packages that include license fileskpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168267 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09Make this compile for mvanbaakrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168198 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09* Fix for JIRA AST-175/ABE-1757rmudgett1-22/+222
* Miscellaneous doxygen comments added. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168191 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09Add check_via calls to more request handlersmmichelson1-1/+5
INFO, NOTIFY, OPTIONS, REFER, and MESSAGE requests were not checking the topmost Via to determine where to send the response. Adding check_via calls to those request handlers solves this. (closes issue #13071) Reported by: baron Patches: check_via.patch uploaded by baron (license 531) Tested by: baron git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168128 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-08Don't truncate database results at 255 chars.tilghman1-3/+22
(closes issue #14069) Reported by: evandro Patches: 20081214__bug14069.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167840 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-08remove an unnecessary argument to queue_request()kpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167714 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-07When a SIP request or response arrives for a dialog with an associated ↵kpfleming1-14/+115
Asterisk channel, and the lock on that channel cannot be obtained because it is held by another thread, instead of dropping the request/response, queue it for later processing when the channel lock becomes available. http://reviewboard.digium.com/r/117/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-07Fix the last couple of places where free() was improperly used directly.russell1-7/+8
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167566 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-07Don't fclose() the file early, the filestream destructor will handle it.russell1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167554 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-07Only try to close the file if one was actually openedrussell1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167545 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-07Don't use free() directly. This caused a crash since ast_filestream is now ↵russell1-1/+1
an ao2 object. Reported by JunK-Y on IRC, #asterisk-dev git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167541 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-07Treat an empty string the same way as a NULL country argument.russell1-7/+4
In passing, simplify the handling of returning a default tone zone. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167432 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-06Use the correct variable when creating the format stringmmichelson1-1/+1
(closes issue #14177) Reported by: nic_bellamy Patches: asterisk-trunk-svn-r167242-ast_db_gettree.patch uploaded by nic (license 299) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167299 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-06Merged revisions 167259 via svnmerge from tilghman1-4/+16
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r167259 | tilghman | 2009-01-06 14:44:03 -0600 (Tue, 06 Jan 2009) | 2 lines Security fix AST-2009-001. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167260 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-05A couple of changes to T.38 SDP attribute handlingmmichelson1-28/+48
There are some boolean attributes for T.38 such as T38FaxFillBitRemoval, T38FaxTranscodingMMR, and T38FaxTranscodingJBIG. By simply being present, we should treat these as a "true" value. The current code, however, was requiring a 1 or 0 as the value of the attribute in order to parse it. This is due to the fact that there are some T.38 endpoints and gateways that also transmit this information incorrectly. This patch follows the "be liberal in what you accept and strict in what you send" philosophy by accepting both the correctly- and incorrectly-formatted attributes, but only sending information as it is supposed to be sent. It was also discovered that a particular type of T.38 gateway sends some non-standard T.38 SDP attributes. Instead of using T38FaxMaxDatagram and T38MaxBitRate, it used T38MaxDatagram and T38FaxMaxRate respectively. We now will properly accept these attributes as well. Note that there are a lot of patches cited in the below commit message template. This is because the person who submitted these patches is an awesome person and wrote 1.4, 1.6.0, and 1.6.1 variants. (closes issue #13976) Reported by: linulin Patches: chan_sip.c.1.4-update1.diff uploaded by arcivanov (license 648) chan_sip.c.1.6.0-update1.diff uploaded by arcivanov (license 648) chan_sip.c.1.6.1-update1.diff uploaded by arcivanov (license 648) chan_sip.c.1.4-relaxedT38_update1.diff uploaded by arcivanov (license 648) chan_sip.c.1.6.0-relaxedT38_update1.diff uploaded by arcivanov (license 648) chan_sip.c.1.6.1-relaxedT38_update1.diff uploaded by arcivanov (license 648) Tested by: arcivanov git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167179 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-01Repeat attempts to write when we receive -EAGAIN from the driver, as detailedtilghman1-3/+9
in the ALSA sample code (see http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_8c-example.html#a32) Reported by: Jerry Geis (via the -users list) Fixed by: me (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167095 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-31Also inherit the musiconhold class.tilghman1-0/+1
(Closes #14153) Reported by: Jerry Geis, via the users list. Patch by: me (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166953 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-28Use strncat() instead of an sprintf() in which source and target buffers overlaprussell1-2/+3
http://lists.digium.com/pipermail/asterisk-dev/2008-December/035919.html git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166772 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-23Compile, even if both DAHDI and Zaptel are not installed.tilghman2-0/+4
(Closes issue #14120) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166592 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-23Fix a crash resulting from a datastore with inheritance but no duplicate ↵mmichelson1-1/+1
callback The fix for this is to simply set the newly created datastore's data pointer to NULL if it is inherited but has no duplicate callback. (closes issue #14113) Reported by: francesco_r Patches: 14113.patch uploaded by putnopvut (license 60) Tested by: francesco_r git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166568 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-23Use the integer form of condition for integer comparisons.tilghman1-1/+4
(closes issue #14127) Reported by: andrew git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166509 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-22Fix a deadlock relating to channel locks and autoservicemmichelson1-1/+12
It has been discovered that if a channel is locked prior to a call to ast_autoservice_stop, then it is likely that a deadlock will occur. The reason is that the call to ast_autoservice_stop has a check built into it to be sure that the thread running autoservice is not currently trying to manipulate the channel we are about to pull out of autoservice. The autoservice thread, however, cannot advance beyond where it currently is, though, because it is trying to acquire the lock of the channel for which autoservice is attempting to be stopped. The gist of all this is that a channel MUST NOT be locked when attempting to stop autoservice on the channel. In this particular case, the channel was locked by a call to ast_read. A call to ast_exists_extension led to autoservice being started and stopped due to the existence of dialplan switches. It may be that there are future commits which handle the same symptoms but in a different location, but based on my looks through the code, it is very rare to see a construct such as this one. (closes issue #14057) Reported by: rtrauntvein Patches: 14057v3.patch uploaded by putnopvut (license 60) Tested by: rtrauntvein Review: http://reviewboard.digium.com/r/107/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166380 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-22Fix up timeout handling in ast_carefulwrite().russell1-1/+18
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166297 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-22Re-work ref count handling of MoH classes using astobj2 to resolve crashes.russell2-325/+460
(closes issue #13566) Reported by: igorcarneiro Tested by: russell Review: http://reviewboard.digium.com/r/106/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166262 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19Backport of AUDIOHOOK_INHERIT for Asterisk 1.4mmichelson6-10/+372
(closes issue #13538) Reported by: mbit Patches: 13538.patch uploaded by putnopvut (license 60) Tested by: putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166157 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19This merges the masqpark branch into 1.4murf4-97/+53
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: http://svn.digium.com/svn/asterisk/branches/1.4@166093 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19(closes issue #13480)jpeeler10-135/+51
Reported by: tzafrir Replace a bunch of if defined checks for Zaptel/DAHDI through several new defines in dahdi_compat.h. This removes a lot of code duplication. Example from bug: #ifdef HAVE_ZAPTEL fd = open("/dev/zap/pseudo", O_RDWR); #else fd = open("/dev/dahdi/pseudo", O_RDWR); #endif is replaced with: fd = open(DAHDI_FILE_PSEUDO, O_RDRW); git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19Ensure that the chanspy datastore is fully initialized.russell1-1/+1
This patch resolved some random crash issues observed by a user on a BSD system (closes issue #14111) Reported by: ys Patches: app_chanspy.c.diff uploaded by ys (license 281) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165889 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18Make ast_carefulwrite() be more careful.russell1-13/+38
This patch handles some additional cases that could result in partial writes to the file description. This was done to address complaints about partial writes on AMI. (issue #13546) (more changes needed to address potential problems in 1.6) Reported by: srt Tested by: russell Review: http://reviewboard.digium.com/r/99/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165796 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18Add mutexes around accesses to the IMAP library interface. This preventstilghman1-8/+42
certain crashes, especially when shared mailboxes are used. (closes issue #13653) Reported by: howardwilkinson Patches: asterisk-1.4.21.2-appvoicemail-sharedimap-lock.patch uploaded by howardwilkinson (license 590) Tested by: jpeeler git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165767 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18Set the process group ID on the MOH process so that all children will get killedrussell1-6/+7
(closes issue #14099) Reported by: caspy Patches: res_musiconhold.c.patch.killpg.try2 uploaded by caspy (license 645) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165661 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18Only care about a compatible codec for early bridging if we are actually ↵file1-3/+2
bridging to another channel. If we are not we actually want to bring the audio back to us. (closes issue #13545) Reported by: davidw git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165591 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18Do not crash if we are not passed in a followme id.file1-6/+10
(closes issue #14106) Reported by: ys Patches: app_followme.c.2.diff uploaded by ys (license 281) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165537 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17Reverse the fix from issue #6176 and add proper handling for that issue.tilghman1-19/+54
(Closes issue #13962, closes issue #13363) Fixed by myself (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165317 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17Fix some memory leaks found while looking at how realtimemmichelson4-7/+15
configs are handled. Also cleaned up some coding guidelines violations in app_realtime.c, mostly related to spacing git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165255 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16After looking through SIP registration code most of the day, thismmichelson1-1/+3
is one of the few things I could find that was just plain wrong. Even though it probably isn't possible for it to happen, it seems weird to have code that checks if a pointer is NULL and then immediately dereferences that pointer if it was NULL. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164977 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Fix an issue where DEBUG_THREADS may erroneously report that a thread russell1-0/+6
is exiting while holding a lock. If the last lock attempt was a trylock, and it failed, it will still be in the list of locks so that it can be reported. (closes issue #13219) Reported by: pj git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164881 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.russell1-1/+1
This is a bug I noticed while looking at the code for app_macro. This return code means that another thread has assumed ownership of the channel and it can no longer be touched. (I hate this return code with a passion, by the way.) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164876 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Add "restart gracefully" to the AMI blacklist of CLI commands. russell1-0/+1
"module unload" was already identified as a command that can not be used from the AMI. "restart gracefully" effectively unloads all modules, and will run in to the same problems. (closes issue #13894) Reported by: kernelsensei git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164806 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS.russell2-12/+28
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: http://svn.digium.com/svn/asterisk/branches/1.4@164736 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Fix a memory leak related to the use of the "setvar" configuration option.russell1-10/+14
The problem was that these variables were being appended to the list of vars on the sip_pvt every time a re-registration or re-subscription came in. Since it's just a waste of memory to put them there unless the request was an INVITE, then the fix is to check the request type before copying the vars. (closes issue #14037) Reported by: marvinek Tested by: russell git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164672 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16I added a sentence to clarify why - and ' ' are ignored in patternsmurf1-1/+2
as per bug 14076. Leif says he'll put some stuff about it in the extensions.conf sample, etc. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164634 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Don't try to change working directory if a directory was not configured.russell1-1/+1
(closes issue #14089) Reported by: caspy git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164605 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15Add the deadlock note to ast_spawn_extension as wellmmichelson1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164422 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15Add notes to autoservice and pbx doxygen regarding a potentialmmichelson2-0/+25
deadlock scenario so that it is avoided in the future git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164416 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15Do not try to unlock a non-existant channel if the transfer fails.file1-1/+3
(closes issue #13800) Reported by: dwagner Patches: asterisk-1.4.22-chan-sip-nullp.patch uploaded by tweety (license 608) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164350 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15Use autoconf logic to determine whether the system has timersub or not. Do ↵file4-6/+72
not blindly assume Solaris does not. (closes issue #13838) Reported by: ano git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164343 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15Can we try not to assign an unsigned int to -1?file1-1/+1
(closes issue #14074) Reported by: wetwired git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164204 f38db490-d61c-443f-a65b-d21fe96a405b