diff --git a/build/MagnusBilling-current.tar.gz b/build/MagnusBilling-current.tar.gz index 6c7ce58fc..3d0a1d212 100644 Binary files a/build/MagnusBilling-current.tar.gz and b/build/MagnusBilling-current.tar.gz differ diff --git a/classic/src/Application.js b/classic/src/Application.js index 64f2969e4..6b0d47efd 100755 --- a/classic/src/Application.js +++ b/classic/src/Application.js @@ -9,7 +9,7 @@ Ext.define('MBilling.Application', { name: 'MBilling', titleNotification: t('Notification'), msgSessionExpired: t('Your session has expired. Log in again.'), - views: ['userHistory.Controller', 'userHistory.Module', 'userHistory.List', 'userHistory.Form', 'main.MainController', 'main.Login', 'main.ForgetPassword', 'main.GoogleAuthenticator', 'main.Main', 'main.Desktop', 'main.Help', 'main.Settings', 'main.About', 'main.ChangePassword', 'main.ImportLogo', 'main.ImportLoginBackground', 'main.SetUserData', 'groupModule.Controller', 'groupModule.Module', 'groupModule.List', 'groupModule.Form', 'groupModule.Field', 'groupUser.Controller', 'groupUser.Module', 'groupUser.List', 'groupUser.Form', 'groupUser.Combo', 'groupUser.Tag', 'module.Controller', 'module.Module', 'module.List', 'module.Form', 'module.Combo', 'module.Tag', 'user.Controller', 'user.Combo', 'user.Module', 'user.List', 'user.Form', 'user.Lookup', 'user.Bulk', 'configuration.Controller', 'configuration.Module', 'configuration.List', 'configuration.Form', 'general.BooleanCombo', 'general.GroupCombo', 'general.LcrtypeCombo', 'general.OfferTypeCombo', 'general.SipCombo', 'general.TypePaymentCombo', 'templateMail.Controller', 'templateMail.Module', 'templateMail.List', 'templateMail.Form', 'logUsers.Controller', 'logUsers.Module', 'logUsers.List', 'logUsers.Form', 'provider.Controller', 'provider.Combo', 'provider.Module', 'provider.List', 'provider.Form', 'provider.Lookup', 'providerCNL.Controller', 'providerCNL.Module', 'providerCNL.List', 'providerCNL.Form', 'providerCNL.ImportCsv', 'plan.Controller', 'plan.Combo', 'plan.Module', 'plan.List', 'plan.Form', 'plan.Tag', 'plan.Lookup', 'trunk.Controller', 'trunk.Combo', 'trunk.Module', 'trunk.List', 'trunk.Form', 'trunk.Lookup', 'trunk.Tag', 'trunkGroup.Controller', 'trunkGroup.Module', 'trunkGroup.List', 'trunkGroup.Form', 'trunkGroup.Lookup', 'trunkGroup.Combo', 'prefix.Controller', 'prefix.Combo', 'prefix.Module', 'prefix.List', 'prefix.Form', 'trunkSipCodes.Controller', 'trunkSipCodes.Module', 'trunkSipCodes.List', 'trunkSipCodes.Form', 'sendCreditProducts.Controller', 'sendCreditProducts.Module', 'sendCreditProducts.List', 'sendCreditProducts.Form', 'sendCreditRates.Controller', 'sendCreditRates.Module', 'sendCreditRates.List', 'sendCreditRates.Form', 'prefix.Lookup', 'sipTrace.Controller', 'sipTrace.Module', 'sipTrace.List', 'sipTrace.Form', 'rateProvider.Controller', 'rateProvider.Module', 'rateProvider.List', 'rateProvider.Form', 'rateProvider.ImportCsv', 'api.Controller', 'api.Module', 'api.List', 'api.Form', 'sip.Controller', 'sip.Module', 'sip.List', 'sip.Form', 'sip.Lookup', 'sip.Bulk', 'sip2.Controller', 'sip2.Module', 'sip2.List', 'sip2.Form', 'sip2.Lookup', 'sipuras.Controller', 'sipuras.Module', 'sipuras.List', 'sipuras.Form', 'iax.Controller', 'iax.Module', 'iax.List', 'iax.Form', 'iax.Lookup', 'callOnLine.Controller', 'callOnLine.Module', 'callOnLine.List', 'callOnLine.Form', 'sendCreditSummary.Controller', 'sendCreditSummary.Module', 'sendCreditSummary.List', 'sendCreditSummary.Form', 'callSummaryDayUser.Controller', 'callSummaryDayUser.Module', 'callSummaryDayUser.List', 'callSummaryDayUser.Form', 'callSummaryDayTrunk.Controller', 'callSummaryDayTrunk.Module', 'callSummaryDayTrunk.List', 'callSummaryDayTrunk.Form', 'callSummaryDayAgent.Controller', 'callSummaryDayAgent.Module', 'callSummaryDayAgent.List', 'callSummaryDayAgent.Form', 'callerid.Controller', 'callerid.Module', 'callerid.List', 'callerid.Form', 'alarm.Controller', 'alarm.Module', 'alarm.List', 'alarm.Form', 'holidays.Controller', 'holidays.Module', 'holidays.List', 'holidays.Form', 'restrictedPhonenumber.Controller', 'restrictedPhonenumber.Module', 'restrictedPhonenumber.List', 'restrictedPhonenumber.Form', 'restrictedPhonenumber.ImportCsv', 'did.Controller', 'did.Lookup', 'did.Combo', 'did.Module', 'did.List', 'did.Form', 'did.ImportCsv', 'didbuy.Module', 'diddestination.Controller', 'diddestination.Module', 'diddestination.List', 'diddestination.Form', 'diddestination.Combo', 'didUse.Controller', 'didUse.Module', 'didUse.List', 'didUse.Form', 'didHistory.Controller', 'didHistory.Module', 'didHistory.List', 'didHistory.Form', 'dashboard.Module', 'dashboardQueue.Module', 'ivr.Controller', 'ivr.Module', 'ivr.List', 'ivr.Form', 'ivr.Lookup', 'queue.Controller', 'queue.Combo', 'queue.Module', 'queue.List', 'queue.Form', 'queue.Lookup', 'queue.ListDashboard', 'queueMember.Controller', 'queueMember.Module', 'queueMember.List', 'queueMember.Form', 'queueMember.ListDashboard', 'refill.Controller', 'refill.Module', 'refill.List', 'refill.Form', 'refill.Chart', 'methodPay.Controller', 'methodPay.Module', 'methodPay.List', 'methodPay.Form', 'methodPay.Combo', 'voucher.Controller', 'voucher.Module', 'voucher.List', 'voucher.Form', 'refillprovider.Controller', 'refillprovider.Module', 'refillprovider.List', 'refillprovider.Form', 'offer.Controller', 'offer.Combo', 'offer.Module', 'offer.List', 'offer.Form', 'offerCdr.Controller', 'offerCdr.Module', 'offerCdr.List', 'offerCdr.Form', 'offerUse.Module', 'offerUse.List', 'offerUse.Form', 'campaignDashboard.Controller', 'campaignDashboard.Module', 'campaignDashboard.List', 'campaignDashboard.Form', 'campaignReport.Controller', 'campaignReport.Module', 'campaignReport.List', 'campaignReport.Form', 'campaign.Controller', 'campaign.Combo', 'campaign.Module', 'campaign.List', 'campaign.Form', 'campaignPoll.Controller', 'campaignPoll.Combo', 'campaignPoll.Module', 'campaignPoll.List', 'campaignPoll.Form', 'phoneNumber.Controller', 'phoneNumber.Module', 'phoneNumber.List', 'phoneNumber.Form', 'phoneNumber.ImportCsv', 'rate.Controller', 'rate.Module', 'rate.List', 'rate.Form', 'rate.ImportCsv', 'phoneBook.Controller', 'phoneBook.Combo', 'phoneBook.Module', 'phoneBook.List', 'phoneBook.Form', 'phoneBook.Tag', 'call.Controller', 'call.Module', 'call.List', 'call.Form', 'callArchive.Controller', 'callArchive.Module', 'callArchive.List', 'callArchive.Form', 'callFailed.Controller', 'callFailed.Module', 'callFailed.List', 'callFailed.Form', 'callSummaryPerDay.Controller', 'callSummaryPerDay.Module', 'callSummaryPerDay.List', 'callSummaryPerDay.Form', 'callSummaryPerMonth.Controller', 'callSummaryPerMonth.Module', 'callSummaryPerMonth.List', 'callSummaryPerMonth.Form', 'callSummaryMonthUser.Controller', 'callSummaryMonthUser.Module', 'callSummaryMonthUser.List', 'callSummaryMonthUser.Form', 'callSummaryMonthDid.Controller', 'callSummaryMonthDid.Module', 'callSummaryMonthDid.List', 'callSummaryMonthDid.Form', 'callSummaryMonthTrunk.Controller', 'callSummaryMonthTrunk.Module', 'callSummaryMonthTrunk.List', 'callSummaryMonthTrunk.Form', 'sms.Controller', 'sms.Module', 'sms.List', 'sms.Form', 'campaignPollInfo.Controller', 'campaignPollInfo.Module', 'campaignPollInfo.List', 'campaignPollInfo.Form', 'campaignPollInfo.Chart', 'campaignRestrictPhone.Controller', 'campaignRestrictPhone.Module', 'campaignRestrictPhone.List', 'campaignRestrictPhone.Form', 'campaignRestrictPhone.ImportCsv', 'campaignLog.Controller', 'campaignLog.Module', 'campaignLog.List', 'campaignLog.Form', 'campaignSend.Module', 'callShop.Controller', 'callShop.Module', 'callShop.List', 'callShop.Form', 'callShopCdr.Controller', 'callShopCdr.Module', 'callShopCdr.List', 'callShopCdr.Form', 'rateCallshop.Controller', 'rateCallshop.Module', 'rateCallshop.List', 'rateCallshop.Form', 'rateCallshop.ImportCsv', 'callSummaryCallShop.Controller', 'callSummaryCallShop.Module', 'callSummaryCallShop.List', 'callSummaryCallShop.Form', 'callSummaryCallShop.Chart', 'buycredit.Controller', 'buycredit.Module', 'transferToMobile.Module', 'firewall.Controller', 'firewall.Module', 'firewall.List', 'firewall.Form', 'userRate.Controller', 'userRate.Module', 'userRate.List', 'userRate.Form', 'didww.Module', 'extra.Module', 'extra2.Module', 'extra3.Module', 'callOnlineChart.Module', 'callOnlineChart.List', 'callOnlineChart.Form', 'callOnlineChart.Chart', 'smtps.Controller', 'smtps.List', 'smtps.Form', 'smtps.Module', 'servers.Controller', 'servers.List', 'servers.Form', 'servers.Module', 'servers.Combo', 'callSummaryPerUser.Controller', 'callSummaryPerUser.List', 'callSummaryPerUser.Form', 'callSummaryPerUser.Module', 'callSummaryPerTrunk.Controller', 'callSummaryPerTrunk.List', 'callSummaryPerTrunk.Form', 'callSummaryPerTrunk.Module', 'backup.Controller', 'backup.List', 'backup.Form', 'backup.Module', 'backup.ImportCsv', 'gAuthenticator.Controller', 'gAuthenticator.List', 'gAuthenticator.Form', 'gAuthenticator.Module', 'groupUserGroup.Controller', 'groupUserGroup.List', 'groupUserGroup.Form', 'groupUserGroup.Module', 'services.Controller', 'services.List', 'services.Form', 'services.Module', 'services.Lookup', 'servicesUse.Controller', 'servicesUse.List', 'servicesUse.Form', 'servicesUse.Module', 'callBack.Controller', 'callBack.Module', 'callBack.List', 'callBack.Form'], + views: ['userHistory.Controller', 'userHistory.Module', 'userHistory.List', 'userHistory.Form', 'main.MainController', 'main.Login', 'main.ForgetPassword', 'main.GoogleAuthenticator', 'main.Main', 'main.Desktop', 'main.Help', 'main.Settings', 'main.About', 'main.ChangePassword', 'main.ImportLogo', 'main.ImportLoginBackground', 'main.SetUserData', 'groupModule.Controller', 'groupModule.Module', 'groupModule.List', 'groupModule.Form', 'groupModule.Field', 'groupUser.Controller', 'groupUser.Module', 'groupUser.List', 'groupUser.Form', 'groupUser.Combo', 'groupUser.Tag', 'module.Controller', 'module.Module', 'module.List', 'module.Form', 'module.Combo', 'module.Tag', 'user.Controller', 'user.Combo', 'user.Module', 'user.List', 'user.Form', 'user.Lookup', 'user.Bulk', 'configuration.Controller', 'configuration.Module', 'configuration.List', 'configuration.Form', 'general.BooleanCombo', 'general.GroupCombo', 'general.LcrtypeCombo', 'general.OfferTypeCombo', 'general.SipCombo', 'general.TypePaymentCombo', 'templateMail.Controller', 'templateMail.Module', 'templateMail.List', 'templateMail.Form', 'logUsers.Controller', 'logUsers.Module', 'logUsers.List', 'logUsers.Form', 'provider.Controller', 'provider.Combo', 'provider.Module', 'provider.List', 'provider.Form', 'provider.Lookup', 'providerCNL.Controller', 'providerCNL.Module', 'providerCNL.List', 'providerCNL.Form', 'providerCNL.ImportCsv', 'plan.Controller', 'plan.Combo', 'plan.Module', 'plan.List', 'plan.Form', 'plan.Tag', 'plan.Lookup', 'trunk.Controller', 'trunk.Combo', 'trunk.Module', 'trunk.List', 'trunk.Form', 'trunk.Lookup', 'trunk.Tag', 'trunkGroup.Controller', 'trunkGroup.Module', 'trunkGroup.List', 'trunkGroup.Form', 'trunkGroup.Lookup', 'trunkGroup.Combo', 'prefix.Controller', 'prefix.Combo', 'prefix.Module', 'prefix.List', 'prefix.Form', 'trunkSipCodes.Controller', 'trunkSipCodes.Module', 'trunkSipCodes.List', 'trunkSipCodes.Form', 'sendCreditProducts.Controller', 'sendCreditProducts.Module', 'sendCreditProducts.List', 'sendCreditProducts.Form', 'sendCreditRates.Controller', 'sendCreditRates.Module', 'sendCreditRates.List', 'sendCreditRates.Form', 'prefix.Lookup', 'sipTrace.Controller', 'sipTrace.Module', 'sipTrace.List', 'sipTrace.Form', 'rateProvider.Controller', 'rateProvider.Module', 'rateProvider.List', 'rateProvider.Form', 'rateProvider.ImportCsv', 'api.Controller', 'api.Module', 'api.List', 'api.Form', 'sip.Controller', 'sip.Module', 'sip.List', 'sip.Form', 'sip.Lookup', 'sip.Bulk', 'sip2.Controller', 'sip2.Module', 'sip2.List', 'sip2.Form', 'sip2.Lookup', 'sipuras.Controller', 'sipuras.Module', 'sipuras.List', 'sipuras.Form', 'iax.Controller', 'iax.Module', 'iax.List', 'iax.Form', 'iax.Lookup', 'callOnLine.Controller', 'callOnLine.Module', 'callOnLine.List', 'callOnLine.Form', 'sendCreditSummary.Controller', 'sendCreditSummary.Module', 'sendCreditSummary.List', 'sendCreditSummary.Form', 'callSummaryDayUser.Controller', 'callSummaryDayUser.Module', 'callSummaryDayUser.List', 'callSummaryDayUser.Form', 'callSummaryDayTrunk.Controller', 'callSummaryDayTrunk.Module', 'callSummaryDayTrunk.List', 'callSummaryDayTrunk.Form', 'callSummaryDayAgent.Controller', 'callSummaryDayAgent.Module', 'callSummaryDayAgent.List', 'callSummaryDayAgent.Form', 'callerid.Controller', 'callerid.Module', 'callerid.List', 'callerid.Form', 'alarm.Controller', 'alarm.Module', 'alarm.List', 'alarm.Form', 'holidays.Controller', 'holidays.Module', 'holidays.List', 'holidays.Form', 'restrictedPhonenumber.Controller', 'restrictedPhonenumber.Module', 'restrictedPhonenumber.List', 'restrictedPhonenumber.Form', 'restrictedPhonenumber.ImportCsv', 'did.Controller', 'did.Lookup', 'did.Combo', 'did.Module', 'did.List', 'did.Form', 'did.ImportCsv', 'didbuy.Module', 'diddestination.Controller', 'diddestination.Module', 'diddestination.List', 'diddestination.Form', 'diddestination.Combo', 'didUse.Controller', 'didUse.Module', 'didUse.List', 'didUse.Form', 'didHistory.Controller', 'didHistory.Module', 'didHistory.List', 'didHistory.Form', 'dashboard.Module', 'dashboardQueue.Module', 'ivr.Controller', 'ivr.Module', 'ivr.List', 'ivr.Form', 'ivr.Lookup', 'queue.Controller', 'queue.Combo', 'queue.Module', 'queue.List', 'queue.Form', 'queue.Lookup', 'queue.ListDashboard', 'queueMember.Controller', 'queueMember.Module', 'queueMember.List', 'queueMember.Form', 'queueMember.ListDashboard', 'refill.Controller', 'refill.Module', 'refill.List', 'refill.Form', 'refill.Chart', 'methodPay.Controller', 'methodPay.Module', 'methodPay.List', 'methodPay.Form', 'methodPay.Combo', 'voucher.Controller', 'voucher.Module', 'voucher.List', 'voucher.Form', 'refillprovider.Controller', 'refillprovider.Module', 'refillprovider.List', 'refillprovider.Form', 'offer.Controller', 'offer.Combo', 'offer.Module', 'offer.List', 'offer.Form', 'offerCdr.Controller', 'offerCdr.Module', 'offerCdr.List', 'offerCdr.Form', 'offerUse.Module', 'offerUse.List', 'offerUse.Form', 'campaignDashboard.Controller', 'campaignDashboard.Module', 'campaignDashboard.List', 'campaignDashboard.Form', 'campaignReport.Controller', 'campaignReport.Module', 'campaignReport.List', 'campaignReport.Form', 'campaign.Controller', 'campaign.Combo', 'campaign.Module', 'campaign.List', 'campaign.Form', 'campaignPoll.Controller', 'campaignPoll.Combo', 'campaignPoll.Module', 'campaignPoll.List', 'campaignPoll.Form', 'phoneNumber.Controller', 'phoneNumber.Module', 'phoneNumber.List', 'phoneNumber.Form', 'phoneNumber.ImportCsv', 'rate.Controller', 'rate.Module', 'rate.List', 'rate.Form', 'rate.ImportCsv', 'phoneBook.Controller', 'phoneBook.Combo', 'phoneBook.Module', 'phoneBook.List', 'phoneBook.Form', 'phoneBook.Tag', 'call.Controller', 'call.Module', 'call.List', 'call.Form', 'callArchive.Controller', 'callArchive.Module', 'callArchive.List', 'callArchive.Form', 'callFailed.Controller', 'callFailed.Module', 'callFailed.List', 'callFailed.Form', 'callSummaryPerDay.Controller', 'callSummaryPerDay.Module', 'callSummaryPerDay.List', 'callSummaryPerDay.Form', 'callSummaryPerMonth.Controller', 'callSummaryPerMonth.Module', 'callSummaryPerMonth.List', 'callSummaryPerMonth.Form', 'callSummaryMonthUser.Controller', 'callSummaryMonthUser.Module', 'callSummaryMonthUser.List', 'callSummaryMonthUser.Form', 'callSummaryMonthDid.Controller', 'callSummaryMonthDid.Module', 'callSummaryMonthDid.List', 'callSummaryMonthDid.Form', 'callSummaryMonthTrunk.Controller', 'callSummaryMonthTrunk.Module', 'callSummaryMonthTrunk.List', 'callSummaryMonthTrunk.Form', 'sms.Controller', 'sms.Module', 'sms.List', 'sms.Form', 'campaignPollInfo.Controller', 'campaignPollInfo.Module', 'campaignPollInfo.List', 'campaignPollInfo.Form', 'campaignPollInfo.Chart', 'campaignRestrictPhone.Controller', 'campaignRestrictPhone.Module', 'campaignRestrictPhone.List', 'campaignRestrictPhone.Form', 'campaignRestrictPhone.ImportCsv', 'campaignLog.Controller', 'campaignLog.Module', 'campaignLog.List', 'campaignLog.Form', 'campaignSend.Module', 'callShop.Controller', 'callShop.Module', 'callShop.List', 'callShop.Form', 'callShopCdr.Controller', 'callShopCdr.Module', 'callShopCdr.List', 'callShopCdr.Form', 'rateCallshop.Controller', 'rateCallshop.Module', 'rateCallshop.List', 'rateCallshop.Form', 'rateCallshop.ImportCsv', 'callSummaryCallShop.Controller', 'callSummaryCallShop.Module', 'callSummaryCallShop.List', 'callSummaryCallShop.Form', 'callSummaryCallShop.Chart', 'buycredit.Controller', 'buycredit.Module', 'transferToMobile.Module', 'firewall.Controller', 'firewall.Module', 'firewall.List', 'firewall.Form', 'userRate.Controller', 'userRate.Module', 'userRate.List', 'userRate.Form', 'didww.Module', 'extra.Module', 'extra2.Module', 'extra3.Module', 'callOnlineChart.Module', 'callOnlineChart.List', 'callOnlineChart.Form', 'callOnlineChart.Chart', 'smtps.Controller', 'smtps.List', 'smtps.Form', 'smtps.Module', 'servers.Tag', 'servers.Controller', 'servers.List', 'servers.Form', 'servers.Module', 'servers.Combo', 'callSummaryPerUser.Controller', 'callSummaryPerUser.List', 'callSummaryPerUser.Form', 'callSummaryPerUser.Module', 'callSummaryPerTrunk.Controller', 'callSummaryPerTrunk.List', 'callSummaryPerTrunk.Form', 'callSummaryPerTrunk.Module', 'backup.Controller', 'backup.List', 'backup.Form', 'backup.Module', 'backup.ImportCsv', 'gAuthenticator.Controller', 'gAuthenticator.List', 'gAuthenticator.Form', 'gAuthenticator.Module', 'groupUserGroup.Controller', 'groupUserGroup.List', 'groupUserGroup.Form', 'groupUserGroup.Module', 'services.Controller', 'services.List', 'services.Form', 'services.Module', 'services.Lookup', 'servicesUse.Controller', 'servicesUse.List', 'servicesUse.Form', 'servicesUse.Module', 'callBack.Controller', 'callBack.Module', 'callBack.List', 'callBack.Form'], stores: ['UserHistory', 'CampaignDashBoard', 'DidHistory', 'TrunkSipCodes', 'CampaignReport', 'TrunkGroup', 'TrunkChart', 'Alarm', 'Holidays', 'StatusSystem', 'ProviderCNL', 'CallOnlineChart', 'Help', 'Api', 'CallSummaryMonthTrunk', 'CallArchive', 'CallSummaryMonthUser', 'CallSummaryMonthDid', 'RateProvider', 'SendCreditProducts', 'SendCreditRates', 'GroupModule', 'GroupUser', 'CallSummaryDayTrunk', 'CallSummaryDayAgent', 'CallSummaryDayUser', 'Module', 'User', 'Configuration', 'TemplateMail', 'LogUsers', 'Provider', 'Plan', 'Trunk', 'Prefix', 'PrefixCombo', 'Sip', 'Sip2', 'Iax', 'Sipuras', 'CallOnLine', 'Callerid', 'RestrictedPhonenumber', 'Did', 'Diddestination', 'DidUse', 'Ivr', 'Queue', 'QueueMember', 'QueueDashBoard', 'QueueMemberDashBoard', 'Refill', 'RefillChart', 'MethodPay', 'SendCreditSummary', 'Voucher', 'Refillprovider', 'Offer', 'OfferCdr', 'OfferUse', 'Campaign', 'CampaignLog', 'CampaignPoll', 'CallSummaryPerTrunk', 'PhoneBook', 'Rate', 'PhoneNumber', 'Call', 'CallFailed', 'CallSummaryPerDay', 'CallSummaryPerMonth', 'Sms', 'CampaignPollInfo', 'CampaignPollInfoChart', 'CampaignRestrictPhone', 'CallShop', 'CallShopCdr', 'SipTrace', 'RateCallshop', 'CallSummaryCallShop', 'Firewall', 'UserRate', 'Smtps', 'Servers', 'CallSummaryPerUser', 'Backup', 'GAuthenticator', 'GroupUserGroup', 'Services', 'ServicesUse', 'CallBack'], mainView: 'MBilling.view.main.Start', init: function() { diff --git a/classic/src/view/servers/Controller.js b/classic/src/view/servers/Controller.js index ab3aece0f..050418474 100755 --- a/classic/src/view/servers/Controller.js +++ b/classic/src/view/servers/Controller.js @@ -48,6 +48,11 @@ Ext.define('MBilling.view.servers.Controller', { } }); }, + onNew: function() { + var me = this; + fieldPid_server = me.lookupReference('id_server')['hide'](); + me.callParent(arguments); + }, onEdit: function() { var me = this, fieldWeight = me.formPanel.getForm().findField('weight'), @@ -58,6 +63,11 @@ Ext.define('MBilling.view.servers.Controller', { } else { fieldWeight['hide'](); } + if (fieldType.value == 'sipproxy') { + fieldPid_server = me.lookupReference('id_server')['show'](); + } else { + fieldPid_server = me.lookupReference('id_server')['hide'](); + } }, onDelete: function(btn) { var me = this, diff --git a/classic/src/view/servers/Form.js b/classic/src/view/servers/Form.js index 46faceaf6..1bfcf0969 100755 --- a/classic/src/view/servers/Form.js +++ b/classic/src/view/servers/Form.js @@ -81,6 +81,22 @@ Ext.define('MBilling.view.servers.Form', { [0, t('Inactive')], [2, t('OffLine')] ] + }, { + xtype: 'fieldset', + style: 'margin-top:10px; overflow: visible;', + title: t('Select one or more slave.'), + collapsible: true, + reference: 'id_server', + height: 100, + collapsed: false, + items: [{ + xtype: 'serverstag', + name: 'id_server', + fieldLabel: t(''), + labelWidth: 10, + anchor: '100%', + allowBlank: true + }] }, { xtype: 'textareafield', name: 'description', diff --git a/classic/src/view/servers/Tag.js b/classic/src/view/servers/Tag.js new file mode 100755 index 000000000..be2893d39 --- /dev/null +++ b/classic/src/view/servers/Tag.js @@ -0,0 +1,25 @@ +/** + * Class to define tag of "phoneBook" + * + * Adilson L. Magnus + * 15/04/2013 + */ +Ext.define('MBilling.view.servers.Tag', { + extend: 'Ext.form.field.Tag', + alias: 'widget.serverstag', + name: 'id_server', + fieldLabel: t('Servers'), + displayField: 'name', + valueField: 'id', + initComponent: function() { + var me = this; + me.store = Ext.create('MBilling.store.Servers', { + proxy: { + type: 'uxproxy', + module: 'servers', + limitParam: undefined + } + }); + me.callParent(arguments); + } +}); \ No newline at end of file diff --git a/protected/commands/UpdateMysqlCommand.php b/protected/commands/UpdateMysqlCommand.php index 7edcda441..38fc3ab15 100755 --- a/protected/commands/UpdateMysqlCommand.php +++ b/protected/commands/UpdateMysqlCommand.php @@ -1891,6 +1891,23 @@ public function run($args) $version = '7.8.3.5'; $this->update($version); } + + //2023-04-21 + if ($version == '7.8.3.5') { + $sql = " + CREATE TABLE `pkg_servers_servers` ( + `id_proxy` int(11) NOT NULL, + `id_server` int(11) NOT NULL, + PRIMARY KEY (`id_server`,`id_proxy`), + KEY `fk_pkg_servers` (`id_server`), + KEY `fk_pkg_proxy` (`id_proxy`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + "; + $this->executeDB($sql); + + $version = '7.8.3.6'; + $this->update($version); + } } public function executeDB($sql) diff --git a/protected/components/AsteriskAccess.php b/protected/components/AsteriskAccess.php index 24b54cfd7..9b1db6710 100755 --- a/protected/components/AsteriskAccess.php +++ b/protected/components/AsteriskAccess.php @@ -11,6 +11,7 @@ class AsteriskAccess private $asmanager; private static $instance; + private static $config; public static function instance($host = 'localhost', $user = 'magnus', $pass = 'magnussolution') { @@ -24,6 +25,7 @@ public static function instance($host = 'localhost', $user = 'magnus', $pass = ' private function __construct() { $this->asmanager = new AGI_AsteriskManager; + $this->config = LoadConfig::getConfig(); } private function connectAsterisk($host, $user, $pass) @@ -288,7 +290,7 @@ public function writeAsteriskFile($model, $file, $head_field = 'name') $line .= 'deny=0.0.0.0/0.0.0.0' . "\n"; $line .= 'permit=' . $data['host'] . "/255.255.255.0\n"; $line .= 'disallow=all' . "\n"; - $line .= 'allow=g729,alaw,ulaw' . "\n"; + $line .= 'allow=' . $this->config['global']['default_codeds'] . "\n"; $line .= 'dtmfmode=RFC2833' . "\n"; $line .= 'insecure=invite' . "\n"; diff --git a/protected/controllers/ServersController.php b/protected/controllers/ServersController.php index 6ad2265ed..d5dc96abd 100755 --- a/protected/controllers/ServersController.php +++ b/protected/controllers/ServersController.php @@ -24,11 +24,16 @@ class ServersController extends Controller { public $attributeOrder = 't.id'; + public $nameModelRelated = 'ServersServers'; + public $nameFkRelated = 'id_proxy'; + public $nameOtherFkRelated = 'id_server'; + public function init() { - $this->instanceModel = new Servers; - $this->abstractModel = Servers::model(); - $this->titleReport = Yii::t('zii', 'CallerID'); + $this->instanceModel = new Servers; + $this->abstractModel = Servers::model(); + $this->titleReport = Yii::t('zii', 'CallerID'); + $this->abstractModelRelated = ServersServers::model(); parent::init(); } @@ -36,14 +41,14 @@ public function afterSave($model, $values) { $modelServer = Servers::model()->findAll("type = 'sipproxy' AND status = 1"); - foreach ($modelServer as $key => $server) { + foreach ($modelServer as $key => $proxy) { - $hostname = $server->host; + $hostname = $proxy->host; $dbname = 'opensips'; $table = 'dispatcher'; - $user = $server->username; - $password = $server->password; - $port = $server->port; + $user = $proxy->username; + $password = $proxy->password; + $port = $proxy->port; $dsn = 'mysql:host=' . $hostname . ';dbname=' . $dbname; @@ -58,23 +63,49 @@ public function afterSave($model, $values) $sql = "TRUNCATE $dbname.$table"; $con->createCommand($sql)->execute(); - $modelServerAS = Servers::model()->findAll("(type = 'asterisk' OR type = 'mbilling') - AND status = 1 AND weight > 0"); + $modelServerAS = ServersServers::model()->findAll("id_proxy = :key", [':key' => $proxy->id]); - foreach ($modelServerAS as $key => $server) { + if (isset($modelServerAS[0]->id_server)) { + foreach ($modelServerAS as $key => $server) { - if ($this->ip_is_private($hostname)) { - $sql = "INSERT INTO $dbname.$table (setid,destination,weight,description) VALUES ('1','sip:" . $server->host . ":" . $server->sip_port . "','" . $server->weight . "','" . $server->description . "')"; - } else { - $sql = "INSERT INTO $dbname.$table (setid,destination,weight,description) VALUES ('1','sip:" . $server->public_ip . ":" . $server->sip_port . "','" . $server->weight . "','" . $server->description . "')"; - } + $modelServer = Servers::model()->find("id = :key AND (type = 'asterisk' OR type = 'mbilling') + AND status = 1 AND weight > 0", [':key' => $server->id_server]); + + if (isset($modelServer->id)) { + if ($this->ip_is_private($hostname)) { + $sql = "INSERT INTO $dbname.$table (setid,destination,weight,description) VALUES ('1','sip:" . $modelServer->host . ":" . $modelServer->sip_port . "','" . $modelServer->weight . "','" . $modelServer->description . "')"; + } else { + $sql = "INSERT INTO $dbname.$table (setid,destination,weight,description) VALUES ('1','sip:" . $modelServer->public_ip . ":" . $modelServer->sip_port . "','" . $modelServer->weight . "','" . $modelServer->description . "')"; + } + + try { + $con->createCommand($sql)->execute(); + } catch (Exception $e) { + return; + } + } - try { - $con->createCommand($sql)->execute(); - } catch (Exception $e) { - return; } + } else { + + $modelServerAS = Servers::model()->find("(type = 'asterisk' OR type = 'mbilling') + AND status = 1 AND weight > 0"); + foreach ($modelServerAS as $key => $server) { + + if ($this->ip_is_private($hostname)) { + $sql = "INSERT INTO $dbname.$table (setid,destination,weight,description) VALUES ('1','sip:" . $server->host . ":" . $server->sip_port . "','" . $server->weight . "','" . $server->description . "')"; + } else { + $sql = "INSERT INTO $dbname.$table (setid,destination,weight,description) VALUES ('1','sip:" . $server->public_ip . ":" . $server->sip_port . "','" . $server->weight . "','" . $server->description . "')"; + } + + try { + $con->createCommand($sql)->execute(); + } catch (Exception $e) { + return; + } + + } } } diff --git a/protected/models/ServersServers.php b/protected/models/ServersServers.php new file mode 100755 index 000000000..908ce8ade --- /dev/null +++ b/protected/models/ServersServers.php @@ -0,0 +1,71 @@ + + * 29/10/2012 + */ + +class ServersServers extends Model +{ + protected $_module = 'serversservers'; + /** + * Retorna a classe estatica da model. + * @return SubModule classe estatica da model. + */ + public static function model($className = __CLASS__) + { + return parent::model($className); + } + + /** + * @return nome da tabela. + */ + public function tableName() + { + return 'pkg_servers_servers'; + } + + /** + * @return nome da(s) chave(s) primaria(s). + */ + public function primaryKey() + { + return array('id_proxy', 'id_server'); + } + + /** + * @return array validacao dos campos da model. + */ + public function rules() + { + $rules = array( + array('id_proxy, id_server', 'required'), + array('id_proxy, id_server', 'numerical', 'integerOnly' => true), + ); + return $this->getExtraField($rules); + } + + public function beforeSave() + { + return parent::beforeSave(); + } + + public function afterSave() + { + return parent::afterSave(); + } +} diff --git a/script/installOpenSips-3.1.sh b/script/installOpenSips-3.1.sh index 7a6ac6846..834effd3b 100755 --- a/script/installOpenSips-3.1.sh +++ b/script/installOpenSips-3.1.sh @@ -467,7 +467,8 @@ ulimit -a # All current limits are reported. sed -i -e 's/$S_MEMORY/2048/g' /lib/systemd/system/opensips.service sed -i -e 's/$P_MEMORY/2048/g' /lib/systemd/system/opensips.service - +sed -i -e 's/User=opensips/User=root/g' /lib/systemd/system/opensips.service +sed -i -e 's/Group=opensips/Group=root/g' /lib/systemd/system/opensips.service echo 'SystemMaxUse=10M' >> /etc/systemd/journald.conf systemctl daemon-reload systemctl restart systemd-journald