[asterisk-commits] oej: branch oej/earlyrtpfix r47922 - in /team/oej/earlyrtpfix: ./ apps/ chann...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 22 04:08:08 MST 2006


Author: oej
Date: Wed Nov 22 05:08:08 2006
New Revision: 47922

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

Modified:
    team/oej/earlyrtpfix/   (props changed)
    team/oej/earlyrtpfix/.cleancount
    team/oej/earlyrtpfix/apps/app_dial.c
    team/oej/earlyrtpfix/apps/app_directed_pickup.c
    team/oej/earlyrtpfix/apps/app_voicemail.c
    team/oej/earlyrtpfix/channels/chan_sip.c
    team/oej/earlyrtpfix/include/asterisk/channel.h
    team/oej/earlyrtpfix/main/frame.c
    team/oej/earlyrtpfix/main/rtp.c

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

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

Propchange: team/oej/earlyrtpfix/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov 22 05:08:08 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-47847
+/branches/1.4:1-47921

Modified: team/oej/earlyrtpfix/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/.cleancount?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/.cleancount (original)
+++ team/oej/earlyrtpfix/.cleancount Wed Nov 22 05:08:08 2006
@@ -1,1 +1,1 @@
-25
+26

Modified: team/oej/earlyrtpfix/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/apps/app_dial.c?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/apps/app_dial.c (original)
+++ team/oej/earlyrtpfix/apps/app_dial.c Wed Nov 22 05:08:08 2006
@@ -456,7 +456,7 @@
 						       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 						       OPT_CALLEE_PARK | OPT_CALLER_PARK |
 						       DIAL_NOFORWARDHTML);
-					ast_copy_string(c->context, "", sizeof(c->context));
+					ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
 					ast_copy_string(c->exten, "", sizeof(c->exten));
 				}
 				continue;
@@ -577,7 +577,7 @@
 							       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 							       OPT_CALLEE_PARK | OPT_CALLER_PARK |
 							       DIAL_NOFORWARDHTML);
-						ast_copy_string(c->context, "", sizeof(c->context));
+						ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
 						ast_copy_string(c->exten, "", sizeof(c->exten));
 						/* Setup RTP early bridge if appropriate */
 						ast_rtp_early_bridge(in, peer);
@@ -1175,7 +1175,7 @@
 			ast_app_group_set_channel(tmp->chan, outbound_group);
 
 		/* Inherit context and extension */
-		ast_copy_string(tmp->chan->context, chan->context, sizeof(tmp->chan->context));
+		ast_copy_string(tmp->chan->dialcontext, chan->context, sizeof(tmp->chan->dialcontext));
 		ast_copy_string(tmp->chan->exten, chan->exten, sizeof(tmp->chan->exten));
 
 		/* Place the call, but don't wait on the answer */

Modified: team/oej/earlyrtpfix/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/apps/app_directed_pickup.c?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/apps/app_directed_pickup.c (original)
+++ team/oej/earlyrtpfix/apps/app_directed_pickup.c Wed Nov 22 05:08:08 2006
@@ -97,7 +97,7 @@
 
 	while ((target = ast_channel_walk_locked(target))) {
 		if (!strcasecmp(target->exten, exten) &&
-		    !strcasecmp(target->context, context) &&
+		    !strcasecmp(target->dialcontext, context) &&
 		    can_pickup(target)) {
 			res = pickup_do(chan, target);
 			ast_channel_unlock(target);

Modified: team/oej/earlyrtpfix/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/apps/app_voicemail.c?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/apps/app_voicemail.c (original)
+++ team/oej/earlyrtpfix/apps/app_voicemail.c Wed Nov 22 05:08:08 2006
@@ -1098,8 +1098,14 @@
 						fd = -1;
 						continue;
 					}
-					if (fd > -1)
-						fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+					if (fd > -1) {
+						if ((fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == -1) {
+							ast_log(LOG_WARNING, "Could not mmap the output file: %s (%d)\n", strerror(errno), errno);
+							SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+							ast_odbc_release_obj(obj);
+							goto yuck;
+						}
+					}
 				}
 				if (fdm) {
 					memset(fdm, 0, fdlen);

Modified: team/oej/earlyrtpfix/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/channels/chan_sip.c?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/channels/chan_sip.c (original)
+++ team/oej/earlyrtpfix/channels/chan_sip.c Wed Nov 22 05:08:08 2006
@@ -542,7 +542,7 @@
 static int allow_external_domains;	/*!< Accept calls to external SIP domains? */
 static int global_callevents;		/*!< Whether we send manager events or not */
 static int global_t1min;		/*!< T1 roundtrip time minimum */
-static int global_autoframing;          /*!< ?????????? */
+static int global_autoframing;          /*!< Turn autoframing on or off. */
 static enum transfermodes global_allowtransfer;	/*!< SIP Refer restriction scheme */
 
 /*! \brief Codecs that we support by default: */
@@ -11521,11 +11521,12 @@
 	/* RFC3261 says we must treat every 1xx response (but not 100)
 	   that we don't recognize as if it was 183.
 	*/
-	if (resp > 100 && resp < 200 && resp != 180 && resp != 183)
+	if (resp > 100 && resp < 200 && resp!=101 && resp != 180 && resp != 183)
 		resp = 183;
 
 	switch (resp) {
 	case 100:	/* Trying */
+	case 101:	/* Dialog establishment */
 		if (!ast_test_flag(req, SIP_PKT_IGNORE))
 			sip_cancel_destroy(p);
 		check_pendings(p);
@@ -12009,6 +12010,7 @@
 	} else if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
 		switch(resp) {
 		case 100:	/* 100 Trying */
+		case 101:	/* 101 Dialog establishment */
 			if (sipmethod == SIP_INVITE) 
 				handle_response_invite(p, resp, rest, req, seqno);
 			break;
@@ -12717,6 +12719,7 @@
 		respcode = atoi(code);
 		switch (respcode) {
 		case 100:	/* Trying: */
+		case 101:	/* dialog establishment */
 			/* Don't do anything yet */
 			break;
 		case 183:	/* Ringing: */

Modified: team/oej/earlyrtpfix/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/include/asterisk/channel.h?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/include/asterisk/channel.h (original)
+++ team/oej/earlyrtpfix/include/asterisk/channel.h Wed Nov 22 05:08:08 2006
@@ -382,6 +382,7 @@
 	char macrocontext[AST_MAX_CONTEXT];		/*!< Macro: Current non-macro context. See app_macro.c */
 	char macroexten[AST_MAX_EXTENSION];		/*!< Macro: Current non-macro extension. See app_macro.c */
 	int macropriority;				/*!< Macro: Current non-macro priority. See app_macro.c */
+	char dialcontext[AST_MAX_CONTEXT];              /*!< Dial: Extension context that we were called from */
 
 	struct ast_pbx *pbx;				/*!< PBX private structure for this channel */
 	int amaflags;					/*!< Set BEFORE PBX is started to determine AMA flags */

Modified: team/oej/earlyrtpfix/main/frame.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/main/frame.c?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/main/frame.c (original)
+++ team/oej/earlyrtpfix/main/frame.c Wed Nov 22 05:08:08 2006
@@ -188,6 +188,8 @@
 			/* Optimize by sending the frame we just got
 			   on the next read, thus eliminating the douple
 			   copy */
+			if (swap)
+				ast_swapcopy_samples(f->data, f->data, f->samples);
 			s->opt = f;
 			return 0;
 		} else {
@@ -198,6 +200,8 @@
 				   we were unable to optimize because there was still
 				   some cruft left over.  Lets just drop the cruft so
 				   we can move to a fully optimized path */
+				if (swap)
+					ast_swapcopy_samples(f->data, f->data, f->samples);
 				s->len = 0;
 				s->opt = f;
 				return 0;

Modified: team/oej/earlyrtpfix/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/main/rtp.c?view=diff&rev=47922&r1=47921&r2=47922
==============================================================================
--- team/oej/earlyrtpfix/main/rtp.c (original)
+++ team/oej/earlyrtpfix/main/rtp.c Wed Nov 22 05:08:08 2006
@@ -1640,7 +1640,7 @@
 			if (isAstFormat &&
 			    (code == AST_FORMAT_G726_AAL2) &&
 			    (options & AST_RTP_OPT_G726_NONSTANDARD))
-				return "AAL2-G726-32";
+				return "G726-32";
 			else
 				return mimeTypes[i].subtype;
 		}
@@ -2871,7 +2871,8 @@
 	ast_channel_lock(chan);
 	/* Remove the callback from the IO context */
 	ast_io_remove(rtp->io, iod[0]);
-	ast_io_remove(rtp->io, iod[1]);
+	if (iod[1])
+		ast_io_remove(rtp->io, iod[1]);
 	/* Restore file descriptors */
 	chan->fds[0] = fds[0];
 	chan->fds[1] = fds[1];
@@ -2888,7 +2889,7 @@
 	struct ast_frame *fr = NULL;
 	struct ast_channel *who = NULL, *other = NULL, *cs[3] = {NULL, };
 	int p0_fds[2] = {-1, -1}, p1_fds[2] = {-1, -1};
-	int *p0_iod[2] = {NULL, }, *p1_iod[2] = {NULL, };
+	int *p0_iod[2] = {NULL, NULL}, *p1_iod[2] = {NULL, NULL};
 	int p0_callback = 0, p1_callback = 0;
 	enum ast_bridge_result res = AST_BRIDGE_FAILED;
 



More information about the asterisk-commits mailing list