Commit Graph

12711 Commits

Author SHA1 Message Date
Tilghman Lesher d6eb859bc2 Revise dialplan locks to permit multiple locks per channel, but with deadlock avoidance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 23:31:14 +00:00
Russell Bryant 782c22ccb4 Merged revisions 79792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79792 | russell | 2007-08-16 17:32:33 -0500 (Thu, 16 Aug 2007) | 4 lines

Fix a little race condition that could cause a crash if two channels had MOH
stopped at the same time that were using a class that had been marked for
deletion when its use count hits zero.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 22:33:02 +00:00
Russell Bryant 74200abe10 Merged revisions 79778 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79778 | russell | 2007-08-16 17:24:25 -0500 (Thu, 16 Aug 2007) | 14 lines

This patch fixes a bug where reloading the module with "module reload" did not
delete classes from memory that were no longer in the config.  This patch fixes
that problem as well as another one.  Previously, if you reloaded MOH using the
"moh reload" CLI command, which behaved differently than "module reload ...",
MOH had to be stopped on every channel and started again immediately.  However,
there was no way to tell what class was being used, so they would all fall back
to the default class.

(closes issue #10139)
Reported by: blitzrage
Patches: 
      asterisk-10139-advanced.diff.txt uploaded by jamesgolovich (license 176)
Tested by: jamesgolovich

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 22:30:39 +00:00
Russell Bryant 0b44b92cf5 Merged revisions 79756 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79756 | russell | 2007-08-16 16:29:24 -0500 (Thu, 16 Aug 2007) | 11 lines

Fix more deadlocks in chan_iax2 that were introduced by making frame handling
and scheduling multi-threaded.  Unfortunately, we have to do some expensive
deadlock avoidance when queueing frames on to the ast_channel owner of the IAX2
pvt struct.  This was already handled for regular frames, but ast_queue_hangup
and ast_queue_control were still used directly.  Making these changes introduced
even more places where the IAX2 pvt struct can disappear in the context of a
function holding its lock due to calling a function that has to unlock/lock it
to avoid deadlocks.  I went through and fixed all of these places to account for
this possibility.
(issue #10362, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:33:38 +00:00
Joshua Colp 95ed8b7931 Fix properties on trunk again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:28:50 +00:00
Mark Michelson ff7c41753f Merged revisions 79748 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79748 | mmichelson | 2007-08-16 16:16:40 -0500 (Thu, 16 Aug 2007) | 8 lines

Fixes a problem where agents would get stuck busy due to their wrapuptime being longer than the queue's wrapuptime and
ringinuse=no for the queue.

(closes issue #10215, reported by Doug, repaired by me)

Special thanks to fkasumovic for pointing out the source of the problem and to bweschke for helping to come up with a solution!


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:21:35 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Steve Murphy c0060cd99a Many thanks to mvanbaak for his update to translate hints; I added the -d option for local testing purposes. This is from bug 10472
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 19:40:28 +00:00
Dwayne M. Hubbard 6186647ac3 added counter for iax2 show registry CLI output, closes issue 10461, thanks junky
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 18:23:39 +00:00
Dwayne M. Hubbard 46b75d5f17 added counter for voicemail show users, issue 10462, thanks junky
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 17:44:25 +00:00
Steve Murphy c33e2ec2ae mvanbaak asks: why did you include that twice? Answer: dunno. removed redundant include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 17:34:50 +00:00
Steve Murphy c11e482cc8 svn did me dirty for some reason. Left 5 files out of the commit; Tilghman copied them in from the branch, but I had made changes to these. Here they are.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 16:50:58 +00:00
Mark Michelson 80f49f0ac8 Merged revisions 79690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79690 | mmichelson | 2007-08-16 10:58:34 -0500 (Thu, 16 Aug 2007) | 5 lines

base_encode is not trying to open a log file, so we should not call it a log file in the warning.

(related to issue #10452, reported by bcnit)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 15:59:15 +00:00
Joshua Colp 3f998a86a1 (closes issue #10467)
Reported by: lunn
Patches:
      pbx_dundi.diff uploaded by lunn (license 179)
Don't print a warning saying an ethernet interface was found when it indeed was.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 15:29:44 +00:00
Joshua Colp b10671b0b8 Make conf2ael build on 64-bit systems.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 15:27:33 +00:00
Philippe Sultan bade686730 Merged revisions 79665 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79665 | phsultan | 2007-08-16 11:37:10 +0200 (Thu, 16 Aug 2007) | 21 lines

A fix for two critical problems detected while working with Daniel
McKeehan in issue #10184. 

Upon priority change, the resource list is not NULL terminated when
moving an item to the end of the list. This makes Asterisk endlessy
loop whenever it needs to read the list. Jids with different resource and
priority values, like in Gmail's and GoogleTalk's jabber clients put
that problem in evidence.

Upon reception of a 'from' attribute with an empty resource string,
Asterisk crashes when trying to access the found->cap pointer if the
resource list for the given buddy is not empty. This situation is
perfectly valid and must be handled. The Gizmoproject's jabber client
put that problem in evidence.

Also added a few comments in the code as well as a handle for the
capabilities from Gmail's jabber client, which are stored in a caps:c tag
rather than the usual c tag.

Closes issue #10184.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 09:45:22 +00:00
Christian Richter a3a32e6675 Merged revisions 79642 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79642 | crichter | 2007-08-16 10:21:21 +0200 (Do, 16 Aug 2007) | 1 line

0x80 + protocol is wrong for USERUSER when we want to send IA5 Chars.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 09:22:23 +00:00
Olle Johansson 0c321a54d9 Doc change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 06:52:17 +00:00
Jason Parker f38a688605 Modify the names of functions/variables in res_musiconhold to be useful.
Closes issue #10464, patch by caio1982


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 22:53:45 +00:00
Tilghman Lesher 918348f03c Missing from murf's last trunk commit, which was why trunk won't compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 21:25:13 +00:00
Joshua Colp eaeec33a5c Remove properties that appeared from Steve's last branch merge. Automerge has already run so everyone's branches based off of trunk are probably toast by now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 19:34:42 +00:00
Steve Murphy 9836efb5fb This commit closes bug 7605, and half-closes 7638. The AEL code has been redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 19:21:27 +00:00
Joshua Colp 5fbd7ebd24 Merged revisions 79553 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79553 | file | 2007-08-15 11:40:23 -0300 (Wed, 15 Aug 2007) | 6 lines

(closes issue #10440)
Reported by: irroot
(closes issue #10454)
Reported by: flo_turc
Increase maximum timestamp skew to 120. 20 was apparently far too low.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:42:49 +00:00
Mark Michelson 425aca97c4 Merged revisions 79527 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79527 | mmichelson | 2007-08-15 09:26:40 -0500 (Wed, 15 Aug 2007) | 5 lines

Fixed an error in the Russian language voicemail intro.

(issue #10458, reported and patched by Oleh)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:27:35 +00:00
Joshua Colp 3512cefb10 Merged revisions 79523 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79523 | file | 2007-08-15 11:18:44 -0300 (Wed, 15 Aug 2007) | 6 lines

(closes issue #10456)
Reported by: irroot
Patches:
      sip_timeout.patch uploaded by irroot (license 52)
Change hardcoded timer value to defined value. I'm doing this in 1.4 as well so if it needs to be changed in the future this place would not have been forgotten.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:20:36 +00:00
Christian Richter 8d6b33c64b Merged revisions 78936 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78936 | crichter | 2007-08-10 15:24:03 +0200 (Fr, 10 Aug 2007) | 1 line

fixed a bug with the useruser information element. We send them now also in the disconnect message.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 11:27:51 +00:00
Russell Bryant 4b584bbdf7 Merged revisions 79470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79470 | russell | 2007-08-14 13:49:10 -0500 (Tue, 14 Aug 2007) | 2 lines

Fix another spot where an iax2_peer would be leaked if realtime was in use.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 18:50:12 +00:00
Russell Bryant 4e038cdc7c Merged revisions 79436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79436 | russell | 2007-08-14 12:31:39 -0500 (Tue, 14 Aug 2007) | 3 lines

Fix some memory leaks throughout chan_iax2 related to the use of realtime.
I found these while working on iax2_peer object reference tracking.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 17:33:12 +00:00
Joshua Colp 9ebe338bc6 Merged revisions 79397 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79397 | file | 2007-08-14 12:27:13 -0300 (Tue, 14 Aug 2007) | 4 lines

(closes issue #10415)
Reported by: atis
Revert fix for #10327 as it causes more issues then it solves.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 15:30:03 +00:00
Steve Murphy d9b52497f0 Merged revisions 79255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79255 | murf | 2007-08-13 11:49:54 -0600 (Mon, 13 Aug 2007) | 1 line

This patch fixes bug 10411. I added a new regression test, some regression test cleanups
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 14:32:21 +00:00
Joshua Colp 9264d5007a (closes issue #10427)
Reported by: pj
Two of the three places ast_waitfor_nandfds could branch off to did not clear outfd and exception. If the calling function did not clear these there was a chance they could get a false positive on testing to see whether they were set.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 14:17:43 +00:00
Steve Murphy 4f98b05cd5 Don't ask me why, but waitfordigit will immediately return a 1 on my system, unless the outfd is initialized to -1 before calling the nandfds func
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 13:46:58 +00:00
Joshua Colp 94b1dda1fa Merged revisions 79334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79334 | file | 2007-08-13 18:57:20 -0300 (Mon, 13 Aug 2007) | 2 lines

Instead of accepting a single DTMF character accept a full string.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 21:59:15 +00:00
Tilghman Lesher c41121cdbb Only use the sanitysql if it's not zero-len
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 21:44:22 +00:00
Russell Bryant e05da8e948 Merged revisions 79301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79301 | russell | 2007-08-13 15:37:50 -0500 (Mon, 13 Aug 2007) | 3 lines

Don't call find_peer in registry_authrequest with the pvt lock held to avoid a
deadlock.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:40:47 +00:00
Russell Bryant 16373a4e5f Merged revisions 79276 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79276 | russell | 2007-08-13 15:18:30 -0500 (Mon, 13 Aug 2007) | 4 lines

Release the pvt lock before calling find_peer in register_verify to avoid a
deadlock.  Also, remove some unnecessary locking in auth_fail that was only done
recursively.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:20:43 +00:00
Russell Bryant 982a3ac424 Merged revisions 79274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79274 | russell | 2007-08-13 15:02:57 -0500 (Mon, 13 Aug 2007) | 3 lines

Don't call find_peer within update_registry with a pvt lock held.  This can
cause a deadlock as the code will eventually call find_callno.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:06:19 +00:00
Russell Bryant 0dd52f7196 Merged revisions 79272 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79272 | russell | 2007-08-13 14:27:39 -0500 (Mon, 13 Aug 2007) | 9 lines

I am fighting deadlocks in chan_iax2.  I have tracked them down to a single
core issue.  You can not call find_callno() while holding a pvt lock as this
function has to lock another (every) other pvt lock.  Doing so can lead to a
classic deadlock.  So, I am tracking down all of the code paths where this
can happen and fixing them.

The fix I committed earlier today was along the same theme.  This patch fixes
some code down the path of authenticate_reply.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 19:29:30 +00:00
Mark Michelson 8d929d7afd Allow non-realtime queues to have realtime members
(issue #10424, reported and patched by irroot)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 15:39:48 +00:00
Russell Bryant a2847deb73 Merged revisions 79214 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79214 | russell | 2007-08-13 10:28:13 -0500 (Mon, 13 Aug 2007) | 4 lines

Fix a potential deadlock in socket_process.  check_provisioning can eventually
call find_callno.  You can't hold a pvt lock while calling find_callno because
it goes through and locks every single one looking for a match.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 15:32:05 +00:00
Joshua Colp 3dac92ecbf Merged revisions 79207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79207 | file | 2007-08-13 11:51:09 -0300 (Mon, 13 Aug 2007) | 2 lines

Add an API call to allow the engine to know that DTMF was received.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:55:17 +00:00
Russell Bryant 5f0c3e7dbc constify the return value of reason2str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:23:38 +00:00
Joshua Colp d5eda8709c Merged revisions 79174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines

(closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:22:46 +00:00
Tilghman Lesher 89588a043f Merged revisions 79142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79142 | tilghman | 2007-08-11 00:23:04 -0500 (Sat, 11 Aug 2007) | 2 lines

Ensure the connection gets marked as used at allocation time (closes issue #10429, report and fix by mnicholson)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-11 05:28:08 +00:00
Jason Parker 9b3c3f1c61 Use localized softkey labels.
Add some information about localization "codes".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 21:29:31 +00:00
Steve Murphy 526d1f39a2 Merged revisions 79099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79099 | murf | 2007-08-10 14:53:43 -0600 (Fri, 10 Aug 2007) | 1 line

From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 21:03:06 +00:00
Russell Bryant 047dbef446 Store custom device states in astdb so that they will persist a restart. As a
side benefit, this simplifies the code a bit, too.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 20:48:49 +00:00
Joshua Colp e927902fe7 Bring up to date with poll changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 18:37:32 +00:00
Steve Murphy cc6a96c580 Merged revisions 79049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79049 | murf | 2007-08-10 12:25:51 -0600 (Fri, 10 Aug 2007) | 1 line

Re bug behavior mentioned in #asterisk, made this tweak to code, to prevent hundreds of log messages from being generated
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 18:35:15 +00:00
Steve Murphy 4382935600 oops. forgot to commit the prop change on .
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 18:33:03 +00:00