asterisk/asterisk.git
11 years agoAdd manager peerstatus events when peer can't authenticate.
Olle Johansson [Tue, 18 Mar 2008 07:23:45 +0000 (07:23 +0000)]
Add manager peerstatus events when peer can't authenticate.

(closes issue #11959)
Reported by: mostyn
Patches:
      peerstatus3.patch uploaded by mostyn (license 398)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109316 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix a typo
Sean Bright [Tue, 18 Mar 2008 00:28:39 +0000 (00:28 +0000)]
Fix a typo

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109282 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoReplace minimime with superior GMime library so that the entire contents of an http...
Terry Wilson [Mon, 17 Mar 2008 22:10:06 +0000 (22:10 +0000)]
Replace minimime with superior GMime library so that the entire contents of an http post are not read into memory.
This does introduce a dependency on the GMime library for handling HTTP POSTs, but it is available in most distros.

If the library is present, then the compile flag for ENABLE_UPLOADS is enabled by default in menuselect.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109229 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 109226 via svnmerge from
Mark Michelson [Mon, 17 Mar 2008 22:06:44 +0000 (22:06 +0000)]
Merged revisions 109226 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109226 | mmichelson | 2008-03-17 17:05:49 -0500 (Mon, 17 Mar 2008) | 12 lines

Fix a logic flaw in the code that stores lock info which is displayed
via the "core show locks" command. The idea behind this section of code was
to remove the previous lock from the list if it was a trylock that had failed.
Unfortunately, instead of checking the status of the previous lock, we were referencing
the index immediately following the previous lock in the lock_info->locks array.
The result of this problem, under the right circumstances, was that the lock which
we currently in the process of attempting to acquire could "overwrite" the previous lock
which was acquired. While this does not in any way affect typical operation, it *could*
lead to misleading "core show locks" output.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoblock rev 109171 that is already here
Michiel van Baak [Mon, 17 Mar 2008 17:58:34 +0000 (17:58 +0000)]
block rev 109171 that is already here

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109172 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago(closes issue #12238)
Steve Murphy [Mon, 17 Mar 2008 17:47:36 +0000 (17:47 +0000)]
(closes issue #12238)
Reported by: mvanbaak
Tested by: murf, mvanbaak

Due to a bug that occurred when merge_contexts_and_delete scanned the "old" or existing contexts, and found a context
that doesn't exist in the new set, yet owned by a different registrar. The context is created in the new set, with the
old registrar, and and all the priorities and extens that have a different registrar are copied into it. But, not the
includes, ignorepats, and switches. I added code to do this immediately after the context is created.

This still leaves a logical hole in the code. If you define a context in two places, (eg. in extensions.conf and also
in extensions.ael), and they both have includes, but different in composition, no new context will be generated, and
therefore the 'old' includes, switches, and ignorepats will not be copied. I'd have added code to simply add any non-duplicates
into the 'new' context that had a different registrar, but there is one big complication: includes, and switches are definitely
order dependent. (ignorepats I'm not sure about). And we'll have to develop some sort of policy about how we
merge order dependent lists, especially if the intersection of the two sets is empty. (in other words, they do not have any
elements in common). Do the new go first, or the old? I've elected to punt this issue until a user complains. Hopefully,
this is pretty rare thing.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109169 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoUpdate the directory of placed calls on skinny phones
Michiel van Baak [Mon, 17 Mar 2008 17:43:46 +0000 (17:43 +0000)]
Update the directory of placed calls on skinny phones
when dialing a channel that does not provide progress (analog ZAP lines)

The phone does handle the double update on calls to channels that do
provide progress and wont insert duplicate items

(closes issue #12239)
Reported by: DEA
Patches:
      chan_skinny-call-log.txt uploaded by DEA (license 3)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109168 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agodon't define Zaptel features as libraries, they aren't, and we don't want '--with...
Kevin P. Fleming [Mon, 17 Mar 2008 17:31:46 +0000 (17:31 +0000)]
don't define Zaptel features as libraries, they aren't, and we don't want '--with-zaptel-<foo>' configure options for them
also some minor cleanups

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109166 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove something that is never ever used.
Joshua Colp [Mon, 17 Mar 2008 16:47:02 +0000 (16:47 +0000)]
Remove something that is never ever used.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109113 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd sample events for aastra phones.
Jason Parker [Mon, 17 Mar 2008 16:37:31 +0000 (16:37 +0000)]
Add sample events for aastra phones.

aastra-check-cfg is the same as the other check-cfg entries,
 and aastra-xml is to load a pre-configured xml script.

(closes issue #12229)
Reported by: gowen72
Patches:
      aastra.patch uploaded by gowen72 (license 432)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109111 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 109107 via svnmerge from
Joshua Colp [Mon, 17 Mar 2008 16:26:36 +0000 (16:26 +0000)]
Merged revisions 109107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109107 | file | 2008-03-17 13:24:29 -0300 (Mon, 17 Mar 2008) | 4 lines

200 OKs in response to a reinvite need to be sent reliably. If the remote side does not receive one the dialog will be torn down.
(closes issue #12208)
Reported by: atrash

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109108 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 109057 via svnmerge
Jason Parker [Mon, 17 Mar 2008 15:16:41 +0000 (15:16 +0000)]
Blocked revisions 109057 via svnmerge

........
r109057 | qwell | 2008-03-17 10:15:56 -0500 (Mon, 17 Mar 2008) | 4 lines

Backport revision 106439 from trunk.  I didn't realize this was broken in 1.4 as well.

Closes issue #12222.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109058 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMake sure that the temporary sip_request structure is empty so that copy_request...
Joshua Colp [Mon, 17 Mar 2008 14:37:40 +0000 (14:37 +0000)]
Make sure that the temporary sip_request structure is empty so that copy_request doesn't think it already has an ast_str.
(closes issue #12231)
Reported by: IgorG

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109054 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 109012 via svnmerge from
Mark Michelson [Mon, 17 Mar 2008 14:21:14 +0000 (14:21 +0000)]
Merged revisions 109012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109012 | mmichelson | 2008-03-17 09:18:26 -0500 (Mon, 17 Mar 2008) | 6 lines

Make sure that we release the lock on the spyee channel if the spyee or spy has hung up

(closes issue #12232)
Reported by: atis

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109024 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108961 via svnmerge from
Michiel van Baak [Sun, 16 Mar 2008 21:50:58 +0000 (21:50 +0000)]
Merged revisions 108961 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108961 | mvanbaak | 2008-03-16 22:47:10 +0100 (Sun, 16 Mar 2008) | 7 lines

add missing break to case AST_CONTROL_SRCUPDATE

(closes issue #12228)
Reported by: andrew
Patches:
      SRC.patch uploaded by andrew (license 240)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108962 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove an unnecessary thread attribute instance
Russell Bryant [Sun, 16 Mar 2008 17:55:53 +0000 (17:55 +0000)]
Remove an unnecessary thread attribute instance

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108929 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix polling for mailbox changes in mailboxes that are not in the default vm context.
Russell Bryant [Sun, 16 Mar 2008 17:53:46 +0000 (17:53 +0000)]
Fix polling for mailbox changes in mailboxes that are not in the default vm context.

(closes issue #12223)
Reported by: DEA
Patches:
      vm-polled-imap.txt uploaded by DEA (license 3)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108927 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove a double write lock of the contexts lock in ast_wrlock_contexts().
Russell Bryant [Sat, 15 Mar 2008 16:21:04 +0000 (16:21 +0000)]
Remove a double write lock of the contexts lock in ast_wrlock_contexts().
How did this ever work?

(closes issue #12219)
Reported by: ys
Patches:
      pbx.c.diff uploaded by ys (license 281)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108894 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDoxygenify dnsmgr.h
Russell Bryant [Fri, 14 Mar 2008 21:20:36 +0000 (21:20 +0000)]
Doxygenify dnsmgr.h

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108857 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMake sure configure is run before menuselect on a clean checkout
Russell Bryant [Fri, 14 Mar 2008 20:14:06 +0000 (20:14 +0000)]
Make sure configure is run before menuselect on a clean checkout

(closes issue #12197)
Reported by: juggie
Patches:
      12197.diff uploaded by juggie (license 24)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108799 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108796 via svnmerge from
Russell Bryant [Fri, 14 Mar 2008 20:09:37 +0000 (20:09 +0000)]
Merged revisions 108796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108796 | russell | 2008-03-14 15:09:22 -0500 (Fri, 14 Mar 2008) | 5 lines

Fix a channel name issue.  chan_oss registers the "Console" channel type,
but it created channels with an "OSS" prefix.

(closes issue #12194, reported by davidw, patched by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108797 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108792 via svnmerge from
Russell Bryant [Fri, 14 Mar 2008 20:04:56 +0000 (20:04 +0000)]
Merged revisions 108792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108792 | russell | 2008-03-14 15:04:35 -0500 (Fri, 14 Mar 2008) | 4 lines

Update the SuSE init script to start networking before asterisk, as well.

(closes issue #12200, reported by and change suggested by reinerotto)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108793 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDo a link test in AST_EXT_TOOL_CHECK() to ensure we have all the required libs
Russell Bryant [Fri, 14 Mar 2008 17:05:11 +0000 (17:05 +0000)]
Do a link test in AST_EXT_TOOL_CHECK() to ensure we have all the required libs
reported by the tool.

(closes issue #12067, reported by Juggie, patched by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108740 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108737 via svnmerge from
Mark Michelson [Fri, 14 Mar 2008 16:52:51 +0000 (16:52 +0000)]
Merged revisions 108737 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108737 | mmichelson | 2008-03-14 11:44:08 -0500 (Fri, 14 Mar 2008) | 33 lines

Fix a race condition in the SIP packet scheduler which could cause a crash.

chan_sip uses the scheduler API in order to schedule retransmission of reliable
packets (such as INVITES). If a retransmission of a packet is occurring, then the
packet is removed from the scheduler and retrans_pkt is called. Meanwhile, if
a response is received from the packet as previously transmitted, then when we
ACK the response, we will remove the packet from the scheduler and free the packet.

The problem is that both the ACK function and retrans_pkt attempt to acquire the
same lock at the beginning of the function call. This means that if the ACK function
acquires the lock first, then it will free the packet which retrans_pkt is about to
read from and write to. The result is a crash.

The solution:

1. If the ACK function fails to remove the packet from the scheduler and the retransmit
   id of the packet is not -1 (meaning that we have not reached the maximum number of
   retransmissions) then release the lock and yield so that retrans_pkt may acquire the
   lock and operate.

2. Make absolutely certain that the ACK function does not recursively lock the lock in
   question. If it does, then releasing the lock will do no good, since retrans_pkt will
   still be unable to acquire the lock.

(closes issue #12098)
Reported by: wegbert
(closes issue #12089)
Reported by: PTorres
Patches:
      12098-putnopvutv3.patch uploaded by putnopvut (license 60)
Tested by: jvandal

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108738 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108682 via svnmerge from
Jason Parker [Fri, 14 Mar 2008 14:32:55 +0000 (14:32 +0000)]
Merged revisions 108682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108682 | qwell | 2008-03-14 09:29:05 -0500 (Fri, 14 Mar 2008) | 4 lines

Fix a potential segfault if chan (or chan->music_state) is NULL.

Closes issue #12210, credit to edantie for pointing this out.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108683 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agodocumenting changes as a result of adding TCP functionality to ExternalIVR
Jeff Peeler [Thu, 13 Mar 2008 23:12:59 +0000 (23:12 +0000)]
documenting changes as a result of adding TCP functionality to ExternalIVR

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108639 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMake this compile
Mark Michelson [Thu, 13 Mar 2008 21:47:55 +0000 (21:47 +0000)]
Make this compile

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108586 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108583 via svnmerge from
Russell Bryant [Thu, 13 Mar 2008 21:40:43 +0000 (21:40 +0000)]
Merged revisions 108583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108583 | russell | 2008-03-13 16:38:16 -0500 (Thu, 13 Mar 2008) | 11 lines

Fix another issue that was causing crashes in chanspy.  This introduces a new
datastore callback, called chan_fixup().  The concept is exactly like the
fixup callback that is used in the channel technology interface.  This callback
gets called when the owning channel changes due to a masquerade.  Before this
was introduced, if a masquerade happened on a channel being spyed on, the
channel pointer in the datastore became invalid.

(closes issue #12187)
(reported by, and lots of testing from atis)
(props to file for the help with ideas)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108584 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108530 via svnmerge from
Russell Bryant [Thu, 13 Mar 2008 21:06:52 +0000 (21:06 +0000)]
Merged revisions 108530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108530 | russell | 2008-03-13 16:06:33 -0500 (Thu, 13 Mar 2008) | 10 lines

Make a tweak that gets the LEDs on polycom phones to blink when an extension that
has been subscribed to goes on hold.  Otherwise, they just stay on like it does
when an extension is in use.

(closes issue #11263)
Reported by: russell
Patches:
      notify_hold.rev1.txt uploaded by russell (license 2)
Tested by: russell

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108531 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFixing a potential buffer overflow in the manager command ModuleCheck.
Mark Michelson [Thu, 13 Mar 2008 20:59:00 +0000 (20:59 +0000)]
Fixing a potential buffer overflow in the manager command ModuleCheck.

Though this overflow is exploitable remotely, we are NOT issuing a security
advisory for this since in order to exploit the overflow, the attacker would
have to establish an authenticated manager session AND have the system privilege.
By gaining this privilege, the attacker already has more powerful weapons at his
disposal than overflowing a buffer with a malformed manager header, so the vulnerability
in this case really lies with the authentication method that allowed the attacker to
gain the system privilege in the first place.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoset variable to NULL to prevent uninitialized warning
Jeff Peeler [Thu, 13 Mar 2008 20:38:56 +0000 (20:38 +0000)]
set variable to NULL to prevent uninitialized warning

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108523 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix a place where configuration values could cause an overflow of a buffer.
Russell Bryant [Thu, 13 Mar 2008 20:35:28 +0000 (20:35 +0000)]
Fix a place where configuration values could cause an overflow of a buffer.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108469 via svnmerge from
Russell Bryant [Thu, 13 Mar 2008 20:26:59 +0000 (20:26 +0000)]
Merged revisions 108469 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108469 | russell | 2008-03-13 15:26:28 -0500 (Thu, 13 Mar 2008) | 4 lines

Fix a couple uses of sprintf.  The second one could actually cause an overflow
of a stack buffer.  It's not a security issue though, it only depends on your
configuration.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108472 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerge changes from team/jamesgolovich/chan_sip-ast_str
Russell Bryant [Thu, 13 Mar 2008 19:54:44 +0000 (19:54 +0000)]
Merge changes from team/jamesgolovich/chan_sip-ast_str

This set of changes removes the hard coded maximum packet size of 4kB from chan_sip.
It now starts by allocating 1kB, and growing the buffer as needed to accommodate large
packets.

(closes issue #8556, reported by mikma, patch by jamesgolovich)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108439 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago(closes issue #11827)
Jeff Peeler [Thu, 13 Mar 2008 18:59:04 +0000 (18:59 +0000)]
(closes issue #11827)
Reported by: ctooley
Patches:
      eivr_tcp_generic.patch uploaded by jpeeler (license 325)
This change adds the ability to communicate over a TCP socket instead of forking a child process.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108404 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMake the default prefix empty, like it was in Asterisk 1.4.
Russell Bryant [Wed, 12 Mar 2008 22:49:26 +0000 (22:49 +0000)]
Make the default prefix empty, like it was in Asterisk 1.4.

(closes issue #12198, reported by bkruse, patched by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108346 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRename ast_tcptls_server_instance to session_instance, since this pertains to
Russell Bryant [Wed, 12 Mar 2008 22:13:18 +0000 (22:13 +0000)]
Rename ast_tcptls_server_instance to session_instance, since this pertains to
server and client usage.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108295 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoLet's get this to compile
Mark Michelson [Wed, 12 Mar 2008 22:09:52 +0000 (22:09 +0000)]
Let's get this to compile

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108293 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108288 via svnmerge from
Mark Michelson [Wed, 12 Mar 2008 21:57:41 +0000 (21:57 +0000)]
Merged revisions 108288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108288 | mmichelson | 2008-03-12 16:53:46 -0500 (Wed, 12 Mar 2008) | 14 lines

Change AST_SCHED_DEL use to ast_sched_del for autocongestion in chan_sip.

The scheduler callback will always return 0. This means that this id
is never rescheduled, so it makes no sense to loop trying to delete
the id from the scheduler queue. If we fail to remove the item from the
queue once, it will fail every single time.

(Yes I realize that in this case, the macro would exit early because the
id is set to -1 in the callback, but it still makes no sense to use
that macro in favor of calling ast_sched_del once and being done with it)

This is the first of potentially several such fixes.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108289 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoadd support for named sections in zapata.conf, and fix a few bugs in config file...
Kevin P. Fleming [Wed, 12 Mar 2008 21:37:40 +0000 (21:37 +0000)]
add support for named sections in zapata.conf, and fix a few bugs in config file parsing

(closes issue #9503)
Reported by: tzafrir
Patches:
      fix_cleanups uploaded by tzafrir (license 46)
      zapata_sections uploaded by tzafrir (license 46)
      skipchannel_options uploaded by tzafrir (license 46)
      conf_sample uploaded by tzafrir (license 46)

patches updated by me to better conform to coding guidelines and fix some problems

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108286 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108227 via svnmerge from
Mark Michelson [Wed, 12 Mar 2008 21:19:30 +0000 (21:19 +0000)]
Merged revisions 108227 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108227 | mmichelson | 2008-03-12 16:16:28 -0500 (Wed, 12 Mar 2008) | 12 lines

Added a large comment before the AST_SCHED_DEL macro to explain its purpose as well as when
it is appropriate and when it is not appropriate to use it.

I also removed the part of the debug message that mentions that this is probably a bug because
there are some perfectly legitimate places where ast_sched_del may fail to delete an entry (e.g.
when the scheduler callback manually reschedules with a new id instead of returning non-zero to
tell the scheduler to reschedule with the same idea). I also raised the debug level of the debug
message in AST_SCHED_DEL since it seems like it could come up quite frequently since the macro
is probably being used in several places where it shouldn't be. Also removed the redundant line,
file, and function information since that is provided by ast_log.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108238 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDoxygenify slinfactory a bit.
Joshua Colp [Wed, 12 Mar 2008 21:06:50 +0000 (21:06 +0000)]
Doxygenify slinfactory a bit.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108226 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108086 via svnmerge from
Kevin P. Fleming [Wed, 12 Mar 2008 20:27:01 +0000 (20:27 +0000)]
Merged revisions 108086 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108086 | kpfleming | 2008-03-12 14:16:07 -0500 (Wed, 12 Mar 2008) | 6 lines

if we receive an INVITE with a Content-Length that is not a valid number, or is zero, then don't process the rest of the message body looking for an SDP

closes issue #11475
Reported by: andrebarbosa

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108191 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108135 via svnmerge from
Russell Bryant [Wed, 12 Mar 2008 19:59:05 +0000 (19:59 +0000)]
Merged revisions 108135 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108135 | russell | 2008-03-12 14:57:42 -0500 (Wed, 12 Mar 2008) | 40 lines

(closes issue #12187, reported by atis, fixed by me after some brainstorming
 on the issue with mmichelson)

- Update copyright info on app_chanspy.

- Fix a race condition that caused app_chanspy to crash.  The issue was that
  the chanspy datastore magic that was used to ensure that spyee channels did
  not disappear out from under the code did not completely solve the problem.
  It was actually possible for chanspy to acquire a channel reference out of
  its datastore to a channel that was in the middle of being destroyed.  That
  was because datastore destruction in ast_channel_free() was done near the
  end.  So, this left the code in app_chanspy accessing a channel that was
  partially, or completely invalid because it was in the process of being free'd
  by another thread.  The following sort of shows the code path where the race
  occurred:

  =============================================================================
  Thread 1 (PBX thread for spyee chan)  ||   Thread 2 (chanspy)
  --------------------------------------||-------------------------------------
  ast_channel_free()                    ||
    - remove channel from channel list  ||
    - lock/unlock the channel to ensure ||
      that no references retrieved from ||
      the channel list exist.           ||
  --------------------------------------||-------------------------------------
                                        || channel_spy()
    - destroy some channel data         ||  - Lock chanspy datastore
                                        ||  - Retrieve reference to channel
                                        ||  - lock channel
                                        ||  - Unlock chanspy datastore
  --------------------------------------||-------------------------------------
     - destroy channel datastores       ||
        - call chanspy datastore d'tor  ||
          which NULL's out the ds'      ||  - Operate on the channel ...
          reference to the channel      ||
                                        ||
    - free the channel                  ||
                                        ||
                                        ||  - unlock the channel
  --------------------------------------||-------------------------------------
  =============================================================================

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108137 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108083 via svnmerge from
Joshua Colp [Wed, 12 Mar 2008 18:29:33 +0000 (18:29 +0000)]
Merged revisions 108083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108083 | file | 2008-03-12 15:26:37 -0300 (Wed, 12 Mar 2008) | 4 lines

Add a trigger mode that triggers on both read and write. The actual function that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait).
(closes issue #11945)
Reported by: xheliox

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108084 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago - Add Tilghman to the copyright info ... he wrote the hard part :)
Russell Bryant [Wed, 12 Mar 2008 17:06:37 +0000 (17:06 +0000)]
 - Add Tilghman to the copyright info ... he wrote the hard part :)
 - Remove some magic in unload_module that isn't needed.  Module use counts
   already ensure that the function isn't going to be in use at this point.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108034 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 108031 via svnmerge from
Russell Bryant [Wed, 12 Mar 2008 17:02:57 +0000 (17:02 +0000)]
Merged revisions 108031 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108031 | russell | 2008-03-12 11:59:07 -0500 (Wed, 12 Mar 2008) | 4 lines

Destroy the channel lock after the channel datastores.

(inspired by issue #12187)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108032 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDeadlock fixes
Tilghman Lesher [Wed, 12 Mar 2008 07:43:03 +0000 (07:43 +0000)]
Deadlock fixes
(closes issue #12143)
 Reported by: kactus
 Patches:
       20080312__bug12143__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: kactus

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107998 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRevert several changes from revision 102525, as the changes were not
Tilghman Lesher [Wed, 12 Mar 2008 05:46:39 +0000 (05:46 +0000)]
Revert several changes from revision 102525, as the changes were not
compatible, and, in fact, introduced regressions.
(Closes issue #12190)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107960 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCache config files, when possible, for speed
Tilghman Lesher [Wed, 12 Mar 2008 02:53:21 +0000 (02:53 +0000)]
Cache config files, when possible, for speed

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107928 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107877 via svnmerge from
Tilghman Lesher [Wed, 12 Mar 2008 01:54:00 +0000 (01:54 +0000)]
Merged revisions 107877 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107877 | tilghman | 2008-03-11 20:52:40 -0500 (Tue, 11 Mar 2008) | 2 lines

Document all of the possible realtime fields

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107878 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107826 via svnmerge from
Jason Parker [Tue, 11 Mar 2008 23:38:00 +0000 (23:38 +0000)]
Merged revisions 107826 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107826 | qwell | 2008-03-11 18:37:05 -0500 (Tue, 11 Mar 2008) | 7 lines

Update documentation for pgsql ODBC voicemail.

(closes issue #12186)
Reported by: jsmith
Patches:
      vm_pgsql_doc_update.patch uploaded by jsmith (license 15)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107827 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAn offhand comment from Russell made me realize that the configuration file
Tilghman Lesher [Tue, 11 Mar 2008 22:55:16 +0000 (22:55 +0000)]
An offhand comment from Russell made me realize that the configuration file
caching would not work properly for users.conf and any other file read from
more than one place.  I needed to add the filename which requested the config
file to get it to work properly.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107791 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoremove documentation of an argument that i did not implement
Russell Bryant [Tue, 11 Mar 2008 22:54:25 +0000 (22:54 +0000)]
remove documentation of an argument that i did not implement

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107790 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd a trivial new dialplan function, AST_CONFIG(), which allows you to access
Russell Bryant [Tue, 11 Mar 2008 22:21:19 +0000 (22:21 +0000)]
Add a trivial new dialplan function, AST_CONFIG(), which allows you to access
a variable from an Asterisk configuration file in the dialplan, or anywhere
else where dialplan functions can be used.

(Inspired by a discussion with Tilghman and Pari)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107787 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoConvert prepare_and_execute to direct_execute for speed
Tilghman Lesher [Tue, 11 Mar 2008 21:10:45 +0000 (21:10 +0000)]
Convert prepare_and_execute to direct_execute for speed
(closes issue #11935)
 Reported by: falves11
 Patches:
       20080208__bug11935.diff.txt uploaded by Corydon76 (license 14)
 Tested by: falves11, Corydon76

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107722 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd contributed script for separation of database access from Asterisk
Tilghman Lesher [Tue, 11 Mar 2008 20:58:42 +0000 (20:58 +0000)]
Add contributed script for separation of database access from Asterisk

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107721 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoThis patch adds support for extended help prompts in voicemail. These prompts
Russell Bryant [Tue, 11 Mar 2008 20:54:32 +0000 (20:54 +0000)]
This patch adds support for extended help prompts in voicemail.  These prompts
are in the 1.4.9 sounds release.

(closes issue #11705)
Reported by: jaroth
Patches:
      helpprompts.patch uploaded by jaroth (license 50)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107719 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107714 via svnmerge from
Jason Parker [Tue, 11 Mar 2008 20:53:48 +0000 (20:53 +0000)]
Merged revisions 107714 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107714 | qwell | 2008-03-11 15:49:56 -0500 (Tue, 11 Mar 2008) | 5 lines

Copy voicemail dependency logic for res_adsi to chan_gtalk and chan_jingle (for jabber).

(closes issue #12014)
Reported by: junky

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107718 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107713 via svnmerge from
Kevin P. Fleming [Tue, 11 Mar 2008 20:50:57 +0000 (20:50 +0000)]
Merged revisions 107713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107713 | kpfleming | 2008-03-11 15:48:58 -0500 (Tue, 11 Mar 2008) | 2 lines

get chan_vpb to build properly in dev mode

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107715 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDial a device even if it's state is unknown.
Joshua Colp [Tue, 11 Mar 2008 20:36:14 +0000 (20:36 +0000)]
Dial a device even if it's state is unknown.
(closes issue #12184)
Reported by: bluecrow76
Patches:
      asterisk-svn-app_page.c.devicestate_unknown.diff uploaded by bluecrow76 (license 270)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107710 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107646 via svnmerge from
Joshua Colp [Tue, 11 Mar 2008 19:23:28 +0000 (19:23 +0000)]
Merged revisions 107646 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107646 | file | 2008-03-11 16:20:01 -0300 (Tue, 11 Mar 2008) | 4 lines

Make sure the visible indication is on the right channel so when the masquerade happens the proper indication is enacted.
(closes issue #11707)
Reported by: iam

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107659 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107637 via svnmerge from
Joshua Colp [Tue, 11 Mar 2008 18:48:59 +0000 (18:48 +0000)]
Merged revisions 107637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107637 | file | 2008-03-11 15:47:33 -0300 (Tue, 11 Mar 2008) | 4 lines

Add an additional check for setting conference parameter when using the marked user options. It was possible for it to return to a no listen/no talk state if a masquerade happened.
(closes issue #12136)
Reported by: aragon

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107638 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 107582 via svnmerge
Joshua Colp [Tue, 11 Mar 2008 17:34:46 +0000 (17:34 +0000)]
Blocked revisions 107582 via svnmerge

........
r107582 | file | 2008-03-11 14:32:17 -0300 (Tue, 11 Mar 2008) | 4 lines

Fix a minor spelling error.
(closes issue #12183)
Reported by: darrylc

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107583 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoWhitespace changes only
Tilghman Lesher [Tue, 11 Mar 2008 16:28:03 +0000 (16:28 +0000)]
Whitespace changes only

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107551 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove some redundant logic from wait_for_answer. This also let's us get rid of one of
Mark Michelson [Tue, 11 Mar 2008 15:59:32 +0000 (15:59 +0000)]
Remove some redundant logic from wait_for_answer. This also let's us get rid of one of
those XXX comments from the code.

The redundancy occurs because the 'single' flag implies that the 'r' and 'm' flags are
not set, so there's no need to explicitly check them again.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107530 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agofix another potential bug found by gcc 4.3
Kevin P. Fleming [Tue, 11 Mar 2008 15:39:37 +0000 (15:39 +0000)]
fix another potential bug found by gcc 4.3

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107525 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoblock fix that is already here
Kevin P. Fleming [Tue, 11 Mar 2008 15:19:05 +0000 (15:19 +0000)]
block fix that is already here

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107475 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107464 via svnmerge from
Kevin P. Fleming [Tue, 11 Mar 2008 15:13:38 +0000 (15:13 +0000)]
Merged revisions 107464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107464 | kpfleming | 2008-03-11 09:53:03 -0500 (Tue, 11 Mar 2008) | 2 lines

fix various other problems found by gcc 4.3

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107466 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoClarify comment about masquerading and playback of the parking slot.
Joshua Colp [Tue, 11 Mar 2008 15:05:17 +0000 (15:05 +0000)]
Clarify comment about masquerading and playback of the parking slot.
(closes issue #12180)
Reported by: davidw

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107465 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107461 via svnmerge from
Kevin P. Fleming [Tue, 11 Mar 2008 14:37:03 +0000 (14:37 +0000)]
Merged revisions 107461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107461 | kpfleming | 2008-03-11 09:33:45 -0500 (Tue, 11 Mar 2008) | 2 lines

stop checking for mktime() in the configure script... we don't use it, and the test is buggy under gcc 4.3

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107462 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107408 via svnmerge from
Kevin P. Fleming [Tue, 11 Mar 2008 14:09:49 +0000 (14:09 +0000)]
Merged revisions 107408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107408 | kpfleming | 2008-03-11 09:07:59 -0500 (Tue, 11 Mar 2008) | 5 lines

check for compiler support for -fno-strict-overflow before using it (tested with Debian's gcc 4.3, 4.1 and 3.4)

(closes issue #12179)
Reported by: Netview

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107409 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107405 via svnmerge from
Kevin P. Fleming [Tue, 11 Mar 2008 13:58:37 +0000 (13:58 +0000)]
Merged revisions 107405 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107405 | kpfleming | 2008-03-11 08:57:08 -0500 (Tue, 11 Mar 2008) | 2 lines

fix small bug in IMAP toolkit testing

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107406 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107352 via svnmerge from
Kevin P. Fleming [Tue, 11 Mar 2008 11:36:51 +0000 (11:36 +0000)]
Merged revisions 107352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines

fix up various compiler warnings found with gcc-4.3:

- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function)

- main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement

- main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur

- main/editline/readline.c had an unused variable

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107373 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107290 via svnmerge from
Terry Wilson [Tue, 11 Mar 2008 01:09:46 +0000 (01:09 +0000)]
Merged revisions 107290 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107290 | twilson | 2008-03-10 19:59:18 -0500 (Mon, 10 Mar 2008) | 2 lines

If we fail to alloc a channel, we should re-lock the pvt structure before returning.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107292 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago(closes issue #6019)
Tilghman Lesher [Mon, 10 Mar 2008 21:48:20 +0000 (21:48 +0000)]
(closes issue #6019)
 Reported by: ssokol
 Patches:
       20080304__bug6019.diff.txt uploaded by Corydon76 (license 14)
 Tested by: putnopvut

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107231 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107173 via svnmerge from
Jason Parker [Mon, 10 Mar 2008 20:28:33 +0000 (20:28 +0000)]
Merged revisions 107173 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107173 | qwell | 2008-03-10 15:27:08 -0500 (Mon, 10 Mar 2008) | 5 lines

Make sure to reenable echo can after a "failed" (canceled, etc) three-way call.

(closes issue #11335)
Reported by: rebuild

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107177 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107161 via svnmerge from
Russell Bryant [Mon, 10 Mar 2008 20:17:37 +0000 (20:17 +0000)]
Merged revisions 107161 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107161 | russell | 2008-03-10 15:17:11 -0500 (Mon, 10 Mar 2008) | 8 lines

Fix another bug specifically related to asynchronous call origination.  Once the
PBX is started on the channel using ast_pbx_start(), then the ownership of the
channel has been passed on to another thread.  We can no longer access it in this
code.  If the channel gets hung up very quickly, it is possible that we could
access a channel that has been free'd.

(inspired by BE-386)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107162 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107158 via svnmerge from
Russell Bryant [Mon, 10 Mar 2008 20:05:12 +0000 (20:05 +0000)]
Merged revisions 107158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107158 | russell | 2008-03-10 15:04:27 -0500 (Mon, 10 Mar 2008) | 9 lines

Fix some bugs related to originating calls.  If the code failed to start a PBX
on the channel (such as if you set a call limit based on the system's load
average), then there were cases where a channel that has already been free'd
using ast_hangup() got accessed.  This caused weird memory corruption and
crashes to occur.

(fixes issue BE-386)
(much debugging credit goes to twilson, final patch written by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107159 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoIf we receive a 488 on a T38 request reinvite back to audio. As well reinvite across...
Joshua Colp [Mon, 10 Mar 2008 20:00:21 +0000 (20:00 +0000)]
If we receive a 488 on a T38 request reinvite back to audio. As well reinvite across a bridge back to audio if one side doesn't negotiate to T38.
(closes issue #8677)
Reported by: alex-911

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107157 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107102 via svnmerge from
Russell Bryant [Mon, 10 Mar 2008 17:13:34 +0000 (17:13 +0000)]
Merged revisions 107102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107102 | russell | 2008-03-10 12:13:17 -0500 (Mon, 10 Mar 2008) | 2 lines

Resolve a compiler warning.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107103 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107099 via svnmerge from
Russell Bryant [Mon, 10 Mar 2008 16:59:13 +0000 (16:59 +0000)]
Merged revisions 107099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107099 | russell | 2008-03-10 11:58:57 -0500 (Mon, 10 Mar 2008) | 3 lines

Fix a race condition where the generator can go away
(closes issue #12175, reported by edantie, patched by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107100 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_queue has now been doxygenified thanks to snuffy! The ony thing I changed
Mark Michelson [Mon, 10 Mar 2008 15:45:13 +0000 (15:45 +0000)]
app_queue has now been doxygenified thanks to snuffy! The ony thing I changed
was the way that locks are referenced, since the old 1.2 names were still used
in the comments.

(closes issue #11997)
Reported by: snuffy
Patches:
      bug_11997_queue_doxy.diff uploaded by snuffy (license 35)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107068 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoway back in July, in r.75706, a fix was made ot the strftime usages, which was good...
Steve Murphy [Mon, 10 Mar 2008 14:55:21 +0000 (14:55 +0000)]
way back in July, in r.75706, a fix was made ot the strftime usages, which was good, but in this case, the check for a nil time was accidentally removed, and now it is restored, to keep timevals like '1969-12-31 17:00:00' from showing up in the cdrs. No idea what databases will do with this. No bugs filed as yet, but it felt like a bug.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107019 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 107016 via svnmerge from
Joshua Colp [Mon, 10 Mar 2008 14:36:16 +0000 (14:36 +0000)]
Merged revisions 107016 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107016 | file | 2008-03-10 11:33:02 -0300 (Mon, 10 Mar 2008) | 7 lines

Move where unanswered CDRs are dropped to the CDR core, not everything uses app_dial.
(closes issue #11516)
Reported by: ys
Patches:
      branch_1.4_cdr.diff uploaded by ys (license 281)
Tested by: anest, jcapp, dartvader

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107017 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106945 via svnmerge from
Kevin P. Fleming [Sat, 8 Mar 2008 16:03:48 +0000 (16:03 +0000)]
Merged revisions 106945 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106945 | kpfleming | 2008-03-08 09:59:42 -0600 (Sat, 08 Mar 2008) | 2 lines

don't generate D-Channel "up" and "down" messages unless the channel state is actually changing; also, generate the "up" message when an implicit "up" occurs due to reception of a normal event when we thought the channel was "down"

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106946 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106895 via svnmerge from
Russell Bryant [Fri, 7 Mar 2008 22:52:46 +0000 (22:52 +0000)]
Merged revisions 106895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106895 | russell | 2008-03-07 16:51:23 -0600 (Fri, 07 Mar 2008) | 2 lines

Only start the SLA thread if SLA has actually been configured.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106896 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMake sure we don't start a call when we have already done so in response to a COT...
Matthew Fredrickson [Fri, 7 Mar 2008 22:36:49 +0000 (22:36 +0000)]
Make sure we don't start a call when we have already done so in response to a COT message

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106892 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106842 via svnmerge from
Jason Parker [Fri, 7 Mar 2008 22:15:20 +0000 (22:15 +0000)]
Merged revisions 106842 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106842 | qwell | 2008-03-07 16:14:45 -0600 (Fri, 07 Mar 2008) | 5 lines

Fix hardcoded grep in editline, were GNU grep is required.

(closes issue #12124)
Reported by: dmartin

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106843 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106788 via svnmerge from
Joshua Colp [Fri, 7 Mar 2008 19:33:09 +0000 (19:33 +0000)]
Merged revisions 106788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106788 | file | 2008-03-07 15:32:00 -0400 (Fri, 07 Mar 2008) | 4 lines

Ignore source update control frame.
(closes issue #12168)
Reported by: plack

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106789 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago(closes issue #6002)
Steve Murphy [Fri, 7 Mar 2008 18:57:57 +0000 (18:57 +0000)]
(closes issue #6002)
Reported by: rizzo
Tested by: murf

Proposal of the changes to be made, and then an announcement of how they were accomplished:

http://lists.digium.com/pipermail/asterisk-dev/2008-February/032065.html

and:

http://lists.digium.com/pipermail/asterisk-dev/2008-March/032124.html

Here is a recap, file by file, of what I have done:

pbx/pbx_config.c
pbx/pbx_ael.c

All funcs that were passed a ptr to the context list, now will ALSO be passed a hashtab ptr to the same set.
Why? because (for the time being), the dialplan is stored in both, to facilitate a quick, low-cost move to
hash-tables to speed up dialplan processing. If it was deemed necessary to pass the context LIST, well, it
is just as necessary to have the TABLE available. This is because the list/table in question might not be
the global one, but temporary ones we would use to stage the dialplan on, and then swap into the global
position when things are ready.

We now have one external function for apps to use, "ast_context_find_or_create()" instead of the pre-existing
"find" and "create", as all existing usages used both in tandem anyway.

pbx_config, and pbx_ael, will stage the reloaded dialplan into local lists and tables, and
then call merge_contexts_and_delete, which will merge (now) existing contexts and
priorities from other registrars into this local set by copying them. Then, merge_contexts_and_delete will
lock down the contexts, swap the lists and tables, and unlock (real quick), and then
destroy the old dialplan.

chan_sip.c
chan_iax.c
chan_skinny.c

All the channel drivers that would add regcontexts now use the ast_context_find_or_create now.

chan_sip also includes a small fix to get rid of warnings about removing priorities that never got entered.

apps/app_meetme.c
apps/app_dial.c
apps/app_queue.c

All the apps that added a context/exten/priority were also modified to use ast_context_find_or_create instead.

include/asterisk/pbx.h

ast_context_create() is removed. Find_or_create_ is the new method.
ast_context_find_or_create()  interface gets the hashtab added.
ast_merge_contexts_and_delete() gets the local hashtab arg added.
ast_wrlock_contexts_version() is added so you can detect if someone else got a writelock between your readlocking and writelocking.
ast_hashtab_compare_contexts was made public for use in pbx_config/pbx_ael
ast_hashtab_hash_contexts was in like fashion make public.

include/asterisk/pval.h

ast_compile_ael2() interface changed to include the local hashtab table ptr.

main/features.c

For the sake of the parking context, we use ast_context_find_or_create().

main/pbx.c

I changed all the "tree" names to "table" instead. That's because the original
implementation was based on binary trees. (had a free library). Then I moved
to hashtabs. Now, the names move forward too.

refcount field added to contexts, so you can keep track of how many modules
wanted this context to exist.

Some log messages that are warnings were inflated from LOG_NOTICE to LOG_WARNING.

Added some calls to ast_verb(3,...) for debug messages

Lots of little mods to ast_context_remove_extension2, which is now excersized in ways
it was not previously; one definite bug fixed.

find_or_create was upgraded to handle both local lists/tables as well as the globals.

context_merge() was added to do the per-context merging of the old/present contexts/extens/prios into the new/proposed local list/tables

ast_merge_contexts_and_delete() was heavily modified.

ast_add_extension2() was also upgraded to handle changes.

the context_destroy() code was re-engineered to handle the new way of doing things,
by exten/prio instead of by context.

res/ael/pval.c
res/ael/ael.tab.c
res/ael/ael.tab.h
res/ael/ael.y
res/ael/ael_lex.c
res/ael/ael.flex
utils/ael_main.c
utils/extconf.c
utils/conf2ael.c
utils/Makefile

Had to change the interface to ast_compile_ael2(), to include the hashtab ptr.
This ended up involving several external apps.  The main gotcha was I had to
include lock.h and hashtab.h in several places.

As a side note, I tested this stuff pretty thoroughly, I replicated the problems
originally reported by Luigi, and made triply sure that reloads worked, and everything
worked thru "stop gracefully". I found a and fixed a few bugs as I was merging into
trunk, that did not appear in my tests of bug6002.

How's this for verbose commit messages?

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106757 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106704 via svnmerge from
Russell Bryant [Fri, 7 Mar 2008 17:17:30 +0000 (17:17 +0000)]
Merged revisions 106704 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106704 | russell | 2008-03-07 11:16:58 -0600 (Fri, 07 Mar 2008) | 8 lines

Change a warning message to a debug message.  This is happening quite frequently,
and it is not worth spamming users with these messages unless we are pretty confident
that it should never happen.  As it stands today, it _will_ and _does_ happen and
until that gets cleaned up a reasonable amount on the development side, let's not
spam the logs of everyone else.

(closes issue #12154)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106707 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agofix example usage
Russell Bryant [Fri, 7 Mar 2008 16:31:48 +0000 (16:31 +0000)]
fix example usage

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106684 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106635 via svnmerge from
Tilghman Lesher [Fri, 7 Mar 2008 16:26:07 +0000 (16:26 +0000)]
Merged revisions 106635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106635 | tilghman | 2008-03-07 10:22:11 -0600 (Fri, 07 Mar 2008) | 3 lines

Warn the user when a temporary greeting exists
(Closes issue #11409)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106654 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106606 via svnmerge from
Tilghman Lesher [Fri, 7 Mar 2008 15:22:34 +0000 (15:22 +0000)]
Merged revisions 106606 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106606 | tilghman | 2008-03-07 09:20:52 -0600 (Fri, 07 Mar 2008) | 3 lines

Properly initialize rtp->schedid
(Closes issue #12154)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106607 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 106552 via svnmerge from
Tilghman Lesher [Fri, 7 Mar 2008 06:54:47 +0000 (06:54 +0000)]
Merged revisions 106552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines

Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches:
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106553 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agominor text changes
Russell Bryant [Fri, 7 Mar 2008 01:19:02 +0000 (01:19 +0000)]
minor text changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106518 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd updated SMDI documentation that I had only sitting in my email ... oops
Russell Bryant [Fri, 7 Mar 2008 01:15:36 +0000 (01:15 +0000)]
Add updated SMDI documentation that I had only sitting in my email ... oops

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106507 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerge changes from team/russell/g722-sillyness ...
Russell Bryant [Fri, 7 Mar 2008 00:24:58 +0000 (00:24 +0000)]
Merge changes from team/russell/g722-sillyness ...

Fix a number of other places where the number of samples in a G722 frame was
not properly handled because of various reasons.

main/rtp.c:
 - When a G722 frame is read from the smoother, the number of samples in the
   frame must be divided by 2 before being sent out over the network.  Even
   though G722 is 16 kHz, an error in some previous spec has made it so that
   we have to list the number of samples such as if it was 8 kHz.

main/file.c:
 - When scheduling the next time to expect a frame, take into account that the
   format of the file we're reading from may not be 8 kHz.

codecs/codec_g722.c:
 - When converting from G722 to slinear, g722_decode() expects its samples
   parameter to be in the silly (real samples / 2) format.  Make it so.
 - When converting from slinear to G722, properly set the number of samples in
   the frame to be the number of bytes of output * 2.

formats/format_pcm.c:
 - This format module handles G722, among a number of other formats.  However,
   the read() and seek() functions did not account for the fact that G722 has
   2 samples per byte.

(closes issue #12130, reported by rickross, patched by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106501 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix file playback in many cases.
Jason Parker [Thu, 6 Mar 2008 22:11:30 +0000 (22:11 +0000)]
Fix file playback in many cases.

(closes issue #12115)
Reported by: pj
Patches:
      v2-fileexists.patch uploaded by dimas (license 88) (with modifications by me)
Tested by: dimas, qwell, russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106439 65c4cc65-6c06-0410-ace0-fbb531ad65f3