Commit Graph

13251 Commits

Author SHA1 Message Date
Russell Bryant
301945890d Only try to close the file if one was actually opened
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:19:47 +00:00
Russell Bryant
c67d152525 Don't use free() directly. This caused a crash since ast_filestream is now an ao2 object.
Reported by JunK-Y on IRC, #asterisk-dev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:03:59 +00:00
Russell Bryant
24ccfad6dc Treat an empty string the same way as a NULL country argument.
In passing, simplify the handling of returning a default tone zone.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 17:29:53 +00:00
Mark Michelson
5eca294b65 Use the correct variable when creating the format string
(closes issue #14177)
Reported by: nic_bellamy
Patches:
      asterisk-trunk-svn-r167242-ast_db_gettree.patch uploaded by nic (license 299)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 21:35:57 +00:00
Tilghman Lesher
8476207008 Merged revisions 167259 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@167260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 20:48:05 +00:00
Mark Michelson
543dfee83c A couple of changes to T.38 SDP attribute handling
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@167179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-05 16:51:59 +00:00
Tilghman Lesher
30fe8c619d Repeat attempts to write when we receive -EAGAIN from the driver, as detailed
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@167095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-01 00:01:22 +00:00
Tilghman Lesher
f3f0f40223 Also inherit the musiconhold class.
(Closes #14153)
Reported by: Jerry Geis, via the users list.
Patch by: me (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 19:20:35 +00:00
Russell Bryant
d4ac0f7651 Use strncat() instead of an sprintf() in which source and target buffers overlap
http://lists.digium.com/pipermail/asterisk-dev/2008-December/035919.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-28 15:13:48 +00:00
Tilghman Lesher
5dd486be22 Compile, even if both DAHDI and Zaptel are not installed.
(Closes issue #14120)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 15:35:38 +00:00
Mark Michelson
62c8625f2e Fix a crash resulting from a datastore with inheritance but no duplicate 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@166568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 15:16:26 +00:00
Tilghman Lesher
45bc54db0a Use the integer form of condition for integer comparisons.
(closes issue #14127)
 Reported by: andrew


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 04:05:25 +00:00
Mark Michelson
4133fa7cfc Fix a deadlock relating to channel locks and autoservice
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@166380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 20:56:29 +00:00
Russell Bryant
8b68bd17e5 Fix up timeout handling in ast_carefulwrite().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 17:22:56 +00:00
Russell Bryant
acd0af78ea Re-work ref count handling of MoH classes using astobj2 to resolve crashes.
(closes issue #13566)
Reported by: igorcarneiro
Tested by: russell
Review: http://reviewboard.digium.com/r/106/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 14:45:27 +00:00
Mark Michelson
7fdf99803e Backport of AUDIOHOOK_INHERIT for Asterisk 1.4
(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:34:57 +00:00
Steve Murphy
e3700a13a4 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/branches/1.4@166093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 22:30:32 +00:00
Jeff Peeler
e0bec5d67d (closes issue #13480)
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@165991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 19:48:00 +00:00
Russell Bryant
5de6848d0c Ensure that the chanspy datastore is fully initialized.
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@165889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 15:03:02 +00:00
Russell Bryant
991494f2c0 Make ast_carefulwrite() be more careful.
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@165796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:39:25 +00:00
Tilghman Lesher
139be9556b Add mutexes around accesses to the IMAP library interface. This prevents
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@165767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:14:47 +00:00
Russell Bryant
0d24c2ed92 Set the process group ID on the MOH process so that all children will get killed
(closes issue #14099)
Reported by: caspy
Patches:
      res_musiconhold.c.patch.killpg.try2 uploaded by caspy (license 645)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 18:52:18 +00:00
Joshua Colp
3a354c3500 Only care about a compatible codec for early bridging if we are actually 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@165591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 17:11:42 +00:00
Joshua Colp
3a0e7aec6a Do not crash if we are not passed in a followme id.
(closes issue #14106)
Reported by: ys
Patches:
      app_followme.c.2.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 16:07:37 +00:00
Tilghman Lesher
8468d435e8 Reverse the fix from issue #6176 and add proper handling for that issue.
(Closes issue #13962, closes issue #13363)
Fixed by myself (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 21:14:37 +00:00
Mark Michelson
a391fd9b1c Fix some memory leaks found while looking at how realtime
configs are handled.

Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 20:51:38 +00:00
Mark Michelson
c49c8b9a3a After looking through SIP registration code most of the day, this
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@164977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 23:04:27 +00:00
Russell Bryant
63444acf6b Fix an issue where DEBUG_THREADS may erroneously report that a thread
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@164881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 21:38:29 +00:00
Russell Bryant
c703960acc Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@164876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 21:10:44 +00:00
Russell Bryant
aa60ad0e43 Add "restart gracefully" to the AMI blacklist of CLI commands.
"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: https://origsvn.digium.com/svn/asterisk/branches/1.4@164806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:35:25 +00:00
Russell Bryant
083047a794 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/branches/1.4@164736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 17:06:29 +00:00
Russell Bryant
802d4ebd51 Fix a memory leak related to the use of the "setvar" configuration option.
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@164672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 15:56:37 +00:00
Steve Murphy
4f807bb183 I added a sentence to clarify why - and ' ' are ignored in patterns
as per bug 14076. Leif says he'll put some stuff about it in the
extensions.conf sample, etc.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 15:15:58 +00:00
Russell Bryant
c6f1387e73 Don't try to change working directory if a directory was not configured.
(closes issue #14089)
Reported by: caspy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 14:28:10 +00:00
Mark Michelson
ccf5565ccd Add the deadlock note to ast_spawn_extension as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 19:53:08 +00:00
Mark Michelson
a43cf62956 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/branches/1.4@164416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 19:45:07 +00:00
Joshua Colp
2850bf37a9 Do not try to unlock a non-existant channel if the transfer fails.
(closes issue #13800)
Reported by: dwagner
Patches:
      asterisk-1.4.22-chan-sip-nullp.patch uploaded by tweety (license 608)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 18:11:21 +00:00
Joshua Colp
b80ffd6d26 Use autoconf logic to determine whether the system has timersub or not. Do not blindly assume Solaris does not.
(closes issue #13838)
Reported by: ano


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 17:43:59 +00:00
Joshua Colp
dfa5f7c4b4 Can we try not to assign an unsigned int to -1?
(closes issue #14074)
Reported by: wetwired


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 15:05:08 +00:00
Russell Bryant
3a864cb7b6 Handle a case where a call can be bridged to a channel that is still ringing.
The issue that was reported was about a case where a RINGING channel got 
redirected to an extension to pick up a call from parking.  Once the parked 
call got taken out of parking, it heard silence until the other side answered.  
Ideally, the caller that was parked would get a ringing indication.  This patch
fixes this case so that the caller receives ringback once it comes out of 
parking until the other side answers.

The fixes are:

 - Make sure we remember that a channel was an outgoing channel when doing 
   a masquerade.  This prevents an erroneous ast_answer() call on the channel,
   which causes a bogus 200 OK to be sent in the case of SIP.

 - Add some additional comments to explain related parts of code.

 - Update the handling of the ast_channel visible_indication field.  Storing 
   values that are not stateful is pointless.  Control frames that are events 
   or commands should be ignored.

 - When a bridge first starts, check to see if the peer channel needs to be 
   given ringing indication because the calling side is still ringing.

 - Rework ast_indicate_data() a bit for the sake of readability.

(closes issue #13747)
Reported by: davidw
Tested by: russell
Review: http://reviewboard.digium.com/r/90/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 14:31:37 +00:00
Tilghman Lesher
d8ff8d169d Change the default calldurationlimit from the special value 0 to -1, so we
can better detect an exceptional case.  This follows on to the changes made
in revision 156386.  Related to issue #13851.
(closes issue #13974)
 Reported by: paradise
 Patches: 
       20081208__bug13974.diff.txt uploaded by Corydon76 (license 14)
 Tested by: file, blitzrage, ZX81


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 23:22:02 +00:00
Russell Bryant
36996f4312 Set the reviewboard:url property on 1.4, as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 22:20:26 +00:00
Tilghman Lesher
6d268e6d39 Simple fix for Ctrl-C not immediately exiting Asterisk, but also add a
pointer inside editline to look back to asterisk.c, so others don't spend
as much time as I did looking (in the wrong place) for the appropriate
function.
Reported by: ZX81, via the #asterisk-users channel
Fixed by: me (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 22:03:10 +00:00
Russell Bryant
2404b83404 Specify uint32_t for variables storing a CRC32 so that it is actually 32 bits
on 64-bit machines, as well.

(inspired by issue #13879)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 14:40:31 +00:00
Russell Bryant
c518ed3be1 Resolve issues that could cause DTMF to be processed out of order.
These changes come from team/russell/issue_12658

1) Change autoservice to put digits on the head of the channel's frame readq 
   instead of the tail.  If there were frames on the readq that autoservice 
   had not yet read, the previous code would have resulted in out of order 
   processing.  This required a new API call to queue a frame to the head 
   of the queue instead of the tail.

2) Change up the processing of DTMF in ast_read().  Some of the problems 
   were the result of having two sources of pending DTMF frames.  There 
   was the dtmfq and the more generic readq.  Both were used for pending 
   DTMF in various scenarios.  Simplifying things to only use the frame 
   readq avoids some of the problems.

3) Fix a bug where a DTMF END frame could get passed through when it 
   shouldn't have.  If code set END_DTMF_ONLY in the middle of digit emulation,
   and a digit arrived before emulation was complete, digits would get 
   processed out of order.

(closes issue #12658)
Reported by: dimas
Tested by: russell, file
Review: http://reviewboard.digium.com/r/85/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 13:44:08 +00:00
Tilghman Lesher
f6ef5d5d6c When a Ctrl-C or Ctrl-D ends a remote console, on certain shells, the terminal
is messed up.  By intercepting those events with a signal handler in the remote
console, we can avoid those issues.
(closes issue #13464)
 Reported by: tzafrir
 Patches: 
       20081110__bug13464.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 23:35:55 +00:00
Matthew Nicholson
11e2a937dc Clean up the dundi cache every 5 minutes.
(closes issue #13819)
Reported by: adomjan
Patches:
      pbx_dundi.c-clearcache.patch uploaded by adomjan (license 487)
      dundi_clearecache3.diff uploaded by mnicholson (license 96)
Tested by: adomjan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 22:44:31 +00:00
Russell Bryant
32fff369e7 Fix some observed slowdowns in dialplan processing.
The change is to remove autoservice usage from dialplan functions that do not
need it because they do not perform operations that potentially block.

(closes issue #13940)
Reported by: tbelder


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 21:46:29 +00:00
Russell Bryant
d67d8cd2f3 Fix an issue that made it so you could only have a single caller executing
a custom feature at a time.  This was especially problematic when custom
features ran for any appreciable amount of time.

The fix turned out to be quite simple.  The dynamic features are now stored
in a read/write list instead of a list using a mutex.

(closes issue #13478)
Reported by: neutrino88
Fix suggested by file


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 16:54:51 +00:00
Tilghman Lesher
d9fb8362bc Don't wait forever, if there's a specified recording timeout.
(closes issue #13885)
 Reported by: bamby
 Patches: 
       res_agi.c.patch uploaded by bamby (license 430)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 16:51:27 +00:00