[asterisk-commits] branch crichter/0.3.0 r17593 - /team/crichter/0.3.0/channels/chan_misdn.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 5 08:53:34 MST 2006


Author: crichter
Date: Wed Apr  5 10:53:32 2006
New Revision: 17593

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

Modified:
    team/crichter/0.3.0/channels/chan_misdn.c

Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=17593&r1=17592&r2=17593&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Wed Apr  5 10:53:32 2006
@@ -1413,6 +1413,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