[svn-commits] murf: branch group/newcdr r162991 - in /team/group/newcdr: ./ apps/ channels/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 10 17:46:14 CST 2008


Author: murf
Date: Wed Dec 10 17:46:13 2008
New Revision: 162991

URL: http://svn.digium.com/view/asterisk?view=rev&rev=162991
Log:
Merged revisions 161869,161911,161947,161951,162016,162079,162140,162197,162203,162205,162266,162271,162275,162291,162342,162355,162414,162418,162466,162488,162542,162583,162619,162656,162660,162664,162667,162672,162675,162687,162739,162805,162891,162922-162923,162927,162930 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r161869 | file | 2008-12-08 14:41:50 -0700 (Mon, 08 Dec 2008) | 6 lines

Add alw as a valid file extension for alaw and ulw as a valid file extension for ulaw.
(closes issue #14001)
Reported by: henrikw
Patches:
      alw.diff uploaded by henrikw (license 627)

................
r161911 | bkruse | 2008-12-08 16:04:49 -0700 (Mon, 08 Dec 2008) | 2 lines

Note that the recently changed waittime parameter is in milliseconds.

................
r161947 | eliel | 2008-12-09 07:49:30 -0700 (Tue, 09 Dec 2008) | 8 lines

Avoid allocating memory for a thread that don't need it. Also, this memory was not being freed until the
main thread ends. (That is never).

(closes issue #14040)
Reported by: eliel
Patches:
      func_odbc.c.patch uploaded by eliel (license 64)

................
r161951 | russell | 2008-12-09 07:57:39 -0700 (Tue, 09 Dec 2008) | 23 lines

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

........
r161948 | russell | 2008-12-09 08:52:25 -0600 (Tue, 09 Dec 2008) | 15 lines

Fix a problem with GROUP() settings on a masquerade.

The previous code carried over group settings from the old channel to the new
one.  However, it did nothing with the group settings that were already on the
new channel.  This patch removes all group settings that already existed on the
new channel.

I have a more complicated version of this patch which addresses only the most
blatant problem with this, which is that a channel can end up with multiple
group settings in the same category.  However, I could not think of a use case
for keeping any of the group settings from the old channel, so I went this route
for now.

(closes AST-152)

........

................
r162016 | russell | 2008-12-09 09:47:39 -0700 (Tue, 09 Dec 2008) | 13 lines

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

........
r162014 | russell | 2008-12-09 10:46:53 -0600 (Tue, 09 Dec 2008) | 5 lines

Allow DISA to handle extensions that start with #.

(closes issue #13330)
Reported by: jcovert

........

................
r162079 | murf | 2008-12-09 10:18:03 -0700 (Tue, 09 Dec 2008) | 53 lines

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

........
r162013 | murf | 2008-12-09 09:31:55 -0700 (Tue, 09 Dec 2008) | 45 lines

(closes issue #14019)
Reported by: ckjohnsonme
Patches:
      14019.diff uploaded by murf (license 17)
Tested by: ckjohnsonme, murf

This crash was the result of a few small errors that
would combine in 64-bit land to result in a crash.

32-bit land might have seen these combine to mysteriously
drop the args to an application call, in certain
circumstances.

Also, in trying to find this bug, I spotted
a situation in the flex input, where, in passing
back a 'word' to the parser, it would allocate
a buffer larger than necessary. I changed the
usage in such situations, so that strdup was
not used, but rather, an ast_malloc, followed
by ast_copy_string.

I removed a field from the pval struct, in
u2, that was never getting used, and set in
one spot in the code. I believe it was an
artifact of a previous fix to make switch
cases work invisibly with extens.

And, for goto's I removed a '!' from
before a strcmp, that has been there
since the initial merging of AEL2, that
might prevent the proper target of a 
goto from being found. This was pretty
harmless on its own, as it would just
louse up a consistency check for users.

Many thanks to ckjohnsonme for providing
a simplified and complete set of information
about the bug, that helped considerably in
finding and fixing the problem.

Now, to get aelparse up and running again
in trunk, and out of its "horribly broken" state,
so I can run the regression suite!


........

................
r162140 | murf | 2008-12-09 11:35:35 -0700 (Tue, 09 Dec 2008) | 9 lines

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

........
r162136 | murf | 2008-12-09 11:13:39 -0700 (Tue, 09 Dec 2008) | 1 line

Previous fix used ast_malloc and ast_copy_string and messed up the standalone stuff. Fixed.
........

................
r162197 | file | 2008-12-09 12:08:39 -0700 (Tue, 09 Dec 2008) | 11 lines

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

........
  r162188 | file | 2008-12-09 15:06:14 -0400 (Tue, 09 Dec 2008) | 4 lines
  
  Take video into account when early bridging RTP.
  (closes issue #13535)
  Reported by: davidw
........

................
r162203 | tilghman | 2008-12-09 12:26:08 -0700 (Tue, 09 Dec 2008) | 9 lines

Blocked revisions 162071 via svnmerge

........
  r162071 | tilghman | 2008-12-09 11:07:50 -0600 (Tue, 09 Dec 2008) | 3 lines
  
  For some reason, after a distclean, gcc started returning
  'value computed is not used'.  Fixing (for --enable-dev-mode).
........

................
r162205 | file | 2008-12-09 12:48:35 -0700 (Tue, 09 Dec 2008) | 14 lines

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

........
  r162204 | file | 2008-12-09 15:47:07 -0400 (Tue, 09 Dec 2008) | 7 lines
  
  Make sure that the timestamp for DTMF is not the same as the previous voice frame and do not send audio when transmitting DTMF as this confuses some equipment.
  (closes issue #13209)
  Reported by: ip-rob
  Patches:
        13209.diff uploaded by file (license 11)
  Tested by: ip-rob, bujones
........

................
r162266 | mmichelson | 2008-12-09 13:30:07 -0700 (Tue, 09 Dec 2008) | 14 lines

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

........
r162265 | mmichelson | 2008-12-09 14:28:44 -0600 (Tue, 09 Dec 2008) | 6 lines

If we fail to start a thread for the pbx to run in, we need to
be sure to decrease the number of active calls on the system.

This fix may relate to ABE-1713, but it is not certain yet.


........

................
r162271 | murf | 2008-12-09 13:40:31 -0700 (Tue, 09 Dec 2008) | 9 lines

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

........
r162264 | murf | 2008-12-09 13:20:54 -0700 (Tue, 09 Dec 2008) | 1 line

In discussion with seanbright on #asterisk-dev,  I have added a default rule, and an option to suppress the default rule from being generated in the flex output, for the sake of those OS's where they didn't tweak flex's ECHO macro, and the compiler doesn't like it. The regressions are OK with this.
........

................
r162275 | file | 2008-12-09 13:46:11 -0700 (Tue, 09 Dec 2008) | 11 lines

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

........
  r162273 | file | 2008-12-09 16:44:32 -0400 (Tue, 09 Dec 2008) | 4 lines
  
  Fix double declaration of 'x' on the PPC platform.
  (closes issue #14038)
  Reported by: ffloimair
........

................
r162291 | russell | 2008-12-09 13:59:54 -0700 (Tue, 09 Dec 2008) | 17 lines

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

........
r162286 | russell | 2008-12-09 14:57:35 -0600 (Tue, 09 Dec 2008) | 9 lines

Fix an issue where callers on an incoming call on an SLA trunk would not hear ringback.

We need to make sure that we don't start writing audio to the trunk channel until we're
actually ready to answer it.  Otherwise, the channel driver will treat it as inband
progress, even though all they are getting is silence.

(closes issue #12471)
Reported by: mthomasslo

........

................
r162342 | file | 2008-12-09 14:16:37 -0700 (Tue, 09 Dec 2008) | 11 lines

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

........
  r162341 | file | 2008-12-09 17:14:29 -0400 (Tue, 09 Dec 2008) | 4 lines
  
  Add 'down' as a valid state for directed call pickup. This creeps up when we receive session progress when dialing a device and not ringing.
  (closes issue #14005)
  Reported by: ddl
........

................
r162355 | tilghman | 2008-12-09 14:57:09 -0700 (Tue, 09 Dec 2008) | 11 lines

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

........
  r162348 | tilghman | 2008-12-09 15:53:25 -0600 (Tue, 09 Dec 2008) | 4 lines
  
  We appear to have documented tz= in the [general] section of voicemail.conf,
  without actually having implemented it.  Oops.
  (Reported by Olivier on the -users list)
........

................
r162414 | russell | 2008-12-09 15:25:06 -0700 (Tue, 09 Dec 2008) | 16 lines

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

........
r162413 | russell | 2008-12-09 16:17:39 -0600 (Tue, 09 Dec 2008) | 8 lines

Remove the test_for_thread_safety() function completely.

The test is not valid.  Besides, if we actually suspected that recursive
mutexes were not working, we would get a ton of LOG_ERROR messages when
DEBUG_THREADS is turned on.

(inspired by a discussion on the asterisk-dev list)

........

................
r162418 | russell | 2008-12-09 15:38:41 -0700 (Tue, 09 Dec 2008) | 7 lines

Add some additional Asterisk project developer documentation.  

After the nightly update of the documentation on asterisk.org, I'll post 
an update to asterisk-dev with a pointer to the changes.  This covers some
release branch and commit policy information.  None of this should be a
surprise, since it's just documenting what we have already been doing.

................
r162466 | tilghman | 2008-12-09 16:10:34 -0700 (Tue, 09 Dec 2008) | 9 lines

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

........
  r162463 | tilghman | 2008-12-09 17:08:53 -0600 (Tue, 09 Dec 2008) | 2 lines
  
  Oops, should be "tz", not "zonetag".
........

................
r162488 | kpfleming | 2008-12-09 16:41:02 -0700 (Tue, 09 Dec 2008) | 1 line

it does help if the compiler attribute syntax is correct
................
r162542 | file | 2008-12-09 18:09:06 -0700 (Tue, 09 Dec 2008) | 6 lines

Finish conversion to using ARRAY_LEN and remove it as a janitor project.
(closes issue #14032)
Reported by: bkruse
Patches:
      14032.patch uploaded by bkruse (license 132)

................
r162583 | mvanbaak | 2008-12-10 04:34:09 -0700 (Wed, 10 Dec 2008) | 5 lines

Make res_snmp.so compile on OpenBSD.

OpenBSD uses an old version of gcc which throws an error
if you use a macro that's not #defined

................
r162619 | file | 2008-12-10 08:22:26 -0700 (Wed, 10 Dec 2008) | 4 lines

When transmitting a register set the socket port to the local one for the transport being used, not the port for the remote server.
(closes issue #13633)
Reported by: performer

................
r162656 | file | 2008-12-10 09:06:59 -0700 (Wed, 10 Dec 2008) | 13 lines

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

........
  r162653 | file | 2008-12-10 12:05:29 -0400 (Wed, 10 Dec 2008) | 6 lines
  
  Increment the sequence number on the end packets for RFC2833. After reading the RFC some more and doing some testing I agree with this change.
  (closes issue #12983)
  Reported by: vt
  Patches:
        dtmf_inc_seqnum_on_end_pkts.diff uploaded by vt (license 520)
........

................
r162660 | file | 2008-12-10 09:11:06 -0700 (Wed, 10 Dec 2008) | 6 lines

FreeBSD also needs libgen.h
(closes issue #14051)
Reported by: ys
Patches:
      res_http_post.c.diff uploaded by ys (license 281)

................
r162664 | mmichelson | 2008-12-10 09:34:35 -0700 (Wed, 10 Dec 2008) | 19 lines

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

........
r162663 | mmichelson | 2008-12-10 10:24:56 -0600 (Wed, 10 Dec 2008) | 11 lines

Revert fix for issue 13570. It has caused more problems than
it helped to fix.

(closes issue #13783)
Reported by: navkumar


(closes issue #14025)
Reported by: ffs


........

................
r162667 | mmichelson | 2008-12-10 09:39:10 -0700 (Wed, 10 Dec 2008) | 16 lines

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

........
r162659 | mmichelson | 2008-12-10 10:10:25 -0600 (Wed, 10 Dec 2008) | 8 lines

Add missing documentation to misdn.txt

(closes issue #14052)
Reported by: festr
Patches:
      misdn.txt.patch uploaded by festr (license 443)


........

................
r162672 | mmichelson | 2008-12-10 09:46:51 -0700 (Wed, 10 Dec 2008) | 21 lines

Blocked revisions 162670 via svnmerge

........
r162670 | mmichelson | 2008-12-10 10:44:37 -0600 (Wed, 10 Dec 2008) | 14 lines

Update to stringfield handling so that side-effects on
parameters are not evaluated multiple times.

An example where this caused a problem was in chan_sip.c, with
the line

  ast_string_field_set(p, fromdomain, ++fromdomain);

This patch was originally uploaded to issue #13783 by
jamessan. While the issue was closed for other reasons, this
patch is valid and fixes a separate problem, and is thus
being committed.


........

................
r162675 | murf | 2008-12-10 09:52:05 -0700 (Wed, 10 Dec 2008) | 29 lines

Blocked revisions 162671 via svnmerge

........
r162671 | murf | 2008-12-10 09:45:01 -0700 (Wed, 10 Dec 2008) | 22 lines

(closes issue #14022)
Reported by: wetwired
Tested by: murf

I checked, and I added a mod to the trunk version
of Asterisk that would make it 8-bit transparent
on 27 Nov 2007, but I made no such updates to
1.4. My best guess is that 1.4 was released, and
it was not appropriate to commit an enhancement.

But I'm going to add the same fixes to 1.4 now,
for the following reasons:
1. wetwired is correct; 1.4 is **mostly** 8-bit
   transparent now. This is because the lexical
   token forming rules use . in most 'word'
   state continuances.  It's just the beginning
   of a 'word' that is picky.
2. Accepting 8-bit chars in some places and
   not others leads to bug reports like this.



........

................
r162687 | mvanbaak | 2008-12-10 10:09:15 -0700 (Wed, 10 Dec 2008) | 8 lines

add tab completion for 'core set debug X filename.c'

(closes issue #13969)
Reported by: jtodd
Patches:
      20081205__bug13969.diff.txt uploaded by Corydon76 (license 14)
Tested by: mvanbaak, eliel

................
r162739 | file | 2008-12-10 10:53:09 -0700 (Wed, 10 Dec 2008) | 13 lines

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

........
  r162738 | file | 2008-12-10 13:50:43 -0400 (Wed, 10 Dec 2008) | 6 lines
  
  When a SIP peer unregisters set the expiry time back to 0 so that the 200 OK contains an expires of 0.
  (closes issue #13599)
  Reported by: hjourdain
  Patches:
        chan_sip.c.diff uploaded by hjourdain (license 583)
........

................
r162805 | file | 2008-12-10 12:02:57 -0700 (Wed, 10 Dec 2008) | 13 lines

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

........
  r162804 | file | 2008-12-10 15:01:17 -0400 (Wed, 10 Dec 2008) | 6 lines
  
  Fix subscription based MWI up a bit. We only want to put sip: at the beginning of the URI if it is not already there and revert code to ignore destination check if subscribing for MWI.
  (closes issue #12560)
  Reported by: vsauer
  Patches:
        patch001.diff uploaded by ramonpeek (license 266)
........

................
r162891 | jpeeler | 2008-12-10 15:11:46 -0700 (Wed, 10 Dec 2008) | 13 lines

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

........
r162874 | jpeeler | 2008-12-10 16:04:18 -0600 (Wed, 10 Dec 2008) | 5 lines

(closes issue #13229)
Reported by: clegall_proformatique

Ensure that moh_generate does not return prematurely before local_ast_moh_stop is called. Also, the sleep in mp3_spawn now only occurs for http locations since it seems to have been added originally only for failing media streams.

........

................
r162922 | tilghman | 2008-12-10 15:48:09 -0700 (Wed, 10 Dec 2008) | 7 lines

Checking global variables here actually overwrote the previous substitution by
channel variables, and in any case, was redundant;
pbx_substitute_variables_helper ALREADY does substitution for global
variables.
(closes issue #13327)
 Reported by: pj

................
r162923 | file | 2008-12-10 15:48:58 -0700 (Wed, 10 Dec 2008) | 4 lines

Fix reloads of aliased CLI commands. Due to changes done to turn it into a single memory allocation we can't just use the existing CLI alias structure. We have to destroy all existing ones and then create new ones.
(closes issue #14054)
Reported by: pj

................
r162927 | jpeeler | 2008-12-10 15:53:34 -0700 (Wed, 10 Dec 2008) | 11 lines

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

........
r162926 | jpeeler | 2008-12-10 16:52:51 -0600 (Wed, 10 Dec 2008) | 3 lines

Oops, inverted logic for a strcasecmp check. Pointed out by mmichelson, thanks!


........

................
r162930 | tilghman | 2008-12-10 16:01:14 -0700 (Wed, 10 Dec 2008) | 2 lines

Previously missing line, now the substitution works correctly

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

Modified:
    team/group/newcdr/   (props changed)
    team/group/newcdr/apps/app_directed_pickup.c
    team/group/newcdr/apps/app_disa.c
    team/group/newcdr/apps/app_festival.c
    team/group/newcdr/apps/app_meetme.c
    team/group/newcdr/apps/app_voicemail.c
    team/group/newcdr/channels/chan_sip.c
    team/group/newcdr/channels/iax2-parser.c
    team/group/newcdr/contrib/asterisk-ng-doxygen
    team/group/newcdr/doc/janitor-projects.txt
    team/group/newcdr/doc/tex/misdn.tex
    team/group/newcdr/formats/format_pcm.c
    team/group/newcdr/funcs/func_odbc.c
    team/group/newcdr/include/asterisk.h
    team/group/newcdr/include/asterisk/doxyref.h
    team/group/newcdr/include/asterisk/pval.h
    team/group/newcdr/include/asterisk/stringfields.h
    team/group/newcdr/include/asterisk/utils.h
    team/group/newcdr/main/app.c
    team/group/newcdr/main/asterisk.c
    team/group/newcdr/main/cli.c
    team/group/newcdr/main/pbx.c
    team/group/newcdr/main/rtp.c
    team/group/newcdr/main/utils.c
    team/group/newcdr/res/ael/ael.flex
    team/group/newcdr/res/ael/ael_lex.c
    team/group/newcdr/res/ael/pval.c
    team/group/newcdr/res/res_clialiases.c
    team/group/newcdr/res/res_http_post.c
    team/group/newcdr/res/res_musiconhold.c
    team/group/newcdr/res/snmp/agent.c

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
    automerge = yes

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Dec 10 17:46:13 2008
@@ -1,1 +1,1 @@
-/trunk:1-161835
+/trunk:1-162990

Modified: team/group/newcdr/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_directed_pickup.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/apps/app_directed_pickup.c (original)
+++ team/group/newcdr/apps/app_directed_pickup.c Wed Dec 10 17:46:13 2008
@@ -116,7 +116,7 @@
 /* Helper function that determines whether a channel is capable of being picked up */
 static int can_pickup(struct ast_channel *chan)
 {
-	if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING))
+	if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN))
 		return 1;
 	else
 		return 0;

Modified: team/group/newcdr/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_disa.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/apps/app_disa.c (original)
+++ team/group/newcdr/apps/app_disa.c Wed Dec 10 17:46:13 2008
@@ -303,8 +303,14 @@
 					continue;
 				}
 			} else {
-				if (j == '#') { /* end of extension */
-					break;
+				if (j == '#') { /* end of extension .. maybe */
+					if (i == 0 && 
+							(ast_matchmore_extension(chan, args.context, "#", 1, chan->cid.cid_num) ||
+							 ast_exists_extension(chan, args.context, "#", 1, chan->cid.cid_num)) ) {
+						/* Let the # be the part of, or the entire extension */
+					} else {
+						break;
+					}
 				}
 			}
 

Modified: team/group/newcdr/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_festival.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/apps/app_festival.c (original)
+++ team/group/newcdr/apps/app_festival.c Wed Dec 10 17:46:13 2008
@@ -129,7 +129,6 @@
 	int res;
 #ifdef __PPC__ 
 	char c;
-	int x;
 #endif
 
 	res = ast_safe_fork(0);

Modified: team/group/newcdr/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_meetme.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/apps/app_meetme.c (original)
+++ team/group/newcdr/apps/app_meetme.c Wed Dec 10 17:46:13 2008
@@ -518,6 +518,8 @@
 	CONFFLAG_KICK_CONTINUE = (1 << 28),
 	CONFFLAG_DURATION_STOP = (1 << 29),
 	CONFFLAG_DURATION_LIMIT = (1 << 30),
+	/*! Do not write any audio to this channel until the state is up. */
+	CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31),
 };
 
 enum {
@@ -1945,6 +1947,15 @@
 		ao2_ref(current, -1);
 	}
 	return NULL;
+}
+
+static int can_write(struct ast_channel *chan, int confflags)
+{
+	if (!(confflags & CONFFLAG_NO_AUDIO_UNTIL_UP)) {
+		return 1;
+	}
+
+	return (chan->_state == AST_STATE_UP);
 }
 
 static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int confflags, char *optargs[])
@@ -2296,7 +2307,10 @@
 		}
 	}
 
-	ast_indicate(chan, -1);
+	if (!(confflags & CONFFLAG_NO_AUDIO_UNTIL_UP)) {
+		/* We're leaving this alone until the state gets changed to up */
+		ast_indicate(chan, -1);
+	}
 
 	if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
 		ast_log(LOG_WARNING, "Unable to set '%s' to write linear mode\n", chan->name);
@@ -3186,7 +3200,7 @@
 						}
 						if (conf->transframe[idx]) {
  							if (conf->transframe[idx]->frametype != AST_FRAME_NULL) {
-	 							if (ast_write(chan, conf->transframe[idx])) {
+	 							if (can_write(chan, confflags) && ast_write(chan, conf->transframe[idx])) {
 									ast_log(LOG_WARNING, "Unable to write frame to channel %s\n", chan->name);
 								}
 							}
@@ -3200,7 +3214,7 @@
 						if (user->listen.actual) {
 							ast_frame_adjust_volume(&fr, user->listen.actual);
 						}
-						if (ast_write(chan, &fr) < 0) {
+						if (can_write(chan, confflags) && ast_write(chan, &fr) < 0) {
 							ast_log(LOG_WARNING, "Unable to write frame to channel %s\n", chan->name);
 						}
 					}
@@ -4572,6 +4586,12 @@
 	ast_cond_t *cond;
 };
 
+static void answer_trunk_chan(struct ast_channel *chan)
+{
+	ast_answer(chan);
+	ast_indicate(chan, -1);
+}
+
 static void *run_station(void *data)
 {
 	struct sla_station *station;
@@ -4594,7 +4614,7 @@
 	ast_str_set(&conf_name, 0, "SLA_%s", trunk_ref->trunk->name);
 	ast_set_flag(&conf_flags, 
 		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
-	ast_answer(trunk_ref->chan);
+	answer_trunk_chan(trunk_ref->chan);
 	conf = build_conf(conf_name->str, "", "", 0, 0, 1, trunk_ref->chan);
 	if (conf) {
 		conf_run(trunk_ref->chan, conf, conf_flags.flags, NULL);
@@ -4766,7 +4786,7 @@
 			/* Track the channel that answered this trunk */
 			s_trunk_ref->chan = ast_dial_answered(ringing_station->station->dial);
 			/* Actually answer the trunk */
-			ast_answer(ringing_trunk->trunk->chan);
+			answer_trunk_chan(ringing_trunk->trunk->chan);
 			sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_UP, ALL_TRUNK_REFS, NULL);
 			/* Now, start a thread that will connect this station to the trunk.  The rest of
 			 * the code here sets up the thread and ensures that it is able to save the arguments
@@ -5579,7 +5599,7 @@
 		ast_mutex_unlock(&sla.lock);
 
 		if (ringing_trunk) {
-			ast_answer(ringing_trunk->trunk->chan);
+			answer_trunk_chan(ringing_trunk->trunk->chan);
 			sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_UP, ALL_TRUNK_REFS, NULL);
 
 			free(ringing_trunk);
@@ -5778,7 +5798,7 @@
 		return 0;
 	}
 	ast_set_flag(&conf_flags, 
-		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER | CONFFLAG_PASS_DTMF);
+		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER | CONFFLAG_PASS_DTMF | CONFFLAG_NO_AUDIO_UNTIL_UP);
 
 	if (ast_test_flag(&opt_flags, SLA_TRUNK_OPT_MOH)) {
 		ast_indicate(chan, -1);

Modified: team/group/newcdr/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_voicemail.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/apps/app_voicemail.c (original)
+++ team/group/newcdr/apps/app_voicemail.c Wed Dec 10 17:46:13 2008
@@ -689,6 +689,7 @@
 
 static AST_LIST_HEAD_STATIC(users, ast_vm_user);
 static AST_LIST_HEAD_STATIC(zones, vm_zone);
+static char zonetag[80];
 static int maxsilence;
 static int maxmsg;
 static int maxdeletedmsg;
@@ -846,6 +847,7 @@
 	ast_copy_string(vmu->callback, callcontext, sizeof(vmu->callback));
 	ast_copy_string(vmu->dialout, dialcontext, sizeof(vmu->dialout));
 	ast_copy_string(vmu->exit, exitcontext, sizeof(vmu->exit));
+	ast_copy_string(vmu->zonetag, zonetag, sizeof(vmu->zonetag));
 	if (vmmaxsecs)
 		vmu->maxsecs = vmmaxsecs;
 	if (maxmsg)
@@ -1420,7 +1422,7 @@
 		"Deleted",
 		"Urgent"
 	};
-	return (id >= 0 && id < (sizeof(msgs)/sizeof(msgs[0]))) ? msgs[id] : "Unknown";
+	return (id >= 0 && id < ARRAY_LEN(msgs)) ? msgs[id] : "Unknown";
 }
 
 static void free_user(struct ast_vm_user *vmu)
@@ -10840,6 +10842,9 @@
 				adsiver = atoi(val);
 			}
 		}
+		if ((val = ast_variable_retrieve(cfg, "general", "tz"))) {
+			ast_copy_string(zonetag, val, sizeof(zonetag));
+		}
 		if ((val = ast_variable_retrieve(cfg, "general", "emailsubject"))) {
 			emailsubject = ast_strdup(val);
 		}

Modified: team/group/newcdr/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/channels/chan_sip.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/channels/chan_sip.c (original)
+++ team/group/newcdr/channels/chan_sip.c Wed Dec 10 17:46:13 2008
@@ -6814,7 +6814,6 @@
 	char *port = NULL;
 	char *hostname=NULL, *secret=NULL, *authuser=NULL, *expire=NULL;
 	char *callback=NULL;
-	char *reserved = NULL;
 
 	if (!value)
 		return -1;
@@ -6839,15 +6838,7 @@
 		if (authuser)
 			*authuser++ = '\0';
 	}
-	if ((reserved = strpbrk(username, SIP_RESERVED))) {
-		goto invalid_char;
-	}
-	if (!ast_strlen_zero(secret) && (reserved = strpbrk(secret, SIP_RESERVED))) {
-		goto invalid_char;
-	}
-	if (!ast_strlen_zero(authuser) && (reserved = strpbrk(authuser, SIP_RESERVED))) {
-		goto invalid_char;
-	}
+
 	/* split host[:port][/contact] */
 	expire = strchr(hostname, '~');
 	if (expire)
@@ -6861,9 +6852,6 @@
 	 */
 	if ((port = strchr(hostname, ':'))) {
 		*port = '\0';
-	}
-	if ((reserved = strpbrk(hostname, SIP_RESERVED))) {
-		goto invalid_char;
 	}
 	/* And then re-merge the host and port so they are stored correctly
 	 */
@@ -6903,10 +6891,6 @@
 	ASTOBJ_CONTAINER_LINK(&regl, reg); /* Add the new registry entry to the list */
 	registry_unref(reg, "unref the reg pointer");	/* release the reference given by ASTOBJ_INIT. The container has another reference */
 	return 0;
-
-invalid_char:
-	ast_log(LOG_ERROR, "A reserved character ('%c') was used in a \"register\" line. This registration will not occur\n", *reserved);
-	return -1;
 }
 
 /*! \brief Parse mwi=> line in sip.conf and add to list */
@@ -9689,7 +9673,7 @@
  	} else {
  		if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { 
  			/* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
-			snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
+			snprintf(to, sizeof(to), "<%s%s>;tag=%s", (!strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
  		} else if (p->options && p->options->vxml_url) {
  			/* If there is a VXML URL append it to the SIP URL */
  			snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);
@@ -10546,7 +10530,9 @@
 
 		/* Set transport and port so the correct contact is built */
 		p->socket.type = r->transport;
-		p->socket.port = htons(r->portno);
+		if (r->transport == SIP_TRANSPORT_TLS || r->transport == SIP_TRANSPORT_TCP) {
+			p->socket.port = sip_tcp_desc.local_address.sin_port;
+		}
 
 		/*
 		  check which address we should use in our contact header 
@@ -11133,6 +11119,7 @@
 		ast_string_field_set(peer, useragent, "");
 		peer->sipoptions = 0;
 		peer->lastms = 0;
+		pvt->expiry = 0;
 
 		ast_verb(3, "Unregistered SIP '%s'\n", peer->name);
 
@@ -19709,7 +19696,7 @@
 	parse_ok_contact(p, req);
 
 	build_contact(p);
-	if (strcmp(event, "message-summary") && gotdest) {
+	if (gotdest) {
 		transmit_response(p, "404 Not Found", req);
 		pvt_set_needdestroy(p, "subscription target not found");
 		if (authpeer)

Modified: team/group/newcdr/channels/iax2-parser.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/channels/iax2-parser.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/channels/iax2-parser.c (original)
+++ team/group/newcdr/channels/iax2-parser.c Wed Dec 10 17:46:13 2008
@@ -533,14 +533,14 @@
 		sprintf(subclass2, "%c", fh->csub);
 		subclass = subclass2;
 	} else if (fh->type == AST_FRAME_IAX) {
-		if (fh->csub >= (int)sizeof(iaxs)/(int)sizeof(iaxs[0])) {
+		if (fh->csub >= ARRAY_LEN(iaxs)) {
 			snprintf(subclass2, sizeof(subclass2), "(%d?)", fh->csub);
 			subclass = subclass2;
 		} else {
 			subclass = iaxs[(int)fh->csub];
 		}
 	} else if (fh->type == AST_FRAME_CONTROL) {
-		if (fh->csub >= (int)sizeof(cmds)/(int)sizeof(cmds[0])) {
+		if (fh->csub >= ARRAY_LEN(cmds)) {
 			snprintf(subclass2, sizeof(subclass2), "(%d?)", fh->csub);
 			subclass = subclass2;
 		} else {

Modified: team/group/newcdr/contrib/asterisk-ng-doxygen
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/contrib/asterisk-ng-doxygen?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/contrib/asterisk-ng-doxygen (original)
+++ team/group/newcdr/contrib/asterisk-ng-doxygen Wed Dec 10 17:46:13 2008
@@ -178,6 +178,7 @@
 # You can put \n's in the value part of an alias to insert newlines.
 
 ALIASES                = "extref=\xrefitem extref \"ExtRef\" \"External references\""
+ALIASES += "AsteriskTrunkWarning=\note The information contained on this page may be out of date.  To make sure you get the most current information, please make sure that you are using the documentation generated from Asterisk trunk."
 
 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
 # sources only. Doxygen will then generate output that is more tailored for C. 

Modified: team/group/newcdr/doc/janitor-projects.txt
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/doc/janitor-projects.txt?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/doc/janitor-projects.txt (original)
+++ team/group/newcdr/doc/janitor-projects.txt Wed Dec 10 17:46:13 2008
@@ -32,11 +32,3 @@
  -- Audit all channel/res/app/etc. modules to ensure that they do not register any entrypoints with the Asterisk core until after they are ready to service requests; all config file reading/processing, structure allocation, etc. must be completed before Asterisk is made aware of any services the module offers.
 
  -- Ensure that Realtime-enabled modules do not depend on the order of columns returned by the database lookup (example: outboundproxy and host settings in chan_sip).
-
- -- There are several places in the code where the length of arrays is calculated in-line with sizeof() and division. A common place to find this is in for loops, like this:
-
- 	for (i = 0; i < sizeof(array)/sizeof(array[0]); i++)
-
-	There is a macro in utils.h called ARRAY_LEN which should be used instead for readability's sake.
-
-	for (i = 0; i < ARRAY_LEN(array); i++)

Modified: team/group/newcdr/doc/tex/misdn.tex
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/doc/tex/misdn.tex?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/doc/tex/misdn.tex (original)
+++ team/group/newcdr/doc/tex/misdn.tex Wed Dec 10 17:46:13 2008
@@ -122,7 +122,7 @@
 
 \begin{astlisting}
 \begin{verbatim}
-mISDN/<port>|g:<group>/<extension>[/<OPTIONSSTRING>]
+mISDN/<port>[:bchannel]|g:<group>/<extension>[/<OPTIONSSTRING>]
 
 The Optionsstring looks Like:
 :<optchar><optarg>:<optchar><optarg>...

Modified: team/group/newcdr/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/formats/format_pcm.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/formats/format_pcm.c (original)
+++ team/group/newcdr/formats/format_pcm.c Wed Dec 10 17:46:13 2008
@@ -415,7 +415,7 @@
 
 static const struct ast_format alaw_f = {
 	.name = "alaw",
-	.exts = "alaw|al",
+	.exts = "alaw|al|alw",
 	.format = AST_FORMAT_ALAW,
 	.write = pcm_write,
 	.seek = pcm_seek,
@@ -432,7 +432,7 @@
 
 static const struct ast_format pcm_f = {
 	.name = "pcm",
-	.exts = "pcm|ulaw|ul|mu",
+	.exts = "pcm|ulaw|ul|mu|ulw",
 	.format = AST_FORMAT_ULAW,
 	.write = pcm_write,
 	.seek = pcm_seek,

Modified: team/group/newcdr/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/funcs/func_odbc.c?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/funcs/func_odbc.c (original)
+++ team/group/newcdr/funcs/func_odbc.c Wed Dec 10 17:46:13 2008
@@ -963,7 +963,7 @@
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(field)[100];
 	);
-	struct ast_str *sql = ast_str_thread_get(&sql_buf, 16);
+	struct ast_str *sql;
 	char *char_args, varname[10];
 	struct acf_odbc_query *query;
 	struct ast_channel *chan;
@@ -1005,6 +1005,11 @@
 		return CLI_SHOWUSAGE;
 	}
 
+	sql = ast_str_thread_get(&sql_buf, 16);
+	if (!sql) {
+		return CLI_FAILURE;
+	}
+
 	AST_RWLIST_RDLOCK(&queries);
 	AST_RWLIST_TRAVERSE(&queries, query, list) {
 		if (!strcmp(query->acf->name, a->argv[2])) {
@@ -1156,7 +1161,7 @@
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(field)[100];
 	);
-	struct ast_str *sql = ast_str_thread_get(&sql_buf, 16);
+	struct ast_str *sql;
 	char *char_args, *char_values, varname[10];
 	struct acf_odbc_query *query;
 	struct ast_channel *chan;
@@ -1198,6 +1203,11 @@
 		return CLI_SHOWUSAGE;
 	}
 
+	sql = ast_str_thread_get(&sql_buf, 16);
+	if (!sql) {
+		return CLI_FAILURE;
+	}
+
 	AST_RWLIST_RDLOCK(&queries);
 	AST_RWLIST_TRAVERSE(&queries, query, list) {
 		if (!strcmp(query->acf->name, a->argv[2])) {

Modified: team/group/newcdr/include/asterisk.h
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/include/asterisk.h?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/include/asterisk.h (original)
+++ team/group/newcdr/include/asterisk.h Wed Dec 10 17:46:13 2008
@@ -89,6 +89,7 @@
  */
 const char *ast_file_version_find(const char *file);
 
+char *ast_complete_source_filename(const char *partial, int n);
 
 /*!
  * \brief Register/unregister a source code file with the core.

Modified: team/group/newcdr/include/asterisk/doxyref.h
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/include/asterisk/doxyref.h?view=diff&rev=162991&r1=162990&r2=162991
==============================================================================
--- team/group/newcdr/include/asterisk/doxyref.h (original)
+++ team/group/newcdr/include/asterisk/doxyref.h Wed Dec 10 17:46:13 2008
@@ -1,9 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
- *
- * Mark Spencer <markster at digium.com>
+ * Copyright (C) 1999 - 2008, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk project. Please do not directly contact
@@ -16,110 +14,398 @@
  * at the top of the source tree.
  */
 
-/*! \file 
+/*! 
+ * \file 
  * \brief This file generates Doxygen pages from files in the /doc
- directory of the Asterisk source code tree 
- */
-
-/* The following is for Doxygen Developer's documentation generated
+ *        directory of the Asterisk source code tree 
+ */
+
+/* 
+ * The following is for Doxygen Developer's documentation generated
  * by running "make progdocs" with doxygen installed on your
  * system.
  */
-/*! \page DevDoc Asterisk Developer's Documentation - appendices
- *  \arg \ref CodeGuide : The must-read document for all developer's
- *  \arg \ref AstAPI
- *  \arg \ref Def_Channel : What's a channel, anyway?
- *  \arg \ref channel_drivers : Existing channel drivers
- *  \arg \ref AstDebug : Hints on debugging
- *  \arg \ref AstAMI : The Call management socket API
- *  \arg \ref AstARA : A generic data storage and retrieval API for Asterisk
- *  \arg \ref AstDUNDi : A way to find phone services dynamically by using the DUNDi protocol
- *  \arg \ref AJI_intro : The Asterisk Jabber Interface
- *  \arg \ref AstCDR
- *  \arg \ref AstREADME
- *  \arg \ref AstVar
- *  \arg \ref AstVideo
- *  \arg \ref AstENUM : The IETF way to redirect from phone numbers to VoIP calls
- *  \arg \ref AstHTTP
- *  \arg \ref AstSpeech
- *  \arg \ref ConfigFiles
- *  \arg \ref SoundFiles included in the Asterisk distribution
- *  \arg \ref AstCREDITS : A Thank You to contributors
- *  \arg \ref extref 
- \n\n
+
+/*! 
+ * \page DevDoc Asterisk Developer's Documentation - Appendices
+ *
+ * \section devpolicy Development and Release Policies
+ * \arg \ref CodeGuide : The must-read document for all developers
+ * \arg \ref ReleaseStatus : The current support level for various Asterisk releases
+ * \arg \ref ReleasePolicies : Asterisk Release and Commit Policies
+ * \arg \ref AstCREDITS : A Thank You to contributors (unfortunately out of date)
+ *
+ * \section apisandinterfaces Asterisk APIs and Interfaces
+ * \arg \ref AstAPI
+ * \arg \ref Def_Channel : What's a channel, anyway?
+ * \arg \ref channel_drivers : Existing channel drivers
+ * \arg \ref AstAMI : The Call management socket API
+ * \arg \ref AstARA : A generic data storage and retrieval API for Asterisk

[... 2618 lines stripped ...]



More information about the svn-commits mailing list