[asterisk-commits] murf: branch murf/bug_7638 r49060 - in /team/murf/bug_7638: ./ apps/ channels...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 29 11:11:10 MST 2006


Author: murf
Date: Fri Dec 29 12:11:09 2006
New Revision: 49060

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49060
Log:
Merged revisions 48927-48930,48932-48933,48941,48945,48947,48949-48951,48957-48959,48961,48965,48967,48976,48979,48981,48983-48984,48986,48989-48990,48992,48994,48996,48999-49001,49004,49007-49008,49010,49019,49023,49025-49027,49029-49030,49033,49036,49047,49053-49054,49056 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r48927 | russell | 2006-12-23 12:51:56 -0700 (Sat, 23 Dec 2006) | 2 lines

Use the correct function to destroy an rwlock in the destructor for an ast_rwlock_t

................
r48928 | file | 2006-12-23 12:55:38 -0700 (Sat, 23 Dec 2006) | 2 lines

We should probably declare the lock... and not just the constructor/deconstructor.

................
r48929 | russell | 2006-12-23 13:08:16 -0700 (Sat, 23 Dec 2006) | 3 lines

Remove a debug message.  If this is still needed for debugging something,
it should be made a LOG_DEBUG message.

................
r48930 | russell | 2006-12-23 13:13:14 -0700 (Sat, 23 Dec 2006) | 17 lines

- Convert the list of URI handlers to use the linked list macros.  While doing
  this, implementing locking of this list to make it thread-safe.

- Add a "redirect" option to http.conf that allows redirecting one URI to
  another.  I was inspired to do this while playing with the Asterisk GUI.  I
  got tired of typing this URL to get to the GUI:
     
     http://localhost:8088/asterisk/static/config/cfgadvanced.html

  So, now I have the following line in http.conf:

     redirect=/=/asterisk/static/config/cfgadvanced.html

  Now, I can type the following into my browser and go to the GUI:

     http://localhost:8088

................
r48932 | russell | 2006-12-23 13:26:34 -0700 (Sat, 23 Dec 2006) | 9 lines

Blocked revisions 48931 via svnmerge

........
r48931 | russell | 2006-12-23 15:22:52 -0500 (Sat, 23 Dec 2006) | 2 lines

Implement locking for the list of URI handlers to make it thread-safe.

........

................
r48933 | russell | 2006-12-23 20:29:42 -0700 (Sat, 23 Dec 2006) | 4 lines

Simplify the definition of http_uri_redirect such that only one allocation is
done for exactly how much memory is needed.  This was suggested by Luigi on
the asterisk-dev mailing list.  Thanks!

................
r48941 | russell | 2006-12-23 23:51:37 -0700 (Sat, 23 Dec 2006) | 19 lines

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

................
r48940 | russell | 2006-12-24 01:49:31 -0500 (Sun, 24 Dec 2006) | 11 lines

Merged revisions 48939 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48939 | russell | 2006-12-24 01:47:29 -0500 (Sun, 24 Dec 2006) | 3 lines

Remove a couple of misplaced dots in log messages.  This was reported by
Andrea Spadaccini on the asterisk-dev mailing list.

........

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

................
r48945 | russell | 2006-12-24 00:27:29 -0700 (Sun, 24 Dec 2006) | 19 lines

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

................
r48944 | russell | 2006-12-24 02:25:38 -0500 (Sun, 24 Dec 2006) | 11 lines

Merged revisions 48943 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48943 | russell | 2006-12-24 02:23:07 -0500 (Sun, 24 Dec 2006) | 3 lines

Check for the proper return value on an error in a call to mmap().
This was reported by Andy Wang on the asterisk-dev list.  Thanks!

........

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

................
r48947 | russell | 2006-12-24 14:01:02 -0700 (Sun, 24 Dec 2006) | 2 lines

Use spaces as a separator for the redirect option to improve readability

................
r48949 | russell | 2006-12-24 14:21:21 -0700 (Sun, 24 Dec 2006) | 11 lines

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

........
r48948 | russell | 2006-12-24 16:19:37 -0500 (Sun, 24 Dec 2006) | 3 lines

Fix a typo in an error message that indicated that the MGCP channel type could
not be registered, instead of the correct type, OSS.

........

................
r48950 | russell | 2006-12-24 19:06:47 -0700 (Sun, 24 Dec 2006) | 2 lines

Resolve some compiler warnings

................
r48951 | russell | 2006-12-24 19:31:04 -0700 (Sun, 24 Dec 2006) | 6 lines

Simplify the if statements used to check to see if the argument was "num"
or "number".  It is not possible to ever reach the second part of this
conditional statement.

Thanks to my brother, Brett, for pointing this out.  :)

................
r48957 | russell | 2006-12-24 22:22:40 -0700 (Sun, 24 Dec 2006) | 22 lines

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

................
r48956 | russell | 2006-12-25 00:21:20 -0500 (Mon, 25 Dec 2006) | 14 lines

Merged revisions 48955 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48955 | russell | 2006-12-25 00:19:48 -0500 (Mon, 25 Dec 2006) | 6 lines

Fix an error introduced by copying and pasting the handling of the >= operator
for the MATH function.  If a single equal sign was used as an operator, the
function would treat it is as if it were the >= operator.  Now, it properly
handles it as an invalid operator.
(issue #8665, patch by tempest1)

........

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

................
r48958 | rizzo | 2006-12-24 23:38:09 -0700 (Sun, 24 Dec 2006) | 8 lines

rename the structs struct tone_zone_sound and struct tone_zone
defined in indications.h to ind_tone_zone_sound and ind_tone_zone,
to avoid conflicts with the structs with the same names
defined in tonezone.h

Hope i haven't missed any instance.


................
r48959 | rizzo | 2006-12-24 23:42:15 -0700 (Sun, 24 Dec 2006) | 3 lines

provide INT16_MIN and INT16_MAX for platforms where they are not defined.


................
r48961 | file | 2006-12-25 10:06:58 -0700 (Mon, 25 Dec 2006) | 10 lines

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

........
r48960 | file | 2006-12-25 12:04:48 -0500 (Mon, 25 Dec 2006) | 2 lines

Clean up autoconf file (gets rid of warnings seen when rebuilding configure) and rebuild configure.

........

................
r48965 | file | 2006-12-25 21:34:07 -0700 (Mon, 25 Dec 2006) | 10 lines

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

........
r48964 | file | 2006-12-25 23:31:58 -0500 (Mon, 25 Dec 2006) | 2 lines

Add an API call that initializes an RTP structure. We need this because chan_sip is cheeky and uses a temporary RTP structure for codec purposes, and the API calls that are used rely on the lock. (Pointed out on asterisk-dev by Andy Wang)

........

................
r48967 | file | 2006-12-25 22:23:25 -0700 (Mon, 25 Dec 2006) | 10 lines

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

........
r48966 | file | 2006-12-26 00:20:08 -0500 (Tue, 26 Dec 2006) | 2 lines

Get rid of a needless memory allocation and only create a conference structure in find_conf_realtime if data was read from realtime. (issue #8669 reported by robl)

........

................
r48976 | oej | 2006-12-27 09:01:07 -0700 (Wed, 27 Dec 2006) | 2 lines

Issue #8600 - bogus SDP Content Length in T.38 re-invite

................
r48979 | oej | 2006-12-27 09:26:02 -0700 (Wed, 27 Dec 2006) | 2 lines

Reset invitestate when sending new invite

................
r48981 | oej | 2006-12-27 09:35:41 -0700 (Wed, 27 Dec 2006) | 2 lines

Cleanup of handle_common_options

................
r48983 | oej | 2006-12-27 09:56:11 -0700 (Wed, 27 Dec 2006) | 2 lines

Add support for buggy Cisco MWI firmware > 8.0.3 (issue 8575 - flewid)

................
r48984 | oej | 2006-12-27 09:58:03 -0700 (Wed, 27 Dec 2006) | 8 lines

>From coding guidelines:

Comments should explain what the code does, not when something was changed
  or who changed it. If you have done a larger contribution, make sure
  that you are added to the CREDITS file.



................
r48986 | oej | 2006-12-27 11:02:10 -0700 (Wed, 27 Dec 2006) | 2 lines

Be politically correct

................
r48989 | kpfleming | 2006-12-27 11:33:44 -0700 (Wed, 27 Dec 2006) | 10 lines

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

........
r48987 | kpfleming | 2006-12-27 12:29:13 -0600 (Wed, 27 Dec 2006) | 2 lines

allow 'show memory' and 'show memory summary' to distinguish memory allocations that were done for caching purposes, so they don't look like memory leaks

........

................
r48990 | kpfleming | 2006-12-27 11:34:24 -0700 (Wed, 27 Dec 2006) | 10 lines

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

........
r48988 | kpfleming | 2006-12-27 12:33:22 -0600 (Wed, 27 Dec 2006) | 2 lines

make the option actually match the documentation

........

................
r48992 | oej | 2006-12-27 12:57:06 -0700 (Wed, 27 Dec 2006) | 3 lines

-Remove "localmask" setting (deprecated in earlier version)
- Remove "musiconhold" and "musicclass" settings (also deprecated earlier)

................
r48994 | oej | 2006-12-27 13:26:30 -0700 (Wed, 27 Dec 2006) | 2 lines

Only handle T38 options once

................
r48996 | oej | 2006-12-27 13:30:03 -0700 (Wed, 27 Dec 2006) | 2 lines

Only set "rfc2833compensate" option once

................
r48999 | kpfleming | 2006-12-27 14:09:35 -0700 (Wed, 27 Dec 2006) | 11 lines

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

........
r48998 | kpfleming | 2006-12-27 15:08:30 -0600 (Wed, 27 Dec 2006) | 3 lines

move extern declaration for this option to a header file where it belongs
provide an initial value for 'languageprefix' option, instead of relying on randomness to provide a useful value

........

................
r49000 | kpfleming | 2006-12-27 14:18:27 -0700 (Wed, 27 Dec 2006) | 2 lines

make the 'languageprefix' option default to on, and deprecate turning it off

................
r49001 | kpfleming | 2006-12-27 14:21:21 -0700 (Wed, 27 Dec 2006) | 2 lines

apparently we need an explicit message to warn people

................
r49004 | oej | 2006-12-27 14:27:57 -0700 (Wed, 27 Dec 2006) | 2 lines

Only include include files once (imported from 1.4)

................
r49007 | kpfleming | 2006-12-27 15:10:31 -0700 (Wed, 27 Dec 2006) | 2 lines

add file to ignore list

................
r49008 | kpfleming | 2006-12-27 15:14:33 -0700 (Wed, 27 Dec 2006) | 10 lines

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

........
r49006 | kpfleming | 2006-12-27 16:06:56 -0600 (Wed, 27 Dec 2006) | 2 lines

since these variables all have static duration, none of them need initializers (they default to zero anyway)

........

................
r49010 | file | 2006-12-27 15:30:28 -0700 (Wed, 27 Dec 2006) | 10 lines

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

........
r49009 | file | 2006-12-27 17:28:46 -0500 (Wed, 27 Dec 2006) | 2 lines

ast_copy_string is not available when LOW_MEMORY is used and things are being built in the utils directory, so we need to resort to the old method of strncpy. (issue #8579 reported by mottano)

........

................
r49019 | murf | 2006-12-28 10:56:21 -0700 (Thu, 28 Dec 2006) | 1 line

Jason is having problems with the inclusion of <err.h>; it appears to be unnecessary for sucessful builds, so I either removed or commented out the inclusions from all the AEL related code. New outputs from bison/flex are included, etc.
................
r49023 | file | 2006-12-28 12:45:44 -0700 (Thu, 28 Dec 2006) | 9 lines

Blocked revisions 49022 via svnmerge

........
r49022 | file | 2006-12-28 14:43:15 -0500 (Thu, 28 Dec 2006) | 2 lines

Backport support for read/write locks.

........

................
r49025 | qwell | 2006-12-28 12:53:48 -0700 (Thu, 28 Dec 2006) | 9 lines

Blocked revisions 49024 via svnmerge

........
r49024 | qwell | 2006-12-28 13:52:46 -0600 (Thu, 28 Dec 2006) | 2 lines

make the uris_lock a rwlock instead of a mutex lock - needs to be forward ported to trunk

........

................
r49026 | file | 2006-12-28 13:02:41 -0700 (Thu, 28 Dec 2006) | 10 lines

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

........
r49024 | qwell | 2006-12-28 14:52:46 -0500 (Thu, 28 Dec 2006) | 2 lines

make the uris_lock a rwlock instead of a mutex lock - needs to be forward ported to trunk

........

................
r49027 | file | 2006-12-28 13:05:00 -0700 (Thu, 28 Dec 2006) | 2 lines

Convert uri_redirects list to read/write locks.

................
r49029 | kpfleming | 2006-12-28 13:10:24 -0700 (Thu, 28 Dec 2006) | 10 lines

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

........
r49028 | kpfleming | 2006-12-28 14:08:59 -0600 (Thu, 28 Dec 2006) | 2 lines

new versions of sounds

........

................
r49030 | tilghman | 2006-12-28 13:13:00 -0700 (Thu, 28 Dec 2006) | 2 lines

Integrate functionality tested on svncommunity users back into trunk

................
r49033 | qwell | 2006-12-28 13:42:28 -0700 (Thu, 28 Dec 2006) | 9 lines

Blocked revisions 49032 via svnmerge

........
r49032 | qwell | 2006-12-28 14:40:23 -0600 (Thu, 28 Dec 2006) | 2 lines

saw this in passing...  fix a small typo

........

................
r49036 | qwell | 2006-12-28 14:28:48 -0700 (Thu, 28 Dec 2006) | 11 lines

Blocked revisions 49035 via svnmerge

........
r49035 | qwell | 2006-12-28 15:26:04 -0600 (Thu, 28 Dec 2006) | 4 lines

Fix some deprecated commands.

Issue 8682, patch by me

........

................
r49047 | kpfleming | 2006-12-28 17:33:33 -0700 (Thu, 28 Dec 2006) | 18 lines

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

................
r49046 | kpfleming | 2006-12-28 18:32:59 -0600 (Thu, 28 Dec 2006) | 10 lines

Merged revisions 49045 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r49045 | kpfleming | 2006-12-28 18:32:32 -0600 (Thu, 28 Dec 2006) | 2 lines

location of the bug posting guidelines has changed

........

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

................
r49053 | russell | 2006-12-28 23:26:53 -0700 (Thu, 28 Dec 2006) | 2 lines

Fix a spelling mistake in a comment.

................
r49054 | oej | 2006-12-29 04:02:28 -0700 (Fri, 29 Dec 2006) | 2 lines

Removing extra output

................
r49056 | russell | 2006-12-29 06:25:07 -0700 (Fri, 29 Dec 2006) | 2 lines

Convert various comments to doxygen format.

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

Modified:
    team/murf/bug_7638/   (props changed)
    team/murf/bug_7638/BUGS
    team/murf/bug_7638/CHANGES
    team/murf/bug_7638/UPGRADE.txt
    team/murf/bug_7638/apps/app_disa.c
    team/murf/bug_7638/apps/app_meetme.c
    team/murf/bug_7638/apps/app_read.c
    team/murf/bug_7638/apps/app_sms.c
    team/murf/bug_7638/channels/chan_iax2.c
    team/murf/bug_7638/channels/chan_misdn.c
    team/murf/bug_7638/channels/chan_oss.c
    team/murf/bug_7638/channels/chan_sip.c
    team/murf/bug_7638/channels/iax2-parser.c
    team/murf/bug_7638/codecs/g722/   (props changed)
    team/murf/bug_7638/codecs/g722/g722.h
    team/murf/bug_7638/configs/func_odbc.conf.sample
    team/murf/bug_7638/configs/http.conf.sample
    team/murf/bug_7638/configs/sip.conf.sample
    team/murf/bug_7638/configure
    team/murf/bug_7638/configure.ac
    team/murf/bug_7638/contrib/utils/zones2indications.c
    team/murf/bug_7638/doc/asterisk-conf.txt
    team/murf/bug_7638/funcs/func_callerid.c
    team/murf/bug_7638/funcs/func_channel.c
    team/murf/bug_7638/funcs/func_math.c
    team/murf/bug_7638/funcs/func_odbc.c
    team/murf/bug_7638/funcs/func_strings.c
    team/murf/bug_7638/include/asterisk/ael_structs.h
    team/murf/bug_7638/include/asterisk/astmm.h
    team/murf/bug_7638/include/asterisk/channel.h
    team/murf/bug_7638/include/asterisk/http.h
    team/murf/bug_7638/include/asterisk/indications.h
    team/murf/bug_7638/include/asterisk/lock.h
    team/murf/bug_7638/include/asterisk/options.h
    team/murf/bug_7638/include/asterisk/rtp.h
    team/murf/bug_7638/include/asterisk/smdi.h
    team/murf/bug_7638/include/asterisk/utils.h
    team/murf/bug_7638/main/app.c
    team/murf/bug_7638/main/ast_expr2.c
    team/murf/bug_7638/main/ast_expr2.fl
    team/murf/bug_7638/main/ast_expr2.y
    team/murf/bug_7638/main/ast_expr2f.c
    team/murf/bug_7638/main/asterisk.c
    team/murf/bug_7638/main/astmm.c
    team/murf/bug_7638/main/cdr.c
    team/murf/bug_7638/main/channel.c
    team/murf/bug_7638/main/dnsmgr.c
    team/murf/bug_7638/main/enum.c
    team/murf/bug_7638/main/file.c
    team/murf/bug_7638/main/frame.c
    team/murf/bug_7638/main/http.c
    team/murf/bug_7638/main/indications.c
    team/murf/bug_7638/main/logger.c
    team/murf/bug_7638/main/manager.c
    team/murf/bug_7638/main/pbx.c
    team/murf/bug_7638/main/rtp.c
    team/murf/bug_7638/main/term.c
    team/murf/bug_7638/main/udptl.c
    team/murf/bug_7638/pbx/ael/ael_lex.c
    team/murf/bug_7638/res/res_indications.c
    team/murf/bug_7638/res/snmp/agent.c
    team/murf/bug_7638/sounds/Makefile
    team/murf/bug_7638/utils/ael_main.c

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

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

Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Dec 29 12:11:09 2006
@@ -1,1 +1,1 @@
-/trunk:1-48912
+/trunk:1-49059

Modified: team/murf/bug_7638/BUGS
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/BUGS?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/BUGS (original)
+++ team/murf/bug_7638/BUGS Fri Dec 29 12:11:09 2006
@@ -10,7 +10,7 @@
 learn how you can contribute by acting as a bug marshall
 please see:
 
-	http://www.digium.com/index.php?menu=bugguidelines
+	http://www.asterisk.org/developers/bug-guidelines
 
 If you would like to submit a feature request, please
 resist the temptation to post it to the bug tracker.

Modified: team/murf/bug_7638/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/CHANGES?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/CHANGES (original)
+++ team/murf/bug_7638/CHANGES Fri Dec 29 12:11:09 2006
@@ -64,4 +64,4 @@
   * Added maxfiles option to options section of asterisk.conf which allows you to specify
      what Asterisk should set as the maximum number of open files when it loads.
   * Added the jittertargetextra configuration option.
-
+  * Added the URI redirect option for the built-in HTTP server

Modified: team/murf/bug_7638/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/UPGRADE.txt?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/UPGRADE.txt (original)
+++ team/murf/bug_7638/UPGRADE.txt Fri Dec 29 12:11:09 2006
@@ -17,3 +17,9 @@
   not include it, but really, you should make sure that all execution
   paths within your macros end in "return;".
 
+Core:
+
+* The 'languageprefix' option in asterisk.conf is now deprecated, and
+  the default sound file layout for non-English sounds is the 'new
+  style' layout introduced in Asterisk 1.4 (and used by the automatic
+  sound file installer in the Makefile).

Modified: team/murf/bug_7638/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_disa.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/apps/app_disa.c (original)
+++ team/murf/bug_7638/apps/app_disa.c Fri Dec 29 12:11:09 2006
@@ -99,7 +99,7 @@
 
 static void play_dialtone(struct ast_channel *chan, char *mailbox)
 {
-	const struct tone_zone_sound *ts = NULL;
+	const struct ind_tone_zone_sound *ts = NULL;
 	if(ast_app_has_voicemail(mailbox, NULL))
 		ts = ast_get_indication_tone(chan->zone, "dialrecall");
 	else

Modified: team/murf/bug_7638/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_meetme.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/apps/app_meetme.c (original)
+++ team/murf/bug_7638/apps/app_meetme.c Fri Dec 29 12:11:09 2006
@@ -1979,25 +1979,21 @@
 		if (!strcmp(confno, cnf->confno)) 
 			break;
 	}
-	if (cnf){
+	if (cnf) {
 		cnf->refcount += refcount;
 	}
 	AST_LIST_UNLOCK(&confs);
 
 	if (!cnf) {
 		char *pin = NULL, *pinadmin = NULL; /* For temp use */
-
-		cnf = ast_calloc(1, sizeof(struct ast_conference));
-		if (!cnf) {
-			ast_log(LOG_ERROR, "Out of memory\n");
+		
+		var = ast_load_realtime("meetme", "confno", confno, NULL);
+
+		if (!var)
 			return NULL;
-		}
-
-		var = ast_load_realtime("meetme", "confno", confno, NULL);
+
 		while (var) {
-			if (!strcasecmp(var->name, "confno")) {
-				ast_copy_string(cnf->confno, var->value, sizeof(cnf->confno));
-			} else if (!strcasecmp(var->name, "pin")) {
+			if (!strcasecmp(var->name, "pin")) {
 				pin = ast_strdupa(var->value);
 			} else if (!strcasecmp(var->name, "adminpin")) {
 				pinadmin = ast_strdupa(var->value);
@@ -2005,7 +2001,7 @@
 			var = var->next;
 		}
 		ast_variables_destroy(var);
-
+		
 		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount);
 	}
 

Modified: team/murf/bug_7638/apps/app_read.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_read.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/apps/app_read.c (original)
+++ team/murf/bug_7638/apps/app_read.c Fri Dec 29 12:11:09 2006
@@ -93,7 +93,7 @@
 	int tries = 1, to = 0, x = 0;
 	double tosec;
 	char *argcopy = NULL;
-	struct tone_zone_sound *ts;
+	struct ind_tone_zone_sound *ts;
 	struct ast_flags flags = {0};
 
 	 AST_DECLARE_APP_ARGS(arglist,

Modified: team/murf/bug_7638/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_sms.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/apps/app_sms.c (original)
+++ team/murf/bug_7638/apps/app_sms.c Fri Dec 29 12:11:09 2006
@@ -26,14 +26,12 @@
  *	ES 201 912	SMS for PSTN/ISDN
  *	TS 123 040	Technical realization of SMS
  *
- * \note 2006-09-19: ETSI ES 201 912 protocol 2 used in Italy and Spain
- *                   support added by Filippo Grassilli (Hyppo)
- *                   <http://hyppo.com> (Hyppo)
- *                   Not fully tested, under development
  * 
  * \ingroup applications
  *
  * \author Adrian Kennard (for the original protocol 1 code)
+ * \author Filippo Grassilli (Hyppo) - protocol 2 support
+ *                   Not fully tested, under development
  */
 
 #include "asterisk.h"

Modified: team/murf/bug_7638/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_iax2.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/channels/chan_iax2.c (original)
+++ team/murf/bug_7638/channels/chan_iax2.c Fri Dec 29 12:11:09 2006
@@ -1469,7 +1469,7 @@
 		return -1;
 	}
 	fwh = mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 
-	if (!fwh) {
+	if (fwh == (void *) -1) {
 		ast_log(LOG_WARNING, "mmap failed: %s\n", strerror(errno));
 		close(fd);
 		return -1;

Modified: team/murf/bug_7638/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_misdn.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/channels/chan_misdn.c (original)
+++ team/murf/bug_7638/channels/chan_misdn.c Fri Dec 29 12:11:09 2006
@@ -205,7 +205,7 @@
 	int other_pid;
 	struct chan_list *other_ch;
 
-	const struct tone_zone_sound *ts;
+	const struct ind_tone_zone_sound *ts;
 	
 	int overlap_dial;
 	int overlap_dial_task;
@@ -2775,7 +2775,7 @@
 
 static int dialtone_indicate(struct chan_list *cl)
 {
-	const struct tone_zone_sound *ts= NULL;
+	const struct ind_tone_zone_sound *ts= NULL;
 	struct ast_channel *ast=cl->ast;
 
 

Modified: team/murf/bug_7638/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_oss.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/channels/chan_oss.c (original)
+++ team/murf/bug_7638/channels/chan_oss.c Fri Dec 29 12:11:09 2006
@@ -285,7 +285,7 @@
 
 static int oss_debug;
 
-/*
+/*!
  * Each sound is made of 'datalen' samples of sound, repeated as needed to
  * generate 'samplen' samples of data, then followed by 'silencelen' samples
  * of silence. The loop is repeated if 'repeat' is set.
@@ -310,8 +310,9 @@
 };
 
 
-/*
- * descriptor for one of our channels.
+/*!
+ * \brief descriptor for one of our channels.
+ *
  * There is one used for 'default' values (from the [general] entry in
  * the configuration file), and then one instance for each device
  * (the default is cloned from [general], others are only created
@@ -321,45 +322,45 @@
 	struct chan_oss_pvt *next;
 
 	char *name;
-	/*
+	/*!
 	 * cursound indicates which in struct sound we play. -1 means nothing,
 	 * any other value is a valid sound, in which case sampsent indicates
 	 * the next sample to send in [0..samplen + silencelen]
 	 * nosound is set to disable the audio data from the channel
 	 * (so we can play the tones etc.).
 	 */
-	int sndcmd[2];				/* Sound command pipe */
-	int cursound;				/* index of sound to send */
-	int sampsent;				/* # of sound samples sent  */
-	int nosound;				/* set to block audio from the PBX */
-
-	int total_blocks;			/* total blocks in the output device */
+	int sndcmd[2];				/*!< Sound command pipe */
+	int cursound;				/*!< index of sound to send */
+	int sampsent;				/*!< # of sound samples sent  */
+	int nosound;				/*!< set to block audio from the PBX */
+
+	int total_blocks;			/*!< total blocks in the output device */
 	int sounddev;
 	enum { M_UNSET, M_FULL, M_READ, M_WRITE } duplex;
 	int autoanswer;
 	int autohangup;
 	int hookstate;
-	char *mixer_cmd;			/* initial command to issue to the mixer */
-	unsigned int queuesize;		/* max fragments in queue */
-	unsigned int frags;			/* parameter for SETFRAGMENT */
-
-	int warned;					/* various flags used for warnings */
+	char *mixer_cmd;			/*!< initial command to issue to the mixer */
+	unsigned int queuesize;		/*!< max fragments in queue */
+	unsigned int frags;			/*!< parameter for SETFRAGMENT */
+
+	int warned;					/*!< various flags used for warnings */
 #define WARN_used_blocks	1
 #define WARN_speed		2
 #define WARN_frag		4
-	int w_errors;				/* overfull in the write path */
+	int w_errors;				/*!< overfull in the write path */
 	struct timeval lastopen;
 
 	int overridecontext;
 	int mute;
 
-	/* boost support. BOOST_SCALE * 10 ^(BOOST_MAX/20) must
-	 * be representable in 16 bits to avoid overflows.
+	/*! boost support. BOOST_SCALE * 10 ^(BOOST_MAX/20) must
+	 *  be representable in 16 bits to avoid overflows.
 	 */
 #define	BOOST_SCALE	(1<<9)
-#define	BOOST_MAX	40			/* slightly less than 7 bits */
-	int boost;					/* input boost, scaled by BOOST_SCALE */
-	char device[64];			/* device to open */
+#define	BOOST_MAX	40			/*!< slightly less than 7 bits */
+	int boost;					/*!< input boost, scaled by BOOST_SCALE */
+	char device[64];			/*!< device to open */
 
 	pthread_t sthread;
 
@@ -371,15 +372,15 @@
 	char cid_num[256];			/*XXX */
 	char mohinterpret[MAX_MUSICCLASS];
 
-	/* buffers used in oss_write */
+	/*! buffers used in oss_write */
 	char oss_write_buf[FRAME_SIZE * 2];
 	int oss_write_dst;
-	/* buffers used in oss_read - AST_FRIENDLY_OFFSET space for headers
-	 * plus enough room for a full frame
+	/*! buffers used in oss_read - AST_FRIENDLY_OFFSET space for headers
+	 *  plus enough room for a full frame
 	 */
 	char oss_read_buf[FRAME_SIZE * 2 + AST_FRIENDLY_OFFSET];
-	int readpos;				/* read position above */
-	struct ast_frame read_f;	/* returned by oss_read */
+	int readpos;				/*!< read position above */
+	struct ast_frame read_f;	/*!< returned by oss_read */
 };
 
 static struct chan_oss_pvt oss_default = {
@@ -397,7 +398,7 @@
 	.boost = BOOST_SCALE,
 };
 
-static char *oss_active;	 /* the active device */
+static char *oss_active;	 /*!< the active device */
 
 static int setformat(struct chan_oss_pvt *o, int mode);
 
@@ -432,8 +433,8 @@
 	.fixup = oss_fixup,
 };
 
-/*
- * returns a pointer to the descriptor with the given name
+/*!
+ * \brief returns a pointer to the descriptor with the given name
  */
 static struct chan_oss_pvt *find_desc(char *dev)
 {
@@ -450,14 +451,16 @@
 	return o;
 }
 
-/*
- * split a string in extension-context, returns pointers to malloc'ed
- * strings.
+/* !
+ * \brief split a string in extension-context, returns pointers to malloc'ed
+ *        strings.
+ *
  * If we do not have 'overridecontext' then the last @ is considered as
  * a context separator, and the context is overridden.
  * This is usually not very necessary as you can play with the dialplan,
  * and it is nice not to need it because you have '@' in SIP addresses.
- * Return value is the buffer address.
+ *
+ * \return the buffer address.
  */
 static char *ast_ext_ctx(const char *src, char **ext, char **ctx)
 {
@@ -484,8 +487,8 @@
 	return *ext;
 }
 
-/*
- * Returns the number of blocks used in the audio output channel
+/*!
+ * \brief Returns the number of blocks used in the audio output channel
  */
 static int used_blocks(struct chan_oss_pvt *o)
 {
@@ -508,7 +511,7 @@
 	return o->total_blocks - info.fragments;
 }
 
-/* Write an exactly FRAME_SIZE sized frame */
+/*! Write an exactly FRAME_SIZE sized frame */
 static int soundcard_writeframe(struct chan_oss_pvt *o, short *data)
 {
 	int res;
@@ -533,8 +536,9 @@
 	return write(o->sounddev, (void *)data, FRAME_SIZE * 2);
 }
 
-/*
- * Handler for 'sound writable' events from the sound thread.
+/*!
+ * \brief Handler for 'sound writable' events from the sound thread.
+ *
  * Builds a frame from the high level description of the sounds,
  * and passes it to the audio device.
  * The actual sound is made of 1 or more sequences of sound samples
@@ -661,7 +665,7 @@
 	return NULL;				/* Never reached */
 }
 
-/*
+/*!
  * reset and close the device if opened,
  * then open and initialize it in the desired mode,
  * trigger reads and writes so we can start using it.
@@ -785,15 +789,15 @@
 	return 0;
 }
 
-/* Play ringtone 'x' on device 'o' */
+/*! \brief Play ringtone 'x' on device 'o' */
 static void ring(struct chan_oss_pvt *o, int x)
 {
 	write(o->sndcmd[1], &x, sizeof(x));
 }
 
 
-/*
- * handler for incoming calls. Either autoanswer, or start ringing
+/*!
+ * \brief handler for incoming calls. Either autoanswer, or start ringing
  */
 static int oss_call(struct ast_channel *c, char *dest, int timeout)
 {
@@ -816,8 +820,8 @@
 	return 0;
 }
 
-/*
- * remote side answered the phone
+/*!
+ * \brief remote side answered the phone
  */
 static int oss_answer(struct ast_channel *c)
 {
@@ -856,7 +860,7 @@
 	return 0;
 }
 
-/* used for data coming from the network */
+/*! \brief used for data coming from the network */
 static int oss_write(struct ast_channel *c, struct ast_frame *f)
 {
 	int src;
@@ -991,8 +995,8 @@
 	return 0;
 }
 
-/*
- * allocate a new channel.
+/*!
+ * \brief allocate a new channel.
  */
 static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx, int state)
 {
@@ -1104,8 +1108,8 @@
 	return CLI_SUCCESS;
 }
 
-/*
- * answer command from the console
+/*!
+ * \brief answer command from the console
  */
 static char *console_answer(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
@@ -1136,8 +1140,10 @@
 	return CLI_SUCCESS;
 }
 
-/*
- * concatenate all arguments into a single string. argv is NULL-terminated
+/*!
+ * \brief Console send text CLI command
+ *
+ * \note concatenate all arguments into a single string. argv is NULL-terminated
  * so we can use it right away
  */
 static char *console_sendtext(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
@@ -1369,8 +1375,8 @@
 	"console.  If a device is specified, the console sound device is changed to\n"
 	"the device specified.\n";
 
-/*
- * store the boost factor
+/*!
+ * \brief store the boost factor
  */
 static void store_boost(struct chan_oss_pvt *o, char *s)
 {
@@ -1424,7 +1430,7 @@
 	active_usage },
 };
 
-/*
+/*!
  * store the mixer argument from the config file, filtering possibly
  * invalid or dangerous values (the string is used as argument for
  * system("mixer %s")
@@ -1445,7 +1451,7 @@
 	ast_log(LOG_WARNING, "setting mixer %s\n", s);
 }
 
-/*
+/*!
  * store the callerid components
  */
 static void store_callerid(struct chan_oss_pvt *o, char *s)
@@ -1453,7 +1459,7 @@
 	ast_callerid_split(s, o->cid_name, sizeof(o->cid_name), o->cid_num, sizeof(o->cid_num));
 }
 
-/*
+/*!
  * grab fields from the config file, init the descriptor and open the device.
  */
 static struct chan_oss_pvt *store_config(struct ast_config *cfg, char *ctg)
@@ -1576,7 +1582,7 @@
 	}
 
 	if (ast_channel_register(&oss_tech)) {
-		ast_log(LOG_ERROR, "Unable to register channel class 'MGCP'\n");
+		ast_log(LOG_ERROR, "Unable to register channel type 'OSS'\n");
 		return AST_MODULE_LOAD_FAILURE;
 	}
 

Modified: team/murf/bug_7638/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_sip.c?view=diff&rev=49060&r1=49059&r2=49060
==============================================================================
--- team/murf/bug_7638/channels/chan_sip.c (original)
+++ team/murf/bug_7638/channels/chan_sip.c Fri Dec 29 12:11:09 2006
@@ -113,7 +113,6 @@
 #include "asterisk/module.h"
 #include "asterisk/pbx.h"
 #include "asterisk/options.h"
-#include "asterisk/lock.h"
 #include "asterisk/sched.h"
 #include "asterisk/io.h"
 #include "asterisk/rtp.h"
@@ -126,7 +125,6 @@
 #include "asterisk/musiconhold.h"
 #include "asterisk/dsp.h"
 #include "asterisk/features.h"
-#include "asterisk/acl.h"
 #include "asterisk/srv.h"
 #include "asterisk/astdb.h"
 #include "asterisk/causes.h"
@@ -778,10 +776,12 @@
 #define SIP_PAGE2_CALL_ONHOLD		(3 << 23)	/*!< Call states */
 #define SIP_PAGE2_CALL_ONHOLD_ONEDIR	(1 << 23)	/*!< 23: One directional hold */
 #define SIP_PAGE2_CALL_ONHOLD_INACTIVE	(1 << 24)	/*!< 24: Inactive  */
-#define SIP_PAGE2_RFC2833_COMPENSATE    (1 << 25)
+#define SIP_PAGE2_RFC2833_COMPENSATE    (1 << 25)	/*!< 25: ???? */
+#define SIP_PAGE2_BUGGY_MWI		(1 << 26)	/*!< 26: Buggy CISCO MWI fix */
 
 #define SIP_PAGE2_FLAGS_TO_COPY \
-	(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE)
+	(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
+	SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | SIP_PAGE2_BUGGY_MWI)
 
 /* SIP packet flags */
 #define SIP_PKT_DEBUG		(1 << 0)	/*!< Debug this packet */
@@ -4800,10 +4800,12 @@
 	/* Initialize the temporary RTP structures we use to evaluate the offer from the peer */
 	newaudiortp = alloca(ast_rtp_alloc_size());
 	memset(newaudiortp, 0, ast_rtp_alloc_size());
+	ast_rtp_new_init(newaudiortp);
 	ast_rtp_pt_clear(newaudiortp);
 
 	newvideortp = alloca(ast_rtp_alloc_size());
 	memset(newvideortp, 0, ast_rtp_alloc_size());
+	ast_rtp_new_init(newvideortp);
 	ast_rtp_pt_clear(newvideortp);
 
 	/* Update our last rtprx when we receive an SDP, too */
@@ -6111,8 +6113,9 @@
 	ast_build_string(&a_modem_next, &a_modem_left, "a=T38FaxMaxDatagram:%d\r\n",x);
 	if (p->t38.jointcapability != T38FAX_UDP_EC_NONE)
 		ast_build_string(&a_modem_next, &a_modem_left, "a=T38FaxUdpEC:%s\r\n", (p->t38.jointcapability & T38FAX_UDP_EC_REDUNDANCY) ? "t38UDPRedundancy" : "t38UDPFEC");
+	len = strlen(v) + strlen(s) + strlen(o) + strlen(c) + strlen(t);
 	if (p->udptl)
-		len = strlen(m_modem) + strlen(a_modem);
+		len += strlen(m_modem) + strlen(a_modem);
 	add_header(resp, "Content-Type", "application/sdp");
 	add_header_contentLength(resp, len);
 	add_line(resp, v);
@@ -7062,7 +7065,11 @@
 	ast_build_string(&t, &maxbytes, "Messages-Waiting: %s\r\n", newmsgs ? "yes" : "no");
 	ast_build_string(&t, &maxbytes, "Message-Account: sip:%s@%s\r\n",
 		S_OR(vmexten, default_vmexten), S_OR(p->fromdomain, ast_inet_ntoa(p->ourip)));
-	ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d (0/0)\r\n", newmsgs, oldmsgs);
+	/* Cisco has a bug in the SIP stack where it can't accept the
+		(0/0) notification. This can temporarily be disabled in
+		sip.conf with the "buggymwi" option */
+	ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d%s\r\n", newmsgs, oldmsgs, (ast_test_flag(&p->flags[1], SIP_PAGE2_BUGGY_MWI) ? "" : " (0/0)"));
+
 	if (p->subscribed) {
 		if (p->expiry)
 			add_header(&req, "Subscription-State", "active");
@@ -11913,6 +11920,8 @@
 		/* Then we AUTH */
 		ast_string_field_free(p, theirtag);	/* forget their old tag, so we don't match tags when getting response */
 		if (!ast_test_flag(req, SIP_PKT_IGNORE)) {
+			if (p->authtries < MAX_AUTHTRIES)
+				p->invitestate = INV_CALLING;
 			if (p->authtries == MAX_AUTHTRIES || do_proxy_auth(p, req, resp, SIP_INVITE, 1)) {
 				ast_log(LOG_NOTICE, "Failed to authenticate on INVITE to '%s'\n", get_header(&p->initreq, "From"));
 				ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
@@ -14241,11 +14250,11 @@
 	} else if (p->owner) {
 		ast_queue_hangup(p->owner);
 		if (option_debug > 2)
-			ast_log(LOG_DEBUG, "Received bye, issuing owner hangup\n.");
+			ast_log(LOG_DEBUG, "Received bye, issuing owner hangup\n");
 	} else {
 		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 		if (option_debug > 2)
-			ast_log(LOG_DEBUG, "Received bye, no owner, selfdestruct soon.\n.");
+			ast_log(LOG_DEBUG, "Received bye, no owner, selfdestruct soon.\n");
 	}
 	transmit_response(p, "200 OK", req);
 
@@ -14659,7 +14668,6 @@
 	p->method = req->method;	/* Find out which SIP method they are using */
 	if (option_debug > 3)
 		ast_log(LOG_DEBUG, "**** Received %s (%d) - Command in SIP %s\n", sip_methods[p->method].text, sip_methods[p->method].id, cmd); 
-		ast_verbose("**** Received %s (%d) - Command in SIP %s\n", sip_methods[p->method].text, sip_methods[p->method].id, cmd); 
 
 	if (p->icseq && (p->icseq > seqno)) {
 		if (option_debug)
@@ -15440,6 +15448,7 @@
 			ast_log(LOG_WARNING, "Unknown dtmf mode '%s' on line %d, using rfc2833\n", v->value, v->lineno);
 			ast_set_flag(&flags[0], SIP_DTMF_RFC2833);
 		}
+		res = 1;
 	} else if (!strcasecmp(v->name, "nat")) {
 		ast_set_flag(&mask[0], SIP_NAT);
 		ast_clear_flag(&flags[0], SIP_NAT);
@@ -15451,6 +15460,7 @@
 			ast_set_flag(&flags[0], SIP_NAT_ALWAYS);
 		else
 			ast_set_flag(&flags[0], SIP_NAT_RFC3581);
+		res = 1;
 	} else if (!strcasecmp(v->name, "canreinvite")) {
 		ast_set_flag(&mask[0], SIP_REINVITE);
 		ast_clear_flag(&flags[0], SIP_REINVITE);
@@ -15472,6 +15482,7 @@
 				}
 			}
 		}
+		res = 1;
 	} else if (!strcasecmp(v->name, "insecure")) {
 		ast_set_flag(&mask[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
 		ast_clear_flag(&flags[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
@@ -15490,6 +15501,7 @@

[... 7213 lines stripped ...]


More information about the asterisk-commits mailing list