Commit Graph

12025 Commits

Author SHA1 Message Date
Russell Bryant
8b3f41409e Don't report a syntax error when an empty string is passed to ast_get_group.
Just return 0.

(closes issue #11540)
Reported by: tzafrir
Patches: 
      group_empty.diff uploaded by tzafrir (license 46)
	   -- slightly changed by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 21:40:02 +00:00
Mark Michelson
5dc1371bf2 Fixing a typo in a comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 20:09:06 +00:00
Joshua Colp
e276b231fb Include types.h in chan_h323 as without it it can not be compiled on some operating systems like FreeBSD to name one.
(closes issue #11585)
Reported by: sobomax
Patches:
      chan_h323.c.diff uploaded by sobomax (license 359)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 17:32:15 +00:00
Joshua Colp
856bc2ef76 Use ast_strlen_zero to see if our_contact is set or not on the dialog. It is possible for it to be a pointer to NULL.
(closes issue #11557)
Reported by: FuriousGeorge


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 17:27:11 +00:00
Russell Bryant
c03ccc41f2 Now that the contexts lock is a read/write lock, it should not be locked here
in ast_hint_state_changed().  This makes it get locked recursively which now
causes a deadlock.
(closes issue #11080, thanks to callguy for the access to a deadlocked machine)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 15:16:56 +00:00
Russell Bryant
67df6e008d Use the constant that I really meant to use here ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 14:44:29 +00:00
Russell Bryant
c792659cc7 Change ast_translator_best_choice() to only pay attention to audio formats.
This fixes a problem where Asterisk claims that a translation path can not be
found for channels involving video.

(closes issue #11638)
Reported by: cwhuang
Tested by: cwhuang
Patch suggested by cwhuang, with some additional changes by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 14:33:21 +00:00
Kevin P. Fleming
eb4d447b78 make this comment explain the situation in an even more explicit fashion
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 01:01:47 +00:00
Tilghman Lesher
3c3eb75062 Workaround for what is probably a glibc bug (but we'll see this crop up again
and again, if we don't add the workaround).
Reported by: rolek
Patch by: tilghman
(Closes issue #11601, closes issue #11426)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 20:43:38 +00:00
Russell Bryant
e6a8750fe7 Just in case the AST_FLAG_END_DTMF_ONLY flag was already set before starting
autoservice, remember it and ensure that the channel has the same setting when
autoservice gets stopped.  (pointed out by d1mas, patched up by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 19:04:31 +00:00
Russell Bryant
52df524ba0 When a channel is in autoservice, mark a flag on the channel that says that
we only care about the END of a digit.  That way, no magic digit emulation stuff
will happen when all we're doing is queueing up END frames.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 18:46:39 +00:00
Russell Bryant
39c5c66235 Don't try to send a parked call back to itself.
(closes issue #11622, reported by djrodman, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 17:24:17 +00:00
Russell Bryant
1deba2c9ed Don't store DTMF BEGIN frames while a channel is in autoservice. It's just
going to make ast_read() do a lot of extra work when the channel comes back
out of autoservice.
(closes issue #11628, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 17:06:26 +00:00
Russell Bryant
a4523fcd83 List include/asterisk/version.h as a .PHONY target because we want the commands
listed for this target to be executed regardless of whether the file exists or
not.  This fixes having the version not up to date when running from svn.
(closes issue #11619, reported by plack, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 17:00:03 +00:00
Joshua Colp
25aef5fc44 file says... build on the builders.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-25 02:27:08 +00:00
Tilghman Lesher
540077b7b1 Race: we need to wait to queue a NewChannel event until after the channel is
inserted into the channel list.  The reason is because some manager users
immediately queue requests from the channel when they see that event and are
confused when Asterisk reports no such channel. (Closes issue #11632)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 19:36:59 +00:00
Tilghman Lesher
9dbd385de7 More deadlock avoidance code (this time between sip_monitor and sip_hangup)
Reported by: apsaras
Patch by: tilghman
(Closes issue #11413)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 16:17:01 +00:00
Tilghman Lesher
f26935218f Another bit of bad logic in realtime_peer
Reported by: dimas
Patch by: dimas
(Closes issue #11631)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 15:39:56 +00:00
Tilghman Lesher
1e5463be20 Argh... I suppose third time's the charm.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 01:21:03 +00:00
Mark Michelson
54215d94f1 Bunch of coding guidelines cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:21:59 +00:00
Mark Michelson
f4663e4f22 Better quota support for using IMAP storage voicemail
(closes issue #11415, reported by jaroth)
(closes issue #11152, reported by selsky)

Patch provided by jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:11:34 +00:00
Mark Michelson
c30bab877c The mail_copy c-client function does not expect a full imap mailbox string, just the name of the mailbox.
(closes issue #11419, reported and patched by jaroth, with additional patchwork from me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 19:59:45 +00:00
Mark Michelson
8c7948fd44 Since we are freeing list elements within a list traversal, we need to use the safe
traversal and remove the item from the list before freeing it.

(closes issue 11612, reported by dtyoo)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:49:35 +00:00
Russell Bryant
5977f8d5be Convert the contexts lock to a read/write lock to resolve a deadlock. This
has a nice side benefit of improving performance.  :)

(closes issue #11609)
(closes issue #11080)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:37:47 +00:00
Mark Michelson
ad89849308 Removing a debug message I accidentally just committed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:11:44 +00:00
Mark Michelson
eac09a0cd0 Fixing Portuguese syntax for saying dates and times. Also some coding guidelines cleanup.
(closes issue #11599, reported and patched by caio1982, coding guidelines cleanup by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 15:45:14 +00:00
Tilghman Lesher
2f24e1b1bf Fix for restart-as-user problem reported via the -dev list
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 15:07:42 +00:00
Russell Bryant
32c8a851c7 Merged revisions 94255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r94255 | russell | 2007-12-20 14:21:41 -0600 (Thu, 20 Dec 2007) | 5 lines

Fix another potential seg fault ...

(closes issue #11606)
Reported by: dimas

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 20:22:22 +00:00
Russell Bryant
b80002cc9f Fix a deadlock in d-channel handling in chan_zap.
This deadlock was introduced by the fix to ensure that channels are properly
locked when handling channel variables.  There were sections of this code where
the channel pvt was locked before the channel lock, when in fact it _must_ be
the other way around.

(closes issue #11582)
Reported by: bugi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 20:08:42 +00:00
Russell Bryant
2fc3d3e903 Blocked revisions 94214 via svnmerge
........
r94214 | russell | 2007-12-20 11:29:11 -0600 (Thu, 20 Dec 2007) | 2 lines

Fix a couple of places where it's possible to dereference a NULL pointer.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 17:30:29 +00:00
Mark Michelson
b0dd0e2a68 Sox versions 13.0.0 and newer do not have "soxmix" and instead use sox -m. res_monitor
needs to use this if the user does not have soxmix.

(closes issue #11589, reported by amessina, patch inspired by amessina but with a flourish from me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 23:02:22 +00:00
Russell Bryant
612d0b8f45 Check for the existence of the soxmix application on the target platform and have
the result available in autoconfig.h.
(part of issue #11589)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 22:48:48 +00:00
Joshua Colp
52527facc4 Make the 1.4 builders happy, ensure var is NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 17:29:20 +00:00
Tilghman Lesher
d1a1f4599b Avoid segfault in chan_iax when peer isn't defined
(Closes issue #11602)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 17:04:13 +00:00
Jason Parker
ff5ffd02cf FreeBSD also does not have byte swap functions.
Issue 11586, patch by sobomax.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 22:42:41 +00:00
Tilghman Lesher
28d4f2f5eb Blocked revisions 93675 via svnmerge
........
r93675 | tilghman | 2007-12-18 12:44:41 -0600 (Tue, 18 Dec 2007) | 2 lines

Oops, missed this one case

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:45:37 +00:00
Tilghman Lesher
be17d99712 Merged revisions 93667 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r93667 | tilghman | 2007-12-18 12:23:06 -0600 (Tue, 18 Dec 2007) | 2 lines

Fixing AST-2007-027 (Closes issue #11119)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:29:39 +00:00
Mark Michelson
62fa8dfbfa Rework deadlock avoidance used in ast_write, since it meant that agent channels which were being monitored
had one audio file recorded and one empty audio file saved.

(closes issue #11529, reported by atis patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 17:02:48 +00:00
Jason Parker
6fa23de8ac Missed a spot..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:56:58 +00:00
Jason Parker
7e7db434e4 What was I thinking when I wrote this masterpiece?
-1 + 1 = 0..  who woulda thunk it?.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:45:57 +00:00
Joshua Colp
0a584613d6 Do not try to access information about a lock when printing out a trylock attempt. It is possible for the lock that it references to no longer be valid. This would have caused segfaults or deadlocks.
(issue #BE-263)
(closes issue #11080)
Reported by: callguy
(closes issue #11100)
Reported by: callguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:28:09 +00:00
Tilghman Lesher
8057fb41cb Today is tomorrow's yesterday, and yesterday's tomorrow is today, and
tomorrow's tomorrow is the day after tomorrow, so who cares if you
recycle anyway?

If this confuses you, that's nothing compared to what this fixes. ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 21:12:42 +00:00
Mark Michelson
2fa91746e3 We need to create the directory for a voicemail user even if they are using IMAP storage
since greetings are stored in the filesystem.

(closes issue #11388, reported by spditner, patch by me inspired by a patch by spditner)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 19:53:48 +00:00
Joshua Colp
48ae6172da If a call is received with a called number IE containing nothing go to the 's' extension.
(closes issue #9099)
Reported by: kb1_kanobe2
Patches:
      20070906__9099.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 18:05:55 +00:00
Kevin P. Fleming
fd1e942f53 fix some copy-and-paste leftovers
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:21:08 +00:00
Olle Johansson
517dacce70 Issue 11574: Add dependencies on res_monitor and res_features.
I wonder if Asterisk can run at all without res_features. My guess is that 
there's propably a lot of more modules and the core that depends on it.

Reported by: caio1982
(closes issue #11574)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:15:13 +00:00
Kevin P. Fleming
627f595c58 In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 06:44:51 +00:00
Russell Bryant
4965b39719 There are a lot of existing systems that #include non-existent files. So, to
make the transition to treating this as an error a bit less painless, just issue
a huge error message for now.  Then, later, we can reinstate the code that treats
it as a failure.

(Thanks to philippel for the feedback)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 17:36:08 +00:00
Joshua Colp
6a2c388e18 Up the length of the format on the SIP channel since it can now be rather long.
(closes issue #11552)
Reported by: francesco_r


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 15:16:15 +00:00
Christian Richter
876afa76de fixed the sequencing of WAITING_4DIGS state setting and overlap_task thread starting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 15:05:28 +00:00