[asterisk-commits] trunk r17594 - /trunk/channels/chan_misdn.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 5 08:54:17 MST 2006


Author: crichter
Date: Wed Apr  5 10:54:15 2006
New Revision: 17594

URL: http://svn.digium.com/view/asterisk?rev=17594&view=rev
Log:
some final fixes for cpn

Modified:
    trunk/channels/chan_misdn.c

Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?rev=17594&r1=17593&r2=17594&view=diff
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Wed Apr  5 10:54:15 2006
@@ -1416,6 +1416,27 @@
 		
 		
 	} else { /** ORIGINATOR MISDN **/
+	
+		misdn_cfg_get( port, MISDN_CFG_CPNDIALPLAN, &bc->cpnnumplan, sizeof(int));
+
+		switch (bc->cpnnumplan) {
+			case NUMPLAN_INTERNATIONAL:
+				chan_misdn_log(2, port, " --> CTON: International\n");
+				break;
+			case NUMPLAN_NATIONAL:
+				chan_misdn_log(2, port, " --> CTON: National\n");
+				break;
+			case NUMPLAN_SUBSCRIBER:
+				chan_misdn_log(2, port, " --> CTON: Subscriber\n");
+				break;
+			case NUMPLAN_UNKNOWN:
+				chan_misdn_log(2, port, " --> CTON: Unknown\n");
+				break;
+				/* Maybe we should cut off the prefix if present ? */
+			default:
+				chan_misdn_log(0, port, " --> !!!! Wrong dialplan setting, please see the misdn.conf sample file\n ");
+				break;
+		}
 		
 		char prefix[BUFFERSIZE+1]="";
 		switch( bc->onumplan ) {



More information about the asterisk-commits mailing list