[asterisk-commits] rmudgett: trunk r136594 - in /trunk: ./ channels/ configs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 7 14:01:03 CDT 2008


Author: rmudgett
Date: Thu Aug  7 14:01:03 2008
New Revision: 136594

URL: http://svn.digium.com/view/asterisk?view=rev&rev=136594
Log:
Merged revisions 136241 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r136241 | rmudgett | 2008-08-06 16:18:53 -0500 (Wed, 06 Aug 2008) | 5 lines

*  The allowed_bearers setting in misdn.conf misspelled one
of its options: digital_restricted.
*  Fixed some other spelling errors and typos.


........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_misdn.c
    trunk/channels/misdn_config.c
    trunk/configs/misdn.conf.sample

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=136594&r1=136593&r2=136594
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Thu Aug  7 14:01:03 2008
@@ -90,14 +90,14 @@
 
 
 
-/*! \brief allocates the jb-structure and initialise the elements*/
+/*! \brief allocates the jb-structure and initialize the elements */
 struct misdn_jb *misdn_jb_init(int size, int upper_threshold);
 
 /*! \brief frees the data and destroys the given jitterbuffer struct */
 void misdn_jb_destroy(struct misdn_jb *jb);
 
 /*! \brief fills the jitterbuffer with len data returns < 0 if there was an
-error (bufferoverun). */
+error (buffer overrun). */
 int misdn_jb_fill(struct misdn_jb *jb, const char *data, int len);
 
 /*! \brief gets len bytes out of the jitterbuffer if available, else only the
@@ -116,7 +116,7 @@
 enum misdn_chan_state {
 	MISDN_NOTHING=0,	/*!< at beginning */
 	MISDN_WAITING4DIGS, /*!<  when waiting for infos */
-	MISDN_EXTCANTMATCH, /*!<  when asterisk couldnt match our ext */
+	MISDN_EXTCANTMATCH, /*!<  when asterisk couldn't match our ext */
 	MISDN_INCOMING_SETUP, /*!<  for incoming setups*/
 	MISDN_DIALING, /*!<  when pbx_start */
 	MISDN_PROGRESS, /*!<  we got a progress */
@@ -131,9 +131,8 @@
 	MISDN_RELEASED, /*!<  when connected */
 	MISDN_BRIDGED, /*!<  when bridged */
 	MISDN_CLEANING, /*!< when hangup from * but we were connected before */
-	MISDN_HUNGUP_FROM_MISDN, /*!< when DISCONNECT/RELEASE/REL_COMP  cam from misdn */
-	MISDN_HUNGUP_FROM_AST, /*!< when DISCONNECT/RELEASE/REL_COMP came out of */
-	/* misdn_hangup */
+	MISDN_HUNGUP_FROM_MISDN, /*!< when DISCONNECT/RELEASE/REL_COMP  came from misdn */
+	MISDN_HUNGUP_FROM_AST, /*!< when DISCONNECT/RELEASE/REL_COMP came out of misdn_hangup */
 	MISDN_HOLDED, /*!< if this chan is holded */
 	MISDN_HOLD_DISCONNECT, /*!< if this chan is holded */
   
@@ -363,11 +362,6 @@
 
 
 
-
-/*protos*/ 
-
-int chan_misdn_jb_empty ( struct misdn_bchannel *bc, char *buf, int len); 
-
 /*************** Helpers *****************/
 
 static struct chan_list * get_chan_by_ast(struct ast_channel *ast)
@@ -398,13 +392,15 @@
 	int cap;
 	int val;
 	char *name;
+	int deprecated;
 };
 
-struct allowed_bearers allowed_bearers_array[]={
+static struct allowed_bearers allowed_bearers_array[]= {
 	{INFO_CAPABILITY_SPEECH,1,"speech"},
 	{INFO_CAPABILITY_AUDIO_3_1K,2,"3_1khz"},
 	{INFO_CAPABILITY_DIGITAL_UNRESTRICTED,4,"digital_unrestricted"},
-	{INFO_CAPABILITY_DIGITAL_RESTRICTED,8,"digital_restriced"},
+	{INFO_CAPABILITY_DIGITAL_RESTRICTED,8,"digital_restricted"},
+	{INFO_CAPABILITY_DIGITAL_RESTRICTED,8,"digital_restriced", 1}, /* Allow misspelling for backwards compatibility */
 	{INFO_CAPABILITY_VIDEO,16,"video"}
 };
 
@@ -802,7 +798,7 @@
 					ast_cli(a->fd, "port number not valid! no ports available so you won't get lucky with any number here...\n");
 					break;
 				case 1:
-					ast_cli(a->fd, "port number not valid! only port 1 is availble.\n");
+					ast_cli(a->fd, "port number not valid! only port 1 is available.\n");
 					break;
 				default:
 					ast_cli(a->fd, "port number not valid! only ports 1 to %d are available.\n", max_ports);
@@ -958,7 +954,7 @@
 		e->command = "misdn port down";
 		e->usage =
 			"Usage: misdn port down <port>\n"
-			"       Try to deacivate the L1 on the given port.\n";
+			"       Try to deactivate the L1 on the given port.\n";
 		return NULL;
 	case CLI_GENERATE:
 		return NULL;
@@ -1092,7 +1088,7 @@
 static struct state_struct state_array[] = {
 	{MISDN_NOTHING,"NOTHING"}, /* at beginning */
 	{MISDN_WAITING4DIGS,"WAITING4DIGS"}, /*  when waiting for infos */
-	{MISDN_EXTCANTMATCH,"EXTCANTMATCH"}, /*  when asterisk couldnt match our ext */
+	{MISDN_EXTCANTMATCH,"EXTCANTMATCH"}, /*  when asterisk couldn't match our ext */
 	{MISDN_INCOMING_SETUP,"INCOMING SETUP"}, /*  when pbx_start */
 	{MISDN_DIALING,"DIALING"}, /*  when pbx_start */
 	{MISDN_PROGRESS,"PROGRESS"}, /*  when pbx_start */
@@ -1107,11 +1103,10 @@
 	{MISDN_RELEASED,"RELEASED"}, /*  when connected */
 	{MISDN_BRIDGED,"BRIDGED"}, /*  when bridged */
 	{MISDN_CLEANING,"CLEANING"}, /* when hangup from * but we were connected before */
-	{MISDN_HUNGUP_FROM_MISDN,"HUNGUP_FROM_MISDN"}, /* when DISCONNECT/RELEASE/REL_COMP  cam from misdn */
-	{MISDN_HOLDED,"HOLDED"}, /* when DISCONNECT/RELEASE/REL_COMP  cam from misdn */
-	{MISDN_HOLD_DISCONNECT,"HOLD_DISCONNECT"}, /* when DISCONNECT/RELEASE/REL_COMP  cam from misdn */
-	{MISDN_HUNGUP_FROM_AST,"HUNGUP_FROM_AST"} /* when DISCONNECT/RELEASE/REL_COMP came out of */
-	/* misdn_hangup */
+	{MISDN_HUNGUP_FROM_MISDN,"HUNGUP_FROM_MISDN"}, /* when DISCONNECT/RELEASE/REL_COMP  came from misdn */
+	{MISDN_HOLDED,"HOLDED"}, /* when DISCONNECT/RELEASE/REL_COMP  came from misdn */
+	{MISDN_HOLD_DISCONNECT,"HOLD_DISCONNECT"}, /* when DISCONNECT/RELEASE/REL_COMP  came from misdn */
+	{MISDN_HUNGUP_FROM_AST,"HUNGUP_FROM_AST"} /* when DISCONNECT/RELEASE/REL_COMP came out of misdn_hangup */
 };
 
 static const char *misdn_get_ch_state(struct chan_list *p) 
@@ -1754,7 +1749,7 @@
 
 static struct ast_cli_entry chan_misdn_clis[] = {
 	AST_CLI_DEFINE(handle_cli_misdn_port_block,        "Block the given port"),
-	AST_CLI_DEFINE(handle_cli_misdn_port_down,         "Try to deacivate the L1 on the given port"),
+	AST_CLI_DEFINE(handle_cli_misdn_port_down,         "Try to deactivate the L1 on the given port"),
 	AST_CLI_DEFINE(handle_cli_misdn_port_unblock,      "Unblock the given port"),
 	AST_CLI_DEFINE(handle_cli_misdn_port_up,           "Try to establish L1 on the given port"),
 	AST_CLI_DEFINE(handle_cli_misdn_reload,            "Reload internal mISDN config, read from the config file"),
@@ -2378,7 +2373,7 @@
 	chan_misdn_log(1, bc ? bc->port : 0, "* IND : Digit %c\n", digit);
 	
 	if (!bc) {
-		ast_log(LOG_WARNING, " --> !! Got Digit Event withut having bchannel Object\n");
+		ast_log(LOG_WARNING, " --> !! Got Digit Event without having bchannel Object\n");
 		return -1;
 	}
 	
@@ -2461,7 +2456,7 @@
 		chan_misdn_log(1, p->bc->port, "* IND :\tringing pid:%d\n", p->bc ? p->bc->pid : -1);
 		switch (p->state) {
 		case MISDN_ALERTING:
-			chan_misdn_log(2, p->bc->port, " --> * IND :\tringing pid:%d but I was Ringing before, so ignoreing it\n", p->bc ? p->bc->pid : -1);
+			chan_misdn_log(2, p->bc->port, " --> * IND :\tringing pid:%d but I was Ringing before, so ignoring it\n", p->bc ? p->bc->pid : -1);
 			break;
 		case MISDN_CONNECTED:
 			chan_misdn_log(2, p->bc->port, " --> * IND :\tringing pid:%d but Connected, so just send TONE_ALERTING without state changes \n", p->bc ? p->bc->pid : -1);
@@ -2667,7 +2662,7 @@
 		break;
 	case MISDN_CONNECTED:
 	case MISDN_PRECONNECTED:
-		/*  Alerting or Disconect */
+		/*  Alerting or Disconnect */
 		if (p->bc->nt) {
 			start_bc_tones(p);
 			hanguptone_indicate(p);
@@ -2903,7 +2898,7 @@
 	}
 	
 	if (ch->notxtone) {
-		chan_misdn_log(7, ch->bc->port, "misdn_write: Returning because notxone\n");
+		chan_misdn_log(7, ch->bc->port, "misdn_write: Returning because notxtone\n");
 		return 0;
 	}
 
@@ -2958,13 +2953,12 @@
 		break;
 	default:
 		if (!ch->dropped_frame_cnt)
-			chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) droping: %d frames addr:%x exten:%s cid:%s ch->state:%s bc_state:%d l3id:%x\n", frame->samples, ch->bc->addr, ast->exten, ast->cid.cid_num, misdn_get_ch_state( ch), ch->bc->bc_state, ch->bc->l3_id);
+			chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) dropping: %d frames addr:%x exten:%s cid:%s ch->state:%s bc_state:%d l3id:%x\n", frame->samples, ch->bc->addr, ast->exten, ast->cid.cid_num, misdn_get_ch_state( ch), ch->bc->bc_state, ch->bc->l3_id);
 		
 		ch->dropped_frame_cnt++;
 		if (ch->dropped_frame_cnt > 100) {
 			ch->dropped_frame_cnt = 0;
-			chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) droping: %d frames addr:%x  dropped > 100 frames!\n", frame->samples, ch->bc->addr);
-
+			chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) dropping: %d frames addr:%x  dropped > 100 frames!\n", frame->samples, ch->bc->addr);
 		}
 
 		return 0;
@@ -2972,7 +2966,7 @@
 
 	chan_misdn_log(9, ch->bc->port, "Sending :%d bytes 2 MISDN\n", frame->samples);
 	if ( !ch->bc->nojitter && misdn_cap_is_speech(ch->bc->capability) ) {
-		/* Buffered Transmit (triggert by read from isdn side)*/
+		/* Buffered Transmit (triggered by read from isdn side)*/
 		if (misdn_jb_fill(ch->jb, frame->data.ptr, frame->samples) < 0) {
 			if (ch->bc->active)
 				cb_log(0, ch->bc->port, "Misdn Jitterbuffer Overflow.\n");
@@ -3053,11 +3047,10 @@
 			if (!f) 
 				chan_misdn_log(4, ch1->bc->port, "Read Null Frame\n");
 			else
-				chan_misdn_log(4, ch1->bc->port, "Read Frame Controll class:%d\n", f->subclass);
+				chan_misdn_log(4, ch1->bc->port, "Read Frame Control class:%d\n", f->subclass);
 
 			*fo = f;
 			*rc = who;
-
 			break;
 		}
 		
@@ -3624,7 +3617,7 @@
 /** Channel Queue End **/
 
 
-int pbx_start_chan(struct chan_list *ch)
+static int pbx_start_chan(struct chan_list *ch)
 {
 	int ret = ast_pbx_start(ch->ast);	
 
@@ -3691,7 +3684,7 @@
 
 		chan_misdn_log(5, bc->port, "release_chan: bc with l3id: %x\n", bc->l3_id);
 
-		/*releaseing jitterbuffer*/
+		/*releasing jitterbuffer*/
 		if (ch->jb ) {
 			misdn_jb_destroy(ch->jb);
 			ch->jb = NULL;
@@ -3744,7 +3737,7 @@
 
 static void misdn_transfer_bc(struct chan_list *tmp_ch, struct chan_list *holded_chan)
 {
-	chan_misdn_log(4, 0, "TRANSFERING %s to %s\n", holded_chan->ast->name, tmp_ch->ast->name);
+	chan_misdn_log(4, 0, "TRANSFERRING %s to %s\n", holded_chan->ast->name, tmp_ch->ast->name);
 
 	tmp_ch->state = MISDN_HOLD_DISCONNECT;
 
@@ -4097,7 +4090,7 @@
 			chan_misdn_log(2, bc->port, " --> DTMF:%c\n", bc->dtmf);
 			ast_queue_frame(ch->ast, &fr);
 		} else {
-			chan_misdn_log(2, bc->port, " --> Ingoring DTMF:%c due to bridge flags\n", bc->dtmf);
+			chan_misdn_log(2, bc->port, " --> Ignoring DTMF:%c due to bridge flags\n", bc->dtmf);
 		}
 	}
 		break;
@@ -4343,18 +4336,28 @@
 
 		if (!strstr(ch->allowed_bearers, "all")) {
 			int i;
-			for (i = 0; i < sizeof(allowed_bearers_array) / sizeof(struct allowed_bearers); i++) {
+
+			for (i = 0; i < ARRAY_LEN(allowed_bearers_array); ++i) {
 				if (allowed_bearers_array[i].cap == bc->capability) {
-					if (!strstr(ch->allowed_bearers, allowed_bearers_array[i].name)) {
-						chan_misdn_log(0, bc->port, "Bearer Not allowed\b");
-						bc->out_cause = AST_CAUSE_INCOMPATIBLE_DESTINATION;
-
-						ch->state = MISDN_EXTCANTMATCH;
-						misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE );
-						return RESPONSE_OK;
+					if (strstr(ch->allowed_bearers, allowed_bearers_array[i].name)) {
+						/* The bearer capability is allowed */
+						if (allowed_bearers_array[i].deprecated) {
+							chan_misdn_log(0, bc->port, "%s in allowed_bearers list is deprecated\n",
+								allowed_bearers_array[i].name);
+						}
+						break;
 					}
 				}
-
+			}	/* end for */
+			if (i == ARRAY_LEN(allowed_bearers_array)) {
+				/* We did not find the bearer capability */
+				chan_misdn_log(0, bc->port, "Bearer capability not allowed: %s(%d)\n",
+					bearer2str(bc->capability), bc->capability);
+				bc->out_cause = AST_CAUSE_INCOMPATIBLE_DESTINATION;
+
+				ch->state = MISDN_EXTCANTMATCH;
+				misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE);
+				return RESPONSE_OK;
 			}
 		}
 
@@ -4464,7 +4467,7 @@
 			break;
 		}
 
-		/* If the extension does not exist and we're not TE_PTMP we wait for more digis 
+		/* If the extension does not exist and we're not TE_PTMP we wait for more digits 
 		 * without interdigit timeout.
 		 * */
 		if (!ast_exists_extension(ch->ast, ch->context, bc->dad, 1, bc->oad))  {
@@ -4833,7 +4836,7 @@
 			break;
 
 		case MISDN_CLEANING: 
-			chan_misdn_log(1,bc->port," --> in state cleaning .. so ingoring, the stack should clean it for us\n");
+			chan_misdn_log(1,bc->port," --> in state cleaning .. so ignoring, the stack should clean it for us\n");
 			break;
 
 		default:
@@ -4843,9 +4846,9 @@
 	break;
 
     
-	/***************************/
-	/** Suplementary Services **/
-	/***************************/
+	/****************************/
+	/** Supplementary Services **/
+	/****************************/
 	case EVENT_RETRIEVE:
 	{
 		struct ast_channel *hold_ast;
@@ -5127,7 +5130,7 @@
 				 "    s - send Non Inband DTMF as inband\n"
 				 "   vr - rxgain control\n"
 				 "   vt - txgain control\n"
-                                "    i - Ignore detected dtmf tones, don't signal them to asterisk, they will be transported inband.\n"
+				 "    i - Ignore detected dtmf tones, don't signal them to asterisk, they will be transported inband.\n"
 		);
 
 	
@@ -5531,7 +5534,7 @@
 /*******************************************************/
 
 
-/* allocates the jb-structure and initialise the elements*/
+/* allocates the jb-structure and initialize the elements*/
 struct misdn_jb *misdn_jb_init(int size, int upper_threshold)
 {
 	int i;
@@ -5584,7 +5587,7 @@
 }
 
 /* fills the jitterbuffer with len data returns < 0 if there was an
-   error (bufferoverflow). */
+   error (buffer overflow). */
 int misdn_jb_fill(struct misdn_jb *jb, const char *data, int len)
 {
 	int i, j, rp, wp;
@@ -5610,7 +5613,7 @@
 		jb->state_buffer = wp - rp;
 	else
 		jb->state_buffer = jb->size - rp + wp;
-	chan_misdn_log(9, 0, "misdn_jb_fill: written:%d | Bufferstatus:%d p:%p\n", len, jb->state_buffer, jb);
+	chan_misdn_log(9, 0, "misdn_jb_fill: written:%d | Buffer status:%d p:%p\n", len, jb->state_buffer, jb);
 
 	if (jb->state_full) {
 		jb->wp = wp;
@@ -5676,7 +5679,7 @@
 			jb->state_buffer = wp - rp;
 		else
 			jb->state_buffer = jb->size - rp + wp;
-		chan_misdn_log(9, 0, "misdn_jb_empty: read:%d | Bufferstatus:%d p:%p\n", len, jb->state_buffer, jb);
+		chan_misdn_log(9, 0, "misdn_jb_empty: read:%d | Buffer status:%d p:%p\n", len, jb->state_buffer, jb);
 
 		jb->rp = rp;
 	} else
@@ -5697,7 +5700,7 @@
 
 
 
-void chan_misdn_log(int level, int port, char *tmpl, ...)
+static void chan_misdn_log(int level, int port, char *tmpl, ...)
 {
 	va_list ap;
 	char buf[1024];

Modified: trunk/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn_config.c?view=diff&rev=136594&r1=136593&r2=136594
==============================================================================
--- trunk/channels/misdn_config.c (original)
+++ trunk/channels/misdn_config.c Thu Aug  7 14:01:03 2008
@@ -97,26 +97,31 @@
 	{ "name", MISDN_CFG_GROUPNAME, MISDN_CTYPE_STR, "default", NONE,
 		"Name of the portgroup." },
 	{ "allowed_bearers", MISDN_CFG_ALLOWED_BEARERS, MISDN_CTYPE_STR, "all", NONE,
-		"Here you can define which bearers should be allowed." },
+		"Here you can list which bearer capabilities should be allowed:\n"
+		"\t  all                  - allow any bearer capability\n"
+		"\t  speech               - allow speech\n"
+		"\t  3_1khz               - allow 3.1KHz audio\n"
+		"\t  digital_unrestricted - allow unrestricted digital\n"
+		"\t  digital_restricted   - allow restricted digital\n"
+		"\t  video                - allow video" },
 	{ "rxgain", MISDN_CFG_RXGAIN, MISDN_CTYPE_INT, "0", NONE,
 		"Set this between -8 and 8 to change the RX Gain." },
 	{ "txgain", MISDN_CFG_TXGAIN, MISDN_CTYPE_INT, "0", NONE,
 		"Set this between -8 and 8 to change the TX Gain." },
 	{ "te_choose_channel", MISDN_CFG_TE_CHOOSE_CHANNEL, MISDN_CTYPE_BOOL, "no", NONE,
-		"Some telcos espacially in NL seem to need this set to yes,\n"
-		"\talso in switzerland this seems to be important." },
+		"Some telcos especially in NL seem to need this set to yes,\n"
+		"\talso in Switzerland this seems to be important." },
 	{ "far_alerting", MISDN_CFG_FAR_ALERTING, MISDN_CTYPE_BOOL, "no", NONE,
 		"If we should generate ringing for chan_sip and others." },
 	{ "pmp_l1_check", MISDN_CFG_PMP_L1_CHECK, MISDN_CTYPE_BOOL, "no", NONE,
 		"This option defines, if chan_misdn should check the L1 on a PMP\n"
-		"\tbefore makeing a group call on it. The L1 may go down for PMP Ports\n"
+		"\tbefore making a group call on it. The L1 may go down for PMP Ports\n"
 		"\tso we might need this.\n"
 		"\tBut be aware! a broken or plugged off cable might be used for a group call\n"
 		"\tas well, since chan_misdn has no chance to distinguish if the L1 is down\n"
 		"\tbecause of a lost Link or because the Provider shut it down..." },
 	{ "block_on_alarm", MISDN_CFG_ALARM_BLOCK, MISDN_CTYPE_BOOL, "no", NONE ,
-	  "Block this port if we have an alarm on it."
-	  "default: yes\n" },
+	  "Block this port if we have an alarm on it." },
 	{ "hdlc", MISDN_CFG_HDLC, MISDN_CTYPE_BOOL, "no", NONE,
 		"Set this to yes, if you want to bridge a mISDN data channel to\n"
 		"\tanother channel type or to an application." },
@@ -166,7 +171,7 @@
 		"\t2 - National\n"
 		"\t4 - Subscriber\n"
 		"\n"
-		"\tThis setting is used for outgoing calls" },
+		"\tThis setting is used for outgoing calls." },
 	{ "cpndialplan", MISDN_CFG_CPNDIALPLAN, MISDN_CTYPE_INT, "0", NONE,
 		"Dialplan means Type Of Number in ISDN Terms (for outgoing calls)\n"
 		"\n"
@@ -236,9 +241,9 @@
 		"\tyou to send indications by yourself, normally the Telco sends the\n"
 		"\tindications to the remote party." },
 	{ "echocancel", MISDN_CFG_ECHOCANCEL, MISDN_CTYPE_BOOLINT, "0", 128,
-		"This enables echocancellation, with the given number of taps.\n"
-		"\tBe aware, move this setting only to outgoing portgroups!\n"
-		"\tA value of zero turns echocancellation off.\n"
+		"This enables echo cancellation with the given number of taps.\n"
+		"\tBe aware: Move this setting only to outgoing portgroups!\n"
+		"\tA value of zero turns echo cancellation off.\n"
 		"\n"
 		"\tPossible values are: 0,32,64,128,256,yes(=128),no(=0)" },
 #ifdef MISDN_1_2
@@ -271,7 +276,7 @@
 		"Do not send SETUP_ACKNOWLEDGE or PROCEEDING automatically to the calling Party.\n"
 		"Instead we directly jump into the dialplan. This might be useful for fast call\n"
 		"rejection, or for some broken switches, that need hangup causes like busy in the.\n"
-		"RELEASE_COMPLETE Message, instead of the DISCONNECT Message.\n"},
+		"RELEASE_COMPLETE Message, instead of the DISCONNECT Message."},
 	{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "4000", NONE,
 		"The jitterbuffer." },
 	{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "0", NONE,
@@ -282,7 +287,7 @@
 		"Pickupgroup." },
 	{ "max_incoming", MISDN_CFG_MAX_IN, MISDN_CTYPE_INT, "-1", NONE,
 		"Defines the maximum amount of incoming calls per port for this group.\n"
-		"\tCalls which exceed the maximum will be marked with the channel varible\n"
+		"\tCalls which exceed the maximum will be marked with the channel variable\n"
 		"\tMAX_OVERFLOW. It will contain the amount of overflowed calls" },
 	{ "max_outgoing", MISDN_CFG_MAX_OUT, MISDN_CTYPE_INT, "-1", NONE,
 		"Defines the maximum amount of outgoing calls per port for this group\n"
@@ -325,12 +330,11 @@
 		"This can be used to have bridging enabled in general and to\n"
 		"disable it for specific ports. It makes sense to disable\n"
 		"bridging on NT Port where you plan to use the HOLD/RETRIEVE\n"
-		"features with ISDN phones.\n"
-		},
+		"features with ISDN phones." },
 	{ "msns", MISDN_CFG_MSNS, MISDN_CTYPE_MSNLIST, "*", NONE,
 		"MSN's for TE ports, listen on those numbers on the above ports, and\n"
 		"\tindicate the incoming calls to Asterisk.\n"
-		"\tHere you can give a comma seperated list, or simply an '*' for any msn." },
+		"\tHere you can give a comma separated list, or simply an '*' for any msn." },
 };
 
 static const struct misdn_cfg_spec gen_spec[] = {
@@ -352,18 +356,18 @@
 	{ "stop_tone_after_first_digit", MISDN_GEN_STOP_TONE, MISDN_CTYPE_BOOL, "yes", NONE,
 		"Stops dialtone after getting first digit on NT Port." },
 	{ "append_digits2exten", MISDN_GEN_APPEND_DIGITS2EXTEN, MISDN_CTYPE_BOOL, "yes", NONE,
-		"Wether to append overlapdialed Digits to Extension or not." },
+		"Whether to append overlapdialed Digits to Extension or not." },
 	{ "dynamic_crypt", MISDN_GEN_DYNAMIC_CRYPT, MISDN_CTYPE_BOOL, "no", NONE,
-		"Wether to look out for dynamic crypting attempts." },
+		"Whether to look out for dynamic crypting attempts." },
 	{ "crypt_prefix", MISDN_GEN_CRYPT_PREFIX, MISDN_CTYPE_STR, NO_DEFAULT, NONE,
 		"What is used for crypting Protocol." },
 	{ "crypt_keys", MISDN_GEN_CRYPT_KEYS, MISDN_CTYPE_STR, NO_DEFAULT, NONE,
 		"Keys for cryption, you reference them in the dialplan\n"
 		"\tLater also in dynamic encr." },
  	{ "ntkeepcalls", MISDN_GEN_NTKEEPCALLS, MISDN_CTYPE_BOOL, "no", NONE, 
-		"avoid dropping calls if the L2 goes down. some nortel pbx\n" 
+		"avoid dropping calls if the L2 goes down. some Nortel pbx\n" 
 		"do put down the L2/L1 for some milliseconds even if there\n"
-		"are running calls. with this option you can avoid dropping them\n" },
+		"are running calls. with this option you can avoid dropping them" },
 	{ "ntdebugflags", MISDN_GEN_NTDEBUGFLAGS, MISDN_CTYPE_INT, "0", NONE,
 	  	"No description yet."},
 	{ "ntdebugfile", MISDN_GEN_NTDEBUGFILE, MISDN_CTYPE_STR, "/var/log/misdn-nt.log", NONE,
@@ -566,7 +570,7 @@
 {
 	int pos;
 
-	/* here comes a hack to replace the (not existing) "name" elemet with the "ports" element */
+	/* here comes a hack to replace the (not existing) "name" element with the "ports" element */
 	if (!strcmp(name, "ports"))
 		return MISDN_CFG_GROUPNAME;
 	if (!strcmp(name, "name"))
@@ -594,7 +598,7 @@
 		return;
 	}
 	
-	/* here comes a hack to replace the (not existing) "name" elemet with the "ports" element */
+	/* here comes a hack to replace the (not existing) "name" element with the "ports" element */
 	if (elem == MISDN_CFG_GROUPNAME) {
 		if (!snprintf(buf, bufsize, "ports"))
 			memset(buf, 0, 1);
@@ -614,7 +618,7 @@
 	int place = map[elem];
 	struct misdn_cfg_spec *spec = NULL;
 
-	/* here comes a hack to replace the (not existing) "name" elemet with the "ports" element */
+	/* here comes a hack to replace the (not existing) "name" element with the "ports" element */
 	if (elem == MISDN_CFG_GROUPNAME) {
 		ast_copy_string(buf, ports_description, bufsize);
 		if (buf_default && bufsize_default)
@@ -704,6 +708,9 @@
 	return re;
 }
 
+/*! 
+ * \brief Generate a comma separated list of all active ports
+ */
 void misdn_cfg_get_ports_string (char *ports)
 {
 	char tmp[16];
@@ -724,8 +731,10 @@
 	}
 	misdn_cfg_unlock();
 
-	if ((l = strlen(ports)))
+	if ((l = strlen(ports))) {
+		/* Strip trailing ',' */
 		ports[l-1] = 0;
+	}
 }
 
 void misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char* buf, int bufsize)

Modified: trunk/configs/misdn.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/misdn.conf.sample?view=diff&rev=136594&r1=136593&r2=136594
==============================================================================
--- trunk/configs/misdn.conf.sample (original)
+++ trunk/configs/misdn.conf.sample Thu Aug  7 14:01:03 2008
@@ -192,7 +192,16 @@
 
 
 ;
-; here you can define which bearers should be allowed
+; Here you can list which bearer capabilities should be allowed:
+;   all                  - allow any bearer capability
+;   speech               - allow speech
+;   3_1khz               - allow 3.1KHz audio
+;   digital_unrestricted - allow unrestricted digital
+;   digital_restricted   - allow restricted digital
+;   video                - allow video
+;
+; Example:
+; allowed_bearers=speech,3_1khz
 ;
 allowed_bearers=all
 
@@ -371,9 +380,9 @@
 presentation=-1
 screen=-1
 
-; this enables echocancellation, with the given number of taps
-; be aware, move this setting only to outgoing portgroups!
-; A value of zero turns echocancellation off.
+; This enables echo cancellation with the given number of taps.
+; Be aware: Move this setting only to outgoing portgroups!
+; A value of zero turns echo cancellation off.
 ;
 ; possible values are: 0,32,64,128,256,yes(=128),no(=0)
 ;




More information about the asterisk-commits mailing list