[svn-commits] nadi: branch group/trunk-cm-csel-hash r48128 - in /team/group/trunk-cm-csel-h...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Nov 30 02:05:34 MST 2006


Author: nadi
Date: Thu Nov 30 03:05:33 2006
New Revision: 48128

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48128
Log:
Merged revisions 47986,47995,47997,48001,48003-48004,48008-48014,48016,48018-48019,48032-48034,48039-48040,48048,48050,48056,48062,48067,48071,48073-48074,48077-48084,48086,48089-48090,48096,48098-48100,48102-48103,48108-48112,48114,48116,48123 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r47986 | oej | 2006-11-24 15:00:19 +0100 (Fr, 24 Nov 2006) | 6 lines

Doxygen update
- Document cause codes
- Document a bit more on channel variables - global, predefined and local
- Fix some doxygen in channel.h. Adding one comment for two definitions does not
  work. They won't be copied to each.

................
r47995 | murf | 2006-11-24 18:40:49 +0100 (Fr, 24 Nov 2006) | 1 line

This fix inspired by a patch supplied in bug 8189, which points out problems with the PLC code
................
r47997 | murf | 2006-11-24 19:17:25 +0100 (Fr, 24 Nov 2006) | 1 line

removed the svnmerge-integrated property from trunk; it's confusing svnmerge in newly created branches
................
r48001 | rizzo | 2006-11-25 10:02:42 +0100 (Sa, 25 Nov 2006) | 5 lines

set pointers to NULL after freeing memory to avoid multiple free()

probably 1.4/1.2 issue as well if someone can look into that.


................
r48003 | oej | 2006-11-25 10:45:57 +0100 (Sa, 25 Nov 2006) | 9 lines

- Adding comment on suspicious memory allocation. Seems like it's never freed, but I don't
  have a clear understanding of the frame allocation/deallocation, so I just mark this
  for investigation. (Reported by Ed Guy). We're trying to see if a free() hurts...

- Doxygen comments on p2p rtp bridge stuff.  I am a bit worried about shortcutting
  rtcp this way, but will need feedback from rtcp gurus. This should work for 
  video calls too, and possibly UDPTL.


................
r48004 | oej | 2006-11-25 10:48:30 +0100 (Sa, 25 Nov 2006) | 2 lines

Changing ERROR to lesser level. Imported from 1.2/1.4

................
r48008 | rizzo | 2006-11-25 18:37:04 +0100 (Sa, 25 Nov 2006) | 7 lines

generalize a bit the functions used to create an tcp socket
and then run a service on it.
The code in manager.c does essentially the same things,
so we will be able to reuse the code in here (probably
moving it to netsock.c or another appropriate library file).


................
r48009 | mattf | 2006-11-25 21:30:04 +0100 (Sa, 25 Nov 2006) | 1 line

Updates to show linkset command
................
r48010 | mattf | 2006-11-25 21:54:38 +0100 (Sa, 25 Nov 2006) | 2 lines

Add ss7 show linkset command

................
r48011 | mattf | 2006-11-25 22:32:33 +0100 (Sa, 25 Nov 2006) | 1 line

Make sure we don't send a group reset on a group larger than 32 CICs
................
r48012 | mattf | 2006-11-25 22:35:23 +0100 (Sa, 25 Nov 2006) | 1 line

bug fix
................
r48013 | mattf | 2006-11-25 22:46:58 +0100 (Sa, 25 Nov 2006) | 1 line

Make compiler happier
................
r48014 | mattf | 2006-11-25 22:50:42 +0100 (Sa, 25 Nov 2006) | 1 line

Little fix so we use the right message
................
r48016 | murf | 2006-11-26 01:15:42 +0100 (So, 26 Nov 2006) | 9 lines

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

........
r48015 | murf | 2006-11-25 17:01:34 -0700 (Sat, 25 Nov 2006) | 1 line

A little bit of func_cdr documentation upgrade-- no bug# involved, although 8221 may have inspired it.
........

................
r48018 | murf | 2006-11-26 01:31:13 +0100 (So, 26 Nov 2006) | 9 lines

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

........
r48017 | murf | 2006-11-25 17:26:16 -0700 (Sat, 25 Nov 2006) | 1 line

might as well also document the raw values of the flag vars
........

................
r48019 | russell | 2006-11-26 07:55:33 +0100 (So, 26 Nov 2006) | 6 lines

- Add some comments on thread storage with a brief explanation of what it is
  as well as what the motivation is for using it.
- Add a comment by the declaration of ast_inet_ntoa() noting that this function
  is not reentrant, and the result of a previous call to the function is no
  longer valid after calling it again.

................
r48032 | oej | 2006-11-27 07:44:40 +0100 (Mo, 27 Nov 2006) | 2 lines

Change error message (imported from 1.4)

................
r48033 | oej | 2006-11-27 07:59:20 +0100 (Mo, 27 Nov 2006) | 2 lines

Doxygen updates

................
r48034 | rizzo | 2006-11-27 15:47:15 +0100 (Mo, 27 Nov 2006) | 5 lines

remove an extra comma in an initializer

Detected by: AST_DEVMODE=yes


................
r48039 | file | 2006-11-27 16:33:56 +0100 (Mo, 27 Nov 2006) | 18 lines

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

................
r48038 | file | 2006-11-27 10:32:19 -0500 (Mon, 27 Nov 2006) | 10 lines

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

........
r48037 | file | 2006-11-27 10:30:37 -0500 (Mon, 27 Nov 2006) | 2 lines

Do not reference the freed outgoing structure in the debug message. (issue #8425 reported by arkadia)

........

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

................
r48040 | file | 2006-11-27 16:48:57 +0100 (Mo, 27 Nov 2006) | 2 lines

More fixes for referencing a structure after it has been freed. (issue #8425 reported by arkadia)

................
r48048 | russell | 2006-11-27 18:19:47 +0100 (Mo, 27 Nov 2006) | 9 lines

Blocked revisions 48046 via svnmerge

........
r48046 | russell | 2006-11-27 12:17:40 -0500 (Mon, 27 Nov 2006) | 2 lines

Remove a couple of unused variables (issue #8380, casper)

........

................
r48050 | tilghman | 2006-11-27 18:31:56 +0100 (Mo, 27 Nov 2006) | 18 lines

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

................
r48049 | tilghman | 2006-11-27 11:20:37 -0600 (Mon, 27 Nov 2006) | 10 lines

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

........
r48045 | tilghman | 2006-11-27 11:15:54 -0600 (Mon, 27 Nov 2006) | 2 lines

Random MOH wasn't really random (bug 8381)

........

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

................
r48056 | file | 2006-11-27 19:10:59 +0100 (Mo, 27 Nov 2006) | 18 lines

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

................
r48054 | file | 2006-11-27 13:06:50 -0500 (Mon, 27 Nov 2006) | 10 lines

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

........
r48053 | file | 2006-11-27 13:03:57 -0500 (Mon, 27 Nov 2006) | 2 lines

Use the proper function to get the new message count instead of always using the filesystem. (issue #8421 reported by slimey)

........

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

................
r48062 | rizzo | 2006-11-27 19:51:10 +0100 (Mo, 27 Nov 2006) | 3 lines

staticize a global variable and remove an unused field structure.


................
r48067 | rizzo | 2006-11-27 20:19:48 +0100 (Mo, 27 Nov 2006) | 7 lines

in the helper thread, separate the FILE * creation from the actual
function doing work on the socket. This is another generalization
to provide a generic mechanism to open TCP/TLS socket with a thread
managing the accpet and children threads managing the individual
sessions.


................
r48071 | rizzo | 2006-11-27 21:21:40 +0100 (Mo, 27 Nov 2006) | 6 lines

add a new http.conf option, sslbindaddr.
Because https is more secure than http, it usually
makes sense to keep this service more open than the
one on the unencrypted port.


................
r48073 | rizzo | 2006-11-27 22:25:55 +0100 (Mo, 27 Nov 2006) | 6 lines

document the support for running a server on TCP/TLS and
opening an SSL socket.

We are almost ready to make this code available to other modules.


................
r48074 | rizzo | 2006-11-28 01:02:42 +0100 (Di, 28 Nov 2006) | 6 lines

In the previous commit i forgot to set the poll_timeout to -1,
causing the http threads to do busy waiting around the socket...

Fix the mistake, sorry for the inconvenience!


................
r48077 | rizzo | 2006-11-28 10:27:37 +0100 (Di, 28 Nov 2006) | 4 lines

always use managerid to determine whether this is an AMI or HTTP session,
and document it.


................
r48078 | rizzo | 2006-11-28 10:39:16 +0100 (Di, 28 Nov 2006) | 5 lines

another normalization of AMI vs HTTP identification.
Should really define a macro IS_AMI(s) so it is clear what
we want to do.


................
r48079 | rizzo | 2006-11-28 10:43:44 +0100 (Di, 28 Nov 2006) | 3 lines

More informative message on invalid commands.


................
r48080 | rizzo | 2006-11-28 11:23:25 +0100 (Di, 28 Nov 2006) | 16 lines

Various simplifications of the code:
+ use a wrapper around ast_carefulwrite(), used in two places,
  to make life easier when we decide to use a different interface
  to the socket.

+ put an ast_verbose() message on astman_append on a case that
  should never happen now that we use a temporary file for
  AMI-over-HTTP sessions

+ document and slightly simplify process_events() by removing
  unnecessary parentheses.

+ in get_input(), use ast_wait_for_input() instead of poll().

  We may want to move to a completely non-blocking

................
r48081 | rizzo | 2006-11-28 12:20:39 +0100 (Di, 28 Nov 2006) | 6 lines

Move the code to purge stale sessions to a function,
to simplify the body of the main loop of the accepting thread.
Rename purge_unused() to purge_events() so one knows what the
function does.


................
r48082 | rizzo | 2006-11-28 13:05:25 +0100 (Di, 28 Nov 2006) | 3 lines

mosty comment and documentation cleanup on waitevent.


................
r48083 | rizzo | 2006-11-28 14:08:56 +0100 (Di, 28 Nov 2006) | 4 lines

do not return 500 Internal error if the AMI command provides
no output.


................
r48084 | rizzo | 2006-11-28 15:07:09 +0100 (Di, 28 Nov 2006) | 9 lines

some simplifications to
ast_dynamic_str_thread_build_va_couldnt_we_choose_a_shorter_name()

I am unsure whether the truncation of the string in case of a failed
attempt should be done unconditionally. See the XXX mark.

Russel, ideas ?


................
r48086 | rizzo | 2006-11-28 16:53:12 +0100 (Di, 28 Nov 2006) | 3 lines

initialize the dynamic string in a sane way.


................
r48089 | file | 2006-11-28 17:59:20 +0100 (Di, 28 Nov 2006) | 18 lines

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

................
r48088 | file | 2006-11-28 11:57:16 -0500 (Tue, 28 Nov 2006) | 10 lines

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

........
r48087 | file | 2006-11-28 11:56:01 -0500 (Tue, 28 Nov 2006) | 2 lines

According to the research I have done we never needed to include compiler.h in the first place so let's not! (issue #8430 reported by edguy3)

........

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

................
r48090 | rizzo | 2006-11-28 18:08:19 +0100 (Di, 28 Nov 2006) | 10 lines

don't use outputstr in the struct mansession, it's just
an extra allocation on a path where we have way too many already.

Unfortunately the AMI-over-HTTP requires multiple copies,
because we need to generate a header, then the raw output to
an intermediate buffer, then convert it to html/xml, and
finally copy everything into a malloc'ed buffer because
that's what the generic_http_callback interface expects.


................
r48096 | qwell | 2006-11-28 19:28:07 +0100 (Di, 28 Nov 2006) | 10 lines

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

........
r48095 | qwell | 2006-11-28 12:26:53 -0600 (Tue, 28 Nov 2006) | 2 lines

Export several more variables in top level Makefile.  Inspired by issue 8438.

........

................
r48098 | russell | 2006-11-29 00:04:36 +0100 (Mi, 29 Nov 2006) | 2 lines

resolve a couple of compiler warnings

................
r48099 | russell | 2006-11-29 00:13:37 +0100 (Mi, 29 Nov 2006) | 3 lines

Add a comment to note near some code that performs a very expensive operation
that occurs for every incoming media frame.

................
r48100 | file | 2006-11-29 04:12:16 +0100 (Mi, 29 Nov 2006) | 2 lines

Use the proper version of extra sounds. (issue #8441 reported by jtodd)

................
r48102 | file | 2006-11-29 05:28:21 +0100 (Mi, 29 Nov 2006) | 10 lines

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

........
r48101 | file | 2006-11-28 23:26:53 -0500 (Tue, 28 Nov 2006) | 2 lines

Don't crash if the mailstream was not created.

........

................
r48103 | russell | 2006-11-29 06:08:19 +0100 (Mi, 29 Nov 2006) | 5 lines

Remove an XXX command suggesting that this truncation should not be conditional,
and also add a more verbose comment explaining why it is only needed in the
case of appending to the string for any curious readers that come along in the
future.

................
r48108 | file | 2006-11-29 17:53:27 +0100 (Mi, 29 Nov 2006) | 18 lines

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

................
r48107 | file | 2006-11-29 11:50:33 -0500 (Wed, 29 Nov 2006) | 10 lines

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

........
r48106 | file | 2006-11-29 11:47:10 -0500 (Wed, 29 Nov 2006) | 2 lines

If the frame was duplicated before writing out then we need to free it. (issue #8429 reported by edguy3)

........

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

................
r48109 | russell | 2006-11-29 18:37:31 +0100 (Mi, 29 Nov 2006) | 7 lines

Go ahead and make this write unconditional.  Making it conditional is more work
in both the append and non-append modes.  Also, always truncating the partial
write makes the behavior of the function more consistent, where in any type of
write, no partial result is left in the buffer.

Thanks for the feedback, luigi

................
r48110 | russell | 2006-11-29 18:59:13 +0100 (Mi, 29 Nov 2006) | 6 lines

- Fix a few spelling mistakes.
- Add some more documentation for the ast_dynamic_str_............() function
  to document the behavior of the function in the case of a partial write.
  Also, document the return value and note that the function should never need
  to be called directly.

................
r48111 | oej | 2006-11-29 20:44:06 +0100 (Mi, 29 Nov 2006) | 2 lines

Change logging for p2p rtp bridge mode

................
r48112 | oej | 2006-11-29 20:47:45 +0100 (Mi, 29 Nov 2006) | 2 lines

Explain RTP timeouts

................
r48114 | oej | 2006-11-29 21:57:48 +0100 (Mi, 29 Nov 2006) | 2 lines

Clarify some settings for status reports in subscriptions, queues and manager

................
r48116 | file | 2006-11-29 22:07:14 +0100 (Mi, 29 Nov 2006) | 10 lines

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

........
r48115 | file | 2006-11-29 16:05:17 -0500 (Wed, 29 Nov 2006) | 2 lines

Use MAILTMPLEN instead of sizeof in mm_login. (issue #8420 reported by slimey)

........

................
r48123 | file | 2006-11-30 04:29:42 +0100 (Do, 30 Nov 2006) | 2 lines

I am pretty sure that oej only meant to change the variable name in the source, not the configuration option name so let's turn it back to srvlookup instead of global_srvlookup. (issue #8442 reported by jtodd)

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

Modified:
    team/group/trunk-cm-csel-hash/   (props changed)
    team/group/trunk-cm-csel-hash/Makefile
    team/group/trunk-cm-csel-hash/apps/app_voicemail.c
    team/group/trunk-cm-csel-hash/channels/chan_iax2.c
    team/group/trunk-cm-csel-hash/channels/chan_phone.c
    team/group/trunk-cm-csel-hash/channels/chan_sip.c
    team/group/trunk-cm-csel-hash/channels/chan_zap.c
    team/group/trunk-cm-csel-hash/codecs/codec_zap.c
    team/group/trunk-cm-csel-hash/configs/http.conf.sample
    team/group/trunk-cm-csel-hash/configs/sip.conf.sample
    team/group/trunk-cm-csel-hash/funcs/func_cdr.c
    team/group/trunk-cm-csel-hash/include/asterisk/causes.h
    team/group/trunk-cm-csel-hash/include/asterisk/channel.h
    team/group/trunk-cm-csel-hash/include/asterisk/doxyref.h
    team/group/trunk-cm-csel-hash/include/asterisk/threadstorage.h
    team/group/trunk-cm-csel-hash/include/asterisk/utils.h
    team/group/trunk-cm-csel-hash/main/channel.c
    team/group/trunk-cm-csel-hash/main/http.c
    team/group/trunk-cm-csel-hash/main/manager.c
    team/group/trunk-cm-csel-hash/main/pbx.c
    team/group/trunk-cm-csel-hash/main/rtp.c
    team/group/trunk-cm-csel-hash/main/translate.c
    team/group/trunk-cm-csel-hash/main/utils.c
    team/group/trunk-cm-csel-hash/pbx/pbx_spool.c
    team/group/trunk-cm-csel-hash/res/res_musiconhold.c
    team/group/trunk-cm-csel-hash/sounds/Makefile

Propchange: team/group/trunk-cm-csel-hash/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/group/trunk-cm-csel-hash/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/trunk-cm-csel-hash/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Nov 30 03:05:33 2006
@@ -1,1 +1,1 @@
-/trunk:1-47961
+/trunk:1-48126

Modified: team/group/trunk-cm-csel-hash/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/Makefile?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/Makefile (original)
+++ team/group/trunk-cm-csel-hash/Makefile Thu Nov 30 03:05:33 2006
@@ -37,6 +37,11 @@
 export ASTVARLIBDIR
 export ASTDATADIR
 export ASTLOGDIR
+export ASTLIBDIR
+export ASTMANDIR
+export ASTHEADERDIR
+export ASTBINDIR
+export ASTSBINDIR
 export AGI_DIR
 export ASTCONFPATH
 export NOISY_BUILD

Modified: team/group/trunk-cm-csel-hash/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/apps/app_voicemail.c?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/apps/app_voicemail.c (original)
+++ team/group/trunk-cm-csel-hash/apps/app_voicemail.c Thu Nov 30 03:05:33 2006
@@ -4673,7 +4673,7 @@
 	if(option_debug > 2)
 		ast_log(LOG_DEBUG,"Before init_mailstream, user is %s\n",vmu->imapuser);
 	ret = init_mailstream(vms, box);
-	if (ret != 0) {
+	if (ret != 0 || !vms->mailstream) {
 		ast_log (LOG_ERROR,"Could not initialize mailstream\n");
 		return -1;
 	}
@@ -6970,22 +6970,13 @@
 			}
 		}
 		AST_LIST_TRAVERSE(&users, vmu, list) {
-			char dirname[256];
-			DIR *vmdir;
-			struct dirent *vment;
-			int vmcount = 0;
-			char count[12];
+			int newmsgs = 0, oldmsgs = 0;
+			char count[12], tmp[256] = "";
 
 			if ((argc == 3) || ((argc == 5) && !strcmp(argv[4],vmu->context))) {
-				make_dir(dirname, 255, vmu->context, vmu->mailbox, "INBOX");
-				if ((vmdir = opendir(dirname))) {
-					/* No matter what the format of VM, there will always be a .txt file for each message. */
-					while ((vment = readdir(vmdir)))
-						if (strlen(vment->d_name) > 7 && !strncmp(vment->d_name + 7,".txt",4))
-							vmcount++;
-					closedir(vmdir);
-				}
-				snprintf(count,sizeof(count),"%d",vmcount);
+				snprintf(tmp, sizeof(tmp), "%s@%s", vmu->mailbox, ast_strlen_zero(vmu->context) ? "default" : vmu->context);
+				inboxcount(tmp, &newmsgs, &oldmsgs);
+				snprintf(count,sizeof(count),"%d",newmsgs);
 				ast_cli(fd, output_format, vmu->context, vmu->mailbox, vmu->fullname, vmu->zonetag, count);
 			}
 		}
@@ -8481,15 +8472,16 @@
 
 	if(option_debug > 3)
 		ast_log(LOG_DEBUG, "Entering callback mm_login\n");
-	ast_copy_string(user, mb->user,sizeof(user));
+
+	ast_copy_string(user, mb->user, MAILTMPLEN);
 
 	/* We should only do this when necessary */
 	if (!ast_strlen_zero(authpassword)) {
-		ast_copy_string(pwd, authpassword, sizeof(pwd));
+		ast_copy_string(pwd, authpassword, MAILTMPLEN);
 	} else {
 		AST_LIST_TRAVERSE(&users, vmu, list) {
 			if(!strcasecmp(mb->user, vmu->imapuser)) {
-				ast_copy_string(pwd, vmu->imappassword, sizeof(pwd));
+				ast_copy_string(pwd, vmu->imappassword, MAILTMPLEN);
 				break;
 			}
 		}

Modified: team/group/trunk-cm-csel-hash/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/channels/chan_iax2.c?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/channels/chan_iax2.c (original)
+++ team/group/trunk-cm-csel-hash/channels/chan_iax2.c Thu Nov 30 03:05:33 2006
@@ -1195,6 +1195,20 @@
 	return res;
 }
 
+/*!
+ * \todo XXX Note that this function contains a very expensive operation that
+ * happens for *every* incoming media frame.  It iterates through every
+ * possible call number, locking and unlocking each one, to try to match the
+ * incoming frame to an active call.  Call numbers can be up to 2^15, 32768.
+ * So, for an call with a local call number of 20000, every incoming audio
+ * frame would require 20000 mutex lock and unlock operations.  Ouch.
+ *
+ * It's a shame that IAX2 media frames carry the source call number instead of
+ * the destination call number.  If they did, this lookup wouldn't be needed.
+ * However, it's too late to change that now.  Instead, we need to come up with
+ * a better way of indexing active calls so that these frequent lookups are not
+ * so expensive.
+ */
 static int find_callno(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int new, int lockpeer, int sockfd)
 {
 	int res = 0;

Modified: team/group/trunk-cm-csel-hash/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/channels/chan_phone.c?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/channels/chan_phone.c (original)
+++ team/group/trunk-cm-csel-hash/channels/chan_phone.c Thu Nov 30 03:05:33 2006
@@ -48,11 +48,6 @@
 #include <linux/telephony.h>
 /* Still use some IXJ specific stuff */
 #include <linux/version.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-# include <linux/compiler.h>
-#endif
-#endif
 #include <linux/ixjuser.h>
 
 #include "asterisk/lock.h"

Modified: team/group/trunk-cm-csel-hash/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/channels/chan_sip.c?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/channels/chan_sip.c (original)
+++ team/group/trunk-cm-csel-hash/channels/chan_sip.c Thu Nov 30 03:05:33 2006
@@ -12331,7 +12331,8 @@
 			if (sipmethod == SIP_INVITE) {
 				/* First we ACK */
 				transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
-					ast_log(LOG_WARNING, "INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
+				if (option_debug)
+					ast_log(LOG_DEBUG, "Got 481 on Invite. Assuming INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
 				if (owner)
 					ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
 				sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
@@ -14456,7 +14457,7 @@
 
 			if ((firststate = ast_extension_state(NULL, p->context, p->exten)) < 0) {
 
-				ast_log(LOG_ERROR, "Got SUBSCRIBE for extension %s@%s from %s, but there is no hint for that extension\n", p->exten, p->context, ast_inet_ntoa(p->sa.sin_addr));
+				ast_log(LOG_NOTICE, "Got SUBSCRIBE for extension %s@%s from %s, but there is no hint for that extension.\n", p->exten, p->context, ast_inet_ntoa(p->sa.sin_addr));
 				transmit_response(p, "404 Not found", req);
 				ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 				return 0;
@@ -16307,7 +16308,7 @@
 			autocreatepeer = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "match_auth_username")) {
 			global_match_auth_username = ast_true(v->value);
-		} else if (!strcasecmp(v->name, "global_srvlookup")) {
+		} else if (!strcasecmp(v->name, "srvlookup")) {
 			global_srvlookup = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "pedantic")) {
 			pedanticsipchecking = ast_true(v->value);

Modified: team/group/trunk-cm-csel-hash/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/channels/chan_zap.c?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/channels/chan_zap.c (original)
+++ team/group/trunk-cm-csel-hash/channels/chan_zap.c Thu Nov 30 03:05:33 2006
@@ -8380,7 +8380,7 @@
 	startcic = linkset->pvts[0]->cic;
 
 	for (i = 0; i < linkset->numchans; i++) {
-		if (linkset->pvts[i+1] && (linkset->pvts[i+1]->cic - linkset->pvts[i]->cic) == 1) {
+		if (linkset->pvts[i+1] && ((linkset->pvts[i+1]->cic - linkset->pvts[i]->cic) == 1) && (linkset->pvts[i]->cic - startcic < 31)) {
 			continue;
 		} else {
 			endcic = linkset->pvts[i]->cic;
@@ -10568,23 +10568,23 @@
 	return RESULT_SUCCESS;
 }
 
-static const char pri_debug_help[] = 
+static char pri_debug_help[] = 
 	"Usage: pri debug span <span>\n"
 	"       Enables debugging on a given PRI span\n";
 	
-static const char pri_no_debug_help[] = 
+static char pri_no_debug_help[] = 
 	"Usage: pri no debug span <span>\n"
 	"       Disables debugging on a given PRI span\n";
 
-static const char pri_really_debug_help[] = 
+static char pri_really_debug_help[] = 
 	"Usage: pri intensive debug span <span>\n"
 	"       Enables debugging down to the Q.921 level\n";
 
-static const char pri_show_span_help[] = 
+static char pri_show_span_help[] = 
 	"Usage: pri show span <span>\n"
 	"       Displays PRI Information on a given PRI span\n";
 
-static const char pri_show_spans_help[] = 
+static char pri_show_spans_help[] = 
 	"Usage: pri show spans\n"
 	"       Displays PRI Information\n";
 
@@ -11556,7 +11556,6 @@
 	return RESULT_SUCCESS;
 }
 
-#if 0
 static int handle_ss7_show_linkset(int fd, int argc, char *argv[])
 {
 	int linkset;
@@ -11573,49 +11572,44 @@
 		return RESULT_SUCCESS;
 	}
 	if (linksets[linkset-1].ss7)
-		ss7 = linksets[linkset-1];
-
-	if (
+		ss7 = &linksets[linkset-1];
+
+	ast_cli(fd, "SS7 linkset %d status: %s\n", linkset, (ss7->state == LINKSET_STATE_UP) ? "Up" : "Down");
 
 	return RESULT_SUCCESS;
 }
-#endif
-
-static const char ss7_debug_help[] = 
+
+static char ss7_debug_help[] = 
 	"Usage: ss7 debug linkset <linkset>\n"
 	"       Enables debugging on a given SS7 linkset\n";
 	
-static const char ss7_no_debug_help[] = 
+static char ss7_no_debug_help[] = 
 	"Usage: ss7 no debug linkset <span>\n"
 	"       Disables debugging on a given SS7 linkset\n";
 
-static const char ss7_block_cic_help[] = 
+static char ss7_block_cic_help[] = 
 	"Usage: ss7 block cic <linkset> <CIC>\n"
 	"       Sends a remote blocking request for the given CIC on the specified linkset\n";
 
-static const char ss7_unblock_cic_help[] = 
+static char ss7_unblock_cic_help[] = 
 	"Usage: ss7 unblock cic <linkset> <CIC>\n"
 	"       Sends a remote unblocking request for the given CIC on the specified linkset\n";
 
-#if 0
-static const char ss7_show_linkset_help[] = 
+static char ss7_show_linkset_help[] = 
 	"Usage: ss7 show linkset <span>\n"
-	"       Disables debugging on a given SS7 linkset\n";
-#endif
+	"       Shows the status of an SS7 linkset.\n";
 
 static struct ast_cli_entry zap_ss7_cli[] = {
 	{ { "ss7", "debug", "linkset", NULL }, handle_ss7_debug,
 	  "Enables SS7 debugging on a linkset", ss7_debug_help, NULL },
 	{ { "ss7", "no", "debug", "linkset", NULL }, handle_ss7_no_debug,
-	  "Disables SS7 debugging on a linkset", ss7_debug_help, NULL },
+	  "Disables SS7 debugging on a linkset", ss7_no_debug_help, NULL },
 	{ { "ss7", "block", "cic", NULL }, handle_ss7_block_cic,
 	  "Disables SS7 debugging on a linkset", ss7_block_cic_help, NULL },
 	{ { "ss7", "unblock", "cic", NULL }, handle_ss7_unblock_cic,
 	  "Disables SS7 debugging on a linkset", ss7_unblock_cic_help, NULL },
-#if 0
 	{ { "ss7", "show", "linkset", NULL }, handle_ss7_show_linkset,
-	  "Disables SS7 debugging on a linkset", ss7_show_linkset_help, NULL },
-#endif
+	  "Shows the status of a linkset", ss7_show_linkset_help, NULL },
 };
 #endif /* HAVE_SS7 */
 

Modified: team/group/trunk-cm-csel-hash/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/codecs/codec_zap.c?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/codecs/codec_zap.c (original)
+++ team/group/trunk-cm-csel-hash/codecs/codec_zap.c Thu Nov 30 03:05:33 2006
@@ -232,7 +232,7 @@
 	return zap_translate(pvt, pvt->t->dstfmt, pvt->t->srcfmt);
 }
 
-static struct ast_frame *g729_fakesrc_sample()
+static struct ast_frame *g729_fakesrc_sample(void)
 {
 	/* Don't bother really trying to test hardware ones. */
 	static struct ast_frame f = {
@@ -244,7 +244,7 @@
 	return &f;
 }
 
-static struct ast_frame *g723_fakesrc_sample()
+static struct ast_frame *g723_fakesrc_sample(void)
 {
 	/* Don't bother really trying to test hardware ones. */
 	static struct ast_frame f = {

Modified: team/group/trunk-cm-csel-hash/configs/http.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/configs/http.conf.sample?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/configs/http.conf.sample (original)
+++ team/group/trunk-cm-csel-hash/configs/http.conf.sample Thu Nov 30 03:05:33 2006
@@ -28,10 +28,13 @@
 ;
 ;prefix=asterisk
 
-; HTTPS support: you need to enable it, define the port to use,
+; HTTPS support. In addition to enabled=yes, you need to
+; explicitly enable ssl, define the port to use,
 ; and have a certificate somewhere.
 ; sslenable=yes		; enable ssl - default no.
 ; sslbindport=4433	; port to use - default is 8089
+; sslbindaddr=0.0.0.0	; address to bind to - default is bindaddr.
+;
 ; sslcert=/tmp/foo.pem	; path to the certificate
 ;
 ; To produce a certificate you can e.g. use openssl

Modified: team/group/trunk-cm-csel-hash/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/configs/sip.conf.sample?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/configs/sip.conf.sample (original)
+++ team/group/trunk-cm-csel-hash/configs/sip.conf.sample Thu Nov 30 03:05:33 2006
@@ -94,9 +94,11 @@
 ;language=en			; Default language setting for all users/peers
 				; This may also be set for individual users/peers
 ;relaxdtmf=yes			; Relax dtmf handling
-;rtptimeout=60			; Terminate call if 60 seconds of no RTP activity
-				; when we're not on hold
-;rtpholdtimeout=300		; Terminate call if 300 seconds of no RTP activity
+;rtptimeout=60			; Terminate call if 60 seconds of no RTP or RTCP activity
+				; when we're not on hold. This is to be able to hangup
+				; a call in the case of a phone disappearing from the net,
+				; like a powerloss or grandma tripping over a cable.
+;rtpholdtimeout=300		; Terminate call if 300 seconds of no RTP or RTCP activity
 				; when we're on hold (must be > rtptimeout)
 ;trustrpid = no			; If Remote-Party-ID should be trusted
 ;sendrpid = yes			; If Remote-Party-ID should be sent
@@ -172,6 +174,15 @@
 ; You can subscribe to the status of extensions with a "hint" priority
 ; (See extensions.conf.sample for examples)
 ; chan_sip support two major formats for notifications: dialog-info and SIMPLE 
+;
+; You will get more detailed reports (busy etc) if you have a call limit set
+; for a device. When the call limit is filled, we will indicate busy. Note that
+; you need at least 2 in order to be able to do attended transfers.
+;
+; For queues, you will need this level of detail in status reporting, regardless
+; if you use SIP subscriptions. Queues and manager use the same internal interface
+; for reading status information.
+;
 ; Note: Subscriptions does not work if you have a realtime dialplan and use the
 ; realtime switch.
 ;

Modified: team/group/trunk-cm-csel-hash/funcs/func_cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/funcs/func_cdr.c?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/funcs/func_cdr.c (original)
+++ team/group/trunk-cm-csel-hash/funcs/func_cdr.c Thu Nov 30 03:05:33 2006
@@ -129,7 +129,28 @@
 "  For example, 'start', 'answer', and 'end' will be retrieved as epoch\n"
 "  values, when the 'u' option is passed, but formatted as YYYY-MM-DD HH:MM:SS\n"
 "  otherwise.  Similarly, disposition and amaflags will return their raw\n"
-"  integral values.\n",
+"  integral values.\n"
+"  Here is a list of all the available cdr field names:\n"
+"    clid          lastdata       disposition\n"
+"    src           start          amaflags\n"
+"    dst           answer         accountcode\n"
+"    dcontext      end            uniqueid\n"
+"    dstchannel    duration       userfield\n"
+"    lastapp       billsec        channel\n"
+"  All of the above variables are read-only, except for accountcode,\n"
+"  userfield, and amaflags. You may, however,  supply\n"
+"  a name not on the above list, and create your own\n"
+"  variable, whose value can be changed with this function,\n"
+"  and this variable will be stored on the cdr.\n"
+"   raw values for disposition:\n"
+"       1 = NO ANSWER\n"
+"	2 = BUSY\n"
+"	3 = FAILED\n"
+"	4 = ANSWERED\n"
+"    raw values for amaflags:\n"
+"       1 = OMIT\n"
+"       2 = BILLING\n"
+"       3 = DOCUMENTATION\n",
 };
 
 static int unload_module(void)

Modified: team/group/trunk-cm-csel-hash/include/asterisk/causes.h
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/include/asterisk/causes.h?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/include/asterisk/causes.h (original)
+++ team/group/trunk-cm-csel-hash/include/asterisk/causes.h Thu Nov 30 03:05:33 2006
@@ -22,6 +22,68 @@
 
 #ifndef _ASTERISK_CAUSES_H
 #define _ASTERISK_CAUSES_H
+
+/*! \page AstCauses Hangup Causes for Asterisk
+
+The Asterisk hangup causes are delivered to the dialplan in the
+${HANGUPCAUSE} channel variable after a call (after execution
+of "dial"). 
+
+In SIP, we have a conversion table to convert between SIP
+return codes and Q.931 both ways. This is to improve SIP/ISDN
+compatibility.
+
+These are the current codes, based on the Q.931
+specification:
+
+	- AST_CAUSE_UNALLOCATED				1
+	- AST_CAUSE_NO_ROUTE_TRANSIT_NET			2
+	- AST_CAUSE_NO_ROUTE_DESTINATION			3
+	- AST_CAUSE_CHANNEL_UNACCEPTABLE			6
+	- AST_CAUSE_CALL_AWARDED_DELIVERED		7
+	- AST_CAUSE_NORMAL_CLEARING			16
+	- AST_CAUSE_USER_BUSY				17
+	- AST_CAUSE_NO_USER_RESPONSE			18
+	- AST_CAUSE_NO_ANSWER				19
+	- AST_CAUSE_CALL_REJECTED				21
+	- AST_CAUSE_NUMBER_CHANGED			22
+	- AST_CAUSE_DESTINATION_OUT_OF_ORDER		27
+	- AST_CAUSE_INVALID_NUMBER_FORMAT			28
+	- AST_CAUSE_FACILITY_REJECTED			29
+	- AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY		30
+	- AST_CAUSE_NORMAL_UNSPECIFIED			31
+	- AST_CAUSE_NORMAL_CIRCUIT_CONGESTION		34
+	- AST_CAUSE_NETWORK_OUT_OF_ORDER			38
+	- AST_CAUSE_NORMAL_TEMPORARY_FAILURE		41
+	- AST_CAUSE_SWITCH_CONGESTION			42
+	- AST_CAUSE_ACCESS_INFO_DISCARDED			43
+	- AST_CAUSE_REQUESTED_CHAN_UNAVAIL		44
+	- AST_CAUSE_PRE_EMPTED				45
+	- AST_CAUSE_FACILITY_NOT_SUBSCRIBED  		50
+	- AST_CAUSE_OUTGOING_CALL_BARRED     		52
+	- AST_CAUSE_INCOMING_CALL_BARRED     		54
+	- AST_CAUSE_BEARERCAPABILITY_NOTAUTH		57
+	- AST_CAUSE_BEARERCAPABILITY_NOTAVAIL     	58
+	- AST_CAUSE_BEARERCAPABILITY_NOTIMPL		65
+	- AST_CAUSE_CHAN_NOT_IMPLEMENTED     		66
+	- AST_CAUSE_FACILITY_NOT_IMPLEMENTED      	69
+	- AST_CAUSE_INVALID_CALL_REFERENCE		81
+	- AST_CAUSE_INCOMPATIBLE_DESTINATION		88
+	- AST_CAUSE_INVALID_MSG_UNSPECIFIED  		95
+	- AST_CAUSE_MANDATORY_IE_MISSING			96
+	- AST_CAUSE_MESSAGE_TYPE_NONEXIST			97
+	- AST_CAUSE_WRONG_MESSAGE				98
+	- AST_CAUSE_IE_NONEXIST				99
+	- AST_CAUSE_INVALID_IE_CONTENTS			100
+	- AST_CAUSE_WRONG_CALL_STATE			101
+	- AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE		102
+	- AST_CAUSE_MANDATORY_IE_LENGTH_ERROR		103
+	- AST_CAUSE_PROTOCOL_ERROR			111
+	- AST_CAUSE_INTERWORKING				127
+
+For more information:
+- \ref app_dial.c
+*/
 
 /* Causes for disconnection (from Q.931) */
 #define AST_CAUSE_UNALLOCATED				1

Modified: team/group/trunk-cm-csel-hash/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/include/asterisk/channel.h?view=diff&rev=48128&r1=48127&r2=48128
==============================================================================
--- team/group/trunk-cm-csel-hash/include/asterisk/channel.h (original)
+++ team/group/trunk-cm-csel-hash/include/asterisk/channel.h Thu Nov 30 03:05:33 2006
@@ -84,6 +84,11 @@
 
 */
 
+/*! \page AstFileDesc File descriptors 
+	Asterisk File descriptors are connected to each channel (see \ref Def_Channel)
+	in the \ref ast_channel structure.
+*/
+
 #ifndef _ASTERISK_CHANNEL_H
 #define _ASTERISK_CHANNEL_H
 
@@ -336,8 +341,8 @@
 		AST_STRING_FIELD(uniqueid);		/*!< Unique Channel Identifier */
 	);
 	
-	/*! \brief File descriptor for channel -- Drivers will poll on these file descriptors, so at least one must be non -1.  */
-	int fds[AST_MAX_FDS];			
+	/*! \brief File descriptor for channel -- Drivers will poll on these file descriptors, so at least one must be non -1.  See \ref AstFileDesc */
+	int fds[AST_MAX_FDS];	
 
 	void *music_state;				/*!< Music State*/
 	void *generatordata;				/*!< Current generator data if there is any */
@@ -351,12 +356,11 @@
 	struct ast_channel *masqr;			/*!< Who we are masquerading as */
 	int cdrflags;					/*!< Call Detail Record Flags */
 
-	/*! \brief Whether or not we have been hung up...  Do not set this value
-	    directly, use ast_softhangup */
-	int _softhangup;
+	int _softhangup;				/*!< Whether or not we have been hung up...  Do not set this value
+	    							directly, use ast_softhangup() */
 	time_t	whentohangup;				/*!< Non-zero, set to actual time when channel is to be hung up */
 	pthread_t blocker;				/*!< If anyone is blocking, this is them */
-	ast_mutex_t lock;				/*!< Lock, can be used to lock a channel for some operations */
+	ast_mutex_t lock;				/*!< Lock, can be used to lock a channel for some operations - see ast_channel_lock() */
 	const char *blockproc;				/*!< Procedure causing blocking */
 
 	const char *appl;				/*!< Current application */
@@ -373,7 +377,7 @@
 	int (*timingfunc)(void *data);
 	void *timingdata;
 
-	enum ast_channel_state _state;			/*!< State of line -- Don't write directly, use ast_setstate */
+	enum ast_channel_state _state;			/*!< State of line -- Don't write directly, use ast_setstate() */
 	int rings;					/*!< Number of rings so far */
 	struct ast_callerid cid;			/*!< Caller ID, name, presentation etc */
 	char dtmfq[AST_MAX_EXTENSION];			/*!< Any/all queued DTMF characters */
@@ -397,17 +401,16 @@
 
 	struct ast_channel_monitor *monitor;		/*!< Channel monitoring */
 
-	/*! Track the read/written samples for monitor use */
-	unsigned long insmpl;
-	unsigned long outsmpl;
-
-	/* Frames in/out counters. The high bit is a debug mask, so
-	 * the counter is only in the remaining bits
-	 */
-	unsigned int fin;
-	unsigned int fout;
+	unsigned long insmpl;				/*!< Track the read/written samples for monitor use */

[... 1536 lines stripped ...]


More information about the svn-commits mailing list