diff options
author | Christian Richter <christian.richter@beronet.com> | 2006-04-05 15:54:15 +0000 |
---|---|---|
committer | Christian Richter <christian.richter@beronet.com> | 2006-04-05 15:54:15 +0000 |
commit | 70289466051e9b49652b9dc95ffed7238cbdb3d2 (patch) | |
tree | 3921b2317e47b84c2380953c34d58e922b2c4f41 /channels/chan_misdn.c | |
parent | ce8fc47ffcc00b0d542e9442c167666703497322 (diff) |
some final fixes for cpn
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r-- | channels/chan_misdn.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 9987cbd3d..c91fe1818 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -1416,6 +1416,27 @@ static int read_config(struct chan_list *ch, int orig) { } 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 ) { |