[Added ENUM ranges listing Adrian Georgescu **20070817092239 Fixed sip trace purgaing ] hunk ./cdrlib.phtml 1781 - dprint("Reaing rates from MySQL tables ..."); + dprint("Reading rates from the MySQL tables ..."); hunk ./cdrlib.phtml 1783 - // get pricing from mysql tables loaded in memory hunk ./provisioning.phtml 42 - 'sip' => array('recordsClass' => 'SipAccounts', + 'sipAccounts' => array('recordsClass' => 'SipAccounts', hunk ./provisioning.phtml 45 - 'sipa' => array('recordsClass' => 'SipAliases', + 'sipAliases' => array('recordsClass' => 'SipAliases', hunk ./provisioning.phtml 48 - 'domains' => array('recordsClass' => 'DomainStatistics', + 'sipDomains' => array('recordsClass' => 'DomainStatistics', hunk ./provisioning.phtml 51 - 'enum' => array('recordsClass' => 'EnumMappings', + 'enumMappings' => array('recordsClass' => 'EnumMappings', hunk ./provisioning.phtml 54 - 'trusted' => array('recordsClass' => 'TrustedPeers', + 'enumRanges' => array('recordsClass' => 'EnumRanges', + 'soapClass' => 'WebService_NGNPro_EnumPort' + ), + 'trustedParties' => array('recordsClass' => 'TrustedPeers', hunk ./provisioning.phtml 60 - 'gateways' => array('recordsClass' => 'Gateways', + 'pstnGateways' => array('recordsClass' => 'Gateways', hunk ./provisioning.phtml 63 - 'gwGroups' => array('recordsClass' => 'GatewayGroups', + 'pstnGwGroups' => array('recordsClass' => 'GatewayGroups', hunk ./provisioning.phtml 66 - 'routes' => array('recordsClass' => 'Routes', + 'pstnRoutes' => array('recordsClass' => 'Routes', hunk ./provisioning.phtml 506 +class ENUMranges extends Records { + var $sortElements=array('changeDate' => 'Change date', + 'number' => 'E.164 number', + 'tld' => 'TLD', + 'owner' => 'Owner' + ); + + function ENUMranges(&$SOAPEngine) { + $this->filters = array('number' => trim($_REQUEST['number_filter']), + 'tld' => trim($_REQUEST['tld_filter']), + 'type' => trim($_REQUEST['type_filter']), + 'mapto' => trim($_REQUEST['mapto_filter']), + 'owner' => trim($_REQUEST['owner_filter']) + ); + + $this->Records(&$SOAPEngine); + } + + function listRecords() { + + $this->showSeachForm(); + + // Insert credetials + $this->SOAPEngine->soapclient->addHeader($this->SOAPEngine->SoapAuth); + + // Call function + $result = $this->SOAPEngine->soapclient->getRanges(); + + if (PEAR::isError($result)) { + $error_msg = $result->getMessage(); + $error_fault= $result->getFault(); + $error_code = $result->getCode(); + printf ("

Error: %s (%s): %s",$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + return false; + } else { + + $this->rows = $result->total; + + //print "

";
+            //print_r($result);
+
+            print "
+            

+ + +
$this->rows records found
+

+ + + + + + + + + + + + + "; + + if (!$this->next) $this->next=0; + + if ($this->rows > $this->maxrowsperpage) { + $maxrows = $this->maxrowsperpage + $this->next; + if ($maxrows > $this->rows) $maxrows = $this->maxrowsperpage; + } else { + $maxrows=$this->rows; + } + + $i=0; + + if ($this->rows) { + while ($i < $this->maxrowsperpage) { + + if (!$result->numbers[$i]) break; + + $number = $result->numbers[$i]; + + $index=$this->next+$i+1; + + $rr=floor($index/2); + $mod=$index-$rr*2; + + if ($mod ==0) { + $bgcolor="lightgrey"; + } else { + $bgcolor="white"; + } + + $j=1; + foreach ($number->mappings as $_mapping) { + if ($j==1) { + printf(" + + + + + + + + + + + + ", + $bgcolor, + $index, + $number->id->number, + $number->id->tld, + $this->tel2enum($number->id->number,$number->id->tld), + ucfirst($_mapping->type), + $_mapping->mapto, + $_mapping->ttl, + $_mapping->priority, + $number->owner, + $number->info + ); + } else { + printf(" + + + + + + + + + + + + ", + $bgcolor, + ucfirst($_mapping->type), + $_mapping->mapto, + $_mapping->ttl, + $_mapping->priority + ); + + } + $j++; + } + + printf(" + + "); + + $i++; + + } + + } + + print "
Id + E.164 prefix Top level domainDNS nameTTLMin digitsMax digitsUsedOwnerInfo
%s+%s%s%s%s%s%s%s%s%s
%s%s%s%s
"; + + $this->showPagination($maxrows); + + return true; + } + } + + function showSeachFormCustom() { + + } + +} + hunk ./provisioning.phtml 2699 + hunk ./scripts/SER/purgeSIPTrace.php 11 -$serTrace = new SER_trace("sip_trace"); +$SipTrace = new SIP_trace("sip_trace"); hunk ./scripts/SER/purgeSIPTrace.php 13 -$serTrace->purgeRecords(); +$SipTrace->purgeRecords(); hunk ./sip_statistics_lib.phtml 415 - $activity='busy'; - $note=sprintf("Sessions %d, Online %d",$sessions,$online_users); + if (!$online_users) { + $activity='busy'; + } else { + $activity='open'; + } + + $note=sprintf("%s: Sessions %d, Online %d",$key, $sessions,$online_users);