[svn-commits] oej: branch oej/codename-pineapple r48198 - in /team/oej/codename-pineapple: ...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sat Dec 2 01:34:34 MST 2006


Author: oej
Date: Sat Dec  2 02:34:33 2006
New Revision: 48198

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48198
Log:
Update to trunk

Modified:
    team/oej/codename-pineapple/   (props changed)
    team/oej/codename-pineapple/Makefile
    team/oej/codename-pineapple/agi/eagi-sphinx-test.c
    team/oej/codename-pineapple/agi/eagi-test.c
    team/oej/codename-pineapple/apps/app_dial.c
    team/oej/codename-pineapple/channels/chan_gtalk.c
    team/oej/codename-pineapple/channels/chan_iax2.c
    team/oej/codename-pineapple/channels/chan_sip.c
    team/oej/codename-pineapple/configs/extensions.conf.sample
    team/oej/codename-pineapple/configs/sip.conf.sample
    team/oej/codename-pineapple/configure
    team/oej/codename-pineapple/configure.ac
    team/oej/codename-pineapple/contrib/asterisk-ng-doxygen
    team/oej/codename-pineapple/doc/manager.txt
    team/oej/codename-pineapple/include/asterisk/channel.h
    team/oej/codename-pineapple/include/asterisk/devicestate.h
    team/oej/codename-pineapple/include/asterisk/doxyref.h
    team/oej/codename-pineapple/include/asterisk/pbx.h
    team/oej/codename-pineapple/include/asterisk/rtp.h
    team/oej/codename-pineapple/include/asterisk/threadstorage.h
    team/oej/codename-pineapple/main/cdr.c
    team/oej/codename-pineapple/main/cli.c
    team/oej/codename-pineapple/main/devicestate.c
    team/oej/codename-pineapple/main/pbx.c
    team/oej/codename-pineapple/main/rtp.c
    team/oej/codename-pineapple/makeopts.in
    team/oej/codename-pineapple/res/res_features.c
    team/oej/codename-pineapple/sounds/Makefile

Propchange: team/oej/codename-pineapple/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/oej/codename-pineapple/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/oej/codename-pineapple/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Dec  2 02:34:33 2006
@@ -1,1 +1,1 @@
-/trunk:1-48133
+/trunk:1-48197

Modified: team/oej/codename-pineapple/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/Makefile?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/Makefile (original)
+++ team/oej/codename-pineapple/Makefile Sat Dec  2 02:34:33 2006
@@ -57,6 +57,7 @@
 export PROC
 export SOLINK
 export STRIP
+export DOWNLOAD
 
 # even though we could use '-include makeopts' here, use a wildcard
 # lookup anyway, so that make won't try to build makeopts if it doesn't
@@ -273,14 +274,14 @@
 	@echo " + Asterisk has successfully been built, and +"  
 	@echo " + can be installed by running:              +"
 	@echo " +                                           +"
-	@echo " +               make install                +"  
+	@echo " +               $(MAKE) install                +"  
 	@echo " +-------------------------------------------+"  
 
 _all: cleantest $(SUBDIRS)
 
 makeopts: configure
 	@echo "****"
-	@echo "**** The configure script must be executed before running 'make'."
+	@echo "**** The configure script must be executed before running '$(MAKE)'."
 	@echo "****"
 	@exit 1
 

Modified: team/oej/codename-pineapple/agi/eagi-sphinx-test.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/agi/eagi-sphinx-test.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/agi/eagi-sphinx-test.c (original)
+++ team/oej/codename-pineapple/agi/eagi-sphinx-test.c Sat Dec  2 02:34:33 2006
@@ -4,6 +4,15 @@
  * This code is released into public domain
  * without any warranty of any kind.
  *
+ */
+
+/*! \file
+ * Extended AGI test application
+ *
+ * This code is released into public domain
+ * without any warranty of any kind.
+ *
+ *	\ingroup agi
  */
 
 #include <stdio.h>

Modified: team/oej/codename-pineapple/agi/eagi-test.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/agi/eagi-test.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/agi/eagi-test.c (original)
+++ team/oej/codename-pineapple/agi/eagi-test.c Sat Dec  2 02:34:33 2006
@@ -17,6 +17,15 @@
 #include "asterisk/compat.h"
 
 #define AUDIO_FILENO (STDERR_FILENO + 1)
+
+/*! \file
+ * Extended AGI test application
+ *
+ * This code is released into the public domain
+ * with no warranty of any kind
+ *
+ * \ingroup agi
+ */
 
 static int read_environment(void)
 {

Modified: team/oej/codename-pineapple/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/apps/app_dial.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/apps/app_dial.c (original)
+++ team/oej/codename-pineapple/apps/app_dial.c Sat Dec  2 02:34:33 2006
@@ -1430,6 +1430,7 @@
 		if (ast_test_flag(outgoing, OPT_MUSICBACK)) {
 			moh = 1;
 			ast_moh_start(chan, opt_args[OPT_ARG_MUSICBACK], NULL);
+			ast_indicate(chan, AST_CONTROL_PROGRESS);
 		} else if (ast_test_flag(outgoing, OPT_RINGBACK)) {
 			ast_indicate(chan, AST_CONTROL_RINGING);
 			sentringing++;

Modified: team/oej/codename-pineapple/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/channels/chan_gtalk.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/channels/chan_gtalk.c (original)
+++ team/oej/codename-pineapple/channels/chan_gtalk.c Sat Dec  2 02:34:33 2006
@@ -163,7 +163,6 @@
 };
 
 static const char desc[] = "Gtalk Channel";
-static const char type[] = "Gtalk";
 
 static int global_capability = AST_FORMAT_ULAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_H263;
 
@@ -192,7 +191,7 @@
 
 /*! \brief PBX interface structure for channel registration */
 static const struct ast_channel_tech gtalk_tech = {
-	.type = type,
+	.type = "Gtalk",
 	.description = "Gtalk Channel Driver",
 	.capabilities = ((AST_FORMAT_MAX_AUDIO << 1) - 1),
 	.requester = gtalk_request,
@@ -220,7 +219,7 @@
 
 /*! \brief RTP driver interface */
 static struct ast_rtp_protocol gtalk_rtp = {
-	type: "gtalk",
+	type: "Gtalk",
 	get_rtp_info: gtalk_get_rtp_peer,
 	set_rtp_peer: gtalk_set_rtp_peer,
 	get_codec: gtalk_get_codec,
@@ -921,10 +920,12 @@
 	fmt = ast_best_codec(tmp->nativeformats);
 
 	if (i->rtp) {
+		ast_rtp_setstun(i->rtp, 1);
 		tmp->fds[0] = ast_rtp_fd(i->rtp);
 		tmp->fds[1] = ast_rtcp_fd(i->rtp);
 	}
 	if (i->vrtp) {
+		ast_rtp_setstun(i->rtp, 1);
 		tmp->fds[2] = ast_rtp_fd(i->vrtp);
 		tmp->fds[3] = ast_rtcp_fd(i->vrtp);
 	}
@@ -1790,7 +1791,7 @@
 
 	/* Make sure we can register our channel type */
 	if (ast_channel_register(&gtalk_tech)) {
-		ast_log(LOG_ERROR, "Unable to register channel class %s\n", type);
+		ast_log(LOG_ERROR, "Unable to register channel class %s\n", gtalk_tech.type);
 		return -1;
 	}
 	return 0;

Modified: team/oej/codename-pineapple/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/channels/chan_iax2.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/channels/chan_iax2.c (original)
+++ team/oej/codename-pineapple/channels/chan_iax2.c Sat Dec  2 02:34:33 2006
@@ -6988,7 +6988,7 @@
 					if (!strcmp(ies.called_number, ast_parking_ext())) {
 						if (iax_park(ast_bridged_channel(iaxs[fr->callno]->owner), iaxs[fr->callno]->owner)) {
 							ast_log(LOG_WARNING, "Failed to park call on '%s'\n", ast_bridged_channel(iaxs[fr->callno]->owner)->name);
-						} else {
+						} else if (ast_bridged_channel(iaxs[fr->callno]->owner)) {
 							if (option_debug)
 								ast_log(LOG_DEBUG, "Parked call on '%s'\n", ast_bridged_channel(iaxs[fr->callno]->owner)->name);
 						}

Modified: team/oej/codename-pineapple/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/channels/chan_sip.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/channels/chan_sip.c (original)
+++ team/oej/codename-pineapple/channels/chan_sip.c Sat Dec  2 02:34:33 2006
@@ -3099,9 +3099,9 @@
 
 	/* Check the list of users only for incoming calls */
 	if (global_limitonpeers == FALSE && !outgoing && (u = find_user(name, 1)))  {
-			inuse = &u->inUse;
-			call_limit = &u->call_limit;
-			inringing = NULL;
+		inuse = &u->inUse;
+		call_limit = &u->call_limit;
+		inringing = NULL;
 	} else if ( (p = find_peer(ast_strlen_zero(fup->peername) ? name : fup->peername, NULL, 1) ) ) { /* Try to find peer */
 		inuse = &p->inUse;
 		call_limit = &p->call_limit;
@@ -3605,15 +3605,12 @@
 	case AST_FRAME_MODEM:
 		if (p) {
 			sip_pvt_lock(p);
-			if (p->udptl) {
-				if ((ast->_state != AST_STATE_UP) &&
-					!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) && 
-				    !ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
-					transmit_response_with_t38_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE);
-					ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
-				}
+			/* UDPTL requires two-way communication, so early media is not needed here.
+				we simply forget the frames if we get modem frames before the bridge is up.
+				Fax will re-transmit.
+			*/
+			if (p->udptl && ast->_state != AST_STATE_UP) 
 				res = ast_udptl_write(p->udptl, frame);
-			}
 			sip_pvt_unlock(p);
 		}
 		break;
@@ -7347,7 +7344,8 @@
 		ast_string_field_set(p, domain, r->domain);
 		ast_string_field_set(p, opaque, r->opaque);
 		ast_string_field_set(p, qop, r->qop);
-		p->noncecount = r->noncecount++;
+		r->noncecount++;
+		p->noncecount = r->noncecount;
 
 		memset(digest,0,sizeof(digest));
 		if(!build_reply_digest(p, sipmethod, digest, sizeof(digest)))
@@ -16267,10 +16265,10 @@
 			compactheaders = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "notifymimetype")) {
 			ast_copy_string(default_notifymime, v->value, sizeof(default_notifymime));
+		} else if (!strcasecmp(v->name, "limitonpeers")) {
+			global_limitonpeers = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "notifyringing")) {
 			global_notifyringing = ast_true(v->value);
-		} else if (!strcasecmp(v->name, "limitpeersonly")) {
-			global_limitonpeers = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "notifyhold")) {
 			global_notifyhold = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "alwaysauthreject")) {

Modified: team/oej/codename-pineapple/configs/extensions.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/configs/extensions.conf.sample?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/configs/extensions.conf.sample (original)
+++ team/oej/codename-pineapple/configs/extensions.conf.sample Sat Dec  2 02:34:33 2006
@@ -167,7 +167,7 @@
 ;
 ; List canonical entries here
 ;
-;exten => 12564286000,1,Macro(std-exten,6000,IAX2/foo)
+;exten => 12564286000,1,Macro(stdexten,6000,IAX2/foo)
 ;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
 
 [dundi-e164-customers]

Modified: team/oej/codename-pineapple/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/configs/sip.conf.sample?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/configs/sip.conf.sample (original)
+++ team/oej/codename-pineapple/configs/sip.conf.sample Sat Dec  2 02:34:33 2006
@@ -39,6 +39,7 @@
 				; Realms MUST be globally unique according to RFC 3261
 				; Set this to your host name or domain name
 bindport=5060			; UDP Port to bind to (SIP standard port is 5060)
+				; bindport is the local UDP port that Asterisk will listen on
 bindaddr=0.0.0.0		; IP address to bind to (0.0.0.0 binds to all)
 srvlookup=yes			; Enable DNS SRV lookups on outbound calls
 				; Note: Asterisk only uses the first host 
@@ -194,6 +195,12 @@
 ;notifyhold = yes		; Notify subscriptions on HOLD state (default: no)
 				; Turning on notifyringing and notifyhold will add a lot
 				; more database transactions if you are using realtime.
+;limitonpeer = yes		; Apply call limits on peers only. This will improve 
+				; status notification when you are using type=friend
+				; Inbound calls, that really apply to the user part
+				; of a friend will now be added to and compared with
+				; the peer limit instead of applying two call limits,
+				; one for the peer and one for the user.
 
 ;----------------------------------------- T.38 FAX PASSTHROUGH SUPPORT -----------------------
 ;
@@ -500,8 +507,9 @@
 ;usereqphone=yes			; This provider requires ";user=phone" on URI
 ;call-limit=5				; permit only 5 simultaneous outgoing calls to this peer
 ;outboundproxy=proxy.provider.domain	; send outbound signaling to this proxy, not directly to the peer
-				; Call-limits will not be enforced on real-time peers,
-				; since they are not stored in-memory
+					; Call-limits will not be enforced on real-time peers,
+					; since they are not stored in-memory
+;port=80				; The port number we want to connect to on the remote side
 
 ;--- sample definition for a provider
 ;[provider1]

Modified: team/oej/codename-pineapple/configure
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/configure?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/configure (original)
+++ team/oej/codename-pineapple/configure Sat Dec  2 02:34:33 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 47328 .
+# From configure.ac Revision: 47759 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.60a.
 #
@@ -691,6 +691,9 @@
 LN
 DOT
 STRIP
+WGET
+FETCH
+DOWNLOAD
 AST_DEVMODE
 ALSA_LIB
 ALSA_INCLUDE
@@ -5576,6 +5579,94 @@
 fi
 
 
+# Extract the first word of "wget", so it can be a program name with args.
+set dummy wget; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_WGET+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $WGET in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_WGET="$WGET" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_WGET" && ac_cv_path_WGET=":"
+  ;;
+esac
+fi
+WGET=$ac_cv_path_WGET
+if test -n "$WGET"; then
+  { echo "$as_me:$LINENO: result: $WGET" >&5
+echo "${ECHO_T}$WGET" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test "${WGET}" != ":" ; then
+  DOWNLOAD=${WGET}
+else
+  # Extract the first word of "fetch", so it can be a program name with args.
+set dummy fetch; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_FETCH+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $FETCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FETCH="$FETCH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_FETCH="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_FETCH" && ac_cv_path_FETCH=":"
+  ;;
+esac
+fi
+FETCH=$ac_cv_path_FETCH
+if test -n "$FETCH"; then
+  { echo "$as_me:$LINENO: result: $FETCH" >&5
+echo "${ECHO_T}$FETCH" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  DOWNLOAD=${FETCH}
+fi
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -34278,14 +34369,14 @@
 LN!$LN$ac_delim
 DOT!$DOT$ac_delim
 STRIP!$STRIP$ac_delim
+WGET!$WGET$ac_delim
+FETCH!$FETCH$ac_delim
+DOWNLOAD!$DOWNLOAD$ac_delim
 AST_DEVMODE!$AST_DEVMODE$ac_delim
 ALSA_LIB!$ALSA_LIB$ac_delim
 ALSA_INCLUDE!$ALSA_INCLUDE$ac_delim
 PBX_ALSA!$PBX_ALSA$ac_delim
 CAP_LIB!$CAP_LIB$ac_delim
-CAP_INCLUDE!$CAP_INCLUDE$ac_delim
-PBX_CAP!$PBX_CAP$ac_delim
-CURL_LIB!$CURL_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -34327,6 +34418,9 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+CAP_INCLUDE!$CAP_INCLUDE$ac_delim
+PBX_CAP!$PBX_CAP$ac_delim
+CURL_LIB!$CURL_LIB$ac_delim
 CURL_INCLUDE!$CURL_INCLUDE$ac_delim
 PBX_CURL!$PBX_CURL$ac_delim
 CURSES_LIB!$CURSES_LIB$ac_delim
@@ -34421,9 +34515,6 @@
 PBX_TERMCAP!$PBX_TERMCAP$ac_delim
 TINFO_LIB!$TINFO_LIB$ac_delim
 TINFO_INCLUDE!$TINFO_INCLUDE$ac_delim
-PBX_TINFO!$PBX_TINFO$ac_delim
-TONEZONE_LIB!$TONEZONE_LIB$ac_delim
-TONEZONE_INCLUDE!$TONEZONE_INCLUDE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -34465,6 +34556,9 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PBX_TINFO!$PBX_TINFO$ac_delim
+TONEZONE_LIB!$TONEZONE_LIB$ac_delim
+TONEZONE_INCLUDE!$TONEZONE_INCLUDE$ac_delim
 PBX_TONEZONE!$PBX_TONEZONE$ac_delim
 VORBIS_LIB!$VORBIS_LIB$ac_delim
 VORBIS_INCLUDE!$VORBIS_INCLUDE$ac_delim
@@ -34510,7 +34604,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 43; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: team/oej/codename-pineapple/configure.ac
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/configure.ac?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/configure.ac (original)
+++ team/oej/codename-pineapple/configure.ac Sat Dec  2 02:34:33 2006
@@ -155,6 +155,14 @@
 AC_PATH_PROG([LN], [ln], :)
 AC_PATH_PROG([DOT], [dot], :)
 AC_PATH_PROG([STRIP], [strip], :)
+AC_PATH_PROG([WGET], [wget], :)
+if test "${WGET}" != ":" ; then
+  DOWNLOAD=${WGET}
+else
+  AC_PATH_PROG([FETCH], [fetch], [:])
+  DOWNLOAD=${FETCH}
+fi
+AC_SUBST(DOWNLOAD)
 
 AC_LANG(C)
 

Modified: team/oej/codename-pineapple/contrib/asterisk-ng-doxygen
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/contrib/asterisk-ng-doxygen?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/contrib/asterisk-ng-doxygen (original)
+++ team/oej/codename-pineapple/contrib/asterisk-ng-doxygen Sat Dec  2 02:34:33 2006
@@ -459,6 +459,7 @@
 			 codecs \
 			 formats \
 			 pbx \
+			 agi \
 			 res
 
 # If the value of the INPUT tag contains directories, you can use the 

Modified: team/oej/codename-pineapple/doc/manager.txt
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/doc/manager.txt?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/doc/manager.txt (original)
+++ team/oej/codename-pineapple/doc/manager.txt Sat Dec  2 02:34:33 2006
@@ -30,6 +30,15 @@
 If you develop applications, please try to reuse existing manager
 headers and their interpretation. If you are unsure, discuss on
 the asterisk-dev mailing list.
+
+Device status reports
+---------------------
+Manager subscribes to extension status reports from all channels,
+to be able to generate events when an extension or device changes
+state. The level of details in these events may depend on the channel
+and device configuration. Please check each channel configuration
+file for more information. (in sip.conf, check the section on
+subscriptions and call limits)
 
 
 Command Syntax

Modified: team/oej/codename-pineapple/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/channel.h?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/channel.h (original)
+++ team/oej/codename-pineapple/include/asterisk/channel.h Sat Dec  2 02:34:33 2006
@@ -143,6 +143,8 @@
 
 typedef unsigned long long ast_group_t;
 
+/*! \todo Add an explanation of an Asterisk generator 
+*/
 struct ast_generator {
 	void *(*alloc)(struct ast_channel *chan, void *params);
 	void (*release)(struct ast_channel *chan, void *data);
@@ -274,8 +276,8 @@
 	int (* func_channel_write)(struct ast_channel *chan, char *function, char *data, const char *value);
 };
 
-struct ast_channel_spy_list;
-struct ast_channel_whisper_buffer;
+struct ast_channel_spy_list;	/*!< \todo Add explanation here */
+struct ast_channel_whisper_buffer;	/*!< \todo Add explanation here */
 
 #define	DEBUGCHAN_FLAG  0x80000000
 #define	FRAMECOUNT_INC(x)	( ((x) & DEBUGCHAN_FLAG) | ((x++) & ~DEBUGCHAN_FLAG) )
@@ -492,6 +494,7 @@
 	AST_FEATURE_PARKCALL =     (1 << 5),
 };
 
+/*! \brief bridge configuration */
 struct ast_bridge_config {
 	struct ast_flags features_caller;
 	struct ast_flags features_callee;
@@ -750,7 +753,7 @@
 int ast_indicate(struct ast_channel *chan, int condition);
 
 /*! \brief Indicates condition of channel, with payload
- * \note Indicate a condition such as AST_CONTROL_BUSY, AST_CONTROL_RINGING, or AST_CONTROL_CONGESTION on a channel
+ * \note Indicate a condition such as AST_CONTROL_HOLD with payload being music on hold class
  * \param chan channel to change the indication
  * \param condition which condition to indicate on the channel
  * \param data pointer to payload data
@@ -817,14 +820,12 @@
 
 /*! \brief Reads a frame
  * \param chan channel to read a frame from
-	Read a frame.  
-	\return Returns a frame, or NULL on error.  If it returns NULL, you
-		best just stop reading frames and assume the channel has been
-		disconnected. */
+ * \return Returns a frame, or NULL on error.  If it returns NULL, you
+	best just stop reading frames and assume the channel has been
+	disconnected. */
 struct ast_frame *ast_read(struct ast_channel *chan);
 
 /*! \brief Reads a frame, returning AST_FRAME_NULL frame if audio. 
- * Read a frame. 
  	\param chan channel to read a frame from
 	\return  Returns a frame, or NULL on error.  If it returns NULL, you
 		best just stop reading frames and assume the channel has been
@@ -892,7 +893,20 @@
  */
 int ast_senddigit(struct ast_channel *chan, char digit);
 
+/*! \brief Send a DTMF digit to a channel
+ * Send a DTMF digit to a channel.
+ * \param chan channel to act upon
+ * \param digit the DTMF digit to send, encoded in ASCII
+ * \return Returns 0 on success, -1 on failure
+ */
 int ast_senddigit_begin(struct ast_channel *chan, char digit);
+/*! \brief Send a DTMF digit to a channel
+
+ * Send a DTMF digit to a channel.
+ * \param chan channel to act upon
+ * \param digit the DTMF digit to send, encoded in ASCII
+ * \return Returns 0 on success, -1 on failure
+ */
 int ast_senddigit_end(struct ast_channel *chan, char digit);
 
 /*! \brief Receives a text string from a channel
@@ -1350,7 +1364,7 @@
   audio samples, and then to mix in audio from the whisper buffer if it
   is available.
 
-  Note: This function performs no locking; you must hold the channel's lock before
+  \note Note: This function performs no locking; you must hold the channel's lock before
   calling this function.
  */
 int ast_channel_whisper_start(struct ast_channel *chan);

Modified: team/oej/codename-pineapple/include/asterisk/devicestate.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/devicestate.h?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/devicestate.h (original)
+++ team/oej/codename-pineapple/include/asterisk/devicestate.h Sat Dec  2 02:34:33 2006
@@ -18,6 +18,8 @@
 
 /*! \file
  * \brief Device state management
+ *
+ * \arg See \ref AstExtState
  */
 
 #ifndef _ASTERISK_DEVICESTATE_H
@@ -26,25 +28,18 @@
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
-
-/*! Device is valid but channel didn't know state */
-#define AST_DEVICE_UNKNOWN	0
-/*! Device is not used */
-#define AST_DEVICE_NOT_INUSE	1
-/*! Device is in use */
-#define AST_DEVICE_INUSE	2
-/*! Device is busy */
-#define AST_DEVICE_BUSY		3
-/*! Device is invalid */
-#define AST_DEVICE_INVALID	4
-/*! Device is unavailable */
-#define AST_DEVICE_UNAVAILABLE	5
-/*! Device is ringing */
-#define AST_DEVICE_RINGING	6
-/*! Device is ringing *and* in use */
-#define AST_DEVICE_RINGINUSE	7
-/*! Device is on hold */
-#define AST_DEVICE_ONHOLD	8
+/*! @name DeviceStates */
+/*! \@{ */
+#define AST_DEVICE_UNKNOWN	0 /*!< Device is valid but channel didn't know state */
+#define AST_DEVICE_NOT_INUSE	1 /*!< Device is not used */
+#define AST_DEVICE_INUSE	2 /*!< Device is in use */
+#define AST_DEVICE_BUSY		3 /*!< Device is busy */
+#define AST_DEVICE_INVALID	4 /*!< Device is invalid */
+#define AST_DEVICE_UNAVAILABLE	5 /*!< Device is unavailable */
+#define AST_DEVICE_RINGING	6 /*!< Device is ringing */
+#define AST_DEVICE_RINGINUSE	7 /*!< Device is ringing *and* in use */
+#define AST_DEVICE_ONHOLD	8 /*!< Device is on hold */
+/*! \@} */
 
 /*! \brief Devicestate watcher call back */
 typedef int (*ast_devstate_cb_type)(const char *dev, int state, void *data);

Modified: team/oej/codename-pineapple/include/asterisk/doxyref.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/doxyref.h?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/doxyref.h (original)
+++ team/oej/codename-pineapple/include/asterisk/doxyref.h Sat Dec  2 02:34:33 2006
@@ -67,6 +67,7 @@
  *
  *  \arg \ref AstThreadStorage
  *  \arg \ref DataStores
+ *  \arg \ref AstExtState
  *
  *  \subsection model_txt Generic Model
  *  \verbinclude model.txt

Modified: team/oej/codename-pineapple/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/pbx.h?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/pbx.h (original)
+++ team/oej/codename-pineapple/include/asterisk/pbx.h Sat Dec  2 02:34:33 2006
@@ -43,7 +43,10 @@
 
 #define PRIORITY_HINT	-1	/*!< Special Priority for a hint */
 
-/*! \brief Extension states */
+/*! \brief Extension states 
+	\note States can be combined 
+	- \ref AstExtState
+*/
 enum ast_extension_states {
 	AST_EXTENSION_REMOVED = -2,	/*!< Extension removed */
 	AST_EXTENSION_DEACTIVATED = -1,	/*!< Extension hint removed */
@@ -174,6 +177,20 @@
  * \return NULL on failure, and an ast_context structure on success
  */
 struct ast_context *ast_context_create(struct ast_context **extcontexts, const char *name, const char *registrar);
+
+/*!
+ * \brief Register a new context or find an existing one
+ *
+ * \param extcontexts pointer to the ast_context structure pointer
+ * \param name name of the new context
+ * \param registrar registrar of the context
+ *
+ * This will first search for a context with your name.  If it exists already, it will not
+ * create a new one.  If it does not exist, it will create a new one with the given name
+ * and registrar.
+ *
+ * \return NULL on failure, and an ast_context structure on success
+ */
 struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts, const char *name, const char *registrar);
 
 /*!
@@ -211,6 +228,11 @@
  */
 struct ast_context *ast_context_find(const char *name);
 
+/*! \brief The result codes when starting the PBX on a channel
+	with \ref ast_pbx_start()
+
+	AST_PBX_CALL_LIMIT refers to the maxcalls call limit in asterisk.conf
+ */
 enum ast_pbx_result {
 	AST_PBX_SUCCESS = 0,
 	AST_PBX_FAILED = -1,
@@ -356,7 +378,7 @@
 int ast_extension_state_del(int id, ast_state_cb_type callback);
 
 /*! 
- * \brief If an extension exists, return non-zero
+ * \brief If an extension hint exists, return non-zero
  * 
  * \param hint buffer for hint
  * \param maxlen size of hint buffer
@@ -728,7 +750,9 @@
  */
 int pbx_checkcondition(const char *condition);
 
-/* Functions for returning values from structures */
+/*! @name 
+ * Functions for returning values from structures */
+/*! @{ */
 const char *ast_get_context_name(struct ast_context *con);
 const char *ast_get_extension_name(struct ast_exten *exten);
 struct ast_context *ast_get_extension_context(struct ast_exten *exten);
@@ -736,21 +760,26 @@
 const char *ast_get_ignorepat_name(struct ast_ignorepat *ip);
 const char *ast_get_switch_name(struct ast_sw *sw);
 const char *ast_get_switch_data(struct ast_sw *sw);
-
-/* Other extension stuff */
+/*! @} */
+
+/*! @name Other Extension stuff */
+/*! @{ */
 int ast_get_extension_priority(struct ast_exten *exten);
 int ast_get_extension_matchcid(struct ast_exten *e);
 const char *ast_get_extension_cidmatch(struct ast_exten *e);
 const char *ast_get_extension_app(struct ast_exten *e);
 const char *ast_get_extension_label(struct ast_exten *e);
 void *ast_get_extension_app_data(struct ast_exten *e);
-
-/* Registrar info functions ... */
+/*! @} */
+
+/*! @name Registrar info functions ... */
+/*! @{ */
 const char *ast_get_context_registrar(struct ast_context *c);
 const char *ast_get_extension_registrar(struct ast_exten *e);
 const char *ast_get_include_registrar(struct ast_include *i);
 const char *ast_get_ignorepat_registrar(struct ast_ignorepat *ip);
 const char *ast_get_switch_registrar(struct ast_sw *sw);
+/*! @} */
 
 /* Walking functions ... */
 struct ast_context *ast_walk_contexts(struct ast_context *con);

Modified: team/oej/codename-pineapple/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/rtp.h?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/rtp.h (original)
+++ team/oej/codename-pineapple/include/asterisk/rtp.h Sat Dec  2 02:34:33 2006
@@ -186,6 +186,9 @@
 /*! \brief Compensate for devices that send RFC2833 packets all at once */
 void ast_rtp_setdtmfcompensate(struct ast_rtp *rtp, int compensate);
 
+/*! \brief Enable STUN capability */
+void ast_rtp_setstun(struct ast_rtp *rtp, int stun_enable);
+
 int ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms);
 
 int ast_rtp_proto_register(struct ast_rtp_protocol *proto);

Modified: team/oej/codename-pineapple/include/asterisk/threadstorage.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/threadstorage.h?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/threadstorage.h (original)
+++ team/oej/codename-pineapple/include/asterisk/threadstorage.h Sat Dec  2 02:34:33 2006
@@ -20,6 +20,8 @@
  * \file threadstorage.h
  * \author Russell Bryant <russell at digium.com>
  * \brief Definitions to aid in the use of thread local storage
+ *
+ * \arg \ref AstThreadStorage
  */
 
 /*!

Modified: team/oej/codename-pineapple/main/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/cdr.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/main/cdr.c (original)
+++ team/oej/codename-pineapple/main/cdr.c Sat Dec  2 02:34:33 2006
@@ -404,14 +404,14 @@
 static void check_post(struct ast_cdr *cdr)
 {
 	if (ast_test_flag(cdr, AST_CDR_FLAG_POSTED))
-		ast_log(LOG_WARNING, "CDR on channel '%s' already posted\n", S_OR(cdr->channel, "<unknown>"));
+		ast_log(LOG_NOTICE, "CDR on channel '%s' already posted\n", S_OR(cdr->channel, "<unknown>"));
 }
 
 /*! \brief  print a warning if cdr already started */
 static void check_start(struct ast_cdr *cdr)
 {
 	if (!ast_tvzero(cdr->start))
-		ast_log(LOG_WARNING, "CDR on channel '%s' already started\n", S_OR(cdr->channel, "<unknown>"));
+		ast_log(LOG_NOTICE, "CDR on channel '%s' already started\n", S_OR(cdr->channel, "<unknown>"));
 }
 
 void ast_cdr_free(struct ast_cdr *cdr)
@@ -421,11 +421,11 @@
 		struct ast_cdr *next = cdr->next;
 		char *chan = S_OR(cdr->channel, "<unknown>");
 		if (!ast_test_flag(cdr, AST_CDR_FLAG_POSTED) && !ast_test_flag(cdr, AST_CDR_FLAG_POST_DISABLED))
-			ast_log(LOG_WARNING, "CDR on channel '%s' not posted\n", chan);
+			ast_log(LOG_NOTICE, "CDR on channel '%s' not posted\n", chan);
 		if (ast_tvzero(cdr->end))
-			ast_log(LOG_WARNING, "CDR on channel '%s' lacks end\n", chan);
+			ast_log(LOG_NOTICE, "CDR on channel '%s' lacks end\n", chan);
 		if (ast_tvzero(cdr->start))
-			ast_log(LOG_WARNING, "CDR on channel '%s' lacks start\n", chan);
+			ast_log(LOG_NOTICE, "CDR on channel '%s' lacks start\n", chan);
 
 		ast_cdr_free_vars(cdr, 0);
 		free(cdr);

Modified: team/oej/codename-pineapple/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/cli.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/main/cli.c (original)
+++ team/oej/codename-pineapple/main/cli.c Sat Dec  2 02:34:33 2006
@@ -1288,7 +1288,6 @@
 	AST_LIST_LOCK(&helpers);
 	
 	if (find_cli(e->cmda, 1)) {
-		AST_LIST_UNLOCK(&helpers);
 		ast_log(LOG_WARNING, "Command '%s' already registered (or something close enough)\n", e->_full_cmd);
 		free(e->_full_cmd);
 		e->_full_cmd = NULL;

Modified: team/oej/codename-pineapple/main/devicestate.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/devicestate.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/main/devicestate.c (original)
+++ team/oej/codename-pineapple/main/devicestate.c Sat Dec  2 02:34:33 2006
@@ -20,7 +20,91 @@
  *
  * \brief Device state management
  *
+ *
  * \author Mark Spencer <markster at digium.com> 
+ *
+ *	\arg \ref AstExtState
+ */
+/*! \page AstExtState Extension and device states in Asterisk
+ *
+ *	Asterisk has an internal system that reports states
+ *	for an extension. By using the dialplan priority -1,
+ *	also called a \b hint, a connection can be made from an
+ *	extension to one or many devices. The state of the extension
+ *	now depends on the combined state of the devices.
+ *
+ *	The device state is basically based on the current calls.
+ *	If the devicestate engine can find a call from or to the
+ *	device, it's in use.
+ *	
+ *	Some channel drivers implement a callback function for 
+ *	a better level of reporting device states. The SIP channel
+ *	has a complicated system for this, which is improved 
+ *	by adding call limits to the configuration.
+ * 
+ *	Functions that want to check the status of an extension
+ *	register themself as a \b watcher.
+ *	Watchers in this system can subscribe either to all extensions
+ *	or just a specific extensions.
+ *
+ *	For non-device related states, there's an API called
+ *	devicestateproviders. This is an extendable system for
+ *	delivering state information from outside sources or
+ *	functions within Asterisk. Currently we have providers
+ *	for app_meetme.c - the conference bridge - and call
+ *	parking (metermaids).
+ *
+ *	There are manly three subscribers to extension states 
+ *	within Asterisk:
+ *	- AMI, the manager interface
+ *	- app_queue.c - the Queue dialplan application
+ *	- SIP subscriptions, a.k.a. "blinking lamps" or 
+ *	  "buddy lists"
+ *
+ *	The CLI command "show hints" show last known state
+ *
+ *	\note None of these handle user states, like an IM presense
+ *	system. res_jabber.c can subscribe and watch such states
+ *	in jabber/xmpp based systems.
+ *
+ *	\section AstDevStateArch Architecture for devicestates
+ *
+ *	When a channel driver or asterisk app changes state for 
+ *	a watched object, it alerts the core. The core queues
+ *	a change. When the change is processed, there's a query
+ *	sent to the channel driver/provider if there's a function
+ *	to handle that, otherwise a channel walk is issued to find
+ *	a channel that involves the object.
+ *	
+ *	The changes are queued and processed by a separate thread.
+ *	This thread calls the watchers subscribing to status 
+ *	changes for the object. For manager, this results 
+ *	in events. For SIP, NOTIFY requests.
+ *
+ *	- Device states
+ *		\arg \ref devicestate.c 
+ *		\arg \ref devicestate.h 
+ *
+ *	\section AstExtStateArch Architecture for extension states
+ *	
+ *	Hints are connected to extension. If an extension changes state
+ *	it checks the hint devices. If there is a hint, the callbacks into
+ *	device states are checked. The aggregated state is set for the hint
+ *	and reported back.
+ *
+ *	- Extension states
+ *		\arg \ref enum ast_extension_states
+ *		\arg \ref pbx.c 
+ *		\arg \ref pbx.h 
+ *	- Structures
+ *		- \ref struct ast_state_cb  Callbacks for watchers
+ *		- Callback ast_state_cb_type
+ *		- \ref struct ast_hint
+ * 	- Functions
+ *		- ast_extension_state_add()
+ *		- ast_extension_state_del()
+ *		- ast_get_hint()
+ *	
  */
 
 #include "asterisk.h"
@@ -69,7 +153,7 @@
 /*! \brief  A device state watcher (callback) */
 struct devstate_cb {
 	void *data;
-	ast_devstate_cb_type callback;
+	ast_devstate_cb_type callback;	/*!< Where to report when state changes */
 	AST_LIST_ENTRY(devstate_cb) list;
 };
 

Modified: team/oej/codename-pineapple/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/pbx.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/main/pbx.c (original)
+++ team/oej/codename-pineapple/main/pbx.c Sat Dec  2 02:34:33 2006
@@ -193,7 +193,9 @@
 /*! \brief Structure for dial plan hints
 
   \note Hints are pointers from an extension in the dialplan to one or
-  more devices (tech/name) */
+  more devices (tech/name) 
+	- See \ref AstExtState
+*/
 struct ast_hint {
 	struct ast_exten *exten;	/*!< Extension */
 	int laststate; 			/*!< Last known state */

Modified: team/oej/codename-pineapple/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/rtp.c?view=diff&rev=48198&r1=48197&r2=48198
==============================================================================
--- team/oej/codename-pineapple/main/rtp.c (original)
+++ team/oej/codename-pineapple/main/rtp.c Sat Dec  2 02:34:33 2006

[... 191 lines stripped ...]


More information about the svn-commits mailing list