[asterisk-commits] rmudgett: branch group/v14_colp r148270 - in /team/group/v14_colp: ./ channel...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 10 11:47:33 CDT 2008


Author: rmudgett
Date: Fri Oct 10 11:47:33 2008
New Revision: 148270

URL: http://svn.digium.com/view/asterisk?view=rev&rev=148270
Log:
Merged from issue8824 branch
---------
r148255 | rmudgett | 2008-10-10 11:09:30 -0500 (Fri, 10 Oct 2008) | 14 lines

*  Updated CHANGES for the COLP feature and gathered the information into
one section.
*  Fixed caller id presentation getting the setting from the wrong
party id structure if misdn.conf does not force the setting.
*  Fixed initialization of display_connected.
*  Made the misdn.conf callerid setting accept the "name" <number>
format used elsewhere in the system.
*  Made the misdn.conf localdialplan and cpndialplan accept -1 to
get the setting from the asterisk channel.
*  Added display_setup parameter to misdn.conf.

Modified:
    team/group/v14_colp/CHANGES
    team/group/v14_colp/channels/chan_misdn.c
    team/group/v14_colp/channels/misdn/chan_misdn_config.h
    team/group/v14_colp/channels/misdn/isdn_lib.c
    team/group/v14_colp/channels/misdn/isdn_lib.h
    team/group/v14_colp/channels/misdn/isdn_msg_parser.c
    team/group/v14_colp/channels/misdn_config.c
    team/group/v14_colp/configs/misdn.conf.sample

Modified: team/group/v14_colp/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/CHANGES?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/CHANGES (original)
+++ team/group/v14_colp/CHANGES Fri Oct 10 11:47:33 2008
@@ -1,3 +1,40 @@
+------------------------------------------------------------------------------
+--- Functionality changes for COLP feature -----------------------------------
+------------------------------------------------------------------------------
+
+Dialplan Functions
+------------------
+ * Added new dialplan functions CONNECTEDLINE and REDIRECTING which permits
+   setting various connected line and redirecting party information.
+
+Queue changes
+-------------
+  * A new option, 'I' has been added to both app_queue and app_dial.
+    By setting this option, Asterisk will not update the caller with
+    connected line changes when they occur.
+
+mISDN channel driver (chan_misdn) changes
+----------------------------------------
+  * Added display_connected parameter to misdn.conf to put a display string
+    in the CONNECT message containing the connected name and/or number if
+    the presentation setting permits it.
+  * Added display_setup parameter to misdn.conf to put a display string
+    in the SETUP message containing the caller name and/or number if the
+    presentation setting permits it.
+  * Made misdn.conf parameters localdialplan and cpndialplan take a -1 to
+    indicate the dialplan settings are to be obtained from the asterisk
+    channel.
+  * Made misdn.conf parameter callerid accept the "name" <number> format
+    used by the rest of the system.
+
+SIP channel driver (chan_sip) changes
+-------------------------------------------
+  * The sendrpid parameter has been expanded to include the options
+    'rpid' and 'pai'. Setting sendrpid to 'rpid' will cause Remote-Party-ID
+    header to be sent (equivalent to setting sendrpid=yes) and setting 
+    sendrpid to 'pai' will cause P-Asserted-Identity header to be sent.
+
+------------------------------------------------------------------------------
 Changes since Asterisk 1.2:
 
     * over 4,000 commits since 1.2

Modified: team/group/v14_colp/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/chan_misdn.c?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/channels/chan_misdn.c (original)
+++ team/group/v14_colp/channels/chan_misdn.c Fri Oct 10 11:47:33 2008
@@ -2377,8 +2377,10 @@
 {
 	struct ast_channel *ast;
 	struct misdn_bchannel *bc;
-	int port, hdlc = 0;
-	int pres, screen;
+	int port;
+	int hdlc = 0;
+	int pres;
+	int screen;
 
 	if (!ch) {
 		ast_log(LOG_WARNING, "Cannot configure without chanlist\n");
@@ -2397,7 +2399,6 @@
 	chan_misdn_log(7, port, "update_config: Getting Config\n");
 
 	misdn_cfg_get(port, MISDN_CFG_HDLC, &hdlc, sizeof(int));
-	
 	if (hdlc) {
 		switch (bc->capability) {
 		case INFO_CAPABILITY_DIGITAL_UNRESTRICTED:
@@ -2414,12 +2415,12 @@
 	chan_misdn_log(2, port, " --> pres: %d screen: %d\n", pres, screen);
 		
 	if (pres < 0 || screen < 0) {
-		chan_misdn_log(2, port, " --> pres: %x\n", ast->cid.cid_pres);
+		chan_misdn_log(2, port, " --> pres: %x\n", ast->connected.id.number_presentation);
 			
-		bc->caller.presentation = ast_to_misdn_pres(ast->cid.cid_pres);
+		bc->caller.presentation = ast_to_misdn_pres(ast->connected.id.number_presentation);
 		chan_misdn_log(2, port, " --> PRES: %s(%d)\n", misdn_to_str_pres(bc->caller.presentation), bc->caller.presentation);
 			
-		bc->caller.screening = ast_to_misdn_screen(ast->cid.cid_pres);
+		bc->caller.screening = ast_to_misdn_screen(ast->connected.id.number_presentation);
 		chan_misdn_log(2, port, " --> SCREEN: %s(%d)\n", misdn_to_str_screen(bc->caller.screening), bc->caller.screening);
 	} else {
 		bc->caller.screening = screen;
@@ -2572,7 +2573,6 @@
 	misdn_cfg_get(port, MISDN_CFG_SENDDTMF, &bc->send_dtmf, sizeof(bc->send_dtmf));
 	
 	misdn_cfg_get(port, MISDN_CFG_ASTDTMF, &ch->ast_dsp, sizeof(int));
-
 	if (ch->ast_dsp) {
 		ch->ignore_dtmf = 1;
 	}
@@ -2589,7 +2589,6 @@
   	misdn_cfg_get(port, MISDN_CFG_FAXDETECT, faxdetect, sizeof(faxdetect));
 
 	misdn_cfg_get(port, MISDN_CFG_HDLC, &hdlc, sizeof(hdlc));
-
 	if (hdlc) {
 		switch (bc->capability) {
 		case INFO_CAPABILITY_DIGITAL_UNRESTRICTED:
@@ -2621,6 +2620,9 @@
 	misdn_cfg_get(port, MISDN_CFG_PICKUPGROUP, &pg, sizeof(pg));
 	misdn_cfg_get(port, MISDN_CFG_CALLGROUP, &cg, sizeof(cg));
 
+	misdn_cfg_get(port, MISDN_CFG_DISPLAY_CONNECTED, &bc->display_connected, sizeof(bc->display_connected));
+	misdn_cfg_get(port, MISDN_CFG_DISPLAY_SETUP, &bc->display_setup, sizeof(bc->display_setup));
+
 	chan_misdn_log(5, port, " --> * CallGrp:%s PickupGrp:%s\n", ast_print_group(buf, sizeof(buf), cg), ast_print_group(buf2, sizeof(buf2), pg));
 	ast->pickupgroup = pg;
 	ast->callgroup = cg;
@@ -2640,22 +2642,27 @@
  		}
 
 		misdn_cfg_get(port, MISDN_CFG_CALLERID, callerid, sizeof(callerid));
-		if ( ! ast_strlen_zero(callerid) ) {
-			chan_misdn_log(1, port, " --> * Setting caller id number to %s\n", callerid);
-			ast_copy_string(bc->caller.number, callerid, sizeof(bc->caller.number));
+		if (!ast_strlen_zero(callerid)) {
+			char *cid_name = NULL;
+			char *cid_num = NULL;
+
+			ast_callerid_parse(callerid, &cid_name, &cid_num);
+			if (cid_name) {
+				ast_copy_string(bc->caller.name, cid_name, sizeof(bc->caller.name));
+			} else {
+				bc->caller.name[0] = 0;
+			}
+			if (cid_num) {
+				ast_copy_string(bc->caller.number, cid_num, sizeof(bc->caller.number));
+			} else {
+				bc->caller.number[0] = 0;
+			}
+			chan_misdn_log(1, port, " --> * Setting caller to \"%s\" <%s>\n", bc->caller.name, bc->caller.number);
 		}
 
 		misdn_cfg_get(port, MISDN_CFG_DIALPLAN, &bc->dialed.number_type, sizeof(bc->dialed.number_type));
 		bc->dialed.number_plan = NUMPLAN_ISDN;
 		debug_numtype(port, bc->dialed.number_type, "TON");
-
-		misdn_cfg_get(port, MISDN_CFG_LOCALDIALPLAN, &bc->caller.number_type, sizeof(bc->caller.number_type));
-		bc->caller.number_plan = NUMPLAN_ISDN;
-		debug_numtype(port, bc->caller.number_type, "LTON");
-
-		misdn_cfg_get(port, MISDN_CFG_CPNDIALPLAN, &bc->connected.number_type, sizeof(bc->connected.number_type));
-		bc->connected.number_plan = NUMPLAN_ISDN;
-		debug_numtype(port, bc->connected.number_type, "CTON");
 
 		ch->overlap_dial = 0;
 	} else {
@@ -2669,10 +2676,6 @@
  			else
  				ch->faxdetect = 1;
  		}
-
-		misdn_cfg_get(port, MISDN_CFG_CPNDIALPLAN, &bc->connected.number_type, sizeof(bc->connected.number_type));
-		bc->connected.number_plan = NUMPLAN_ISDN;
-		debug_numtype(port, bc->connected.number_type, "CTON");
 
 		/* Add configured prefix to caller.number */
 		prefix[0] = 0;
@@ -2710,23 +2713,6 @@
 
 		if (strcmp(bc->dialed.number, ast->exten)) {
 			ast_copy_string(ast->exten, bc->dialed.number, sizeof(ast->exten));
-		}
-
-		ast_set_callerid(ast, bc->caller.number, NULL, bc->caller.number);
-
-		if (!ast_strlen_zero(bc->redirecting.from.number)) {
-			struct ast_party_redirecting redirecting;
-
-			ast_party_redirecting_set_init(&redirecting, &ast->redirecting);
-			redirecting.from.number = bc->redirecting.from.number;
-			redirecting.from.number_type =
-				misdn_to_ast_ton(bc->redirecting.from.number_type)
-				| misdn_to_ast_plan(bc->redirecting.from.number_plan);
-			redirecting.from.number_presentation =
-				misdn_to_ast_pres(bc->redirecting.from.presentation)
-				| misdn_to_ast_screen(bc->redirecting.from.screening);
-			redirecting.reason = misdn_to_ast_reason(bc->redirecting.reason);
-			ast_set_redirecting(ast, &redirecting);
 		}
 	
 		misdn_cfg_get(bc->port, MISDN_CFG_OVERLAP_DIAL, &ch->overlap_dial, sizeof(ch->overlap_dial));
@@ -2771,22 +2757,44 @@
  */
 static void misdn_update_connected_line(struct ast_channel *ast, struct misdn_bchannel *bc, int originator)
 {
+	int number_type;
+
 	if (originator == ORG_MISDN) {
 		/* ORIGINATOR MISDN (incoming call) */
+
 		ast_copy_string(bc->connected.name, S_OR(ast->connected.id.name, ""), sizeof(bc->connected.name));
 		ast_copy_string(bc->connected.number, S_OR(ast->connected.id.number, ""), sizeof(bc->connected.number));
 		bc->connected.presentation = ast_to_misdn_pres(ast->connected.id.number_presentation);
 		bc->connected.screening = ast_to_misdn_screen(ast->connected.id.number_presentation);
-		bc->connected.number_type = ast_to_misdn_ton(ast->connected.id.number_type);
-		bc->connected.number_plan = ast_to_misdn_plan(ast->connected.id.number_type);
+
+		misdn_cfg_get(bc->port, MISDN_CFG_CPNDIALPLAN, &number_type, sizeof(number_type));
+		if (number_type < 0) {
+			bc->connected.number_type = ast_to_misdn_ton(ast->connected.id.number_type);
+			bc->connected.number_plan = ast_to_misdn_plan(ast->connected.id.number_type);
+		} else {
+			/* Force us to send in CONNECT message */
+			bc->connected.number_type = number_type;
+			bc->connected.number_plan = NUMPLAN_ISDN;
+		}
+		debug_numtype(bc->port, bc->connected.number_type, "CTON");
 	} else {
 		/* ORIGINATOR Asterisk (outgoing call) */
+
 		ast_copy_string(bc->caller.name, S_OR(ast->connected.id.name, ""), sizeof(bc->caller.name));
 		ast_copy_string(bc->caller.number, S_OR(ast->connected.id.number, ""), sizeof(bc->caller.number));
 		bc->caller.presentation = ast_to_misdn_pres(ast->connected.id.number_presentation);
 		bc->caller.screening = ast_to_misdn_screen(ast->connected.id.number_presentation);
-		bc->caller.number_type = ast_to_misdn_ton(ast->connected.id.number_type);
-		bc->caller.number_plan = ast_to_misdn_plan(ast->connected.id.number_type);
+
+		misdn_cfg_get(bc->port, MISDN_CFG_LOCALDIALPLAN, &number_type, sizeof(number_type));
+		if (number_type < 0) {
+			bc->caller.number_type = ast_to_misdn_ton(ast->connected.id.number_type);
+			bc->caller.number_plan = ast_to_misdn_plan(ast->connected.id.number_type);
+		} else {
+			/* Force us to send in SETUP message */
+			bc->caller.number_type = number_type;
+			bc->caller.number_plan = NUMPLAN_ISDN;
+		}
+		debug_numtype(bc->port, bc->caller.number_type, "LTON");
 	}
 }	/* end misdn_update_connected_line() */
 
@@ -2825,6 +2833,7 @@
 	int r;
 	int exceed;
 	int bridging;
+	int number_type;
 	struct chan_list *ch;
 	struct misdn_bchannel *newbc;
 	char *opts = NULL, *ext, *tokb;
@@ -2892,11 +2901,25 @@
 	ast_copy_string(ast->exten, ext, sizeof(ast->exten));
 	ast_copy_string(newbc->dialed.number, ext, sizeof(newbc->dialed.number));
 
+	if (ast_strlen_zero(newbc->caller.name)	&& !ast_strlen_zero(ast->connected.id.name)) {
+		ast_copy_string(newbc->caller.name, ast->connected.id.name, sizeof(newbc->caller.name));
+		chan_misdn_log(3, port, " --> * set caller:\"%s\" <%s>\n", newbc->caller.name, newbc->caller.number);
+	}
 	if (ast_strlen_zero(newbc->caller.number) && !ast_strlen_zero(ast->connected.id.number)) {
 		ast_copy_string(newbc->caller.number, ast->connected.id.number, sizeof(newbc->caller.number));
-		ast_copy_string(newbc->caller.name, S_OR(ast->connected.id.name, ""), sizeof(newbc->caller.name));
 		chan_misdn_log(3, port, " --> * set caller:\"%s\" <%s>\n", newbc->caller.name, newbc->caller.number);
 	}
+
+	misdn_cfg_get(port, MISDN_CFG_LOCALDIALPLAN, &number_type, sizeof(number_type));
+	if (number_type < 0) {
+		newbc->caller.number_type = ast_to_misdn_ton(ast->connected.id.number_type);
+		newbc->caller.number_plan = ast_to_misdn_plan(ast->connected.id.number_type);
+	} else {
+		/* Force us to send in SETUP message */
+		newbc->caller.number_type = number_type;
+		newbc->caller.number_plan = NUMPLAN_ISDN;
+	}
+	debug_numtype(port, newbc->caller.number_type, "LTON");
 
 	newbc->capability = ast->transfercapability;
 	pbx_builtin_setvar_helper(ast, "TRANSFERCAPABILITY", ast_transfercapability2str(newbc->capability));
@@ -2904,10 +2927,8 @@
 		chan_misdn_log(2, port, " --> * Call with flag Digital\n");
 	}
 
-	/* update screening and presentation */ 
+	/* update caller screening and presentation */ 
 	update_config(ch);
-
-	misdn_cfg_get(port, MISDN_CFG_DISPLAY_CONNECTED, &newbc->display_connected, sizeof(newbc->display_connected));
 
 	/* fill in some ies from channel dialplan variables */
 	import_ch(ast, newbc, ch);
@@ -3007,6 +3028,12 @@
 	if (ast_strlen_zero(p->bc->connected.number)) {
 		chan_misdn_log(2,p->bc->port," --> empty connected number using dialed number\n");
 		ast_copy_string(p->bc->connected.number, p->bc->dialed.number, sizeof(p->bc->connected.number));
+
+		/*
+		 * Use the misdn_set_opt() application to set the presentation
+		 * before we answer or you can use the CONECTEDLINE() function
+		 * to set everything before using the Answer() application.
+		 */
 		p->bc->connected.presentation = p->bc->presentation;
 		p->bc->connected.screening = 0;	/* unscreened */
 		p->bc->connected.number_type = p->bc->dialed.number_type;
@@ -5000,6 +5027,7 @@
 		ch->ast->rings = 1;
 		ast_setstate(ch->ast, AST_STATE_RINGING);
 
+		/* Update asterisk channel caller information */
 		chan_misdn_log(2, bc->port, " --> TON: %s(%d)\n", misdn_to_str_ton(bc->caller.number_type), bc->caller.number_type);
 		chan_misdn_log(2, bc->port, " --> PLAN: %s(%d)\n", misdn_to_str_plan(bc->caller.number_plan), bc->caller.number_plan);
 		chan->cid.cid_ton = misdn_to_ast_ton(bc->caller.number_type)
@@ -5009,6 +5037,24 @@
 		chan_misdn_log(2, bc->port, " --> SCREEN: %s(%d)\n", misdn_to_str_screen(bc->caller.screening), bc->caller.screening);
 		chan->cid.cid_pres = misdn_to_ast_pres(bc->caller.presentation)
 			| misdn_to_ast_screen(bc->caller.screening);
+
+		ast_set_callerid(chan, bc->caller.number, NULL, bc->caller.number);
+
+		if (!ast_strlen_zero(bc->redirecting.from.number)) {
+			struct ast_party_redirecting redirecting;
+
+			/* Update asterisk channel redirecting information */
+			ast_party_redirecting_set_init(&redirecting, &chan->redirecting);
+			redirecting.from.number = bc->redirecting.from.number;
+			redirecting.from.number_type =
+				misdn_to_ast_ton(bc->redirecting.from.number_type)
+				| misdn_to_ast_plan(bc->redirecting.from.number_plan);
+			redirecting.from.number_presentation =
+				misdn_to_ast_pres(bc->redirecting.from.presentation)
+				| misdn_to_ast_screen(bc->redirecting.from.screening);
+			redirecting.reason = misdn_to_ast_reason(bc->redirecting.reason);
+			ast_set_redirecting(chan, &redirecting);
+		}
 
 		pbx_builtin_setvar_helper(chan, "TRANSFERCAPABILITY", ast_transfercapability2str(bc->capability));
 		chan->transfercapability = bc->capability;

Modified: team/group/v14_colp/channels/misdn/chan_misdn_config.h
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/misdn/chan_misdn_config.h?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/channels/misdn/chan_misdn_config.h (original)
+++ team/group/v14_colp/channels/misdn/chan_misdn_config.h Fri Oct 10 11:47:33 2008
@@ -51,6 +51,7 @@
 	MISDN_CFG_PRES,                /* int */
 	MISDN_CFG_SCREEN,              /* int */
 	MISDN_CFG_DISPLAY_CONNECTED,   /* int */
+	MISDN_CFG_DISPLAY_SETUP,       /* int */
 	MISDN_CFG_ALWAYS_IMMEDIATE,    /* int (bool) */
 	MISDN_CFG_NODIALTONE,    /* int (bool) */
 	MISDN_CFG_IMMEDIATE,           /* int (bool) */

Modified: team/group/v14_colp/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/misdn/isdn_lib.c?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/channels/misdn/isdn_lib.c (original)
+++ team/group/v14_colp/channels/misdn/isdn_lib.c Fri Oct 10 11:47:33 2008
@@ -717,6 +717,7 @@
 	bc->out_cause = AST_CAUSE_NORMAL_CLEARING;
 
 	bc->display_connected = 0;	/* none */
+	bc->display_setup = 0;	/* none */
 	
 	bc->presentation = 0;	/* allowed */
 	bc->set_presentation = 0;

Modified: team/group/v14_colp/channels/misdn/isdn_lib.h
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/misdn/isdn_lib.h?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/channels/misdn/isdn_lib.h (original)
+++ team/group/v14_colp/channels/misdn/isdn_lib.h Fri Oct 10 11:47:33 2008
@@ -503,6 +503,18 @@
 	 */
 	int display_connected;
 
+	/*!
+	 * \brief Put a display ie in the SETUP message
+	 * \details
+	 * Put a display ie in the SETUP message containing the following
+	 * information if it is available (nt port only):
+	 * 0 - Do not put the caller information in the display ie.
+	 * 1 - Put the available caller name in the display ie.
+	 * 2 - Put the available caller number in the display ie.
+	 * 3 - Put the available caller name and number in the display ie.
+	 */
+	int display_setup;
+
 	/*! \brief User set presentation restriction code
 	 * 0=Allowed, 1=Restricted, 2=Unavailable
 	 * \note It is settable by the misdn_set_opt() application.

Modified: team/group/v14_colp/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/misdn/isdn_msg_parser.c?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/channels/misdn/isdn_msg_parser.c (original)
+++ team/group/v14_colp/channels/misdn/isdn_msg_parser.c Fri Oct 10 11:47:33 2008
@@ -356,8 +356,17 @@
 	}
 	
   
+
 	if (*bc->display) {
-		enc_ie_display(&setup->DISPLAY, msg, bc->display, nt,bc);
+		enc_ie_display(&setup->DISPLAY, msg, bc->display, nt, bc);
+	} else if (nt && bc->caller.presentation == 0) {
+		char display[sizeof(bc->display)];
+
+		/* Presentation is allowed */
+		build_display_str(display, sizeof(display), bc->display_setup, bc->caller.name, bc->caller.number);
+		if (display[0]) {
+			enc_ie_display(&setup->DISPLAY, msg, display, nt, bc);
+		}
 	}
   
 	{

Modified: team/group/v14_colp/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/misdn_config.c?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/channels/misdn_config.c (original)
+++ team/group/v14_colp/channels/misdn_config.c Fri Oct 10 11:47:33 2008
@@ -137,63 +137,60 @@
 	{ "musicclass", MISDN_CFG_MUSICCLASS, MISDN_CTYPE_STR, "default", NONE,
 		"Sets the musiconhold class." },
 	{ "callerid", MISDN_CFG_CALLERID, MISDN_CTYPE_STR, "", NONE,
-		"Sets the caller ID." },
+		"Set the outgoing caller id to the value." },
 	{ "method", MISDN_CFG_METHOD, MISDN_CTYPE_STR, "standard", NONE,
 		"Sets the method to use for channel selection:\n"
 		"\t  standard    - always choose the first free channel with the lowest number\n"
 		"\t  round_robin - use the round robin algorithm to select a channel. use this\n"
 		"\t                if you want to balance your load." },
 	{ "dialplan", MISDN_CFG_DIALPLAN, MISDN_CTYPE_INT, "0", NONE,
-		"Dialplan means Type Of Number in ISDN Terms (for outgoing calls)\n"
-		"\n"
+		"Dialplan means Type Of Number in ISDN Terms\n"
 		"\tThere are different types of the dialplan:\n"
 		"\n"
-		"\tdialplan -> outgoing Number\n"
-		"\tlocaldialplan -> callerid\n"
-		"\tcpndialplan -> connected party number\n"
+		"\tdialplan -> for outgoing call's dialed number\n"
+		"\tlocaldialplan -> for outgoing call's callerid\n"
+		"\t      (if -1 is set use the value from the asterisk channel)\n"
+		"\tcpndialplan -> for incoming call's connected party number sent to caller\n"
+		"\t      (if -1 is set use the value from the asterisk channel)\n"
 		"\n"
 		"\tdialplan options:\n"
 		"\n"
 		"\t0 - unknown\n"
 		"\t1 - International\n"
 		"\t2 - National\n"
-		"\t4 - Subscriber\n"
-		"\n"
-		"\tThis setting is used for outgoing calls." },
+		"\t4 - Subscriber" },
 	{ "localdialplan", MISDN_CFG_LOCALDIALPLAN, MISDN_CTYPE_INT, "0", NONE,
-		"Dialplan means Type Of Number in ISDN Terms (for outgoing calls)\n"
-		"\n"
+		"Dialplan means Type Of Number in ISDN Terms\n"
 		"\tThere are different types of the dialplan:\n"
 		"\n"
-		"\tdialplan -> outgoing Number\n"
-		"\tlocaldialplan -> callerid\n"
-		"\tcpndialplan -> connected party number\n"
+		"\tdialplan -> for outgoing call's dialed number\n"
+		"\tlocaldialplan -> for outgoing call's callerid\n"
+		"\t      (if -1 is set use the value from the asterisk channel)\n"
+		"\tcpndialplan -> for incoming call's connected party number sent to caller\n"
+		"\t      (if -1 is set use the value from the asterisk channel)\n"
 		"\n"
 		"\tdialplan options:\n"
 		"\n"
 		"\t0 - unknown\n"
 		"\t1 - International\n"
 		"\t2 - National\n"
-		"\t4 - Subscriber\n"
-		"\n"
-		"\tThis setting is used for outgoing calls." },
+		"\t4 - Subscriber" },
 	{ "cpndialplan", MISDN_CFG_CPNDIALPLAN, MISDN_CTYPE_INT, "0", NONE,
-		"Dialplan means Type Of Number in ISDN Terms (for outgoing calls)\n"
-		"\n"
+		"Dialplan means Type Of Number in ISDN Terms\n"
 		"\tThere are different types of the dialplan:\n"
 		"\n"
-		"\tdialplan -> outgoing Number\n"
-		"\tlocaldialplan -> callerid\n"
-		"\tcpndialplan -> connected party number\n"
+		"\tdialplan -> for outgoing call's dialed number\n"
+		"\tlocaldialplan -> for outgoing call's callerid\n"
+		"\t      (if -1 is set use the value from the asterisk channel)\n"
+		"\tcpndialplan -> for incoming call's connected party number sent to caller\n"
+		"\t      (if -1 is set use the value from the asterisk channel)\n"
 		"\n"
 		"\tdialplan options:\n"
 		"\n"
 		"\t0 - unknown\n"
 		"\t1 - International\n"
 		"\t2 - National\n"
-		"\t4 - Subscriber\n"
-		"\n"
-		"\tThis setting is used for outgoing calls." },
+		"\t4 - Subscriber" },
 	{ "nationalprefix", MISDN_CFG_NATPREFIX, MISDN_CTYPE_STR, "0", NONE,
 		"Prefix for national, this is put before the\n"
 		"\toad if an according dialplan is set by the other end." },
@@ -223,7 +220,15 @@
 		"\t0 - Do not put the connected line information in the display ie.\n"
 		"\t1 - Put the available connected line name in the display ie.\n"
 		"\t2 - Put the available connected line number in the display ie.\n"
-		"\t3 - Put the available connected line name and number in the display ie.\n" },
+		"\t3 - Put the available connected line name and number in the display ie." },
+	{ "display_setup", MISDN_CFG_DISPLAY_SETUP, MISDN_CTYPE_INT, "0", NONE,
+		"Put a display ie in the SETUP message containing the following\n"
+		"\tinformation if it is available (nt port only):\n"
+		"\n"
+		"\t0 - Do not put the caller information in the display ie.\n"
+		"\t1 - Put the available caller name in the display ie.\n"
+		"\t2 - Put the available caller number in the display ie.\n"
+		"\t3 - Put the available caller name and number in the display ie." },
 	{ "always_immediate", MISDN_CFG_ALWAYS_IMMEDIATE, MISDN_CTYPE_BOOL, "no", NONE,
 		"Enable this to get into the s dialplan-extension.\n"
 		"\tThere you can use DigitTimeout if you can't or don't want to use\n"
@@ -232,7 +237,7 @@
 	{ "nodialtone", MISDN_CFG_NODIALTONE, MISDN_CTYPE_BOOL, "no", NONE,
 		"Enable this to prevent chan_misdn to generate the dialtone\n"
 		"\tThis makes only sense together with the always_immediate=yes option\n"
-		"\tto generate your own dialtone with Playtones or so."},
+		"\tto generate your own dialtone with Playtones or so." },
 	{ "immediate", MISDN_CFG_IMMEDIATE, MISDN_CTYPE_BOOL, "no", NONE,
 		"Enable this if you want callers which called exactly the base\n"
 		"\tnumber (so no extension is set) to jump into the s extension.\n"
@@ -269,17 +274,17 @@
 #endif
 #ifdef WITH_BEROEC
 	{ "bnechocancel", MISDN_CFG_BNECHOCANCEL, MISDN_CTYPE_BOOLINT, "yes", 64,
-		"echotail in ms (1-200)\n"},
+		"echotail in ms (1-200)" },
 	{ "bnec_antihowl", MISDN_CFG_BNEC_ANTIHOWL, MISDN_CTYPE_INT, "0", NONE,
-		"Use antihowl\n"},
+		"Use antihowl" },
 	{ "bnec_nlp", MISDN_CFG_BNEC_NLP, MISDN_CTYPE_BOOL, "yes", NONE,
-		"Nonlinear Processing (much faster adaption)"},
+		"Nonlinear Processing (much faster adaption)" },
 	{ "bnec_zerocoeff", MISDN_CFG_BNEC_ZEROCOEFF, MISDN_CTYPE_BOOL, "no", NONE,
-		"ZeroCoeffeciens\n"},
+		"ZeroCoeffeciens" },
 	{ "bnec_tonedisabler", MISDN_CFG_BNEC_TD, MISDN_CTYPE_BOOL, "no", NONE,
-		"Disable Tone\n"},
+		"Disable Tone" },
 	{ "bnec_adaption", MISDN_CFG_BNEC_ADAPT, MISDN_CTYPE_INT, "1", NONE,
-		"Adaption mode (0=no,1=full,2=fast)\n"},
+		"Adaption mode (0=no,1=full,2=fast)" },
 #endif
 	{ "need_more_infos", MISDN_CFG_NEED_MORE_INFOS, MISDN_CTYPE_BOOL, "0", NONE,
 		"Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING),\n"
@@ -329,7 +334,7 @@
 		"\n"
 		"\tThis option is only read at chan_misdn loading time.\n"
 		"\tYou need to unload and load chan_misdn to change the\n"
-		"\tvalue.  An asterisk restart will also do the trick.\n" },
+		"\tvalue.  An asterisk restart will also do the trick." },
 	{ "overlapdial", MISDN_CFG_OVERLAP_DIAL, MISDN_CTYPE_BOOLINT, "0", 4,
 		"Enables overlap dial for the given amount of seconds.\n"
 		"\tPossible values are positive integers or:\n"

Modified: team/group/v14_colp/configs/misdn.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/configs/misdn.conf.sample?view=diff&rev=148270&r1=148269&r2=148270
==============================================================================
--- team/group/v14_colp/configs/misdn.conf.sample (original)
+++ team/group/v14_colp/configs/misdn.conf.sample Fri Oct 10 11:47:33 2008
@@ -192,7 +192,7 @@
 
 ; Prefixes for national and international Type-Of-Number, these are
 ; put before the caller number and dialed number if a corresponding
-; dialplan is set for outgoing calls.  See the dialplan and localdialplan
+; dialplan is set for incoming calls.  See the dialplan and localdialplan
 ; options.
 ;
 ; default values: nationalprefix      : 0
@@ -286,13 +286,14 @@
 overlapdial=yes
 
 ;
-; dialplan means Type Of Number in ISDN Terms (for outgoing calls)
-;
-; there are different types of the dialplan:
-;
-; dialplan -> outgoing Number
-; localdialplan -> callerid
-; cpndialplan -> connected party number
+; dialplan means Type Of Number in ISDN Terms
+; There are different types of the dialplan:
+;
+; dialplan -> for outgoing call's dialed number
+; localdialplan -> for outgoing call's callerid
+;       (if -1 is set use the value from the asterisk channel)
+; cpndialplan -> for incoming call's connected party number sent to caller
+;       (if -1 is set use the value from the asterisk channel)
 ;
 ; dialplan options:
 ;
@@ -301,8 +302,6 @@
 ; 2 - National
 ; 4 - Subscriber
 ;
-; This setting is used for outgoing calls
-;
 ; default value: 0
 ;
 dialplan=0
@@ -368,6 +367,8 @@
 ;callgroup=1
 ;pickupgroup=1
 
+; Set the outgoing caller id to the value.
+;callerid="name" <number>
 
 ;
 ; these are the exact isdn screening and presentation indicators
@@ -389,6 +390,16 @@
 ; 3 - Put the available connected line name and number in the display ie.
 ;
 display_connected=0
+
+; Put a display ie in the SETUP message containing the following
+; information if it is available (nt port only):
+;
+; 0 - Do not put the caller information in the display ie.
+; 1 - Put the available caller name in the display ie.
+; 2 - Put the available caller number in the display ie.
+; 3 - Put the available caller name and number in the display ie.
+;
+display_setup=0
 
 ; This enables echo cancellation with the given number of taps.
 ; Be aware: Move this setting only to outgoing portgroups!
@@ -461,5 +472,5 @@
 [second_extern]
 ports=5
 context=Extern2
-callerid=15
+callerid="Asterisk" <1234>
 msns=102,144,101,104




More information about the asterisk-commits mailing list