aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2009-08-18git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.26-rc3@212958 ↵v1.4.26-rc3kpfleming8-20/+19
f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-18Use autotagged externalslmadsen0-0/+0
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.26-rc3@201619 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-18Importing files for 1.4.26-rc3 release.lmadsen3-0/+24808
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.26-rc3@201618 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-18Creating tag for the release of asterisk-1.4.26-rc3lmadsen0-0/+0
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.26-rc3@201617 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-18Creating tag for the release of asterisk-1.4.26-rc3lmadsen0-0/+0
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.26-rc3@201615 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-18Fix memory corruption and leakage related reloads of non files mode MoH classes.russell1-1/+2
For Music on Hold classes that are not files mode, meaning that we are executing an application that will feed us audio data, we use a thread to monitor the external application and read audio from it. This thread also makes use of the MoH class object. In the MoH class destructor, we used pthread_cancel() to ask the thread to exit. Unfortunately, the code did not wait to ensure that the thread actually went away. What needed to be done is a pthread_join() to ensure that the thread fully cleans up before we proceed. By adding this one line, we resolve two significant problems: 1) Since the thread was never joined, it never fully goes away. So, on every reload of non-files mode MoH, an unused thread was sticking around. 2) There was a race condition here where the application monitoring thread could still try to access the MoH class, even though the thread executing the MoH reload has already destroyed it. (issue #15109) Reported by: jvandal (issue #15123) Reported by: axisinternet (issue #15195) Reported by: amorsen (issue AST-208) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@201600 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-17Change the datastore traversal in ast_do_masquerade to use a safe list ↵mmichelson1-1/+5
traversal. It is possible for datastore fixup functions to remove the datastore from the list and free it. In particular, the queue_transfer_fixup in app_queue does this. While I don't yet know of this causing any crashes, it certainly could. Found while discussing a separate issue with Brian Degenhardt. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@201450 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-17StopMixMonitor race condition (not giving up file immediately)dvossel1-26/+64
StopMixMonitor only indicates to the MixMonitor thread to stop writing to the file. It does not guarantee that the recording's file handle is available to the dialplan immediately after execution. This results in a race condition. To resolve this, the filestream pointer is placed in a datastore on the channel. When StopMixMonitor is called, the datastore is retrieved from the channel and the filestream is closed immediately before returning to the dialplan. Documentation indicating the use of StopMixMonitor to free files has been updated as well. (closes issue #15259) Reported by: travisghansen Tested by: dvossel Review: https://reviewboard.asterisk.org/r/283/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@201423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-17Checks for NULL sip_pvt pointer in chan_sip.c->acf_channel_read()dbrooks1-0/+4
Zombie channels could be passed, and chan_sip.c wasn't checking for it. Could crash Asterisk. Now checking for NULL pointer. (closes issue #15330) Reported by: okrief Tested by: dbrooks git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@201380 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-17Correct AST_LIST_APPEND_LIST behavior when list to be appended is empty.kpfleming1-5/+8
When the list to be appended is empty, and the list to be appended to is *not*, AST_LIST_APPEND_LIST would actually cause the target list to become broken, and no longer have a pointer to its last entry. This patch fixes the problem. (reported by Stanislaw Pitucha on the asterisk-dev mailing list) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@201261 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-16Improve support for media paths that can generate multiple frames at once.kpfleming12-194/+334
There are various media paths in Asterisk (codec translators and UDPTL, primarily) that can generate more than one frame to be generated when the application calling them expects only a single frame. This patch addresses a number of those cases, at least the primary ones to solve the known problems. In addition it removes the broken TRACE_FRAMES support, fixes a number of bugs in various frame-related API functions, and cleans up various code paths affected by these changes. https://reviewboard.asterisk.org/r/175/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@200991 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-16Show the interface name on error, if it is not found.eliel1-1/+1
If the smdiport specified is not found, show the interface name instead of '(null)'. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@200875 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15Add INFO to our allowed methods so that endpoints know they may send it to us.mmichelson1-1/+1
AST-223 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@200513 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-12Suppress a warning message and give a better return code when generatingmmichelson1-0/+10
inband ringing after a call is answered. (closes issue #15158) Reported by: madkins Patches: 15158.patch uploaded by mmichelson (license 60) Tested by: madkins git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@200360 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-11Backport fix for parallel build warnings from trunk r199781.seanbright1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@200185 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-11Fix path for .flavor and .version.lmadsen1-3/+3
(issue #14737) Reported by: davidw Patches: flavor.patch uploaded by davidw (license 780) Tested by: davidw git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@200037 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-10__WORDSIZE is not available on all platforms, so use sizeof(void *) instead.seanbright1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@199856 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-08Fix a typo in the stack size calculation just introduced.seanbright1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@199628 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-08Increase the size of our thread stack on 64 bit processors.seanbright1-3/+3
We were setting the stack size for each thread to 240KB regardless of architecture, which meant that in some scenarios we actually had less available stack space on 64 bit processors (pointers use 8 bytes instead of 4). So now we calculate the stack size we reserve based on the platform's __WORDSIZE, which gives us: 32 bit -> 240KB 64 bit -> 496KB 128 bit -> 1008KB (that's right, we're ready for 128 bit processors) Patch typed by me but written by several members of #asterisk-dev, including Kevin, Tilghman, and Qwell. (closes issue #14932) Reported by: jpiszcz Patches: 06052009_issue14932.patch uploaded by seanbright (license 71) Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@199626 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-05Fixes issue with hints giving unexpected results.dvossel1-19/+12
Hints with two or more devices that include ONHOLD gave unexpected results. (closes issue #15057) Reported by: p_lindheimer Patches: onhold_trunk.diff uploaded by dvossel (license 671) pbx.c.1.4.patch uploaded by p (license 558) devicestate.c.trunk.patch uploaded by p (license 671) Tested by: p_lindheimer, dvossel Review: https://reviewboard.asterisk.org/r/254/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@199297 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-04Additional updates to AST-2009-001dvossel1-1/+17
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@199138 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-04Safely handle AMI connections/reload requests that occur during startup.seanbright3-9/+101
During asterisk startup, a lock on the list of modules is obtained by the primary thread while each module is initialized. Issue 13778 pointed out a problem with this approach, however. Because the AMI is loaded before other modules, it is possible for a module reload to be issued by a connected client (via Action: Command), causing a deadlock. The resolution for 13778 was to move initialization of the manager to happen after the other modules had already been lodaded. While this fixed this particular issue, it caused a problem for users (like FreePBX) who call AMI scripts via an #exec in a configuration file (See issue 15189). The solution I have come up with is to defer any reload requests that come in until after the server is fully booted. When a call comes in to ast_module_reload (from wherever) before we are fully booted, the request is added to a queue of pending requests. Once we are done booting up, we then execute these deferred requests in turn. Note that I have tried to make this a bit more intelligent in that it will not queue up more than 1 request for the same module to be reloaded, and if a general reload request comes in ('module reload') the queue is flushed and we only issue a single deferred reload for the entire system. As for how this will impact existing installations - Before 13778, a reload issued before module initialization was completed would result in a deadlock. After 13778, you simply couldn't connect to the manager during startup (which causes problems with #exec-that-calls-AMI configuration files). I believe this is a good general purpose solution that won't negatively impact existing installations. (closes issue #15189) (closes issue #13778) Reported by: p_lindheimer Patches: 06032009_15189_deferred_reloads.diff uploaded by seanbright (license 71) Tested by: p_lindheimer, seanbright Review: https://reviewboard.asterisk.org/r/272/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@199022 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-03Fix a possible crash in pbx_spool.seanbright1-3/+3
We were trying to reference members of a struct that had previously been freed. This patch makes sure that we free the struct after it has been removed from the spooler queue. (closes issue #15072) Reported by: garlew Patches: spool.diff uploaded by garlew (license 376) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198957 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-03Generic call forward api, ast_call_forward()dvossel3-6/+107
The function ast_call_forward() forwards a call to an extension specified in an ast_channel's call_forward string. After an ast_channel is called, if the channel's call_forward string is set this function can be used to forward the call to a new channel and terminate the original one. I have included this api call in both channel.c's ast_request_and_dial() and res_feature.c's feature_request_and_dial(). App_dial and app_queue already contain call forward logic specific for their application and options. (closes issue #13630) Reported by: festr Review: https://reviewboard.asterisk.org/r/271/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198891 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01If using the old deprecated format, a reload would cause the class to disappear.tilghman1-6/+11
(closes issue #14759) Reported by: lidocaineus Patches: 20090518__issue14759.diff.txt uploaded by tilghman (license 14) Tested by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198665 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-30Properly terminate AMI JabberSend response messages.seanbright1-8/+8
The response message (either Error or Success) needs an extra trailing \r\n after the fields to inform the client that the message is complete. (closes issue #14876) Reported by: srt Patches: 05302009_1.4_res_jabber.c.diff uploaded by seanbright (license 71) asterisk_14876.patch uploaded by srt (license 378) trunk-14876-2.diff uploaded by phsultan (license 73) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198370 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-30Fix a crash that occurred when MWI SMDI messages expired.russell1-0/+2
(closes issue #14561) Reported by: cmoss28 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198311 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-30Treat an empty FORWARD_CONTEXT the same way we treat a missing one.seanbright1-0/+3
(closes issue #15056) Reported by: p_lindheimer Patches: 05292009_bug15056.diff uploaded by seanbright (license 71) Tested by: p_lindheimer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198251 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-29Use AST_CDR_NOANSWER instead of AST_CDR_NULL as the default CDR disposition.mnicholson4-3/+13
This change also involves the addition of an AST_CDR_FLAG_ORIGINATED flag that is used on originated channels to distinguish: them from dialed channels. (closes issue #12946) Reported by: meral Patches: null-cdr2.diff uploaded by mnicholson (license 96) Tested by: mnicholson, dbrooks (closes issue #15122) Reported by: sum Tested by: sum git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198068 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-29Fix 'make config' target for Slackware.seanbright1-1/+1
There was a missing semi-colon after the echo statement in the Makefile that was causing problems for some users. Fix suggested by reporter. (closes issue #15225) Reported by: pdavis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197998 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28Update MixMonitor documentation.lmadsen1-0/+4
Updated the MixMonitor documentation for the 'b' option so that it is more obvious that you must not optimize awat the Local channel when using this option. (issue #14829) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197895 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28'iax show peer blah' now outputs whether or not peer 'blah' is in trunk mode ↵dvossel1-0/+1
or not. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28Allow for media to arrive from an alternate source when responding to a ↵mmichelson3-5/+110
reinvite with 491. When we receive a SIP reinvite, it is possible that we may not be able to process the reinvite immediately since we have also sent a reinvite out ourselves. The problem is that whoever sent us the reinvite may have also sent a reinvite out to another party, and that reinvite may have succeeded. As a result, even though we are not going to accept the reinvite we just received, it is important for us to not have problems if we suddenly start receiving RTP from a new source. The fix for this is to grab the media source information from the SDP of the reinvite that we receive. This information is passed to the RTP layer so that it will know about the alternate source for media. Review: https://reviewboard.asterisk.org/r/252 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197588 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28Use the address we already know when reloading a peer with nat=yes.eliel1-2/+5
If we already have an address for a peer, and we are reloading the sip configuration, try to use that address to contact the peer, instead of getting it from the Contact. (closes issue #15194) Reported by: ibc Patches: sip.patch uploaded by eliel (license 64) Tested by: manwe git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197562 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28Add flags to chanspy audiohook so that audio stays in sync.mmichelson3-1/+17
There are two flags being added to the chanspy audiohook here. One is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set, we ensure that the read and write slinfactories on the audiohook do not skew beyond a certain tolerance. In addition, there is a new audiohook flag added here, AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for a slinfactory to build up a substantial amount of audio before flushing it. For this particular issue, this means that the person spying on the call will hear the conversations in real time with very little delay in the audio. (closes issue #13745) Reported by: geoffs Patches: 13745.patch uploaded by mmichelson (license 60) Tested by: snblitz git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197537 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28Fix a bug where the flag indicating the presence of rport would get ↵file1-1/+7
overwritten by the nat setting. The presence of rport is now stored as a separate flag. Once the dialog is setup and authenticated (or it passes through unauthenticated) the proper nat flag is set. (closes issue #13823) Reported by: dimas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197466 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-27Use bash explicitly when calling build_tools/mkpkgconfig from the Makefile.seanbright1-1/+1
Since we use bashisms in build_tools/mkpkgconfig, we should call on bash explicitly when running from the Makefile, otherwise we get errors during a 'make install.' (closes issue #15209) Reported by: seandarcy git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197264 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-27Typo fixoej1-3/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197259 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-27Use a different determinator on whether to print the delimiter, since ↵tilghman1-5/+6
leading fields may be blank. (closes issue #15208) Reported by: ramonpeek Patch by me, though inspired in part by a patch from ramonpeek git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197194 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-27Fix broken attended transfersjpeeler2-5/+7
The bridge was terminating immediately after the attended transfer was completed. The problem was because upon reentering ast_channel_bridge nexteventts was checked to see if it was set and if so could possibly return AST_BRIDGE_COMPLETE. (closes issue #15183) Reported by: andrebarbosa Tested by: andrebarbosa, tootai, loloski git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197124 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-27Fix handling of the 'state_interface' option of the 'queue add member' CLIseanbright1-1/+3
command. This change relates to r184980, which was a backport of the state interface changes to app_queue from trunk. trunk and all of the 1.6.x branches are not affected. 'queue add member' allows for specifying an interface to use for device state when adding a queue member via CLI, but the validation code was not properly updated to reflect this optional argument. (closes issue #15198) Reported by: loloski Patches: 05272009_app_queue.diff uploaded by seanbright (license 71) Tested by: loloski git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197024 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-26Resolve a file handle leak.russell1-0/+4
The frames here should have always been freed. However, out of luck, there was never any memory leaked. However, after file streams became reference counted, this code would leak the file stream for the file being read. (closes issue #15181) Reported by: jkroon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@196826 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-26Remove some bash specific stuff from safe_asterisk.file1-4/+4
(closes issue #10812) Reported by: paravoid Patches: safe_asterisk_bashism.diff uploaded by tzafrir (license 46) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@196657 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-22Fix a bug where using immediate with mISDN caused a cause code of 16 to get ↵file1-2/+3
sent back instead of 1 if the 's' extension did not exist. (closes issue #12286) Reported by: lmamane git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@196116 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Sign problem calculating timestamp for iax frame leads to no audio on the ↵dvossel1-0/+3
receiving peer. There are rare cases in which a frame's delivery timestamp is slightly less than the iax2_pvt's offset. This causes the pvt's timestamp to be a small negative number, but since the timestamp value is unsigned it looks like a huge positive number. This patch checks for this negative case and sets the ms to zero. A similar check is already done right below this one in the 'else' statement. (closes issue #15032) Reported by: guillecabeza Patches: chan_iax2.c.patch_timestamp uploaded by guillecabeza (license 380) Tested by: guillecabeza (closes issue #14216) Reported by: Andrey Sofronov git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195991 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21This commit prevents cdr records with AST_CDR_FLAG_ANSLOCKED and ↵mnicholson3-6/+52
AST_CDR_FLAG_LOCKED from being updated in certain cases. This is accomplished by adding two functions to update the answer time and disposition of calls that checks for the proper lock flags. These functions are used in the ast_bridge_call() function so that ForkCDR(A) calls are respected. This patch also modifies the way ast_bridge_call() chooses the cdr record to base the bridged_cdr on. Previously the first unlocked cdr record would be chosen, now instead the first cdr record is chosen and forked cdr records are moved to the bridge_cdr. This allows the original cdr record and any forked cdr records to be properly updated with answer and end times. (closes issue #13797) Reported by: sh0t Tested by: sh0t (closes issue #14744) Reported by: deepesh git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195881 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-20Fix some code that wrongly assumed a pointer would always be non-NULL when ↵file1-5/+11
dealing with CDRs after a bridge. (closes issue #15079) Reported by: barryf git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195688 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-20Fix a bug where the MeetMe option 'D' did not actually prompt for the pin.file1-1/+1
(closes issue #15050) Reported by: pmhaddad git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195635 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-19Ensure thread keys are initialized before attempting to access them.tilghman1-0/+3
(closes issue #14889) Reported by: jaroth Patches: app_voicemail.c.patch uploaded by msirota (license 758) Tested by: msirota, BlargMaN git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195520 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-19Fix a bug where direct RTP setup would partially occur even when disabled if ↵file1-1/+1
the calling channel was answered. (issue #13545) Reported by: davidw (issue #14244) Reported by: mbnwa git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195448 f38db490-d61c-443f-a65b-d21fe96a405b