Changeset 2385

Show
Ignore:
Timestamp:
09/07/06 21:00:31 (2 years ago)
Author:
qldrob
Message:

Ensure blacklist is on every DID

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.2/blacklist/functions.inc.php

    r2380 r2385  
    203203                case "asterisk": 
    204204                // Code from modules/core/functions.inc.php core_get_config inbound routes 
    205                     $exten = $item['extension']; 
    206                     $cidnum = $item['cidnum']; 
    207                     $channel = $item['channel']; 
    208  
    209                     $exten = (empty($exten)?"s":$exten); 
    210                     $exten = $exten.(empty($cidnum)?"":"/".$cidnum); //if a CID num is defined, add it 
    211  
    212                     if (empty($channel)) 
    213                         $context = "ext-did"; 
    214                     else 
    215                         $context = "macro-from-zaptel-{$channel}"; 
    216  
    217                     $ext->splice($context, $exten, 1, new ext_gosub('1', 's', 'app-blacklist-check')); 
     205                        $didlist = core_did_list(); 
     206                        if (is_array($didlist)) { 
     207                                foreach ($didlist as $item) { 
     208                                        $did = core_did_get($item['extension'],$item['cidnum'],$item['channel']); 
     209                                        $exten = $item['extension']; 
     210                                        $cidnum = $item['cidnum']; 
     211                                        $channel = $item['channel']; 
     212 
     213                                        $exten = (empty($exten)?"s":$exten); 
     214                                        $exten = $exten.(empty($cidnum)?"":"/".$cidnum); //if a CID num is defined, add it 
     215 
     216                                        if (empty($channel)) 
     217                                                $context = "ext-did"; 
     218                                        else 
     219                                                $context = "macro-from-zaptel-{$channel}"; 
     220 
     221                                        $ext->splice($context, $exten, 1, new ext_gosub('1', 's', 'app-blacklist-check')); 
     222                                } 
     223                        } // else no DID's defined. Not even a catchall. 
    218224                break; 
    219225        } 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads