[Overwrite defaults from sip_settings class per NGNPro connection Adrian Georgescu **20071228110231] hunk ./debian/changelog 4 + * Overwrite defaults from sip_settings class per NGNPro connection hunk ./debian/changelog 6 - -- Adrian Georgescu Thu, 27 Dec 2007 00:13:48 +0100 + -- Adrian Georgescu Fri, 28 Dec 2007 12:01:54 +0100 hunk ./provisioning/ngnpro_client_lib.phtml 1449 + "; + if ($this->version > 1) { + print " hunk ./provisioning/ngnpro_client_lib.phtml 1453 + Customer + Domain + Change date + Action hunk ./provisioning/ngnpro_client_lib.phtml 1458 - if ($this->version > 1) { - print "Customer - Domain - Change date - Action - "; - } else { - print " - Domain - Action - "; - } + } else { + print " + Id + Domain + Action + "; + } hunk ./provisioning/ngnpro_client_lib.phtml 1563 + + $_sip_accounts_url = $this->url.sprintf("&service=sip_accounts@%s&domain_filter=%s", + urlencode($this->SOAPEngine->soapEngine), + urlencode($domain) + ); + + $_sip_aliases_url = $this->url.sprintf("&service=sip_aliases@%s&domain_filter=%s", + urlencode($this->SOAPEngine->soapEngine), + urlencode($domain) + ); + hunk ./provisioning/ngnpro_client_lib.phtml 1586 + Sip accounts + Sip aliases hunk ./provisioning/ngnpro_client_lib.phtml 1593 + $_sip_accounts_url, + $_sip_aliases_url, hunk ./provisioning/ngnpro_client_lib.phtml 6816 + 'xcap_root' => array('name' => 'XCAP Root URL', + 'category' => 'sip', + 'permission' => 'customer' + ), hunk ./provisioning/ngnpro_client_lib.phtml 6828 - 'support_organization'=> array('name' => 'Support organization', + 'support_company' => array('name' => 'Support organization', hunk ./provisioning/sip_settings_lib.phtml 24 - var $voicemail = array('AccessNumber' => '*70', - 'Server' => 'vm.example.com' - ); + // this variables can be overwritten per soap engine (in ngnpro_soap_engines.inc) + var $templatesPath = './templates'; + var $proxy = "proxy.example.com"; hunk ./provisioning/sip_settings_lib.phtml 31 - var $SIPsettingsURL = "https://cdrtool.example.com/sip_settings.phtml"; - var $xcaproot = "https://cdrtool.example.com/xcap-root/"; - - var $templatesPath = './templates'; + var $SipSettingsPage = "https://cdrtool.example.com/sip_settings.phtml"; + var $xcap_root = "https://cdrtool.example.com/xcap-root/"; + var $pstn_access = false; + var $voicemailServer = "vm.example.com"; + var $voicemailAccessNumber = "*70"; hunk ./provisioning/sip_settings_lib.phtml 38 + // end variables hunk ./provisioning/sip_settings_lib.phtml 239 - if ($this->enablePresence) { + if ($this->presenceEngine) { hunk ./provisioning/sip_settings_lib.phtml 316 + // overwrite default settings + + if (strlen($this->soapEngines[$this->soapEngine]['sip_proxy'])) { + $this->proxy = $this->soapEngines[$this->soapEngine]['sip_proxy']; + } + + if (strlen($this->soapEngines[$this->soapEngine]['support_company'])) { + $this->SupportCompany = $this->soapEngines[$this->soapEngine]['support_company']; + } + + if (strlen($this->soapEngines[$this->soapEngine]['support_web'])) { + $this->SupportWEBsite = $this->soapEngines[$this->soapEngine]['support_web']; + } + + if (strlen($this->soapEngines[$this->soapEngine]['support_email'])) { + $this->SupportEmail = $this->soapEngines[$this->soapEngine]['support_email']; + } + + if (strlen($this->soapEngines[$this->soapEngine]['sip_settings_page'])) { + $this->SipSettingsPage = $this->soapEngines[$this->soapEngine]['sip_settings_page']; + } + + if (strlen($this->soapEngines[$this->soapEngine]['xcap_root'])) { + $this->xcap_root = $this->soapEngines[$this->soapEngine]['xcap_root']; + } + + if (strlen($this->soapEngines[$this->soapEngine]['cdrtool_address'])) { + $this->SupportCDRsite = $this->soapEngines[$this->soapEngine]['cdrtool_address']; + } + + if ($this->soapEngines[$this->soapEngine]['pstn_access']) { + $this->pstn_access = $this->soapEngines[$this->soapEngine]['pstn_access']; + } + + if ($this->soapEngines[$this->soapEngine]['voicemail_server']) { + $this->voicemailServer = $this->soapEngines[$this->soapEngine]['voicemail_server']; + } + + if ($this->loginCredentials['templates_path']) { + $this->templatesPath = $this->loginCredentials['templates_path']; + } else if ($this->soapEngines[$this->soapEngine]['templates_path']) { + $this->templatesPath = $this->soapEngines[$this->soapEngine]['templates_path']; + } + hunk ./provisioning/sip_settings_lib.phtml 924 - dprint("getVoicemail()"); + dprint("getVoicemail(engine=$this->voicemailEngine)"); hunk ./provisioning/sip_settings_lib.phtml 952 - $this->voicemail['Account'] = $result->mailbox.'@'.$this->voicemail['Server']; + $this->voicemail['Account'] = $result->mailbox.'@'.$this->voicemailServer; hunk ./provisioning/sip_settings_lib.phtml 1068 - $this->CustomerPort->addHeader($this->SoapAuthCustomer); - $result = $this->CustomerPort->getAccount(intval($this->reseller)); - - if (PEAR::isError($result)) { - $error_msg = $result->getMessage(); - $error_fault= $result->getFault(); - $error_code = $result->getCode(); - printf ("

Error (CustomerPort): %s (%s): %s",$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); - return false; - } - - foreach ($result->properties as $_property) { - $this->resellerProperties[$_property->name]=$_property->value; - } - - $this->resellerProperties['language'] = $result->language; - $this->resellerProperties['timezone'] = $result->timezone; - - //dprint_r($this->resellerProperties); - - $this->proxy = $this->resellerProperties['sip_proxy_server']; - $this->SupportCompany = $this->resellerProperties['support_organization']; - $this->SupportWEBsite = $this->resellerProperties['support_web']; - $this->SupportEmail = $this->resellerProperties['support_email']; - hunk ./provisioning/sip_settings_lib.phtml 1073 - if ($this->resellerProperties['pstn_access']) { + $this->SIPACLS['blocked'] =array("Group"=>"blocked", + "WEBName" =>sprintf(_("Account blocked")), + "SubscriberMayEditIt"=>"0", + "SubscriberMaySeeIt"=>0 + ); + + if ($this->pstn_access) { hunk ./provisioning/sip_settings_lib.phtml 1088 - $this->SIPACLS['blocked'] =array("Group"=>"blocked", - "WEBName" =>sprintf(_("Account blocked")), - "SubscriberMayEditIt"=>"0", - "SubscriberMaySeeIt"=>0 - ); - hunk ./provisioning/sip_settings_lib.phtml 1114 + if (!$this->reseller) { + return true; + } + + $this->CustomerPort->addHeader($this->SoapAuthCustomer); + $result = $this->CustomerPort->getAccount(intval($this->reseller)); + + if (PEAR::isError($result)) { + $error_msg = $result->getMessage(); + $error_fault= $result->getFault(); + $error_code = $result->getCode(); + printf ("

Error (CustomerPort): %s (%s): %s",$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + return false; + } + + foreach ($result->properties as $_property) { + $this->resellerProperties[$_property->name]=$_property->value; + } + + $this->resellerProperties['language'] = $result->language; + $this->resellerProperties['timezone'] = $result->timezone; + + //dprint_r($this->resellerProperties); + + // overwrite settings from soap engine + if ($this->resellerProperties['sip_proxy']) { + $this->proxy = $this->resellerProperties['sip_proxy']; + } + + if ($this->resellerProperties['support_company']) { + $this->SupportCompany = $this->resellerProperties['support_company']; + } + + if ($this->resellerProperties['support_web']) { + $this->SupportWEBsite = $this->resellerProperties['support_web']; + } + + if ($this->resellerProperties['support_email']) { + $this->SupportEmail = $this->resellerProperties['support_email']; + } + + if ($this->resellerProperties['sip_settings_page']) { + $this->sip_settings_page = $this->resellerProperties['sip_settings_page']; + } + + if ($this->resellerProperties['xcap_root']) { + $this->xcap_root = $this->resellerProperties['xcap_root']; + } + + if ($this->resellerProperties['cdrtool_address']) { + $this->SupportCDRsite = $this->resellerProperties['cdrtool_address']; + } + + if ($this->resellerProperties['pstn_access']) { + $this->pstn_access = $this->resellerProperties['pstn_access']; + } + + if ($this->pstn_access) { + $this->SIPACLS['free-pstn'] =array("Group"=>"free-pstn", + "WEBName" => sprintf(_("Access to PSTN")), + "WEBComment"=> sprintf(_("Caller-ID")), + "SubscriberMayEditIt"=>"0", + "SubscriberMaySeeIt"=>1 + ); + } + hunk ./provisioning/sip_settings_lib.phtml 1384 - if ($this->enablePresence) { + if ($this->presenceEngine) { hunk ./provisioning/sip_settings_lib.phtml 1398 - $this->xcaproot + $this->xcap_root hunk ./provisioning/sip_settings_lib.phtml 1954 - if ($this->voicemail['AccessNumber']) { + + if ($this->voicemailAccessNumber) { hunk ./provisioning/sip_settings_lib.phtml 1959 - printf(_("Dial %s to listen to your messages or change preferences. "),$this->voicemail['AccessNumber']); + printf(_("Dial %s to listen to your messages or change preferences. "),$this->voicemailAccessNumber); hunk ./provisioning/sip_settings_lib.phtml 4859 - dprint_r($this->acceptRules['groups']); + //dprint_r($this->acceptRules['groups']); hunk ./provisioning/sip_settings_lib.phtml 5103 - $this->voicemailAccessNumber=$this->voicemail['AccessNumber']; hunk ./provisioning/sip_settings_lib.phtml 5590 - //dprint("$name not found"); + dprint("File $this->templatesPath/default/$name not found"); hunk ./setup/ngnpro_engines.inc.sample 2 -// Connections to NGN-Pro +// Connections to NGNPro servers hunk ./setup/ngnpro_engines.inc.sample 5 - 'se' => array('name'=> 'SOAP Engine', - 'username'=> 'username', - 'password'=> 'password', - 'url' => 'http://sip.example.com:9200/', - 'voicemailEngine' => 've', - 'presenceEngine' => 'pe', - 'recordGenerator' => 'rg' + 'eng1' => array('name' => 'SOAP Engine', + 'username' => 'username', + 'password' => 'password', + 'url' => 'http://sip.example.com:9200/', + 'voicemailEngine' => 'eng1_vm', + 'presenceEngine' => 'eng1_ssp', + 'recordGenerator' => 'rg1', + 'sip_proxy' => 'proxy.example.com', + 'support_company' => 'Support Company B.V.', + 'support_web' => 'http://www.example.com', + 'support_email' => 'support@example.com', + 'sip_settings_page' => 'http://cdr.example.com/sip_settings.phtml', + 'cdrtool_address' => 'http://cdr.example.com/CDRTool/', + 'xcap_root' => 'http://cdr.example.com/xcap-root/', + 'voicemail_server' => 'vm.example.com', + 'pstn_access' => true, + 'templates_path' => './templates' hunk ./setup/ngnpro_engines.inc.sample 23 - 'pe' => array('name'=> 'Simple Soap Proxy', + 'eng1_ssp' => array('name'=> 'Simple Soap Proxy', hunk ./setup/ngnpro_engines.inc.sample 27 - 've' => array('name'=> 'Voicemail', + 'eng1_vm' => array('name'=> 'Voicemail', hunk ./setup/ngnpro_engines.inc.sample 34 + hunk ./setup/ngnpro_engines.inc.sample 38 - 'rg'=>array( - 'sipEngine' => 'se', - 'enumEngine'=> 'se' + 'rg1'=>array( + 'sipEngine' => 'eng1', + 'enumEngine'=> 'eng1' hunk ./setup/ngnpro_engines.inc.sample 44 -$resellerFilters=array('default' => array('soapFilter' => 'se' +$resellerFilters=array('default' => array('soapFilter' => 'eng1' hunk ./setup/ngnpro_engines.inc.sample 46 - '1000' => array('soapFilter' => 'se:sip_accounts', - 'recordGenerator' => 'rg', - 'soapEngine' => 'node03' + '1000' => array('soapFilter' => 'eng1:sip_accounts', + 'recordGenerator' => 'rg1', + 'soapEngine' => 'eng2'