[asterisk-commits] murf: branch murf/bug11210 r114526 - in /team/murf/bug11210: ./ apps/ cdr/ ch...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 22 10:38:49 CDT 2008


Author: murf
Date: Tue Apr 22 10:38:48 2008
New Revision: 114526

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114526
Log:
Merged revisions 114181-114183,114185,114187-114188,114190,114192,114194,114196,114199,114201-114202,114205,114208,114212,114227,114229,114231,114233,114243,114246,114249,114253-114254,114259,114261,114271,114276,114279,114285,114295,114298,114300,114303,114314,114320,114323,114325,114327,114389,114423,114456,114487,114520 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r114181 | tilghman | 2008-04-16 14:00:27 -0600 (Wed, 16 Apr 2008) | 10 lines

Blocked revisions 114180 via svnmerge

........
r114180 | tilghman | 2008-04-16 14:59:37 -0500 (Wed, 16 Apr 2008) | 3 lines

Backport revisions for latest vpb drivers to 1.4
(Closes issue #12457)

........

................
r114182 | murf | 2008-04-16 14:09:39 -0600 (Wed, 16 Apr 2008) | 1 line

Introducing a small upgrade to the ast_sched_xxx  facility, to keep it from eating up lots of cpu cycles. See CHANGES. From the team/murf/bug11210 branch.
................
r114183 | murf | 2008-04-16 14:28:08 -0600 (Wed, 16 Apr 2008) | 1 line

Introducing a small optimization to event_unsubscribe; events now use a Doubly-Linked list for events, gives fast deletions, for the sake of channel driver mwi events. From team/murf/bug11210.
................
r114185 | kpfleming | 2008-04-16 14:47:30 -0600 (Wed, 16 Apr 2008) | 14 lines

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

........
r114184 | kpfleming | 2008-04-16 15:46:38 -0500 (Wed, 16 Apr 2008) | 6 lines

use the ZT_SET_DIALPARAMS ioctl properly by initializing the structure to all zeroes in case it contains fields that we don't write values into (which it does as of Zaptel 1.4.10)

(closes issue #12456)
Reported by: fnordian


........

................
r114187 | murf | 2008-04-16 14:54:41 -0600 (Wed, 16 Apr 2008) | 1 line

A small enhancement-- I added the routine log_show_lock to utils.c, which if the mentioned lock has been acquired, this routine will log to the console the normal info about that lock you'd see from the CLI when you do a 'core show locks'. It's solely for debug-- if the lock is NOT acquired, there is no output. I use it to show 'unexpected' locks, to see where/why a lock is pre-locked. This command is to be called from points of interest, like just before a trylock, and helps to spot fleeting, highly temporal locks that normally are not locked...
................
r114188 | tilghman | 2008-04-16 16:57:54 -0600 (Wed, 16 Apr 2008) | 2 lines

Standardized routines for forking processes (keeps all the specialized code in one place).

................
r114190 | murf | 2008-04-16 17:53:27 -0600 (Wed, 16 Apr 2008) | 1 line

This is the scariest commit I've done in a long time. This is the astobj2-ification of chan_sip. I've tested a number of scenarios like crazy. It used to have 4x the call setup/teardown performance of trunk, but now it's roughly at parity. I will attempt to find the bottlenecks and get it back to the 4x mark. The changes made were somewhat invasive, but the value to the community of these upgrades outweighs waiting further for more testing. Every change being made to chan_sip was lousing this code up when we tried to merge. Peers, Users, Dialogs, are all now astobj2 objects, indexed via hashtables. Refcounting is used to track objects and free them at the bitter end of their lives. Please file issues on bugs.digium.com, and PLEASE, please, please be patient. One natural advantage to all the hash-table work is that loading large sip.conf files full of thousands of peers now goes much faster. One more please: PLEASE help thrash this code and test it.
................
r114192 | seanbright | 2008-04-17 04:55:05 -0600 (Thu, 17 Apr 2008) | 9 lines

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

........
r114191 | seanbright | 2008-04-17 06:51:20 -0400 (Thu, 17 Apr 2008) | 1 line

Make sure we have enough room for the recording's filename.
........

................
r114194 | seanbright | 2008-04-17 06:25:23 -0600 (Thu, 17 Apr 2008) | 1 line

Update the CHANGES file with yesterday's ChanSpy change.  Sorry Kevin, just saw your e-mail.
................
r114196 | tilghman | 2008-04-17 06:59:04 -0600 (Thu, 17 Apr 2008) | 16 lines

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

........
r114195 | tilghman | 2008-04-17 07:56:38 -0500 (Thu, 17 Apr 2008) | 8 lines

Add special case for when the agi cannot be executed, to comply with the documentation that
we return failure in that case.
(closes issue #12462)
 Reported by: fmueller
 Patches: 
       20080416__bug12462.diff.txt uploaded by Corydon76 (license 14)
 Tested by: fmueller

........

................
r114199 | phsultan | 2008-04-17 07:46:17 -0600 (Thu, 17 Apr 2008) | 10 lines

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

........
r114198 | phsultan | 2008-04-17 15:42:23 +0200 (Thu, 17 Apr 2008) | 2 lines

Use keepalives effectively in order diagnose bug #12432.

........

................
r114201 | murf | 2008-04-17 08:45:16 -0600 (Thu, 17 Apr 2008) | 1 line

Thanks to snuff for finding these omissions
................
r114202 | tilghman | 2008-04-17 09:12:52 -0600 (Thu, 17 Apr 2008) | 2 lines

fileio.h does not exist; io.h does, though.

................
r114205 | russell | 2008-04-17 10:25:29 -0600 (Thu, 17 Apr 2008) | 11 lines

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

........
r114204 | russell | 2008-04-17 11:23:45 -0500 (Thu, 17 Apr 2008) | 3 lines

Fix the bininstall target to install from subdirs, as well.
(closes issue AST-8, patch from bmd at switchvox)

........

................
r114208 | mmichelson | 2008-04-17 10:40:12 -0600 (Thu, 17 Apr 2008) | 20 lines

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

........
r114207 | mmichelson | 2008-04-17 11:28:03 -0500 (Thu, 17 Apr 2008) | 12 lines

It was possible for a reference to a frame which was part of a freed DSP to still be
referenced, leading to memory corruption and eventual crashes. This code change ensures
that the dsp is freed when we are finished with the frame. This change is very similar
to a change Russell made with translators back a month or so ago.

(closes issue #11999)
Reported by: destiny6628
Patches:
      11999.patch uploaded by putnopvut (license 60)
Tested by: destiny6628, victoryure


........

................
r114212 | mmichelson | 2008-04-17 10:51:09 -0600 (Thu, 17 Apr 2008) | 11 lines

Blocked revisions 114211 via svnmerge

........
r114211 | mmichelson | 2008-04-17 11:50:46 -0500 (Thu, 17 Apr 2008) | 4 lines

Add prototype for ast_dsp_frame_freed. I'm not sure how this was
compiling before...


........

................
r114227 | mmichelson | 2008-04-17 15:04:40 -0600 (Thu, 17 Apr 2008) | 17 lines

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

........
r114226 | mmichelson | 2008-04-17 16:03:29 -0500 (Thu, 17 Apr 2008) | 9 lines

Declaration of the peer channel in this scope was making it so the peer variable defined
in the outer scope was never set properly, therefore making iterating through the channel
list always restart from the beginning. This bug would have affected anyone who called
chanspy without specifying a first argument.

(closes issue #12461)
Reported by: stever28


........

................
r114229 | jpeeler | 2008-04-17 15:09:37 -0600 (Thu, 17 Apr 2008) | 1 line

added info describing DNS manager
................
r114231 | russell | 2008-04-17 16:21:32 -0600 (Thu, 17 Apr 2008) | 3 lines

Make this file compile.  The variable str is never set anywhere.  Furthermore,
it duplicates a lot of code.  I will leave it to murf to clean up.

................
r114233 | russell | 2008-04-17 16:24:00 -0600 (Thu, 17 Apr 2008) | 14 lines

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

........
r114230 | russell | 2008-04-17 17:15:43 -0500 (Thu, 17 Apr 2008) | 6 lines

Remove redundant safety net.  The check for the autoservice channel list state
accomplishes the same goal in a better way.

(issue #12470)
Reported By: atis

........

................
r114243 | tilghman | 2008-04-18 00:53:47 -0600 (Fri, 18 Apr 2008) | 11 lines

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

........
r114242 | tilghman | 2008-04-18 01:49:16 -0500 (Fri, 18 Apr 2008) | 3 lines

For consistency sake, ensure that the values that ${CALLINGPRES} returns are valid as an
input to SetCallingPres.  (Closes issue #12472)

........

................
r114246 | seanbright | 2008-04-18 07:38:07 -0600 (Fri, 18 Apr 2008) | 9 lines

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

........
r114245 | seanbright | 2008-04-18 09:33:32 -0400 (Fri, 18 Apr 2008) | 1 line

Only complete the SIP channel name once for 'sip show channel <channel>'
........

................
r114249 | russell | 2008-04-18 09:25:50 -0600 (Fri, 18 Apr 2008) | 12 lines

Blocked revisions 114248 via svnmerge

........
r114248 | russell | 2008-04-18 10:24:09 -0500 (Fri, 18 Apr 2008) | 5 lines

Ensure that we don't ast_strdupa(NULL)
(closes issue #12476)
Reported by: davidw
Patch by me

........

................
r114253 | dbailey | 2008-04-18 10:05:29 -0600 (Fri, 18 Apr 2008) | 2 lines

Add g__object_unref to clean up gmime message object

................
r114254 | file | 2008-04-18 10:11:27 -0600 (Fri, 18 Apr 2008) | 4 lines

If the parsing of the config file fails make sure we unlock ldap_lock.
(closes issue #12477)
Reported by: IgorG

................
r114259 | mmichelson | 2008-04-18 12:03:06 -0600 (Fri, 18 Apr 2008) | 14 lines

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

........
r114257 | mmichelson | 2008-04-18 12:44:29 -0500 (Fri, 18 Apr 2008) | 6 lines

Clearing up error messages so they make a bit more sense. Also removing a redundant error
message.

Issue AST-15


........

................
r114261 | file | 2008-04-18 12:15:11 -0600 (Fri, 18 Apr 2008) | 6 lines

Add MEETME_INFO dialplan function that allows querying various properties of a Meetme conference.
(closes issue #11691)
Reported by: junky
Patches:
      meetme_info.patch uploaded by jpeeler (license 325)

................
r114271 | file | 2008-04-18 13:35:33 -0600 (Fri, 18 Apr 2008) | 4 lines

Make sure ADSI is marked as unavailable on Unistim channels so voicemail does not try to do some ADSI jazz.
(closes issue #12460)
Reported by: PerryB

................
r114276 | russell | 2008-04-18 13:59:17 -0600 (Fri, 18 Apr 2008) | 10 lines

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

........
r114275 | russell | 2008-04-18 14:58:55 -0500 (Fri, 18 Apr 2008) | 2 lines

SUBDIRS_INSTALL is already listed as a subtarget for bininstall

........

................
r114279 | russell | 2008-04-18 14:01:47 -0600 (Fri, 18 Apr 2008) | 10 lines

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

........
r114278 | russell | 2008-04-18 15:01:09 -0500 (Fri, 18 Apr 2008) | 2 lines

ensure directories are created before we try to install stuff into them

........

................
r114285 | russell | 2008-04-18 15:51:05 -0600 (Fri, 18 Apr 2008) | 10 lines

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

........
r114284 | russell | 2008-04-18 16:48:06 -0500 (Fri, 18 Apr 2008) | 2 lines

Don't destroy a manager session if poll() returns an error of EAGAIN.

........

................
r114295 | seanbright | 2008-04-18 18:15:31 -0600 (Fri, 18 Apr 2008) | 2 lines

Ignore refcounter

................
r114298 | tilghman | 2008-04-19 07:53:38 -0600 (Sat, 19 Apr 2008) | 11 lines

Blocked revisions 114297 via svnmerge

........
r114297 | tilghman | 2008-04-19 08:49:50 -0500 (Sat, 19 Apr 2008) | 4 lines

MOH usage information needs a terminating newline, or else
"asterisk -rx 'help moh reload'" will hang.  Reported via
-dev list, fixed by me.

........

................
r114300 | tilghman | 2008-04-19 07:58:56 -0600 (Sat, 19 Apr 2008) | 9 lines

Blocked revisions 114299 via svnmerge

........
r114299 | tilghman | 2008-04-19 08:57:17 -0500 (Sat, 19 Apr 2008) | 2 lines

Ensure that help text terminates with a newline

........

................
r114303 | mattf | 2008-04-19 10:58:24 -0600 (Sat, 19 Apr 2008) | 1 line

SS7:Added - Generic Name / Access Transport / Redirecting Number handling. #12425
................
r114314 | seanbright | 2008-04-20 08:52:07 -0600 (Sun, 20 Apr 2008) | 1 line

Minor logging cleanups
................
r114320 | file | 2008-04-21 08:34:06 -0600 (Mon, 21 Apr 2008) | 6 lines

Only print out the error message if ldap_modify_ext_s actually returns an error, and not success.
(closes issue #12438)
Reported by: gservat
Patches:
      res_config_ldap.c-patch-code uploaded by gservat (license 466)

................
r114323 | file | 2008-04-21 08:40:33 -0600 (Mon, 21 Apr 2008) | 12 lines

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

........
r114322 | file | 2008-04-21 11:39:32 -0300 (Mon, 21 Apr 2008) | 4 lines

Only drop audio if we receive it without a progress indication. We allow other frames through such as DTMF because they may be needed to complete the call.
(closes issue #12440)
Reported by: aragon

........

................
r114325 | russell | 2008-04-21 09:01:04 -0600 (Mon, 21 Apr 2008) | 2 lines

Add a simple janitor project

................
r114327 | jpeeler | 2008-04-21 09:34:37 -0600 (Mon, 21 Apr 2008) | 2 lines

This removes an invalid warning message for an incorrectly entered pin, but more importantly removes an inapplicable check. If the first argument passed to app_authenticate does not contain a '/', the argument should be treated as the sole fixed "password" to match against and that is all. (Previous behavior was attempting to open a file based on the pin.)

................
r114389 | mattf | 2008-04-21 12:44:35 -0600 (Mon, 21 Apr 2008) | 1 line

Add support for generic name transmission (#12484) on SS7 in chan_zap
................
r114423 | murf | 2008-04-21 15:13:02 -0600 (Mon, 21 Apr 2008) | 16 lines

(closes issue #12467)
Reported by: atis
Tested by: murf

This upgrade adds the ~~ (concatenation) string operator to expr2.
While not needed in normal runtime pbx operation, it is needed when
raw exprs are being syntax checked. This plays into future syntax-
unification plans. By permission of atis, this addition in trunk 
and the reason of why things are as they are will suffice to close
this bug.

I also added a short note about the previous addition of "sip show sched"
to the CLI in CHANGES, which I discovered I forgot in a previous commit.



................
r114456 | dbailey | 2008-04-21 16:50:33 -0600 (Mon, 21 Apr 2008) | 2 lines

Change the time zone offset from a hard code to use res_phoneprov variables

................
r114487 | jpeeler | 2008-04-21 17:42:45 -0600 (Mon, 21 Apr 2008) | 9 lines

(closes issue #6113)
Reported by: oej
Tested by: jpeeler

This patch implements multiple parking lots for parked calls. The default parkinglot is used by default, however setting the channel variable PARKINGLOT in the dialplan will allow use of any other configured parkinglot. See configs/features.conf.sample for more details on setting up another non-default parkinglot. Also, one can (currently) set the default parkinglot to use in the driver configuration file via the parkinglot option.

Patch initially written by oej, brought up to date and finalized by mvanbaak, and then stabilized and converted to astobj2 by me.


................
r114520 | murf | 2008-04-22 08:38:46 -0600 (Tue, 22 Apr 2008) | 15 lines


Hopefully, this will resolve the issues that russellb had with this log_show_lock().
I gathered the code that filled the string, and put it in a different func which
I cryptically call "append_lock_information()".
Now, both log_show_lock(), and handle_show_locks() both call this code to do
the work. Tested, seems to work fine. 
Also, log_show_lock was modified to use the ast_str stuff, along with checking
for successful ast_str creation, and freeing the ast_str obj when finished.
A break was inserted to terminate the search for the lock; we should never
see it twice.

An example usage in chan_sip.c was created as a comment, for instructional
purposes.


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

Added:
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest24/
      - copied from r114520, trunk/pbx/ael/ael-test/ael-ntest24/
    team/murf/bug11210/pbx/ael/ael-test/ael-ntest24/extensions.ael
      - copied unchanged from r114520, trunk/pbx/ael/ael-test/ael-ntest24/extensions.ael
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-ntest24
      - copied unchanged from r114520, trunk/pbx/ael/ael-test/ref.ael-ntest24
Modified:
    team/murf/bug11210/   (props changed)
    team/murf/bug11210/CHANGES
    team/murf/bug11210/Makefile
    team/murf/bug11210/apps/app_authenticate.c
    team/murf/bug11210/apps/app_chanspy.c
    team/murf/bug11210/apps/app_dumpchan.c
    team/murf/bug11210/apps/app_externalivr.c
    team/murf/bug11210/apps/app_festival.c
    team/murf/bug11210/apps/app_ices.c
    team/murf/bug11210/apps/app_meetme.c
    team/murf/bug11210/apps/app_mp3.c
    team/murf/bug11210/apps/app_nbscat.c
    team/murf/bug11210/apps/app_setcallerid.c
    team/murf/bug11210/apps/app_zapras.c
    team/murf/bug11210/cdr/cdr_pgsql.c
    team/murf/bug11210/channels/chan_console.c
    team/murf/bug11210/channels/chan_gtalk.c
    team/murf/bug11210/channels/chan_iax2.c
    team/murf/bug11210/channels/chan_jingle.c
    team/murf/bug11210/channels/chan_mgcp.c
    team/murf/bug11210/channels/chan_sip.c
    team/murf/bug11210/channels/chan_skinny.c
    team/murf/bug11210/channels/chan_unistim.c
    team/murf/bug11210/channels/chan_zap.c
    team/murf/bug11210/configs/features.conf.sample
    team/murf/bug11210/configs/iax.conf.sample
    team/murf/bug11210/configs/sip.conf.sample
    team/murf/bug11210/doc/CODING-GUIDELINES
    team/murf/bug11210/doc/janitor-projects.txt
    team/murf/bug11210/doc/tex/ael.tex
    team/murf/bug11210/doc/tex/channelvariables.tex
    team/murf/bug11210/funcs/func_channel.c
    team/murf/bug11210/include/asterisk/app.h
    team/murf/bug11210/include/asterisk/channel.h
    team/murf/bug11210/include/asterisk/dsp.h
    team/murf/bug11210/include/asterisk/frame.h
    team/murf/bug11210/include/asterisk/logger.h
    team/murf/bug11210/main/app.c
    team/murf/bug11210/main/ast_expr2.c
    team/murf/bug11210/main/ast_expr2.fl
    team/murf/bug11210/main/ast_expr2.h
    team/murf/bug11210/main/ast_expr2.y
    team/murf/bug11210/main/ast_expr2f.c
    team/murf/bug11210/main/asterisk.c
    team/murf/bug11210/main/autoservice.c
    team/murf/bug11210/main/callerid.c
    team/murf/bug11210/main/dsp.c
    team/murf/bug11210/main/features.c
    team/murf/bug11210/main/frame.c
    team/murf/bug11210/main/logger.c
    team/murf/bug11210/main/manager.c
    team/murf/bug11210/main/utils.c
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-ntest10
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-test1
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-test18
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-test19
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-test3
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-test5
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-test8
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-vtest13
    team/murf/bug11210/pbx/ael/ael-test/ref.ael-vtest17
    team/murf/bug11210/phoneprov/polycom.xml
    team/murf/bug11210/res/res_agi.c
    team/murf/bug11210/res/res_config_ldap.c
    team/murf/bug11210/res/res_http_post.c
    team/murf/bug11210/res/res_jabber.c
    team/murf/bug11210/res/res_musiconhold.c
    team/murf/bug11210/utils/   (props changed)

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 Tue Apr 22 10:38:48 2008
@@ -1,1 +1,1 @@
-/trunk:1-114175
+/trunk:1-114521

Modified: team/murf/bug11210/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/CHANGES?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/CHANGES (original)
+++ team/murf/bug11210/CHANGES Tue Apr 22 10:38:48 2008
@@ -29,12 +29,24 @@
    messages, if the "messagewrap" option is set to a true value.
  * Dial has a new option: F(context^extension^pri), which permits a callee to
    continue in the dialplan, at the specified label, if the caller hangs up.
+ * ChanSpy and ExtenSpy have a new option, 's' which suppresses speaking the
+   technology name (e.g. SIP, IAX, etc) of the channel being spied on.
 
 SIP Changes
 -----------
  * The ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using setvar to cause a given
    audio file to be played upon completion of an attended transfer.
  * Added DNS manager support to registrations for peers referencing peer entries.
+   DNS manager runs in the background which allows DNS lookups to be run asynchronously 
+   as well as periodically updating the IP address. These properties allow for
+   better performance as well as recovery in the event of an IP change.
+ * Performance improvements via using hash tables (astobj2) and doubly-linked lists to improve 
+   load/reload of large numbers of peers/users by ~40x (for large lists of peers.
+   Initially, we saw 4x improvement in call setup/destruction, but at the time
+   of merging, this gain has disappeared; further research will be done to try
+   and restore this performance improvement. Astobj2 refcounting is now used
+   for users, peers, and dialogs.  Users are encouraged to assist in regression
+   testing and problem reporting!
 
 IAX Changes
 -----------
@@ -155,6 +167,10 @@
   * Added a CLI command, "devstate change", which allows you to set custom device
      states from the func_devstate module that provides the DEVICE_STATE() function
      and handling of the "Custom:" devices.
+  * New CLI command: "sip show sched" which shows all ast_sched entries for sip,
+    sorted into the different possible callbacks, with the number of entries
+    currently scheduled for each. Gives you a feel for how busy the sip channel
+    driver is.
 
 SIP changes
 -----------
@@ -417,6 +433,8 @@
      for the "meetme" command.
   * Added the ability to specify the music on hold class used to play into the
      conference when there is only one member and the M option is used.
+  * Added MEETME_INFO dialplan function which provides a way to query
+     various properties of a Meetme conference.
 
 Other Dialplan Application Changes
 ----------------------------------
@@ -489,6 +507,17 @@
      first pass at conversion.
   * aelparse will now read extensions.conf to see if a referenced
      macro or context is there before issueing a warning.
+  * AEL parser sets a local channel variable ~~EXTEN~~, to 
+    preserve the value of ${EXTEN} thru switch statements.
+  * New operator in $[...] expressions: the ~~ operator serves
+    as a concatenation operator. AT THE MOMENT, it is really only
+    necessary and useful in AEL, especially in if() expressions.
+    Operation: ${a} ~~ ${b|  with force both a and b to strings, strip 
+    any enclosing double-quotes, and evaluate to the value of a
+    concatenated with the value of b.  For example if a is set to
+    "xyz"  and b has the value "abc", then ${a} ~~ ${b| would
+    evaluate to xyzabc .
+
 
 Call Features (res_features) Changes
 ------------------------------------
@@ -620,7 +649,7 @@
      (-s)
   * Performance enhancements to the sched facility, which is used in
     the channel drivers, etc. Added hashtabs and doubly-linked lists
-    to speed up deletion; start at the beginning or end of list to 
+    to speed up deletion; start at the beginning or end of list to
     speed up insertion.
   * Added Doubly-linked lists after the fashion of linkedlists.h. They are in
     dlinkedlists.h. Doubly-linked lists feature fast deletion times.

Modified: team/murf/bug11210/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/Makefile?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/Makefile (original)
+++ team/murf/bug11210/Makefile Tue Apr 22 10:38:48 2008
@@ -499,7 +499,7 @@
 NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
 OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
 
-bininstall: _all
+installdirs:
 	mkdir -p $(DESTDIR)$(MODULES_DIR)
 	mkdir -p $(DESTDIR)$(ASTSBINDIR)
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
@@ -511,6 +511,8 @@
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
+
+bininstall: _all installdirs $(SUBDIRS_INSTALL)
 	$(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/
 	$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
@@ -572,7 +574,7 @@
 	@exit 1
 endif
 
-install: badshell datafiles bininstall $(SUBDIRS_INSTALL)
+install: badshell datafiles bininstall
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi
@@ -868,4 +870,4 @@
 asterisk.pdf:
 	$(MAKE) -C doc/tex asterisk.pdf
 
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell main/version.c include/asterisk/version.h
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell main/version.c include/asterisk/version.h installdirs

Modified: team/murf/bug11210/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_authenticate.c?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_authenticate.c (original)
+++ team/murf/bug11210/apps/app_authenticate.c Tue Apr 22 10:38:48 2008
@@ -126,9 +126,7 @@
 			/* Compare against a fixed password */
 			if (!strcmp(passwd, arglist.password))
 				break;
-		}
-
-		if (ast_test_flag(&flags,OPT_DATABASE)) {
+		} else if (ast_test_flag(&flags,OPT_DATABASE)) {
 			char tmp[256];
 			/* Compare against a database key */
 			if (!ast_db_get(arglist.password + 1, passwd, tmp, sizeof(tmp))) {

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=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_chanspy.c (original)
+++ team/murf/bug11210/apps/app_chanspy.c Tue Apr 22 10:38:48 2008
@@ -620,7 +620,6 @@
 			char *ext;
 			char *form_enforced;
 			int ienf = !myenforced;
-			struct ast_channel *peer;
 
 			peer = peer_chanspy_ds->chan;
 
@@ -839,7 +838,7 @@
 	}
 
 	if (recbase) {
-		char filename[512];
+		char filename[PATH_MAX];
 
 		snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
 		if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, AST_FILE_MODE)) <= 0) {
@@ -918,7 +917,7 @@
 	}
 
 	if (recbase) {
-		char filename[512];
+		char filename[PATH_MAX];
 
 		snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
 		if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, AST_FILE_MODE)) <= 0) {

Modified: team/murf/bug11210/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_dumpchan.c?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_dumpchan.c (original)
+++ team/murf/bug11210/apps/app_dumpchan.c Tue Apr 22 10:38:48 2008
@@ -75,6 +75,7 @@
 			"CallerIDName=       %s\n"
 			"DNIDDigits=         %s\n"
 			"RDNIS=              %s\n"
+			"Parkinglot=         %s\n"
 			"Language=           %s\n"
 			"State=              %s (%d)\n"
 			"Rings=              %d\n"
@@ -103,6 +104,7 @@
 			S_OR(c->cid.cid_name, "(N/A)"),
 			S_OR(c->cid.cid_dnid, "(N/A)"),
 			S_OR(c->cid.cid_rdnis, "(N/A)"),
+			c->parkinglot,
 			c->language,
 			ast_state2str(c->_state),
 			c->_state,

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=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_externalivr.c (original)
+++ team/murf/bug11210/apps/app_externalivr.c Tue Apr 22 10:38:48 2008
@@ -319,13 +319,9 @@
 		.finishlist = AST_LIST_HEAD_INIT_VALUE,
 	};
 	struct ivr_localuser *u = &foo;
-	sigset_t fullset, oldset;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(cmd)[32];
 	);
-
-	sigfillset(&fullset);
-	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
 
 	u->abort_current_sound = 0;
 	u->chan = chan;
@@ -405,7 +401,7 @@
 			gen_active = 1;
 		}
 	
-		pid = fork();
+		pid = ast_safe_fork(0);
 		if (pid < 0) {
 			ast_log(LOG_WARNING, "Failed to fork(): %s\n", strerror(errno));
 			goto exit;
@@ -413,19 +409,13 @@
 	
 		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);
+			ast_close_fds_above_n(STDERR_FILENO);
 			execv(args.cmd[0], args.cmd);
 			fprintf(stderr, "Failed to execute '%s': %s\n", args.cmd[0], strerror(errno));
 			_exit(1);

Modified: team/murf/bug11210/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_festival.c?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_festival.c (original)
+++ team/murf/bug11210/apps/app_festival.c Tue Apr 22 10:38:48 2008
@@ -117,30 +117,20 @@
 static int send_waveform_to_fd(char *waveform, int length, int fd)
 {
 	int res;
-	int x;
 #ifdef __PPC__ 
 	char c;
 #endif
-	sigset_t fullset, oldset;
-
-	sigfillset(&fullset);
-	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
-
-	res = fork();
+
+	res = ast_safe_fork(0);
 	if (res < 0)
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res) {
-		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return res;
 	}
-	for (x = 0; x < 256; x++) {
-		if (x != fd)
-			close(x);
-	}
+	dup2(fd, 0);
+	ast_close_fds_above_n(0);
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
-	signal(SIGPIPE, SIG_DFL);
-	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
 #ifdef __PPC__  
 	for (x = 0; x < length; x += 2) {
 		c = *(waveform + x + 1);

Modified: team/murf/bug11210/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_ices.c?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_ices.c (original)
+++ team/murf/bug11210/apps/app_ices.c Tue Apr 22 10:38:48 2008
@@ -43,6 +43,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/app.h"
 
 #define ICES "/usr/bin/ices"
 #define LOCAL_ICES "/usr/local/bin/ices"
@@ -60,31 +61,18 @@
 static int icesencode(char *filename, int fd)
 {
 	int res;
-	int x;
-	sigset_t fullset, oldset;
 
-	sigfillset(&fullset);
-	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
-
-	res = fork();
+	res = ast_safe_fork(0);
 	if (res < 0) 
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res) {
-		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return res;
 	}
-
-	/* Stop ignoring PIPE */
-	signal(SIGPIPE, SIG_DFL);
-	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
 
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
 	dup2(fd, STDIN_FILENO);
-	for (x=STDERR_FILENO + 1;x<1024;x++) {
-		if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))
-			close(x);
-	}
+	ast_close_fds_above_n(STDERR_FILENO);
 	/* Most commonly installed in /usr/local/bin */
 	execl(ICES, "ices", filename, (char *)NULL);
 	/* But many places has it in /usr/bin */
@@ -183,7 +171,7 @@
 		}
 	}
 	close(fds[1]);
-	
+
 	if (pid > -1)
 		kill(pid, SIGKILL);
 	if (!res && oreadformat)

Modified: team/murf/bug11210/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_meetme.c?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_meetme.c (original)
+++ team/murf/bug11210/apps/app_meetme.c Tue Apr 22 10:38:48 2008
@@ -5525,6 +5525,88 @@
 	return res;
 }
 
+static int acf_meetme_info_eval(char *keyword, struct ast_conference *conf)
+{
+	if (!strcasecmp("lock", keyword)) {
+		return conf->locked;
+	} else if (!strcasecmp("parties", keyword)) {
+		return conf->users;
+	} else if (!strcasecmp("activity", keyword)) {
+		time_t now;
+		now = time(NULL);
+		return (now - conf->start);
+	} else if (!strcasecmp("dynamic", keyword)) {
+		return conf->isdynamic;
+	} else {
+		return -1;
+	}
+
+}
+
+static int acf_meetme_info(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
+{
+	struct ast_conference *conf;
+	char *parse;
+	int result = -2; /* only non-negative numbers valid, -1 is used elsewhere */
+	AST_DECLARE_APP_ARGS(args,
+		AST_APP_ARG(keyword);
+		AST_APP_ARG(confno);
+	);
+
+	if (ast_strlen_zero(data)) {
+		ast_log(LOG_ERROR, "Syntax: MEETME_INFO() requires two arguments\n");
+		return -1;
+	}
+
+	parse = ast_strdupa(data);
+	AST_STANDARD_APP_ARGS(args, parse);
+
+	if (ast_strlen_zero(args.keyword)) {
+		ast_log(LOG_ERROR, "Syntax: MEETME_INFO() requires a keyword\n");
+		return -1;
+	}
+
+	if (ast_strlen_zero(args.confno)) {
+		ast_log(LOG_ERROR, "Syntax: MEETME_INFO() requires a conference number\n");
+		return -1;
+	}
+
+	AST_LIST_LOCK(&confs);
+	AST_LIST_TRAVERSE(&confs, conf, list) {
+		if (!strcmp(args.confno, conf->confno)) {
+			result = acf_meetme_info_eval(args.keyword, conf);
+			break;
+		}
+	}
+	AST_LIST_UNLOCK(&confs);
+
+	if (result > -1) {
+		snprintf(buf, len, "%d", result);
+	} else if (result == -1) {
+		snprintf(buf, len, "%s %s", "Error: invalid keyword:", args.keyword);
+	} else if (result == -2) {
+		snprintf(buf, len, "Error: conference (%s) not found", args.confno);
+	}
+
+	return 0;
+}
+
+
+static struct ast_custom_function meetme_info_acf = {
+	.name = "MEETME_INFO",
+	.synopsis = "Query a given conference of various properties.",
+	.syntax = "MEETME_INFO(<keyword>,<confno>)",
+	.read = acf_meetme_info,
+	.desc =
+"Returns information from a given keyword. (For booleans 1-true, 0-false)\n"
+"  Options:\n"
+"    lock     - boolean of whether the corresponding conference is locked\n" 
+"    parties  - number of parties in a given conference\n"
+"    activity - duration of conference in seconds\n"
+"    dynamic  - boolean of whether the corresponding coference is dynamic\n",
+};
+
+
 static int load_config(int reload)
 {
 	load_config_meetme();
@@ -5558,6 +5640,8 @@
 	ast_devstate_prov_del("SLA");
 	
 	sla_destroy();
+	
+	res |= ast_custom_function_unregister(&meetme_info_acf);
 
 	return res;
 }
@@ -5587,6 +5671,8 @@
 	res |= ast_devstate_prov_add("Meetme", meetmestate);
 	res |= ast_devstate_prov_add("SLA", sla_state);
 
+	res |= ast_custom_function_register(&meetme_info_acf);
+
 	return res;
 }
 

Modified: team/murf/bug11210/apps/app_mp3.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_mp3.c?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_mp3.c (original)
+++ team/murf/bug11210/apps/app_mp3.c Tue Apr 22 10:38:48 2008
@@ -39,6 +39,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/app.h"
 
 #define LOCAL_MPG_123 "/usr/local/bin/mpg123"
 #define MPG_123 "/usr/bin/mpg123"
@@ -56,29 +57,19 @@
 static int mp3play(char *filename, int fd)
 {
 	int res;
-	int x;
-	sigset_t fullset, oldset;
-
-	sigfillset(&fullset);
-	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
-
-	res = fork();
+
+	res = ast_safe_fork(0);
 	if (res < 0) 
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res) {
-		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return res;
 	}
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
-	signal(SIGPIPE, SIG_DFL);
-	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
 
 	dup2(fd, STDOUT_FILENO);
-	for (x=STDERR_FILENO + 1;x<256;x++) {
-		if (x != STDOUT_FILENO)
-			close(x);
-	}
+	ast_close_fds_above_n(STDERR_FILENO);
+
 	/* Execute mpg123, but buffer if it's a net connection */
 	if (!strncasecmp(filename, "http://", 7)) {
 		/* Most commonly installed in /usr/local/bin */
@@ -96,7 +87,8 @@
 		/* As a last-ditch effort, try to use PATH */
 	    execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
 	}
-	ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
+	/* Can't use ast_log since FD's are closed */
+	fprintf(stderr, "Execute of mpg123 failed\n");
 	_exit(0);
 }
 

Modified: team/murf/bug11210/apps/app_nbscat.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_nbscat.c?view=diff&rev=114526&r1=114525&r2=114526
==============================================================================
--- team/murf/bug11210/apps/app_nbscat.c (original)
+++ team/murf/bug11210/apps/app_nbscat.c Tue Apr 22 10:38:48 2008
@@ -41,6 +41,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/app.h"
 
 #define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
 #define NBSCAT "/usr/bin/nbscat8k"
@@ -61,34 +62,25 @@
 static int NBScatplay(int fd)
 {
 	int res;
-	int x;
-	sigset_t fullset, oldset;
-
-	sigfillset(&fullset);
-	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
-
-	res = fork();
-	if (res < 0) 
+
+	res = ast_safe_fork(0);
+	if (res < 0) {
 		ast_log(LOG_WARNING, "Fork failed\n");
+	}
+
 	if (res) {
-		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return res;
 	}
-	signal(SIGPIPE, SIG_DFL);
-	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
 
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
 
 	dup2(fd, STDOUT_FILENO);
-	for (x = STDERR_FILENO + 1; x < 1024; x++) {
-		if (x != STDOUT_FILENO)
-			close(x);
-	}
+	ast_close_fds_above_n(STDERR_FILENO);

[... 10507 lines stripped ...]



More information about the asterisk-commits mailing list