[asterisk-commits] murf: branch murf/bug11210 r110442 - in /team/murf/bug11210: ./ apps/ build_t...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 20 20:06:10 CDT 2008


Author: murf
Date: Thu Mar 20 20:06:09 2008
New Revision: 110442

URL: http://svn.digium.com/view/asterisk?view=rev&rev=110442
Log:
Merged revisions 108191,108226,108238,108286,108289,108293,108295,108346,108404,108439,108472,108508,108523,108529,108531,108584,108586,108639,108683,108738,108740,108793,108797,108799,108857,108894,108927,108929,108962,109024,109054,109058,109108,109111,109113,109166,109168-109169,109172,109227,109229,109282,109316,109357,109389-109390,109394,109396,109447,109451 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r108191 | kpfleming | 2008-03-12 14:27:01 -0600 (Wed, 12 Mar 2008) | 14 lines

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


........

................
r108226 | file | 2008-03-12 15:06:50 -0600 (Wed, 12 Mar 2008) | 2 lines

Doxygenify slinfactory a bit.

................
r108238 | mmichelson | 2008-03-12 15:19:30 -0600 (Wed, 12 Mar 2008) | 20 lines

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.


........

................
r108286 | kpfleming | 2008-03-12 15:37:40 -0600 (Wed, 12 Mar 2008) | 13 lines

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


................
r108289 | mmichelson | 2008-03-12 15:57:41 -0600 (Wed, 12 Mar 2008) | 22 lines

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.


........

................
r108293 | mmichelson | 2008-03-12 16:09:52 -0600 (Wed, 12 Mar 2008) | 3 lines

Let's get this to compile


................
r108295 | russell | 2008-03-12 16:13:18 -0600 (Wed, 12 Mar 2008) | 3 lines

Rename ast_tcptls_server_instance to session_instance, since this pertains to
server and client usage.

................
r108346 | russell | 2008-03-12 16:49:26 -0600 (Wed, 12 Mar 2008) | 4 lines

Make the default prefix empty, like it was in Asterisk 1.4.

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

................
r108404 | jpeeler | 2008-03-13 12:59:04 -0600 (Thu, 13 Mar 2008) | 6 lines

(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.

................
r108439 | russell | 2008-03-13 13:54:44 -0600 (Thu, 13 Mar 2008) | 8 lines

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)

................
r108472 | russell | 2008-03-13 14:26:59 -0600 (Thu, 13 Mar 2008) | 12 lines

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.

........

................
r108508 | russell | 2008-03-13 14:35:28 -0600 (Thu, 13 Mar 2008) | 2 lines

Fix a place where configuration values could cause an overflow of a buffer.

................
r108523 | jpeeler | 2008-03-13 14:38:56 -0600 (Thu, 13 Mar 2008) | 1 line

set variable to NULL to prevent uninitialized warning
................
r108529 | mmichelson | 2008-03-13 14:59:00 -0600 (Thu, 13 Mar 2008) | 11 lines

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.


................
r108531 | russell | 2008-03-13 15:06:52 -0600 (Thu, 13 Mar 2008) | 18 lines

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

........

................
r108584 | russell | 2008-03-13 15:40:43 -0600 (Thu, 13 Mar 2008) | 19 lines

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)

........

................
r108586 | mmichelson | 2008-03-13 15:47:55 -0600 (Thu, 13 Mar 2008) | 3 lines

Make this compile


................
r108639 | jpeeler | 2008-03-13 17:12:59 -0600 (Thu, 13 Mar 2008) | 1 line

documenting changes as a result of adding TCP functionality to ExternalIVR
................
r108683 | qwell | 2008-03-14 08:32:55 -0600 (Fri, 14 Mar 2008) | 12 lines

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.

........

................
r108738 | mmichelson | 2008-03-14 10:52:51 -0600 (Fri, 14 Mar 2008) | 41 lines

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


........

................
r108740 | russell | 2008-03-14 11:05:11 -0600 (Fri, 14 Mar 2008) | 5 lines

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)

................
r108793 | russell | 2008-03-14 14:04:56 -0600 (Fri, 14 Mar 2008) | 12 lines

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)

........

................
r108797 | russell | 2008-03-14 14:09:37 -0600 (Fri, 14 Mar 2008) | 13 lines

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)

........

................
r108799 | russell | 2008-03-14 14:14:06 -0600 (Fri, 14 Mar 2008) | 8 lines

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)


................
r108857 | russell | 2008-03-14 15:20:36 -0600 (Fri, 14 Mar 2008) | 2 lines

Doxygenify dnsmgr.h

................
r108894 | russell | 2008-03-15 10:21:04 -0600 (Sat, 15 Mar 2008) | 8 lines

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)

................
r108927 | russell | 2008-03-16 11:53:46 -0600 (Sun, 16 Mar 2008) | 7 lines

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)

................
r108929 | russell | 2008-03-16 11:55:53 -0600 (Sun, 16 Mar 2008) | 2 lines

Remove an unnecessary thread attribute instance

................
r108962 | mvanbaak | 2008-03-16 15:50:58 -0600 (Sun, 16 Mar 2008) | 15 lines

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)

........

................
r109024 | mmichelson | 2008-03-17 08:21:14 -0600 (Mon, 17 Mar 2008) | 14 lines

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


........

................
r109054 | file | 2008-03-17 08:37:40 -0600 (Mon, 17 Mar 2008) | 4 lines

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

................
r109058 | qwell | 2008-03-17 09:16:41 -0600 (Mon, 17 Mar 2008) | 11 lines

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.

........

................
r109108 | file | 2008-03-17 10:26:36 -0600 (Mon, 17 Mar 2008) | 12 lines

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

........

................
r109111 | qwell | 2008-03-17 10:37:31 -0600 (Mon, 17 Mar 2008) | 10 lines

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)

................
r109113 | file | 2008-03-17 10:47:02 -0600 (Mon, 17 Mar 2008) | 2 lines

Remove something that is never ever used.

................
r109166 | kpfleming | 2008-03-17 11:31:46 -0600 (Mon, 17 Mar 2008) | 3 lines

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

................
r109168 | mvanbaak | 2008-03-17 11:43:46 -0600 (Mon, 17 Mar 2008) | 11 lines

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)

................
r109169 | murf | 2008-03-17 11:47:36 -0600 (Mon, 17 Mar 2008) | 20 lines

(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.



................
r109172 | mvanbaak | 2008-03-17 11:58:34 -0600 (Mon, 17 Mar 2008) | 3 lines

block rev 109171 that is already here


................
r109227 | mmichelson | 2008-03-17 16:06:44 -0600 (Mon, 17 Mar 2008) | 20 lines

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.



........

................
r109229 | twilson | 2008-03-17 16:10:06 -0600 (Mon, 17 Mar 2008) | 5 lines

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.

................
r109282 | seanbright | 2008-03-17 18:28:39 -0600 (Mon, 17 Mar 2008) | 1 line

Fix a typo
................
r109316 | oej | 2008-03-18 01:23:45 -0600 (Tue, 18 Mar 2008) | 7 lines

Add manager peerstatus events when peer can't authenticate.

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

................
r109357 | murf | 2008-03-18 08:09:50 -0600 (Tue, 18 Mar 2008) | 25 lines

Merged revisions 109309 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines

(closes issue #11903)
Reported by: atis

Many thanks to atis for spotting this problem and reporting it.
The fix was to straighten out how items are placed on and removed
from the file stack. Regressions as well as the provided test case
helped to straighten out all code paths. valgrind was used to make
sure all memory allocated was freed.

Sorry for not solving this earlier. I got distracted.

Added the ntest23 regression test, which is mainly a copy of ntest22, 
but with a few juicy errors thrown in, to replicate the kind of 
error that atis spotted.



........

................
r109389 | qwell | 2008-03-18 09:07:04 -0600 (Tue, 18 Mar 2008) | 3 lines

Do not return with a successful authentication if the From header ends up empty.
(AST-2008-003)

................
r109390 | file | 2008-03-18 09:08:09 -0600 (Tue, 18 Mar 2008) | 11 lines

Merged revisions 109386 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109386 | file | 2008-03-18 11:58:39 -0300 (Tue, 18 Mar 2008) | 3 lines

Put a maximum limit on the number of payloads accepted, and also make sure a given payload does not exceed our maximum value.
(AST-2008-002)

........

................
r109394 | qwell | 2008-03-18 09:10:45 -0600 (Tue, 18 Mar 2008) | 1 line

Block this here.  Already committed.
................
r109396 | file | 2008-03-18 09:13:07 -0600 (Tue, 18 Mar 2008) | 3 lines

Make sure values are interpreted as character strings and not format strings.
(AST-2008-004)

................
r109447 | twilson | 2008-03-18 09:43:34 -0600 (Tue, 18 Mar 2008) | 3 lines

Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.

................
r109451 | kpfleming | 2008-03-18 09:50:29 -0600 (Tue, 18 Mar 2008) | 2 lines

ensure that dependencies on AST_C_DEFINE_CHECK symbols work properly

................

Added:
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/
      - copied from r109451, trunk/pbx/ael/ael-test/ael-ntest23/
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/extensions.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/extensions.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/qq.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/qq.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t1/
      - copied from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t1/
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t1/a.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t1/a.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t1/b.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t1/b.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t1/c.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t1/c.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t2/
      - copied from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t2/
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t2/d.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t2/d.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t2/e.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t2/e.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t2/f.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t2/f.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t3/
      - copied from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t3/
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t3/g.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t3/g.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t3/h.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t3/h.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t3/i.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t3/i.ael
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest23/t3/j.ael
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ael-ntest23/t3/j.ael
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-ntest23
      - copied unchanged from r109451, trunk/pbx/ael/ael-test/ref.ael-ntest23
Removed:
    team/murf/bug11210/main/minimime/
Modified:
    team/murf/bug11210/   (props changed)
    team/murf/bug11210/CHANGES
    team/murf/bug11210/Makefile
    team/murf/bug11210/acinclude.m4
    team/murf/bug11210/apps/app_chanspy.c
    team/murf/bug11210/apps/app_externalivr.c
    team/murf/bug11210/apps/app_festival.c
    team/murf/bug11210/apps/app_followme.c
    team/murf/bug11210/apps/app_meetme.c
    team/murf/bug11210/apps/app_minivm.c
    team/murf/bug11210/apps/app_queue.c
    team/murf/bug11210/apps/app_voicemail.c
    team/murf/bug11210/build_tools/cflags.xml
    team/murf/bug11210/build_tools/make_buildopts_h
    team/murf/bug11210/build_tools/menuselect-deps.in
    team/murf/bug11210/cdr/cdr_sqlite3_custom.c
    team/murf/bug11210/channels/chan_iax2.c
    team/murf/bug11210/channels/chan_misdn.c
    team/murf/bug11210/channels/chan_oss.c
    team/murf/bug11210/channels/chan_sip.c
    team/murf/bug11210/channels/chan_skinny.c
    team/murf/bug11210/channels/chan_zap.c
    team/murf/bug11210/configs/sip.conf.sample
    team/murf/bug11210/configs/sip_notify.conf.sample
    team/murf/bug11210/configs/zapata.conf.sample
    team/murf/bug11210/configure
    team/murf/bug11210/configure.ac
    team/murf/bug11210/contrib/init.d/rc.suse.asterisk
    team/murf/bug11210/doc/externalivr.txt
    team/murf/bug11210/funcs/func_enum.c
    team/murf/bug11210/include/asterisk/astobj.h
    team/murf/bug11210/include/asterisk/autoconfig.h.in
    team/murf/bug11210/include/asterisk/channel.h
    team/murf/bug11210/include/asterisk/dnsmgr.h
    team/murf/bug11210/include/asterisk/extconf.h
    team/murf/bug11210/include/asterisk/http.h
    team/murf/bug11210/include/asterisk/sched.h
    team/murf/bug11210/include/asterisk/slinfactory.h
    team/murf/bug11210/include/asterisk/strings.h
    team/murf/bug11210/include/asterisk/tcptls.h
    team/murf/bug11210/include/asterisk/utils.h
    team/murf/bug11210/include/jitterbuf.h
    team/murf/bug11210/main/Makefile
    team/murf/bug11210/main/asterisk.c
    team/murf/bug11210/main/channel.c
    team/murf/bug11210/main/cli.c
    team/murf/bug11210/main/config.c
    team/murf/bug11210/main/dial.c
    team/murf/bug11210/main/features.c
    team/murf/bug11210/main/http.c
    team/murf/bug11210/main/jitterbuf.c
    team/murf/bug11210/main/logger.c
    team/murf/bug11210/main/manager.c
    team/murf/bug11210/main/pbx.c
    team/murf/bug11210/main/rtp.c
    team/murf/bug11210/main/slinfactory.c
    team/murf/bug11210/main/tcptls.c
    team/murf/bug11210/main/translate.c
    team/murf/bug11210/main/utils.c
    team/murf/bug11210/makeopts.in
    team/murf/bug11210/res/ael/ael.flex
    team/murf/bug11210/res/ael/ael_lex.c
    team/murf/bug11210/res/res_agi.c
    team/murf/bug11210/res/res_config_ldap.c
    team/murf/bug11210/res/res_indications.c
    team/murf/bug11210/res/res_musiconhold.c
    team/murf/bug11210/res/res_phoneprov.c
    team/murf/bug11210/res/res_realtime.c
    team/murf/bug11210/utils/ael_main.c
    team/murf/bug11210/utils/astman.c
    team/murf/bug11210/utils/check_expr.c
    team/murf/bug11210/utils/conf2ael.c
    team/murf/bug11210/utils/extconf.c
    team/murf/bug11210/utils/frame.c

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
    automerge = yes

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 20 20:06:09 2008
@@ -1,1 +1,1 @@
-/trunk:1-108141
+/trunk:1-109464

Modified: team/murf/bug11210/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/CHANGES?view=diff&rev=110442&r1=110441&r2=110442
==============================================================================
--- team/murf/bug11210/CHANGES (original)
+++ team/murf/bug11210/CHANGES Thu Mar 20 20:06:09 2008
@@ -6,6 +6,11 @@
 ------------------
  * Added a new dialplan function, AST_CONFIG(), which allows you to access
    variables from an Asterisk configuration file.
+
+Zaptel channel driver (chan_zap) Changes
+----------------------------------------
+ * Channels can now be configured using named sections in zapata.conf, just
+   like other channel drivers, including the use of templates.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0  -------------
@@ -165,7 +170,8 @@
   * Performance improvements via using hash tables and doubly-linked lists improve call
     processing speed (invite, hangup) by about 4x; improves simultaneous call volume by
     about 10% (not much, sorry); and load/reload of large numbers of peers/users by ~40x.
-	
+  * Added a new configuration option "authfailureevents" that enables manager events when
+    a peer can't authenticate properly. 
 
 IAX2 changes
 ------------
@@ -398,6 +404,8 @@
      or NOCHANNEL if the given channel was not found.
   * The silencethreshold setting that was previously configurable in multiple
      applications is now settable globally via dsp.conf.
+  * Added ability to communicate over a TCP socket instead of forking a child process for the 
+    ExternalIVR application.
 
 Music On Hold Changes
 ---------------------

Modified: team/murf/bug11210/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/Makefile?view=diff&rev=110442&r1=110441&r2=110442
==============================================================================
--- team/murf/bug11210/Makefile (original)
+++ team/murf/bug11210/Makefile Thu Mar 20 20:06:09 2008
@@ -230,7 +230,7 @@
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT)
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security #-Wformat=2
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)
@@ -351,7 +351,7 @@
 	@echo "****"
 	@exit 1
 
-menuselect.makeopts: menuselect/menuselect menuselect-tree
+menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts
 	menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
 
 $(MOD_SUBDIRS_EMBED_LDSCRIPT):
@@ -446,7 +446,7 @@
 	@$(MAKE) -C sounds dist-clean
 	rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
 	rm -f makeopts.embed_rules
-	rm -f config.log config.status
+	rm -f config.log config.status config.cache
 	rm -rf autom4te.cache
 	rm -f include/asterisk/autoconfig.h
 	rm -f include/asterisk/buildopts.h

Modified: team/murf/bug11210/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/acinclude.m4?view=diff&rev=110442&r1=110441&r2=110442
==============================================================================
--- team/murf/bug11210/acinclude.m4 (original)
+++ team/murf/bug11210/acinclude.m4 Thu Mar 20 20:06:09 2008
@@ -92,7 +92,7 @@
 # AST_C_DEFINE_CHECK([package], [macro name], [header file], [version])
 AC_DEFUN([AST_C_DEFINE_CHECK],
 [
-    if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+    if test "x${PBX_$1}" != "x1"; then
 	AC_MSG_CHECKING([for $2 in $3])
 	saved_cppflags="${CPPFLAGS}"
 	if test "x${$1_DIR}" != "x"; then
@@ -114,10 +114,11 @@
 		AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
 		AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])
 	    ],
-	    [       AC_MSG_RESULT(no) ] 
+	    [   AC_MSG_RESULT(no) ] 
 	)
 	CPPFLAGS="${saved_cppflags}"
     fi
+    AC_SUBST(PBX_$1)
 ])
 
 
@@ -230,7 +231,10 @@
 		fi
 		CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
 
-		AC_COMPILE_IFELSE(
+		saved_ldflags="${LDFLAGS}"
+		LDFLAGS="${$1_LIB}"
+
+		AC_LINK_IFELSE(
 		    [ AC_LANG_PROGRAM( [ $5 ],
 				       [ $6; ]
 				       )],
@@ -240,6 +244,7 @@
 		    []
 		)
 		CPPFLAGS="${saved_cppflags}"
+		LDFLAGS="${saved_ldflags}"
 	    else
 		PBX_$1=1
 		AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])

Modified: team/murf/bug11210/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_chanspy.c?view=diff&rev=110442&r1=110441&r2=110442
==============================================================================
--- team/murf/bug11210/apps/app_chanspy.c (original)
+++ team/murf/bug11210/apps/app_chanspy.c Thu Mar 20 20:06:09 2008
@@ -275,8 +275,10 @@
 
 	/* We now hold the channel lock on spyee */
 
-	if (ast_check_hangup(chan) || ast_check_hangup(spyee))
+	if (ast_check_hangup(chan) || ast_check_hangup(spyee)) {
+		ast_channel_unlock(spyee);
 		return 0;
+	}
 
 	name = ast_strdupa(spyee->name);
 	ast_verb(2, "Spying on channel %s\n", name);
@@ -427,9 +429,19 @@
 	ast_mutex_unlock(&chanspy_ds->lock);
 }
 
+static void chanspy_ds_chan_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
+{
+	struct chanspy_ds *chanspy_ds = data;
+	
+	ast_mutex_lock(&chanspy_ds->lock);
+	chanspy_ds->chan = new_chan;
+	ast_mutex_unlock(&chanspy_ds->lock);
+}
+
 static const struct ast_datastore_info chanspy_ds_info = {
 	.type = "chanspy",
 	.destroy = chanspy_ds_destroy,
+	.chan_fixup = chanspy_ds_chan_fixup,
 };
 
 static struct chanspy_ds *chanspy_ds_free(struct chanspy_ds *chanspy_ds)

Modified: team/murf/bug11210/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_externalivr.c?view=diff&rev=110442&r1=110441&r2=110442
==============================================================================
--- team/murf/bug11210/apps/app_externalivr.c (original)
+++ team/murf/bug11210/apps/app_externalivr.c Thu Mar 20 20:06:09 2008
@@ -45,19 +45,20 @@
 #include "asterisk/linkedlists.h"
 #include "asterisk/app.h"
 #include "asterisk/utils.h"
+#include "asterisk/tcptls.h"
 
 static const char *app = "ExternalIVR";
 
 static const char *synopsis = "Interfaces with an external IVR application";
 
 static const char *descrip =
-"  ExternalIVR(command[,arg[,arg...]]): Forks a process to run the supplied command,\n"
-"and starts a generator on the channel. The generator's play list is\n"
-"controlled by the external application, which can add and clear entries\n"
-"via simple commands issued over its stdout. The external application\n"
-"will receive all DTMF events received on the channel, and notification\n"
-"if the channel is hung up. The application will not be forcibly terminated\n"
-"when the channel is hung up.\n"
+"  ExternalIVR(command|ivr://ivrhost[,arg[,arg...]]): Either forks a process\n"
+"to run given command or makes a socket to connect to given host and starts\n"
+"a generator on the channel. The generator's play list is controlled by the\n"
+"external application, which can add and clear entries via simple commands\n"
+"issued over its stdout. The external application will receive all DTMF events\n"
+"received on the channel, and notification if the channel is hung up. The\n"
+"application will not be forcibly terminated when the channel is hung up.\n"
 "See doc/externalivr.txt for a protocol specification.\n";
 
 /* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
@@ -88,6 +89,8 @@
 static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u, 
               int eivr_events_fd, int eivr_commands_fd, int eivr_errors_fd, 
               const char *args);
+
+int eivr_connect_socket(struct ast_channel *chan, const char *host, int port);
 
 static void send_eivr_event(FILE *handle, const char event, const char *data,
 	const struct ast_channel *chan)
@@ -305,6 +308,12 @@
 	int gen_active = 0;
 	int pid;
 	char *buf, *pipe_delim_argbuf, *pdargbuf_ptr;
+
+	char hostname[1024];
+	char *port_str = NULL;
+	int port = 0;
+	struct ast_tcptls_session_instance *ser = NULL;
+
 	struct ivr_localuser foo = {
 		.playlist = AST_LIST_HEAD_INIT_VALUE,
 		.finishlist = AST_LIST_HEAD_INIT_VALUE,
@@ -333,90 +342,137 @@
 	pipe_delim_argbuf = ast_strdupa(data);
 	while((pdargbuf_ptr = strchr(pipe_delim_argbuf, ',')) != NULL)
 		pdargbuf_ptr[0] = '|';
+
+	if(!strncmp(args.cmd[0], "ivr://", 6)) {
+		struct server_args ivr_desc = {
+			.accept_fd = -1,
+			.name = "IVR",
+		};
+		struct ast_hostent hp;
+
+		/*communicate through socket to server*/
+		if (chan->_state != AST_STATE_UP) {
+			ast_answer(chan);
+		}
+		if (ast_activate_generator(chan, &gen, u) < 0) {
+			ast_chan_log(LOG_WARNING, chan, "Failed to activate generator\n");
+			goto exit;
+		} else {
+			gen_active = 1;
+		}
+
+		ast_chan_log(LOG_DEBUG, chan, "Parsing hostname:port for socket connect from \"%s\"\n", args.cmd[0]);           
+		strncpy(hostname, args.cmd[0] + 6, sizeof(hostname));
+		if((port_str = strchr(hostname, ':')) != NULL) {
+			port_str[0] = 0;
+			port_str += 1;
+			port = atoi(port_str);
+		}
+		if(!port)
+			port = 2949;  /*default port, if one is not provided*/
+
+		ast_gethostbyname(hostname, &hp);
+		ivr_desc.sin.sin_family = AF_INET;
+		ivr_desc.sin.sin_port = htons(port);
+		memmove(&ivr_desc.sin.sin_addr.s_addr, hp.hp.h_addr, hp.hp.h_length);
+		ser = ast_tcptls_client_start(&ivr_desc);
+
+		if (!ser) {
+			goto exit;
+		} 
+		res = eivr_comm(chan, u, ser->fd, ser->fd, 0, pipe_delim_argbuf);
+	} else {
 	
-	if (pipe(child_stdin)) {
-		ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child input: %s\n", strerror(errno));
-		goto exit;
-	}
-	if (pipe(child_stdout)) {
-		ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child output: %s\n", strerror(errno));
-		goto exit;
-	}
-	if (pipe(child_stderr)) {
-		ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child errors: %s\n", strerror(errno));
-		goto exit;
-	}
-	if (chan->_state != AST_STATE_UP) {
-		ast_answer(chan);
-	}
-	if (ast_activate_generator(chan, &gen, u) < 0) {
-		ast_chan_log(LOG_WARNING, chan, "Failed to activate generator\n");
-		goto exit;
-	} else
-		gen_active = 1;
-
-	pid = fork();
-	if (pid < 0) {
-		ast_log(LOG_WARNING, "Failed to fork(): %s\n", strerror(errno));
-		goto exit;
-	}
-
-	if (!pid) {
-		/* child process */
-		int i;
-
-		signal(SIGPIPE, SIG_DFL);
-		pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
-
-		if (ast_opt_high_priority)
-			ast_set_priority(0);
-
-		dup2(child_stdin[0], STDIN_FILENO);
-		dup2(child_stdout[1], STDOUT_FILENO);
-		dup2(child_stderr[1], STDERR_FILENO);
-		for (i = STDERR_FILENO + 1; i < 1024; i++)
-			close(i);
-		execv(args.cmd[0], args.cmd);
-		fprintf(stderr, "Failed to execute '%s': %s\n", args.cmd[0], strerror(errno));
-		_exit(1);
-	} else {
-		/* parent process */
-
+		if (pipe(child_stdin)) {
+			ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child input: %s\n", strerror(errno));
+			goto exit;
+		}
+		if (pipe(child_stdout)) {
+			ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child output: %s\n", strerror(errno));
+			goto exit;
+		}
+		if (pipe(child_stderr)) {
+			ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child errors: %s\n", strerror(errno));
+			goto exit;
+		}
+		if (chan->_state != AST_STATE_UP) {
+			ast_answer(chan);
+		}
+		if (ast_activate_generator(chan, &gen, u) < 0) {
+			ast_chan_log(LOG_WARNING, chan, "Failed to activate generator\n");
+			goto exit;
+		} else {
+			gen_active = 1;
+		}
+	
+		pid = fork();
+		if (pid < 0) {
+			ast_log(LOG_WARNING, "Failed to fork(): %s\n", strerror(errno));
+			goto exit;
+		}
+	
+		if (!pid) {
+			/* child process */
+			int i;
+	
+			signal(SIGPIPE, SIG_DFL);
+			pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
+	
+			if (ast_opt_high_priority)
+				ast_set_priority(0);
+	
+			dup2(child_stdin[0], STDIN_FILENO);
+			dup2(child_stdout[1], STDOUT_FILENO);
+			dup2(child_stderr[1], STDERR_FILENO);
+			for (i = STDERR_FILENO + 1; i < 1024; i++)
+				close(i);

[... 4230 lines stripped ...]



More information about the asterisk-commits mailing list