feat: 支持修改邮件标题,告警转发默认关闭
This commit is contained in:
@@ -133,10 +133,10 @@ INSERT INTO "ne_config" VALUES (240, 'CBC', 'system', 'System Config', 'list', '
|
||||
INSERT INTO "ne_config" VALUES (241, 'CBC', 'amfProfile', 'AMF Profile', 'array', '[{"access":"read-only","comment":"0~15","display":"Index","filter":"0~15","name":"index","type":"int","value":"0"},{"access":"read-write","comment":"","display":"NF Name","filter":"0~64","name":"name","type":"string","value":"AMF"},{"access":"read-write","comment":"","display":"AMF URI","filter":"0~64","name":"uri","type":"string","value":"http://172.16.5.130:8080"},{"access":"read-write","comment":"","display":"PLMN ID","filter":"^[0-9]{5,6}$","name":"plmnId","type":"regex","value":"00101"},{"access":"read-write","comment":"0~16777215","display":"TAC","filter":"0~8","name":"tac","type":"string","value":"1"}]', 3, '', 1724327154499, 'public');
|
||||
INSERT INTO "ne_config" VALUES (242, 'CBC', 'mmeProfile', 'MME Profile', 'array', '[{"access":"read-only","comment":"0~15","display":"Index","filter":"0~15","name":"index","type":"int","value":"0"},{"access":"read-write","comment":"","display":"NF Name","filter":"0~64","name":"name","type":"string","value":"MME"},{"access":"read-write","comment":"","display":"MME URI","filter":"0~64","name":"uri","type":"string","value":"sctp://192.168.1.1:9090"},{"access":"read-write","comment":"","display":"PLMN ID","filter":"^[0-9]{5,6}$","name":"plmnId","type":"regex","value":"00101"},{"access":"read-write","comment":"0~16777215","display":"TAC","filter":"0~8","name":"tac","type":"string","value":"1"}]', 5, '', 1724327154504, 'public');
|
||||
|
||||
-- OMC parameter config
|
||||
INSERT INTO "ne_config" VALUES (260, 'OMC', 'alarmEmailForward', 'Alarm Email Forward Interface', 'list', '[{"access":"rw","comment":"Is it enabled forward alarm with Email interface","display":"Enable","filter":"true;false","name":"enable","type":"bool","value":"true"},{"access":"rw","comment":"","display":"Email List","filter":"","name":"emailList","type":"string","value":""},{"access":"rw","comment":"Email SMTP server","display":"SMTP Server","filter":"","name":"smtp","type":"string","value":""},{"access":"rw","comment":"","display":"Port","filter":"0~65535","name":"port","type":"int","value":""},{"access":"rw","comment":"","display":"User","filter":"","name":"user","type":"string","value":""},{"access":"rw","comment":"","display":"Password","filter":"","name":"password","type":"string","value":""},{"access":"rw","comment":"If skip TLS verify (true/false)","display":"TLS Skip Verify","filter":"true;false","name":"tlsSkipVerify","type":"bool","value":"true"}]', 3, '', 1725505025649, 'public');
|
||||
INSERT INTO "ne_config" VALUES (261, 'OMC', 'alarmSMSForward', 'Alarm SMS Forward Interface', 'list', '[{"access":"rw","comment":"Is it enabled forward alarm with SMS interface","display":"Enable","filter":"true;false","name":"enable","type":"bool","value":"true"},{"access":"rw","comment":"Multiple mobile separated by commas","display":"Mobile List","filter":"","name":"mobileList","type":"string","value":""},{"access":"rw","comment":"The SMSC SMPP Address","display":"SMSC Address","filter":"","name":"smscAddr","type":"string","value":""},{"access":"rw","comment":"","display":"System ID","filter":"","name":"systemID","type":"string","value":""},{"access":"rw","comment":"","display":"Password","filter":"","name":"password","type":"string","value":""},{"access":"rw","comment":"","display":"System Type","filter":"","name":"systemType","type":"string","value":""},{"access":"rw","comment":"Short message coding type","display":"Data Coding","filter":"{\"0\":\"GSM7BIT\",\"1\":\"ASCII\",\"2\":\"BINARY8BIT1\",\"3\":\"LATIN1\",\"4\":\"BINARY8BIT2\",\"6\":\"CYRILLIC\",\"7\":\"HEBREW\",\"8\":\"UCS2\"}","name":"dataCoding","type":"enum","value":"GSM7BIT"},{"access":"rw","comment":"It is the source address, the length is between 3 and 20","display":"Service Number","filter":"3~20","name":"serviceNumber","type":"string","value":"OMC"}]', 4, '', 1727664057261, 'public');
|
||||
INSERT INTO "ne_config" VALUES (262, 'OMC', 'trace', 'NE Signaling Trace', 'list', '[{\"access\":\"read-write\",\"comment\":\"enable or disable NE signaling trace creation\",\"display\":\"Enable\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"enabled\",\"type\":\"bool\",\"value\":\"false\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace host address\",\"display\":\"Host\",\"filter\":\"0~128\",\"name\":\"host\",\"type\":\"ipv4\",\"value\":\"172.16.5.100\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace port\",\"display\":\"Port\",\"filter\":\"3000~65530\",\"name\":\"port\",\"type\":\"int\",\"value\":\"33033\"}]', 1, '', 1748570559170, 'public');
|
||||
-- 更新 OMC 配置 2025627
|
||||
INSERT INTO "ne_config" VALUES (260, 'OMC', 'alarmEmailForward', 'Alarm Email Forward Interface', 'list', '[{"access":"rw","comment":"Is it enabled forward alarm with Email interface","display":"Enable","filter":"true;false","name":"enable","type":"bool","value":"true"},{"access":"rw","comment":"string, no variable support","display":"Email Title","filter":"0~64","name":"title","type":"string","value":""},{"access":"rw","comment":"","display":"Email List","filter":"","name":"emailList","type":"string","value":""},{"access":"rw","comment":"Email SMTP server","display":"SMTP Server","filter":"","name":"smtp","type":"string","value":""},{"access":"rw","comment":"","display":"Port","filter":"0~65535","name":"port","type":"int","value":""},{"access":"rw","comment":"","display":"User","filter":"","name":"user","type":"string","value":""},{"access":"rw","comment":"","display":"Password","filter":"","name":"password","type":"string","value":""},{"access":"rw","comment":"If skip TLS verify (true/false)","display":"TLS Skip Verify","filter":"true;false","name":"tlsSkipVerify","type":"bool","value":"true"}]', 3, '', 1750993234226, 'public');
|
||||
INSERT INTO "ne_config" VALUES (261, 'OMC', 'alarmSMSForward', 'Alarm SMS Forward Interface', 'list', '[{"access":"rw","comment":"Is it enabled forward alarm with SMS interface","display":"Enable","filter":"true;false","name":"enable","type":"bool","value":"true"},{"access":"rw","comment":"Multiple mobile separated by commas","display":"Mobile List","filter":"","name":"mobileList","type":"string","value":""},{"access":"rw","comment":"The SMSC SMPP Address","display":"SMSC Address","filter":"","name":"smscAddr","type":"string","value":""},{"access":"rw","comment":"","display":"System ID","filter":"","name":"systemID","type":"string","value":""},{"access":"rw","comment":"","display":"Password","filter":"","name":"password","type":"string","value":""},{"access":"rw","comment":"","display":"System Type","filter":"","name":"systemType","type":"string","value":""},{"access":"rw","comment":"Short message coding type","display":"Data Coding","filter":"{\"0\":\"GSM7BIT\",\"1\":\"ASCII\",\"2\":\"BINARY8BIT1\",\"3\":\"LATIN1\",\"4\":\"BINARY8BIT2\",\"6\":\"CYRILLIC\",\"7\":\"HEBREW\",\"8\":\"UCS2\"}","name":"dataCoding","type":"enum","value":"GSM7BIT"},{"access":"rw","comment":"It is the source address, the length is between 3 and 20","display":"Service Number","filter":"3~20","name":"serviceNumber","type":"string","value":"OMC"}]', 4, '', 1750993234232, 'public');
|
||||
INSERT INTO "ne_config" VALUES (262, 'OMC', 'trace', 'NE Signaling Trace', 'list', '[{"access":"read-write","comment":"enable or disable NE signaling trace creation","display":"Enable","filter":"{\"0\":\"false\",\"1\":\"true\"}","name":"enabled","type":"bool","value":"false"},{"access":"read-write","comment":"NE signaling trace host address","display":"Host","filter":"0~128","name":"host","type":"ipv4","value":"172.16.5.100"},{"access":"read-write","comment":"NE signaling trace port","display":"Port","filter":"3000~65530","name":"port","type":"int","value":"33033"}]', 1, '', 1750993234209, 'public');
|
||||
|
||||
-- 更新 SMSC 配置 2025521
|
||||
INSERT INTO "ne_config" VALUES (280, 'SMSC', 'system', 'System', 'list', '[{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"cdrFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SM Validity\",\"filter\":\"0-2147483647\",\"name\":\"smValidity\",\"type\":\"int\",\"value\":\"259200\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"logFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable local users.\",\"display\":\"Local Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable outbound roaming users.\",\"display\":\"Local Roaming Out Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localRoamingOutPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable inbound roaming users.\",\"display\":\"Visitor Roaming In Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"visitorRoamingInPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to other unattainable users.\",\"display\":\"Other Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"otherPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Define the maximum port number that the queue of pending SMS may grow to.\",\"display\":\"Polling Number\",\"filter\":\"0-64\",\"name\":\"pollingNumber\",\"type\":\"int\",\"value\":\"64\"},{\"access\":\"read-write\",\"comment\":\"Specify the priority parameter of SM_RP_PRI. true = High; false = Low.\",\"display\":\"Priority Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"priorityFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable TP-Reply-Path parameter in the SMS-DELIVER data unit.\",\"display\":\"TP Reply Path Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"tpReplyPathFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Number\",\"filter\":\"0~32\",\"name\":\"smscNumber\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Domain\",\"filter\":\"0~16\",\"name\":\"smscDomain\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CSFB VoLTE Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"csfbVolteFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Camel Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"camelFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SCF Address\",\"filter\":\"0~16\",\"name\":\"scfAddress\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"If add plus then set false\",\"display\":\"MT Id Format Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mtIdFormatFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"enable mcast sms\",\"display\":\"Mcast Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mcastFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Level\",\"filter\":\"{\\\"0\\\":\\\"none\\\",\\\"1\\\":\\\"error\\\",\\\"2\\\":\\\"debug\\\"}\",\"name\":\"logLevel\",\"type\":\"enum\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"The MB sizeof log file\",\"display\":\"Log Size\",\"filter\":\"1-1000\",\"name\":\"logSize\",\"type\":\"int\",\"value\":\"200\"},{\"access\":\"read-write\",\"comment\":\"The number of log file\",\"display\":\"Log Number\",\"filter\":\"1-20\",\"name\":\"logNum\",\"type\":\"int\",\"value\":\"10\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Directory\",\"filter\":\"0~128\",\"name\":\"logDir\",\"type\":\"string\",\"value\":\"/var/log/\"}]', 1, '', 1747799255683, 'public');
|
||||
|
||||
@@ -134,10 +134,10 @@ INSERT INTO `ne_config` VALUES (240, 'CBC', 'system', 'System Config', 'list', '
|
||||
INSERT INTO `ne_config` VALUES (241, 'CBC', 'amfProfile', 'AMF Profile', 'array', '[{\"access\":\"read-only\",\"comment\":\"0~15\",\"display\":\"Index\",\"filter\":\"0~15\",\"name\":\"index\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"NF Name\",\"filter\":\"0~64\",\"name\":\"name\",\"type\":\"string\",\"value\":\"AMF\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"AMF URI\",\"filter\":\"0~64\",\"name\":\"uri\",\"type\":\"string\",\"value\":\"http://172.16.5.130:8080\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"PLMN ID\",\"filter\":\"^[0-9]{5,6}$\",\"name\":\"plmnId\",\"type\":\"regex\",\"value\":\"00101\"},{\"access\":\"read-write\",\"comment\":\"0~16777215\",\"display\":\"TAC\",\"filter\":\"0~8\",\"name\":\"tac\",\"type\":\"string\",\"value\":\"1\"}]', 3, '', 1724327154499, 'public');
|
||||
INSERT INTO `ne_config` VALUES (242, 'CBC', 'mmeProfile', 'MME Profile', 'array', '[{\"access\":\"read-only\",\"comment\":\"0~15\",\"display\":\"Index\",\"filter\":\"0~15\",\"name\":\"index\",\"type\":\"int\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"NF Name\",\"filter\":\"0~64\",\"name\":\"name\",\"type\":\"string\",\"value\":\"MME\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"MME URI\",\"filter\":\"0~64\",\"name\":\"uri\",\"type\":\"string\",\"value\":\"sctp://192.168.1.1:9090\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"PLMN ID\",\"filter\":\"^[0-9]{5,6}$\",\"name\":\"plmnId\",\"type\":\"regex\",\"value\":\"00101\"},{\"access\":\"read-write\",\"comment\":\"0~16777215\",\"display\":\"TAC\",\"filter\":\"0~8\",\"name\":\"tac\",\"type\":\"string\",\"value\":\"1\"}]', 5, '', 1724327154504, 'public');
|
||||
|
||||
-- OMC parameter config
|
||||
INSERT INTO `ne_config` VALUES (260, 'OMC', 'alarmEmailForward', 'Alarm Email Forward Interface', 'list', '[{\"access\":\"rw\",\"comment\":\"Is it enabled forward alarm with Email interface\",\"display\":\"Enable\",\"filter\":\"true;false\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"true\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Email List\",\"filter\":\"\",\"name\":\"emailList\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"Email SMTP server\",\"display\":\"SMTP Server\",\"filter\":\"\",\"name\":\"smtp\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Port\",\"filter\":\"0~65535\",\"name\":\"port\",\"type\":\"int\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"User\",\"filter\":\"\",\"name\":\"user\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Password\",\"filter\":\"\",\"name\":\"password\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"If skip TLS verify (true/false)\",\"display\":\"TLS Skip Verify\",\"filter\":\"true;false\",\"name\":\"tlsSkipVerify\",\"type\":\"bool\",\"value\":\"true\"}]', 3, '', 1725505025649, 'public');
|
||||
INSERT INTO `ne_config` VALUES (261, 'OMC', 'alarmSMSForward', 'Alarm SMS Forward Interface', 'list', '[{\"access\":\"rw\",\"comment\":\"Is it enabled forward alarm with SMS interface\",\"display\":\"Enable\",\"filter\":\"true;false\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"true\"},{\"access\":\"rw\",\"comment\":\"Multiple mobile separated by commas\",\"display\":\"Mobile List\",\"filter\":\"\",\"name\":\"mobileList\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"The SMSC SMPP Address\",\"display\":\"SMSC Address\",\"filter\":\"\",\"name\":\"smscAddr\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"System ID\",\"filter\":\"\",\"name\":\"systemID\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Password\",\"filter\":\"\",\"name\":\"password\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"System Type\",\"filter\":\"\",\"name\":\"systemType\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"Short message coding type\",\"display\":\"Data Coding\",\"filter\":\"{\\\"0\\\":\\\"GSM7BIT\\\",\\\"1\\\":\\\"ASCII\\\",\\\"2\\\":\\\"BINARY8BIT1\\\",\\\"3\\\":\\\"LATIN1\\\",\\\"4\\\":\\\"BINARY8BIT2\\\",\\\"6\\\":\\\"CYRILLIC\\\",\\\"7\\\":\\\"HEBREW\\\",\\\"8\\\":\\\"UCS2\\\"}\",\"name\":\"dataCoding\",\"type\":\"enum\",\"value\":\"GSM7BIT\"},{\"access\":\"rw\",\"comment\":\"It is the source address, the length is between 3 and 20\",\"display\":\"Service Number\",\"filter\":\"3~20\",\"name\":\"serviceNumber\",\"type\":\"string\",\"value\":\"OMC\"}]', 4, '', 1727664057261, 'public');
|
||||
INSERT INTO `ne_config` VALUES (262, 'OMC', 'trace', 'NE Signaling Trace', 'list', '[{\"access\":\"read-write\",\"comment\":\"enable or disable NE signaling trace creation\",\"display\":\"Enable\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"enabled\",\"type\":\"bool\",\"value\":\"false\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace host address\",\"display\":\"Host\",\"filter\":\"0~128\",\"name\":\"host\",\"type\":\"ipv4\",\"value\":\"172.16.5.100\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace port\",\"display\":\"Port\",\"filter\":\"3000~65530\",\"name\":\"port\",\"type\":\"int\",\"value\":\"33033\"}]', 1, '', 1748570559170, 'public');
|
||||
-- 更新 OMC 配置 20250627
|
||||
INSERT INTO `ne_config` VALUES (260, 'OMC', 'alarmEmailForward', 'Alarm Email Forward Interface', 'list', '[{\"access\":\"rw\",\"comment\":\"Is it enabled forward alarm with Email interface\",\"display\":\"Enable\",\"filter\":\"true;false\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"true\"},{\"access\":\"rw\",\"comment\":\"string, no variable support\",\"display\":\"Email Title\",\"filter\":\"0~64\",\"name\":\"title\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Email List\",\"filter\":\"\",\"name\":\"emailList\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"Email SMTP server\",\"display\":\"SMTP Server\",\"filter\":\"\",\"name\":\"smtp\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Port\",\"filter\":\"0~65535\",\"name\":\"port\",\"type\":\"int\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"User\",\"filter\":\"\",\"name\":\"user\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Password\",\"filter\":\"\",\"name\":\"password\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"If skip TLS verify (true/false)\",\"display\":\"TLS Skip Verify\",\"filter\":\"true;false\",\"name\":\"tlsSkipVerify\",\"type\":\"bool\",\"value\":\"true\"}]', 3, '', 1750993234226, 'public');
|
||||
INSERT INTO `ne_config` VALUES (261, 'OMC', 'alarmSMSForward', 'Alarm SMS Forward Interface', 'list', '[{\"access\":\"rw\",\"comment\":\"Is it enabled forward alarm with SMS interface\",\"display\":\"Enable\",\"filter\":\"true;false\",\"name\":\"enable\",\"type\":\"bool\",\"value\":\"true\"},{\"access\":\"rw\",\"comment\":\"Multiple mobile separated by commas\",\"display\":\"Mobile List\",\"filter\":\"\",\"name\":\"mobileList\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"The SMSC SMPP Address\",\"display\":\"SMSC Address\",\"filter\":\"\",\"name\":\"smscAddr\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"System ID\",\"filter\":\"\",\"name\":\"systemID\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"Password\",\"filter\":\"\",\"name\":\"password\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"\",\"display\":\"System Type\",\"filter\":\"\",\"name\":\"systemType\",\"type\":\"string\",\"value\":\"\"},{\"access\":\"rw\",\"comment\":\"Short message coding type\",\"display\":\"Data Coding\",\"filter\":\"{\\\"0\\\":\\\"GSM7BIT\\\",\\\"1\\\":\\\"ASCII\\\",\\\"2\\\":\\\"BINARY8BIT1\\\",\\\"3\\\":\\\"LATIN1\\\",\\\"4\\\":\\\"BINARY8BIT2\\\",\\\"6\\\":\\\"CYRILLIC\\\",\\\"7\\\":\\\"HEBREW\\\",\\\"8\\\":\\\"UCS2\\\"}\",\"name\":\"dataCoding\",\"type\":\"enum\",\"value\":\"GSM7BIT\"},{\"access\":\"rw\",\"comment\":\"It is the source address, the length is between 3 and 20\",\"display\":\"Service Number\",\"filter\":\"3~20\",\"name\":\"serviceNumber\",\"type\":\"string\",\"value\":\"OMC\"}]', 4, '', 1750993234232, 'public');
|
||||
INSERT INTO `ne_config` VALUES (262, 'OMC', 'trace', 'NE Signaling Trace', 'list', '[{\"access\":\"read-write\",\"comment\":\"enable or disable NE signaling trace creation\",\"display\":\"Enable\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"enabled\",\"type\":\"bool\",\"value\":\"false\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace host address\",\"display\":\"Host\",\"filter\":\"0~128\",\"name\":\"host\",\"type\":\"ipv4\",\"value\":\"172.16.5.100\"},{\"access\":\"read-write\",\"comment\":\"NE signaling trace port\",\"display\":\"Port\",\"filter\":\"3000~65530\",\"name\":\"port\",\"type\":\"int\",\"value\":\"33033\"}]', 1, '', 1750993234209, 'public');
|
||||
|
||||
-- 更新 SMSC 配置 2025521
|
||||
INSERT INTO `ne_config` VALUES (280, 'SMSC', 'system', 'System', 'list', '[{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CDR Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"cdrFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SM Validity\",\"filter\":\"0-2147483647\",\"name\":\"smValidity\",\"type\":\"int\",\"value\":\"259200\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"logFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable local users.\",\"display\":\"Local Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable outbound roaming users.\",\"display\":\"Local Roaming Out Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"localRoamingOutPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to unattainable inbound roaming users.\",\"display\":\"Visitor Roaming In Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"visitorRoamingInPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable resend pending SMS to other unattainable users.\",\"display\":\"Other Polling Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"otherPollingFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Define the maximum port number that the queue of pending SMS may grow to.\",\"display\":\"Polling Number\",\"filter\":\"0-64\",\"name\":\"pollingNumber\",\"type\":\"int\",\"value\":\"64\"},{\"access\":\"read-write\",\"comment\":\"Specify the priority parameter of SM_RP_PRI. true = High; false = Low.\",\"display\":\"Priority Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"priorityFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"Enable or disable TP-Reply-Path parameter in the SMS-DELIVER data unit.\",\"display\":\"TP Reply Path Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"tpReplyPathFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Number\",\"filter\":\"0~32\",\"name\":\"smscNumber\",\"type\":\"string\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SMSC Domain\",\"filter\":\"0~16\",\"name\":\"smscDomain\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"CSFB VoLTE Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"csfbVolteFlag\",\"type\":\"bool\",\"value\":\"1\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Camel Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"camelFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"SCF Address\",\"filter\":\"0~16\",\"name\":\"scfAddress\",\"type\":\"string\",\"value\":\"0.0.0.0\"},{\"access\":\"read-write\",\"comment\":\"If add plus then set false\",\"display\":\"MT Id Format Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mtIdFormatFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"enable mcast sms\",\"display\":\"Mcast Flag\",\"filter\":\"{\\\"0\\\":\\\"false\\\",\\\"1\\\":\\\"true\\\"}\",\"name\":\"mcastFlag\",\"type\":\"bool\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Level\",\"filter\":\"{\\\"0\\\":\\\"none\\\",\\\"1\\\":\\\"error\\\",\\\"2\\\":\\\"debug\\\"}\",\"name\":\"logLevel\",\"type\":\"enum\",\"value\":\"0\"},{\"access\":\"read-write\",\"comment\":\"The MB sizeof log file\",\"display\":\"Log Size\",\"filter\":\"1-1000\",\"name\":\"logSize\",\"type\":\"int\",\"value\":\"200\"},{\"access\":\"read-write\",\"comment\":\"The number of log file\",\"display\":\"Log Number\",\"filter\":\"1-20\",\"name\":\"logNum\",\"type\":\"int\",\"value\":\"10\"},{\"access\":\"read-write\",\"comment\":\"\",\"display\":\"Log Directory\",\"filter\":\"0~128\",\"name\":\"logDir\",\"type\":\"string\",\"value\":\"/var/log/\"}]', 1, '', 1747799255683, 'public');
|
||||
|
||||
@@ -149,16 +149,17 @@ omc:
|
||||
# 4:BINARY8BIT2, 6:CYRILLIC, 7:HEBREW, 8:UCS2
|
||||
alarm:
|
||||
alarmEmailForward:
|
||||
enable: true
|
||||
emailList:
|
||||
enable: false
|
||||
emailList: ""
|
||||
title: "Alarm from OMC"
|
||||
smtp: mail.smtp.com
|
||||
port: 25
|
||||
user: smtpext@smtp.com
|
||||
password: "1000smtp@omc!"
|
||||
tlsSkipVerify: true
|
||||
alarmSMSForward:
|
||||
enable: true
|
||||
mobileList:
|
||||
enable: false
|
||||
mobileList: ""
|
||||
smscAddr: "192.168.13.114:2775"
|
||||
systemID: "omc"
|
||||
password: "omc123"
|
||||
|
||||
@@ -6,14 +6,14 @@ import (
|
||||
"strings"
|
||||
|
||||
"be.ems/lib/config"
|
||||
"be.ems/lib/log"
|
||||
neService "be.ems/src/modules/network_element/service"
|
||||
systemService "be.ems/src/modules/system/service"
|
||||
|
||||
"gopkg.in/gomail.v2"
|
||||
)
|
||||
|
||||
func AlarmEmailForward(alarmData *Alarm) error {
|
||||
log.Info("AlarmEmailForward processing... ")
|
||||
neInfo := neService.NewNeInfo.FindByRmuid(alarmData.NeId)
|
||||
|
||||
alarmStatus := "Clear"
|
||||
if alarmData.AlarmStatus == 1 {
|
||||
@@ -26,11 +26,15 @@ func AlarmEmailForward(alarmData *Alarm) error {
|
||||
severity = v.DataLabel
|
||||
}
|
||||
}
|
||||
subjectTime := fmt.Sprintf("%s-%s-%s", severity, alarmData.NeName, alarmData.AlarmTitle)
|
||||
subjectTitle := config.GetYamlConfig().Alarm.EmailForward.Title
|
||||
if subjectTitle == "" {
|
||||
subjectTitle = fmt.Sprintf("%s-%s-%s", alarmData.OrigSeverity, alarmData.NeName, alarmData.AlarmTitle)
|
||||
}
|
||||
message := fmt.Sprintf(`
|
||||
<p>Alarm information</p>
|
||||
<p style="text-indent:2.5em">Sequence: %d</p>
|
||||
<p style="text-indent:3em">NE Name: %s</p>
|
||||
<p style="text-indent:3em">NE IP: %s</p>
|
||||
<p style="text-indent:4em">Title: %s</p>
|
||||
<p style="text-indent:2.5em">Severity: %s</p>
|
||||
<p style="text-indent:1.5em">Event Time: %s</p>
|
||||
@@ -39,6 +43,7 @@ func AlarmEmailForward(alarmData *Alarm) error {
|
||||
`,
|
||||
alarmData.AlarmSeq,
|
||||
alarmData.NeName,
|
||||
neInfo.IP,
|
||||
alarmData.AlarmTitle,
|
||||
severity,
|
||||
alarmData.EventTime,
|
||||
@@ -93,7 +98,7 @@ func AlarmEmailForward(alarmData *Alarm) error {
|
||||
//m.SetHeader("To", "zhangshuzhong@agrandtech.com", "simonzhangsz@outlook.com") // 收件人,可以多个收件人,但必须使用相同的 SMTP 连接
|
||||
//m.SetHeader("Cc", "******@qq.com") // 抄送,可以多个
|
||||
//m.SetHeader("Bcc", "******@qq.com") // 暗送,可以多个
|
||||
m.SetHeader("Subject", subjectTime) // 邮件主题
|
||||
m.SetHeader("Subject", subjectTitle) // 邮件主题
|
||||
|
||||
// text/html 的意思是将文件的 content-type 设置为 text/html 的形式,浏览器在获取到这种文件时会自动调用html的解析器对文件进行相应的处理。
|
||||
// 可以通过 text/html 处理文本格式进行特殊处理,如换行、缩进、加粗等等
|
||||
|
||||
@@ -113,6 +113,7 @@ type AlarmConfig struct {
|
||||
EmailForward struct {
|
||||
Enable bool `yaml:"enable" json:"enable"`
|
||||
EmailList string `yaml:"emailList" json:"emailList"`
|
||||
Title string `yaml:"title" json:"title"`
|
||||
SMTP string `yaml:"smtp" json:"smtp"`
|
||||
Port uint16 `yaml:"port" json:"port"`
|
||||
User string `yaml:"user" json:"user"`
|
||||
|
||||
@@ -163,16 +163,17 @@ omc:
|
||||
# 4:BINARY8BIT2, 6:CYRILLIC, 7:HEBREW, 8:UCS2
|
||||
alarm:
|
||||
alarmEmailForward:
|
||||
enable: true
|
||||
emailList:
|
||||
enable: false
|
||||
emailList: ""
|
||||
title: "Alarm from OMC"
|
||||
smtp: mail.smtp.com
|
||||
port: 25
|
||||
user: smtpext@smtp.com
|
||||
password: "1000smtp@omc!"
|
||||
tlsSkipVerify: true
|
||||
alarmSMSForward:
|
||||
enable: true
|
||||
mobileList:
|
||||
enable: false
|
||||
mobileList: ""
|
||||
smscAddr: "192.168.13.114:2775"
|
||||
systemID: "omc"
|
||||
password: "omc123"
|
||||
|
||||
@@ -35,6 +35,13 @@ omc:
|
||||
filter: "true;false"
|
||||
display: "Enable"
|
||||
comment: "Is it enabled forward alarm with Email interface"
|
||||
- name: "title"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "rw"
|
||||
filter: "0~64"
|
||||
display: "Email Title"
|
||||
comment: "string, no variable support"
|
||||
- name: "emailList"
|
||||
type: "string"
|
||||
value: ""
|
||||
|
||||
Reference in New Issue
Block a user