[asterisk-commits] oej: branch oej/invitestate-1.4 r48209 - in /team/oej/invitestate-1.4: ./ app...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Dec 2 10:54:55 MST 2006


Author: oej
Date: Sat Dec  2 11:54:55 2006
New Revision: 48209

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

Modified:
    team/oej/invitestate-1.4/   (props changed)
    team/oej/invitestate-1.4/Makefile
    team/oej/invitestate-1.4/apps/app_dial.c
    team/oej/invitestate-1.4/channels/chan_gtalk.c
    team/oej/invitestate-1.4/channels/chan_iax2.c
    team/oej/invitestate-1.4/channels/chan_sip.c
    team/oej/invitestate-1.4/configs/extensions.conf.sample
    team/oej/invitestate-1.4/configs/sip.conf.sample
    team/oej/invitestate-1.4/configure
    team/oej/invitestate-1.4/configure.ac
    team/oej/invitestate-1.4/doc/manager.txt
    team/oej/invitestate-1.4/include/asterisk/rtp.h
    team/oej/invitestate-1.4/include/asterisk/utils.h
    team/oej/invitestate-1.4/main/cdr.c
    team/oej/invitestate-1.4/main/cli.c
    team/oej/invitestate-1.4/main/rtp.c
    team/oej/invitestate-1.4/makeopts.in
    team/oej/invitestate-1.4/res/res_features.c
    team/oej/invitestate-1.4/sounds/Makefile

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

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

Propchange: team/oej/invitestate-1.4/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Dec  2 11:54:55 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-48131
+/branches/1.4:1-48207

Modified: team/oej/invitestate-1.4/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/Makefile?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/Makefile (original)
+++ team/oej/invitestate-1.4/Makefile Sat Dec  2 11:54:55 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/invitestate-1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/apps/app_dial.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/apps/app_dial.c (original)
+++ team/oej/invitestate-1.4/apps/app_dial.c Sat Dec  2 11:54:55 2006
@@ -1231,6 +1231,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/invitestate-1.4/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/channels/chan_gtalk.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/channels/chan_gtalk.c (original)
+++ team/oej/invitestate-1.4/channels/chan_gtalk.c Sat Dec  2 11:54:55 2006
@@ -163,7 +163,6 @@
 };
 
 static const char desc[] = "Gtalk Channel";
-static const char type[] = "Gtalk";
 
 static int usecnt = 0;
 AST_MUTEX_DEFINE_STATIC(usecnt_lock);
@@ -195,7 +194,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,
@@ -223,7 +222,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,
@@ -922,10 +921,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);
 	}
@@ -1796,7 +1797,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/invitestate-1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/channels/chan_iax2.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/channels/chan_iax2.c (original)
+++ team/oej/invitestate-1.4/channels/chan_iax2.c Sat Dec  2 11:54:55 2006
@@ -6935,7 +6935,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))
 							ast_log(LOG_DEBUG, "Parked call on '%s'\n", ast_bridged_channel(iaxs[fr->callno]->owner)->name);
 					} else {
 						if (ast_async_goto(ast_bridged_channel(iaxs[fr->callno]->owner), iaxs[fr->callno]->context, ies.called_number, 1))

Modified: team/oej/invitestate-1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/channels/chan_sip.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/channels/chan_sip.c (original)
+++ team/oej/invitestate-1.4/channels/chan_sip.c Sat Dec  2 11:54:55 2006
@@ -528,6 +528,7 @@
 static struct ast_codec_pref default_prefs;		/*!< Default codec prefs */
 
 /* Global settings only apply to the channel */
+static int global_limitonpeers;		/*!< Match call limit on peers only */
 static int global_rtautoclear;
 static int global_notifyringing;	/*!< Send notifications on ringing */
 static int global_notifyhold;		/*!< Send notifications on hold */
@@ -963,8 +964,6 @@
 	time_t lastrtprx;			/*!< Last RTP received */
 	time_t lastrtptx;			/*!< Last RTP sent */
 	int rtptimeout;				/*!< RTP timeout time */
-	int rtpholdtimeout;			/*!< RTP timeout when on hold */
-	int rtpkeepalive;			/*!< Send RTP packets for keepalive */
 	struct sockaddr_in recv;		/*!< Received as */
 	struct in_addr ourip;			/*!< Our IP */
 	struct ast_channel *owner;		/*!< Who owns us (if we have an owner) */
@@ -2608,17 +2607,21 @@
 	if (dialog->rtp) {
 		ast_rtp_setdtmf(dialog->rtp, ast_test_flag(&dialog->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
 		ast_rtp_setdtmfcompensate(dialog->rtp, ast_test_flag(&dialog->flags[1], SIP_PAGE2_RFC2833_COMPENSATE));
+		ast_rtp_set_rtptimeout(dialog->rtp, peer->rtptimeout);
+		ast_rtp_set_rtpholdtimeout(dialog->rtp, peer->rtpholdtimeout);
+		ast_rtp_set_rtpkeepalive(dialog->rtp, peer->rtpkeepalive);
+		/* Set Frame packetization */
+		ast_rtp_codec_setpref(dialog->rtp, &dialog->prefs);
+		dialog->autoframing = peer->autoframing;
 	}
 	if (dialog->vrtp) {
 		ast_rtp_setdtmf(dialog->vrtp, 0);
 		ast_rtp_setdtmfcompensate(dialog->vrtp, 0);
-	}
-
-	/* Set Frame packetization */
-	if (dialog->rtp) {
-		ast_rtp_codec_setpref(dialog->rtp, &dialog->prefs);
-		dialog->autoframing = peer->autoframing;
-	}
+		ast_rtp_set_rtptimeout(dialog->vrtp, peer->rtptimeout);
+		ast_rtp_set_rtpholdtimeout(dialog->vrtp, peer->rtpholdtimeout);
+		ast_rtp_set_rtpkeepalive(dialog->vrtp, peer->rtpkeepalive);
+	}
+
 	ast_string_field_set(dialog, peername, peer->username);
 	ast_string_field_set(dialog, authname, peer->username);
 	ast_string_field_set(dialog, username, peer->username);
@@ -2657,8 +2660,6 @@
 		dialog->noncodeccapability &= ~AST_RTP_DTMF;
 	ast_string_field_set(dialog, context, peer->context);
 	dialog->rtptimeout = peer->rtptimeout;
-	dialog->rtpholdtimeout = peer->rtpholdtimeout;
-	dialog->rtpkeepalive = peer->rtpkeepalive;
 	if (peer->call_limit)
 		ast_set_flag(&dialog->flags[0], SIP_CALL_LIMIT);
 	dialog->maxcallbitrate = peer->maxcallbitrate;
@@ -2961,7 +2962,7 @@
 static int update_call_counter(struct sip_pvt *fup, int event)
 {
 	char name[256];
-	int *inuse, *call_limit, *inringing;
+	int *inuse = NULL, *call_limit = NULL, *inringing = NULL;
 	int outgoing = ast_test_flag(&fup->flags[0], SIP_OUTGOING);
 	struct sip_user *u = NULL;
 	struct sip_peer *p = NULL;
@@ -2976,16 +2977,17 @@
 	ast_copy_string(name, fup->username, sizeof(name));
 
 	/* Check the list of users only for incoming calls */
-	if (!outgoing && (u = find_user(name, 1)) ) {
+	if (global_limitonpeers == FALSE && !outgoing && (u = find_user(name, 1)))  {
 		inuse = &u->inUse;
 		call_limit = &u->call_limit;
 		inringing = NULL;
-	} else if ( (p = find_peer(fup->peername, NULL, 1) ) ) { /* Try to find peer */
+	} 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;
 		inringing = &p->inRinging;
 		ast_copy_string(name, fup->peername, sizeof(name));
-	} else {
+	} 
+	if (!p && !u) {
 		if (option_debug > 1)
 			ast_log(LOG_DEBUG, "%s is not a local device, no call limit\n", name);
 		return 0;
@@ -3487,15 +3489,12 @@
 	case AST_FRAME_MODEM:
 		if (p) {
 			ast_mutex_lock(&p->lock);
-			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);
-			}
 			ast_mutex_unlock(&p->lock);
 		}
 		break;
@@ -4190,16 +4189,19 @@
 		ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
 		ast_rtp_setdtmfcompensate(p->rtp, ast_test_flag(&p->flags[1], SIP_PAGE2_RFC2833_COMPENSATE));
 		ast_rtp_settos(p->rtp, global_tos_audio);
+		ast_rtp_set_rtptimeout(p->rtp, global_rtptimeout);
+		ast_rtp_set_rtpholdtimeout(p->rtp, global_rtpholdtimeout);
+		ast_rtp_set_rtpkeepalive(p->rtp, global_rtpkeepalive);
 		if (p->vrtp) {
 			ast_rtp_settos(p->vrtp, global_tos_video);
 			ast_rtp_setdtmf(p->vrtp, 0);
 			ast_rtp_setdtmfcompensate(p->vrtp, 0);
+			ast_rtp_set_rtptimeout(p->vrtp, global_rtptimeout);
+			ast_rtp_set_rtpholdtimeout(p->vrtp, global_rtpholdtimeout);
+			ast_rtp_set_rtpkeepalive(p->vrtp, global_rtpkeepalive);
 		}
 		if (p->udptl)
 			ast_udptl_settos(p->udptl, global_tos_audio);
-		p->rtptimeout = global_rtptimeout;
-		p->rtpholdtimeout = global_rtpholdtimeout;
-		p->rtpkeepalive = global_rtpkeepalive;
 		p->maxcallbitrate = default_maxcallbitrate;
 	}
 
@@ -7246,7 +7248,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)))
@@ -10175,6 +10178,7 @@
 	ast_cli(fd, "  Our auth realm          %s\n", global_realm);
 	ast_cli(fd, "  Realm. auth:            %s\n", authl ? "Yes": "No");
  	ast_cli(fd, "  Always auth rejects:    %s\n", global_alwaysauthreject ? "Yes" : "No");
+	ast_cli(fd, "  Call limit peers only:  %s\n", global_limitonpeers ? "Yes" : "No");
 	ast_cli(fd, "  User Agent:             %s\n", global_useragent);
 	ast_cli(fd, "  MWI checking interval:  %d secs\n", global_mwitime);
 	ast_cli(fd, "  Reg. context:           %s\n", S_OR(global_regcontext, "(not set)"));
@@ -10204,6 +10208,7 @@
 	ast_cli(fd, "  T1 minimum:             %d\n", global_t1min);
 	ast_cli(fd, "  Relax DTMF:             %s\n", global_relaxdtmf ? "Yes" : "No");
 	ast_cli(fd, "  Compact SIP headers:    %s\n", compactheaders ? "Yes" : "No");
+	ast_cli(fd, "  RTP Keepalive:          %d %s\n", global_rtpkeepalive, global_rtpkeepalive ? "" : "(Disabled)" );
 	ast_cli(fd, "  RTP Timeout:            %d %s\n", global_rtptimeout, global_rtptimeout ? "" : "(Disabled)" );
 	ast_cli(fd, "  RTP Hold Timeout:       %d %s\n", global_rtpholdtimeout, global_rtpholdtimeout ? "" : "(Disabled)");
 	ast_cli(fd, "  MWI NOTIFY mime type:   %s\n", default_notifymime);
@@ -11627,6 +11632,9 @@
 				if (bridgepvt->udptl) {
 					if (p->t38.state == T38_PEER_REINVITE) {
 						sip_handle_t38_reinvite(bridgepeer, p, 0);
+						ast_rtp_set_rtptimers_onhold(p->rtp);
+						if (p->vrtp)
+							ast_rtp_set_rtptimers_onhold(p->vrtp);	/* Turn off RTP timers while we send fax */
 					} else if (p->t38.state == T38_DISABLED && bridgepeer && (bridgepvt->t38.state == T38_ENABLED)) {
 						ast_log(LOG_WARNING, "RTP re-inivte after T38 session not handled yet !\n");
 						/* Insted of this we should somehow re-invite the other side of the bridge to RTP */
@@ -14755,23 +14763,23 @@
 			    (sip->owner->_state == AST_STATE_UP) &&
 			    !sip->redirip.sin_addr.s_addr) {
 				if (sip->lastrtptx &&
-				    sip->rtpkeepalive &&
-				    (t > sip->lastrtptx + sip->rtpkeepalive)) {
+				    ast_rtp_get_rtpkeepalive(sip->rtp) &&
+				    (t > sip->lastrtptx + ast_rtp_get_rtpkeepalive(sip->rtp))) {
 					/* Need to send an empty RTP packet */
 					sip->lastrtptx = time(NULL);
 					ast_rtp_sendcng(sip->rtp, 0);
 				}
 				if (sip->lastrtprx &&
-				    (sip->rtptimeout || sip->rtpholdtimeout) &&
-				    (t > sip->lastrtprx + sip->rtptimeout)) {
+					(ast_rtp_get_rtptimeout(sip->rtp) || ast_rtp_get_rtpholdtimeout(sip->rtp)) &&
+				    (t > sip->lastrtprx + ast_rtp_get_rtptimeout(sip->rtp))) {
 					/* Might be a timeout now -- see if we're on hold */
 					struct sockaddr_in sin;
 					ast_rtp_get_peer(sip->rtp, &sin);
 					if (sin.sin_addr.s_addr || 
-					    (sip->rtpholdtimeout && 
-					     (t > sip->lastrtprx + sip->rtpholdtimeout))) {
+					    (ast_rtp_get_rtpholdtimeout(sip->rtp) &&
+					     (t > sip->lastrtprx + ast_rtp_get_rtpholdtimeout(sip->rtp)))) {
 						/* Needs a hangup */
-						if (sip->rtptimeout) {
+						if (ast_rtp_get_rtptimeout(sip->rtp)) {
 							while (sip->owner && ast_channel_trylock(sip->owner)) {
 								ast_mutex_unlock(&sip->lock);
 								usleep(1);
@@ -14792,8 +14800,12 @@
 								   has already been requested and we don't want to
 								   repeatedly request hangups
 								*/
-								sip->rtptimeout = 0;
-								sip->rtpholdtimeout = 0;
+								ast_rtp_set_rtptimeout(sip->rtp, 0);
+								ast_rtp_set_rtpholdtimeout(sip->rtp, 0);
+								if (sip->vrtp) {
+									ast_rtp_set_rtptimeout(sip->vrtp, 0);
+									ast_rtp_set_rtpholdtimeout(sip->vrtp, 0);
+								}
 							}
 						}
 					}
@@ -15933,6 +15945,7 @@
 	global_regcontext[0] = '\0';
 	expiry = DEFAULT_EXPIRY;
 	global_notifyringing = DEFAULT_NOTIFYRINGING;
+	global_limitonpeers = FALSE;
 	global_notifyhold = FALSE;
 	global_alwaysauthreject = 0;
 	global_allowsubscribe = FALSE;
@@ -16055,6 +16068,8 @@
 			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, "notifyhold")) {

Modified: team/oej/invitestate-1.4/configs/extensions.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/configs/extensions.conf.sample?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/configs/extensions.conf.sample (original)
+++ team/oej/invitestate-1.4/configs/extensions.conf.sample Sat Dec  2 11:54:55 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/invitestate-1.4/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/configs/sip.conf.sample?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/configs/sip.conf.sample (original)
+++ team/oej/invitestate-1.4/configs/sip.conf.sample Sat Dec  2 11:54:55 2006
@@ -35,6 +35,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 
@@ -90,12 +91,6 @@
 ;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 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
 ;progressinband=never		; If we should generate in-band ringing always
@@ -151,6 +146,21 @@
 ;
 ;regcontext=sipregistrations
 ;
+;--------------------------- RTP timers ----------------------------------------------------
+; These timers are currently used for both audio and video streams. The RTP timeouts
+; are only applied to the audio channel.
+; The settings are settable in the global section as well as per device
+;
+;rtptimeout=60			; Terminate call if 60 seconds of no RTP or RTCP activity
+				; on the audio channel
+				; 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
+				; on the audio channel
+				; when we're on hold (must be > rtptimeout)
+;rtpkeepalive=<secs>		; Send keepalives in the RTP stream to keep NAT open
+				; (default is off - zero)
 ;--------------------------- SIP DEBUGGING ---------------------------------------------------
 ;sipdebug = yes			; Turn on SIP debugging by default, from
 				; the moment the channel loads this configuration
@@ -184,13 +194,20 @@
 ;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 -----------------------
 ;
 ; This setting is available in the [general] section as well as in device configurations.
 ; Setting this to yes, enables T.38 fax (UDPTL) passthrough on SIP to SIP calls, provided
-; both parties have T38 support enabled in their Asterisk configuration (either general or
-; peer/user/friend sections)
+; both parties have T38 support enabled in their Asterisk configuration 
+; This has to be enabled in the general section for all devices to work. You can then
+; disable it on a per device basis. 
 ;
 ; t38pt_udptl = yes            ; Default false
 ;
@@ -481,8 +498,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
 
 ;------------------------------------------------------------------------------
 ; Definitions of locally connected SIP devices

Modified: team/oej/invitestate-1.4/configure
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/configure?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/configure (original)
+++ team/oej/invitestate-1.4/configure Sat Dec  2 11:54:55 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 47327 .
+# From configure.ac Revision: 47758 .
 # 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
@@ -5568,6 +5571,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'
@@ -31677,14 +31768,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
 CURL_LIB!$CURL_LIB$ac_delim
-CURL_INCLUDE!$CURL_INCLUDE$ac_delim
-PBX_CURL!$PBX_CURL$ac_delim
-CURSES_LIB!$CURSES_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -31726,6 +31817,9 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+CURL_INCLUDE!$CURL_INCLUDE$ac_delim
+PBX_CURL!$PBX_CURL$ac_delim
+CURSES_LIB!$CURSES_LIB$ac_delim
 CURSES_INCLUDE!$CURSES_INCLUDE$ac_delim
 PBX_CURSES!$PBX_CURSES$ac_delim
 GNUTLS_LIB!$GNUTLS_LIB$ac_delim
@@ -31820,9 +31914,6 @@
 PBX_TONEZONE!$PBX_TONEZONE$ac_delim
 VORBIS_LIB!$VORBIS_LIB$ac_delim
 VORBIS_INCLUDE!$VORBIS_INCLUDE$ac_delim
-PBX_VORBIS!$PBX_VORBIS$ac_delim
-VPB_LIB!$VPB_LIB$ac_delim
-VPB_INCLUDE!$VPB_INCLUDE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -31864,6 +31955,9 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PBX_VORBIS!$PBX_VORBIS$ac_delim
+VPB_LIB!$VPB_LIB$ac_delim
+VPB_INCLUDE!$VPB_INCLUDE$ac_delim
 PBX_VPB!$PBX_VPB$ac_delim
 ZLIB_LIB!$ZLIB_LIB$ac_delim
 ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim
@@ -31903,7 +31997,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 37; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: team/oej/invitestate-1.4/configure.ac
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/configure.ac?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/configure.ac (original)
+++ team/oej/invitestate-1.4/configure.ac Sat Dec  2 11:54:55 2006
@@ -149,6 +149,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/invitestate-1.4/doc/manager.txt
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/doc/manager.txt?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/doc/manager.txt (original)
+++ team/oej/invitestate-1.4/doc/manager.txt Sat Dec  2 11:54:55 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/invitestate-1.4/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/include/asterisk/rtp.h?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/include/asterisk/rtp.h (original)
+++ team/oej/invitestate-1.4/include/asterisk/rtp.h Sat Dec  2 11:54:55 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);
@@ -216,6 +219,21 @@
 
 int ast_rtp_codec_getformat(int pt);
 
+/*! \brief Set rtp timeout */
+void ast_rtp_set_rtptimeout(struct ast_rtp *rtp, int timeout);
+/*! \brief Set rtp hold timeout */
+void ast_rtp_set_rtpholdtimeout(struct ast_rtp *rtp, int timeout);
+/*! \brief set RTP keepalive interval */
+void ast_rtp_set_rtpkeepalive(struct ast_rtp *rtp, int period);
+/*! \brief Get RTP keepalive interval */
+int ast_rtp_get_rtpkeepalive(struct ast_rtp *rtp);
+/*! \brief Get rtp hold timeout */
+int ast_rtp_get_rtpholdtimeout(struct ast_rtp *rtp);
+/*! \brief Get rtp timeout */
+int ast_rtp_get_rtptimeout(struct ast_rtp *rtp);
+/* \brief Put RTP timeout timers on hold during another transaction, like T.38 */
+void ast_rtp_set_rtptimers_onhold(struct ast_rtp *rtp);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: team/oej/invitestate-1.4/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/include/asterisk/utils.h?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/include/asterisk/utils.h (original)
+++ team/oej/invitestate-1.4/include/asterisk/utils.h Sat Dec  2 11:54:55 2006
@@ -218,6 +218,16 @@
 
 int test_for_thread_safety(void);
 
+/*!
+ * \brief thread-safe replacement for inet_ntoa().
+ *
+ * \note It is very important to note that even though this is a thread-safe
+ *       replacement for inet_ntoa(), it is *not* reentrant.  In a single
+ *       thread, the result from a previous call to this function is no longer
+ *       valid once it is called again.  If the result from multiple calls to
+ *       this function need to be kept or used at once, then the result must be
+ *       copied to a local buffer before calling this function again.
+ */
 const char *ast_inet_ntoa(struct in_addr ia);
 
 #ifdef inet_ntoa

Modified: team/oej/invitestate-1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/main/cdr.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/main/cdr.c (original)
+++ team/oej/invitestate-1.4/main/cdr.c Sat Dec  2 11:54:55 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/invitestate-1.4/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/main/cli.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/main/cli.c (original)
+++ team/oej/invitestate-1.4/main/cli.c Sat Dec  2 11:54:55 2006
@@ -1431,7 +1431,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", fulle);
 		goto done;
 	}

Modified: team/oej/invitestate-1.4/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/main/rtp.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/main/rtp.c (original)
+++ team/oej/invitestate-1.4/main/rtp.c Sat Dec  2 11:54:55 2006
@@ -128,6 +128,11 @@
 	double rxtransit;               /*!< Relative transit time for previous packet */
 	int lasttxformat;
 	int lastrxformat;
+
+	int rtptimeout;			/*!< RTP timeout time (negative or zero means disabled, negative value means temporarily disabled) */
+	int rtpholdtimeout;		/*!< RTP timeout when on hold (negative or zero means disabled, negative value means temporarily disabled). */
+	int rtpkeepalive;		/*!< Send RTP comfort noice packets for keepalive */
+
 	/* DTMF Reception Variables */
 	char resp;
 	unsigned int lasteventendseqn;
@@ -183,6 +188,7 @@
 #define FLAG_P2P_NEED_DTMF              (1 << 5)
 #define FLAG_CALLBACK_MODE              (1 << 6)
 #define FLAG_DTMF_COMPENSATE            (1 << 7)
+#define FLAG_HAS_STUN                   (1 << 8)
 
 /*!
  * \brief Structure defining an RTCP session.
@@ -520,6 +526,53 @@
 	return interval;
 }
 
+/* \brief Put RTP timeout timers on hold during another transaction, like T.38 */
+void ast_rtp_set_rtptimers_onhold(struct ast_rtp *rtp)
+{
+	rtp->rtptimeout = (-1) * rtp->rtptimeout;
+	rtp->rtpholdtimeout = (-1) * rtp->rtpholdtimeout;
+}
+
+/*! \brief Set rtp timeout */
+void ast_rtp_set_rtptimeout(struct ast_rtp *rtp, int timeout)
+{
+	rtp->rtptimeout = timeout;
+}
+
+/*! \brief Set rtp hold timeout */
+void ast_rtp_set_rtpholdtimeout(struct ast_rtp *rtp, int timeout)
+{
+	rtp->rtpholdtimeout = timeout;
+}
+
+/*! \brief set RTP keepalive interval */
+void ast_rtp_set_rtpkeepalive(struct ast_rtp *rtp, int period)
+{
+	rtp->rtpkeepalive = period;
+}
+
+/*! \brief Get rtp timeout */
+int ast_rtp_get_rtptimeout(struct ast_rtp *rtp)
+{
+	if (rtp->rtptimeout < 0)	/* We're not checking, but remembering the setting (during T.38 transmission) */
+		return 0;
+	return rtp->rtptimeout;
+}
+
+/*! \brief Get rtp hold timeout */
+int ast_rtp_get_rtpholdtimeout(struct ast_rtp *rtp)
+{
+	if (rtp->rtptimeout < 0)	/* We're not checking, but remembering the setting (during T.38 transmission) */
+		return 0;
+	return rtp->rtpholdtimeout;
+}
+
+/*! \brief Get RTP keepalive interval */
+int ast_rtp_get_rtpkeepalive(struct ast_rtp *rtp)
+{
+	return rtp->rtpkeepalive;
+}
+
 void ast_rtp_set_data(struct ast_rtp *rtp, void *data)
 {
 	rtp->data = data;
@@ -543,6 +596,11 @@
 void ast_rtp_setdtmfcompensate(struct ast_rtp *rtp, int compensate)
 {
 	ast_set2_flag(rtp, compensate ? 1 : 0, FLAG_DTMF_COMPENSATE);
+}
+
+void ast_rtp_setstun(struct ast_rtp *rtp, int stun_enable)
+{
+	ast_set2_flag(rtp, stun_enable ? 1 : 0, FLAG_HAS_STUN);
 }
 
 static struct ast_frame *send_dtmf(struct ast_rtp *rtp, enum ast_frame_type type)
@@ -2843,8 +2901,8 @@
 /*! \brief Helper function to switch a channel and RTP stream into callback mode */
 static int p2p_callback_enable(struct ast_channel *chan, struct ast_rtp *rtp, int *fds, int **iod)
 {
-	/* If we need DTMF or we have no IO structure, then we can't do direct callback */
-	if (ast_test_flag(rtp, FLAG_P2P_NEED_DTMF) || !rtp->io)
+	/* If we need DTMF, are looking for STUN, or we have no IO structure then we can't do direct callback */
+	if (ast_test_flag(rtp, FLAG_P2P_NEED_DTMF) || ast_test_flag(rtp, FLAG_HAS_STUN) || !rtp->io)
 		return 0;
 
 	/* If the RTP structure is already in callback mode, remove it temporarily */

Modified: team/oej/invitestate-1.4/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/makeopts.in?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/makeopts.in (original)
+++ team/oej/invitestate-1.4/makeopts.in Sat Dec  2 11:54:55 2006
@@ -19,6 +19,9 @@
 QTMOC=@QTMOC@
 DOT=@DOT@
 STRIP=@STRIP@
+WGET=@WGET@
+FETCH=@FETCH@
+DOWNLOAD=@DOWNLOAD@
 
 BUILD_PLATFORM=@BUILD_PLATFORM@
 BUILD_CPU=@BUILD_CPU@

Modified: team/oej/invitestate-1.4/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/res/res_features.c?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/res/res_features.c (original)
+++ team/oej/invitestate-1.4/res/res_features.c Sat Dec  2 11:54:55 2006
@@ -1818,12 +1818,6 @@
 			ast_verbose(VERBOSE_PREFIX_3 "Channel %s connected to parked call %d\n", chan->name, park);
 
 		memset(&config, 0, sizeof(struct ast_bridge_config));
-		ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
-		ast_set_flag(&(config.features_caller), AST_FEATURE_REDIRECT);
-		config.timelimit = 0;
-		config.play_warning = 0;
-		config.warning_freq = 0;
-		config.warning_sound=NULL;
 		res = ast_bridge_call(chan, peer, &config);
 
 		/* Simulate the PBX hanging up */

Modified: team/oej/invitestate-1.4/sounds/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/sounds/Makefile?view=diff&rev=48209&r1=48208&r2=48209
==============================================================================
--- team/oej/invitestate-1.4/sounds/Makefile (original)
+++ team/oej/invitestate-1.4/sounds/Makefile Sat Dec  2 11:54:55 2006
@@ -11,9 +11,9 @@
 # the GNU General Public License
 #
 
-.PHONY: dist-clean all uninstall
+.PHONY: dist-clean all uninstall have_download install
 
--include $(ASTTOPDIR)/menuselect.makeopts
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/makeopts
 
 PWD:=$(shell pwd)
 SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
@@ -56,69 +56,85 @@
 
 all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
 
-$(SOUNDS_DIR)/.asterisk-core-sounds-en-%:
+have_download:
+	@if test "$(DOWNLOAD)" = ":" ; then \
+		echo "**************************************************"; \
+		echo "***                                            ***"; \
+		echo "*** You must have either wget or fetch to be   ***"; \
+		echo "*** able to automatically download and install ***"; \
+		echo "*** the requested sound packages.              ***"; \

[... 95 lines stripped ...]


More information about the asterisk-commits mailing list