[asterisk-commits] rmudgett: branch group/issue14068 r209758 - /team/group/issue14068/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 31 18:41:55 CDT 2009


Author: rmudgett
Date: Fri Jul 31 18:41:52 2009
New Revision: 209758

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=209758
Log:
Found some missing items from the sig_pri merge.

Modified:
    team/group/issue14068/channels/sig_pri.c

Modified: team/group/issue14068/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/channels/sig_pri.c?view=diff&rev=209758&r1=209757&r2=209758
==============================================================================
--- team/group/issue14068/channels/sig_pri.c (original)
+++ team/group/issue14068/channels/sig_pri.c Fri Jul 31 18:41:52 2009
@@ -2318,14 +2318,12 @@
 
 	l = NULL;
 	n = NULL;
-
 	if (!p->hidecallerid) {
 		l = ast->connected.id.number;
 		if (!p->hidecalleridname) {
 			n = ast->connected.id.name;
 		}
 	}
-
 
 	if (strlen(c) < p->stripmsd) {
 		ast_log(LOG_WARNING, "Number '%s' is shorter than stripmsd (%d)\n", c, p->stripmsd);
@@ -2366,22 +2364,22 @@
 
 	ast_verb(3, "Requested transfer capability: 0x%.2x - %s\n", ast->transfercapability, ast_transfercapability2str(ast->transfercapability));
 	dp_strip = 0;
- 	pridialplan = p->pri->dialplan - 1;
- 	if (pridialplan == -2 || pridialplan == -3) { /* compute dynamically */
- 		if (strncmp(c + p->stripmsd, p->pri->internationalprefix, strlen(p->pri->internationalprefix)) == 0) {
+	pridialplan = p->pri->dialplan - 1;
+	if (pridialplan == -2 || pridialplan == -3) { /* compute dynamically */
+		if (strncmp(c + p->stripmsd, p->pri->internationalprefix, strlen(p->pri->internationalprefix)) == 0) {
 			if (pridialplan == -2) {
- 				dp_strip = strlen(p->pri->internationalprefix);
-			}
- 			pridialplan = PRI_INTERNATIONAL_ISDN;
- 		} else if (strncmp(c + p->stripmsd, p->pri->nationalprefix, strlen(p->pri->nationalprefix)) == 0) {
+				dp_strip = strlen(p->pri->internationalprefix);
+			}
+			pridialplan = PRI_INTERNATIONAL_ISDN;
+		} else if (strncmp(c + p->stripmsd, p->pri->nationalprefix, strlen(p->pri->nationalprefix)) == 0) {
 			if (pridialplan == -2) {
- 				dp_strip = strlen(p->pri->nationalprefix);
-			}
- 			pridialplan = PRI_NATIONAL_ISDN;
- 		} else {
+				dp_strip = strlen(p->pri->nationalprefix);
+			}
+			pridialplan = PRI_NATIONAL_ISDN;
+		} else {
 			pridialplan = PRI_LOCAL_ISDN;
- 		}
- 	}
+		}
+	}
 	while (c[p->stripmsd] > '9' && c[p->stripmsd] != '*' && c[p->stripmsd] != '#') {
 		switch (c[p->stripmsd]) {
 		case 'U':
@@ -2440,7 +2438,7 @@
 		}
 		c++;
 	}
- 	pri_sr_set_called(sr, c + p->stripmsd + dp_strip, pridialplan, s ? 1 : 0);
+	pri_sr_set_called(sr, c + p->stripmsd + dp_strip, pridialplan, s ? 1 : 0);
 
 	ldp_strip = 0;
 	prilocaldialplan = p->pri->localdialplan - 1;
@@ -2516,8 +2514,8 @@
 		}
 	}
 	pri_sr_set_caller(sr, l ? (l + ldp_strip) : NULL, n, prilocaldialplan,
-		p->use_callingpres ? ast->cid.cid_pres : (l ? PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN : PRES_NUMBER_NOT_AVAILABLE));
-    sig_pri_redirecting_update(p, ast);
+		p->use_callingpres ? ast->connected.id.number_presentation : (l ? PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN : PRES_NUMBER_NOT_AVAILABLE));
+	sig_pri_redirecting_update(p, ast);
 
 #ifdef SUPPORT_USERUSER
 	/* User-user info */
@@ -2603,12 +2601,16 @@
 		res = 0;
 		break;
 	case AST_CONTROL_PROGRESS:
-		ast_log(LOG_DEBUG,"Received AST_CONTROL_PROGRESS on %s\n",chan->name);
+		ast_debug(1,"Received AST_CONTROL_PROGRESS on %s\n",chan->name);
 		p->digital = 0;	/* Digital-only calls isn't allowing any inband progress messages */
 		if (!p->progress && p->pri && !p->outgoing) {
 			if (p->pri->pri) {		
 				if (!pri_grab(p, p->pri)) {
+#ifdef HAVE_PRI_PROG_W_CAUSE
+					pri_progress_with_cause(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1, -1);  /* no cause at all */
+#else
 					pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
+#endif
 					pri_rel(p->pri);
 				} else {
 					ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->pri->span);




More information about the asterisk-commits mailing list