stc-broadcast.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. package broadcast
  2. import (
  3. "bytes"
  4. "context"
  5. "fmt"
  6. "io"
  7. "net"
  8. "pbx-api-gin/internal/app/ami/action"
  9. "pbx-api-gin/internal/app/stc/active"
  10. msgdata "pbx-api-gin/internal/app/stc/data"
  11. "pbx-api-gin/internal/app/stc/priority"
  12. alstatus "pbx-api-gin/internal/app/stc/sendstatus"
  13. "pbx-api-gin/pkg/lfshook"
  14. "pbx-api-gin/pkg/utils"
  15. "strconv"
  16. "sync"
  17. "time"
  18. )
  19. func HandleStcCmd(ctx context.Context, conn net.Conn) {
  20. for {
  21. select {
  22. case <-ctx.Done():
  23. return
  24. default:
  25. var buf bytes.Buffer
  26. tmp := make([]byte, 1024)
  27. if conn != nil {
  28. n, err := conn.Read(tmp)
  29. if err != nil {
  30. if err != io.EOF {
  31. conn.Close()
  32. }
  33. return
  34. }
  35. buf.Write(tmp[:n])
  36. }
  37. for {
  38. packet, err := msgdata.ExtractPacket(&buf)
  39. if err != nil {
  40. break
  41. }
  42. go processPacket(packet)
  43. }
  44. }
  45. }
  46. }
  47. // 处理单个数据包(原 switch 逻辑迁移过来)
  48. func processPacket(packet []byte) {
  49. if len(packet) < 6 {
  50. fmt.Println("Invalid packet length")
  51. return
  52. }
  53. //for recv data log debug
  54. if packet[5] != 0x03 && packet[5] != 0x0c && packet[5] != 0x01 {
  55. lfshook.NewLogger().Logger.Infof("Get data from STC ===============:%x", packet)
  56. }
  57. //check if the cmd type is avtive
  58. if packet[5] == 0x03 { // ACTIVE
  59. Active([2]byte{packet[8], packet[9]})
  60. return
  61. }
  62. //check if Master role
  63. if !active.Master {
  64. lfshook.NewLogger().Logger.Infof("=========Not Master Role Ignore data=============")
  65. return
  66. }
  67. switch packet[5] {
  68. case 0x01: //heartbeat
  69. /*
  70. //PAD-OCC异常情况处理
  71. if priority.OCCAnswer == 1 {
  72. //定时监测ICP queue 转到OCC queue, 避免异常情形下PAD进入ICP queue之后无法被接听
  73. resCaller, err := action.QueueStatus("0300", "") // check ICP queue, get entries
  74. if err != nil {
  75. lfshook.NewLogger().Infof("==ICP=QueueStatus==%+v", err)
  76. return
  77. }
  78. if resCaller.Calls != "0" {
  79. sort.Slice(resCaller.Entrys, func(i, j int) bool {
  80. return resCaller.Entrys[i].Position < resCaller.Entrys[j].Position
  81. })
  82. for _, caller := range resCaller.Entrys {
  83. priority.ICPAnswer = 0
  84. lfshook.NewLogger().Infof("====Redirect to 0301 entry:%s=Pos:%s==", caller.CallerIDNum, caller.Position)
  85. //order by pos
  86. action.RedirectInQueue(caller.CallerIDNum, "0301", "queues-occ", caller.CallerIDNum) // redirect All ICP-PAD redirect to OCC queue
  87. time.Sleep(time.Microsecond * 200) //200 ms delay
  88. }
  89. }
  90. //定时监测OCC queue, 避免异常情况下PAD 在OCC queue里面不能自动转到OCC
  91. res, err := action.QueueStatus("0301", "") // check OCC queue ,if empty PAD end
  92. if err != nil {
  93. lfshook.NewLogger().Infof("==OCC=QueueStatus==%+v", err)
  94. return
  95. }
  96. if res.Calls != "0" { //OCC queue is not empty
  97. // HangupAllLocalChan()
  98. lfshook.NewLogger().Infof("====Start OCC-PAD===next==%+v", res)
  99. if active.ActivedCab == "1" && action.ExtenStatus("1411") == "Idle" { //check active and OCC status
  100. time.Sleep(time.Second)
  101. PADChan := ""
  102. for _, chanEntry := range res.Entrys {
  103. lfshook.NewLogger().Infof("====PAD answered by OCC1 pos:%s===chan:%s=", chanEntry.Position, chanEntry.Channel)
  104. if chanEntry.Position == "1" {
  105. PADChan = chanEntry.Channel
  106. break
  107. }
  108. }
  109. if PADChan != "" {
  110. alstatus.AlarmStatus(strings.Split(strings.Split(res.Entrys[0].Channel, "/")[1], "-")[0], "connect")
  111. go action.RedirectInQueue(PADChan, "1411", "pad-page-occ-icp", "1") //PAD Page(OCC+ICPs)
  112. go action.Dial("0401", "0512", "pad-rule-pacus-occ", "ano1", "ano1", "1") // PACUs dial OCC1
  113. } else {
  114. lfshook.NewLogger().Infof("===OCC-QueueStatus==PADCchan NULL")
  115. }
  116. break
  117. } else if active.ActivedCab == "8" && action.ExtenStatus("1481") == "Idle" {
  118. time.Sleep(time.Second)
  119. PADChan := ""
  120. for _, chanEntry := range res.Entrys {
  121. lfshook.NewLogger().Infof("====PAD answered by OCC1 pos:%s===chan:%s=", chanEntry.Position, chanEntry.Channel)
  122. if chanEntry.Position == "1" {
  123. PADChan = chanEntry.Channel
  124. break
  125. }
  126. }
  127. if PADChan != "" {
  128. alstatus.AlarmStatus(strings.Split(strings.Split(res.Entrys[0].Channel, "/")[1], "-")[0], "connect")
  129. go action.RedirectInQueue(PADChan, "1481", "pad-page-occ-icp", "8") //PAD Page(OCC+ICPs)
  130. go action.Dial("0401", "0512", "pad-rule-pacus-occ", "ano8", "ano8", "8") // PACUs dial OCC1
  131. } else {
  132. lfshook.NewLogger().Infof("===OCC-QueueStatus==PADCchan NULL")
  133. }
  134. break
  135. }
  136. }
  137. }
  138. */
  139. break
  140. case 0x02: // STN
  141. if active.ActivedCab != "" {
  142. if priority.CheckPriority("STN") {
  143. action.InterruptRunningTask("STN") //STN interrupt other
  144. StationAnn(packet)
  145. } else {
  146. alstatus.PaStatus("", "STN", "refuse")
  147. }
  148. }
  149. case 0x05: // SPC
  150. if active.ActivedCab != "" {
  151. if priority.CheckPriority("SPC") {
  152. action.InterruptRunningTask("SPC") //SPC interrupt other
  153. SpecialAnn(packet)
  154. } else {
  155. alstatus.PaStatus("", "SPC", "refuse")
  156. }
  157. }
  158. case 0x06: // EMG
  159. if active.ActivedCab != "" {
  160. if priority.CheckPriority("EMG") {
  161. action.InterruptRunningTask("EMG") //EMG interrupt other
  162. EmgMsg(packet)
  163. } else {
  164. alstatus.PaStatus("", "EMG", "refuse")
  165. }
  166. }
  167. case 0x07: // STOP
  168. AnnStop([4]byte{packet[8], packet[9], packet[10], packet[11]})
  169. case 0x08: // DCS
  170. if active.ActivedCab != "" {
  171. if priority.CheckPriority("DCS") {
  172. action.InterruptRunningTask("DCS") //DCS interrupt other
  173. DcsAnn(packet)
  174. } else {
  175. alstatus.PaStatus("", "DCS", "refuse")
  176. }
  177. }
  178. case 0x09: // SELF CHECK
  179. if active.ActivedCab != "" {
  180. if priority.CheckPriority("CHK") {
  181. action.InterruptRunningTask("CHK") //CHK interrupt other
  182. SelfCheck(packet)
  183. } else {
  184. alstatus.PaStatus("", "CHK", "refuse")
  185. }
  186. }
  187. case 0x0a: // Tone-test
  188. if active.ActivedCab != "" {
  189. if priority.CheckPriority("VOL") {
  190. action.InterruptRunningTask("VOL") //VOL interrupt other
  191. ToneTest(packet)
  192. } else {
  193. alstatus.PaStatus("", "VOL", "refuse")
  194. }
  195. }
  196. case 0x0e: //TMS answer PAD
  197. if priority.CheckPriority("PAD-TMS") {
  198. action.InterruptRunningTask("PAD-TMS") //PAD-TMS interrupt other
  199. AlarmHandleTMS(packet)
  200. if active.QueueTimer != nil {
  201. if active.SetTimer {
  202. active.QueueTimer.Stop()
  203. active.SetTimer = false
  204. }
  205. }
  206. } else {
  207. alstatus.PaStatus("", "PAD-TMS", "refuse")
  208. }
  209. case 0x0b: // reset all PAD
  210. AlarmHoldResetAll(packet[8]) // reset all pad
  211. //case 0x0c: // recored config
  212. // RecordStorageConf(packet[8:]) // RCD setting
  213. case 0x0d: // ICP answer PAD
  214. if priority.CheckPriority("PAD-ICP") {
  215. action.InterruptRunningTask("PAD-ICP") //PAD-ICP interrupt other
  216. if active.QueueTimer != nil {
  217. if active.SetTimer {
  218. active.QueueTimer.Stop()
  219. active.SetTimer = false
  220. }
  221. }
  222. AlarmHandleICP(packet) //
  223. } else {
  224. alstatus.PaStatus("", "PAD-ICP", "refuse")
  225. }
  226. //default:
  227. //fmt.Printf("Unknown command: %x\n", packet[5])
  228. }
  229. }
  230. // STN , 自动报站广播
  231. func StationAnn(data []byte) (err error) {
  232. specialVoice := int(data[8])
  233. delay := data[9]
  234. cycleCount := data[10]
  235. datalen := int(data[11])
  236. filename := msgdata.SubstrByRune(string(data[12:]), 0, datalen-4)
  237. //set spc voice tag
  238. priority.SpecialVoice = specialVoice
  239. action.PlaybackPacu(strconv.Quote(filename), int(cycleCount), int(delay), "STN")
  240. return nil
  241. }
  242. // 激活信号
  243. func Active(data [2]byte) {
  244. //var info model.Sysinfo
  245. //active.Actived = true
  246. Signal := int(data[0])
  247. Master := int(data[1])
  248. //lfshook.NewLogger().Logger.Infof("Active data : %x", Signal)
  249. if !active.Master && active.CabNum == "8" { //slave role , check the Master data from STC
  250. if Master == 8 {
  251. active.Master = true
  252. }
  253. } else if !active.Master && active.CabNum == "1" {
  254. if Master == 1 {
  255. active.Master = true
  256. }
  257. }
  258. if active.Master && !utils.IsAsteriskOn() {
  259. utils.ExecCmd("/etc/init.d/asterisk", "start")
  260. } else if !active.Master && utils.IsAsteriskOn() {
  261. utils.ExecCmd("/etc/init.d/asterisk", "stop")
  262. }
  263. switch Signal {
  264. case 0:
  265. //lfshook.NewLogger().Logger.Infof("=================Inactive==================")
  266. active.ActivedCab = ""
  267. action.InActiveHangup()
  268. case 1:
  269. active.ActivedCab = "1"
  270. //lfshook.NewLogger().Logger.Infof("=================active===MC1===============")
  271. case 8:
  272. active.ActivedCab = "8"
  273. //lfshook.NewLogger().Logger.Infof("=================active===MC8===============")
  274. }
  275. }
  276. // SPC ,特殊服务消息广播
  277. func SpecialAnn(data []byte) {
  278. delay := data[8]
  279. cycleCount := data[9]
  280. datalen := int(data[10])
  281. filename := msgdata.SubstrByRune(string(data[11:]), 0, datalen-4)
  282. if int(cycleCount) == 255 {
  283. action.PlaybackPacu(strconv.Quote(filename), 9999999, int(delay), "SPC")
  284. } else {
  285. action.PlaybackPacu(strconv.Quote(filename), int(cycleCount), int(delay), "SPC")
  286. }
  287. }
  288. // EMG ,紧急服务消息广播
  289. func EmgMsg(data []byte) {
  290. delay := data[8]
  291. cycleCount := data[9]
  292. datalen := int(data[10])
  293. filename := msgdata.SubstrByRune(string(data[11:]), 0, datalen-4)
  294. if int(cycleCount) == 255 {
  295. action.PlaybackPacu(strconv.Quote(filename), 9999999, int(delay), "EMG")
  296. } else {
  297. action.PlaybackPacu(strconv.Quote(filename), int(cycleCount), int(delay), "EMG")
  298. }
  299. }
  300. // 停止指定类型广播
  301. func AnnStop(data [4]byte) {
  302. lfshook.NewLogger().Logger.Infof("=========AnnStop Type %x", data[0])
  303. switch data[0] {
  304. case 0x03:
  305. action.HangupTask("DCS") //STOP DCS
  306. case 0x04:
  307. action.HangupTask("EMG") //STOP EMG
  308. case 0x07:
  309. action.HangupTask("SPC") //STOP SPC
  310. case 0x08:
  311. action.HangupTask("STN") //STOP STN
  312. case 0x09:
  313. action.HangupTask("CHK") //STOP CHK
  314. case 0x0a:
  315. action.HangupTask("VOL") //STOP VOL
  316. default:
  317. action.InterruptRunningTask("")
  318. }
  319. }
  320. // DCS 语音
  321. func DcsAnn(data []byte) {
  322. delay := data[8]
  323. cycleCount := data[9]
  324. datalen := int(data[10])
  325. filename := msgdata.SubstrByRune(string(data[11:]), 0, datalen-4)
  326. if int(cycleCount) == 255 {
  327. action.PlaybackPacu(strconv.Quote(filename), 9999999, int(delay), "DCS")
  328. } else {
  329. action.PlaybackPacu(strconv.Quote(filename), int(cycleCount), int(delay), "DCS")
  330. }
  331. }
  332. // tone-test广播
  333. func ToneTest(data []byte) {
  334. check := data[8]
  335. delay := data[9]
  336. cycleCount := data[10]
  337. datalen := int(data[11])
  338. filename := msgdata.SubstrByRune(string(data[12:]), 0, datalen-4)
  339. switch check {
  340. case 0x01: //start
  341. action.PlaybackPacu(strconv.Quote(filename), int(cycleCount), int(delay), "VOL")
  342. case 0x02: //stop
  343. action.HangupAllExcept("")
  344. }
  345. }
  346. // 自检广播
  347. func SelfCheck(data []byte) {
  348. check := data[8]
  349. delay := data[9]
  350. //cycleCount := data[10]
  351. cycleCount := 0x32
  352. datalen := int(data[11])
  353. filename := msgdata.SubstrByRune(string(data[12:]), 0, datalen-4)
  354. switch check {
  355. case 0x01: //start
  356. action.PlaybackPacu(strconv.Quote(filename), int(cycleCount), int(delay), "CHK")
  357. case 0x02: //stop
  358. action.HangupAllExcept("")
  359. }
  360. }
  361. // 全局变量:记录正在抑制的 exten
  362. var (
  363. suppressedExts = sync.Map{} // map[string]struct{},值存在即表示被抑制
  364. //suppressionMu sync.Mutex // 保护初始化和清理操作(可选)
  365. )
  366. // suppressKey 生成用于抑制的 key(可以根据需求扩展)
  367. func suppressKey(exten string, handler byte) string {
  368. return fmt.Sprintf("%s_h%x", exten, handler)
  369. }
  370. // ICP操作乘客报警(根据激活信息判断转到1车还是8车================)
  371. func AlarmHandleICP(data []byte) {
  372. handler := data[8]
  373. carr := data[12]
  374. pos := data[13]
  375. exten := fmt.Sprintf("24%c%c", carr, pos)
  376. key := suppressKey(exten, handler)
  377. //Drop other handler in 2 sec
  378. //PACUs---call---->ICP1
  379. //PAD---->Chanspy(WEq)-->ICP1;PAD--->Call---->ICP2
  380. if handler == 0x01 {
  381. if _, loaded := suppressedExts.LoadOrStore(key, struct{}{}); loaded {
  382. lfshook.NewLogger().Logger.Infof("Suppressed duplicate ICP Alarm (handler=0x01) for exten: %s within 4 seconds", exten)
  383. return
  384. }
  385. time.AfterFunc(4*time.Second, func() {
  386. suppressedExts.Delete(key)
  387. lfshook.NewLogger().Logger.Debugf("Suppression released for key: %s", key)
  388. })
  389. }
  390. switch handler {
  391. case 0x01: //answer(ICP+Alarm+PACU)
  392. //NotifyPaiu(exten, "answer")
  393. priority.ICPAnswer = 1
  394. if priority.PADStart == 0 {
  395. alstatus.PaStatus(exten, "PAD", "start")
  396. priority.PADStart = 1
  397. }
  398. lfshook.NewLogger().Logger.Infof("================ICP Answer PAD================:%s ", exten)
  399. if active.ActivedCab == "1" {
  400. action.Dial("0402", "0511", "pad-rule-pacus", "ani1", exten, "1") // PACUs dial ICP1
  401. //goto ami event ConfbridgeJoin, ICP answer PAD
  402. } else if active.ActivedCab == "8" {
  403. action.Dial("0402", "0511", "pad-rule-pacus", "ani8", exten, "8") // PACUs dial ICP8
  404. //goto ami event ConfbridgeJoin, ICP answer PAD
  405. } else if active.ActivedCab == "" { // No cab occupied
  406. action.Dial("0402", "0511", "pad-rule-pacus", "ani1", exten, "1") // PACUs dial ICP1
  407. }
  408. case 0x02: //hold 重新放回队列里面
  409. active.NotifyPaiu(exten, "hold")
  410. err := action.RedirectInQueue(exten, "0300", "queues-icp-redirect", "1")
  411. if err != nil {
  412. lfshook.NewLogger().Info(err)
  413. }
  414. action.InterruptRunningTask("")
  415. //action.HangupICP()
  416. case 0x03: //hangup
  417. //NotifyPaiu(exten, "hangup")
  418. lfshook.NewLogger().Logger.Infof("=============STC== Hangup PAD=============== ")
  419. action.Hangup(exten) //Pad
  420. //action.HangupICP()
  421. action.InterruptRunningTask("")
  422. }
  423. }
  424. // TMS操作乘客报警(根据激活信息判断转到1车还是8车================)
  425. func AlarmHandleTMS(data []byte) {
  426. handler := data[8]
  427. //extlen := data[9]
  428. carr := data[12]
  429. pos := data[13]
  430. exten := fmt.Sprintf("24%c%c", carr, pos)
  431. PacuNum := fmt.Sprintf("21%c%c", carr, pos)
  432. key := suppressKey(exten, handler)
  433. //Drop other handler in 2 sec
  434. // 只对 handler == 0x01 做 2 秒去重
  435. if handler == 0x01 {
  436. if _, loaded := suppressedExts.LoadOrStore(key, struct{}{}); loaded {
  437. lfshook.NewLogger().Logger.Infof("Suppressed duplicate ICP Alarm (handler=0x01) for exten: %s within 4 seconds", exten)
  438. return // 已存在,说明在2秒窗口期内,直接丢弃
  439. }
  440. // 设置4秒后删除该 key,允许下次通过
  441. time.AfterFunc(4*time.Second, func() {
  442. suppressedExts.Delete(key)
  443. lfshook.NewLogger().Logger.Debugf("Suppression released for key: %s", key)
  444. })
  445. }
  446. switch handler {
  447. case 0x01: //answer(ICP+Alarm+PACU)
  448. //PACU---call---->ICP1
  449. //PAD---->Chanspy(WEq)-->ICP1;PAD--->Call---->ICP2
  450. if priority.PADStart == 0 {
  451. alstatus.PaStatus(exten, "PAD", "start")
  452. priority.PADStart = 1
  453. }
  454. priority.ICPAnswer = 1
  455. lfshook.NewLogger().Logger.Infof("================TMS Answer PAD:%s===PACU:%s==========", exten, PacuNum)
  456. if action.ExtenStatus(PacuNum) == "Idle" {
  457. if active.ActivedCab == "1" {
  458. action.Dial("0403", PacuNum, "default", PacuNum, exten, "1") // PACU dial ICP1
  459. //goto ami event BridgeEnter, ICP8 whisper ICP1
  460. } else if active.ActivedCab == "8" {
  461. action.Dial("0403", PacuNum, "default", PacuNum, exten, "8") // PACU dial ICP8
  462. //goto ami event BridgeEnter, ICP1 whisper ICP8
  463. }
  464. } else {
  465. action.RedirectInQueue(exten, "0405", "default", exten) // PAD dial ICPs
  466. }
  467. case 0x02: //hold 重新放回队列里面
  468. active.NotifyPaiu(exten, "hold")
  469. err := action.RedirectInQueue(exten, "0300", "queues-icp-redirect", "1")
  470. if err != nil {
  471. lfshook.NewLogger().Info(err)
  472. }
  473. action.HangupAllLocalChan()
  474. case 0x03: //hangup
  475. //NotifyPaiu(exten, "hangup")
  476. action.Hangup(exten) //Pad
  477. action.HangupAllLocalChan()
  478. action.HangupICP()
  479. }
  480. }
  481. // 挂断所有报警器
  482. func AlarmHoldResetAll(handler byte) {
  483. //hangup all actived PAD
  484. action.HangupAllPAD()
  485. //hangup running task
  486. action.InterruptRunningTask("AlarmHoldResetAll") //Reset PAD ALL
  487. }
  488. /*
  489. func RecordStorageConf(data []byte) {
  490. var info model.RcdConf
  491. info.PadRcdEnable = strconv.Itoa(int(data[0]))
  492. info.PadRcdStorageDays = strconv.Itoa(int(data[1]))
  493. info.PaRcdStorageDays = strconv.Itoa(int(data[2]))
  494. info.CpaRcdStorageDays = strconv.Itoa(int(data[3]))
  495. info.PadRcdDelDays = strconv.Itoa(int(data[4]))
  496. info.PaRcdDelDays = strconv.Itoa(int(data[5]))
  497. info.CpaRcdDelDays = strconv.Itoa(int(data[6]))
  498. //info.OpaRcdStorageDays = int(data[7])
  499. //info.OpaRcdDelDays = int(data[8])
  500. //lfshook.NewLogger().Infof("=============Set record Conf : %+v", info)
  501. filePath := "/etc/asterisk/recording.conf"
  502. _, err := os.Stat(filePath)
  503. if err != nil {
  504. logrus.Error(err)
  505. return
  506. }
  507. iniFile, err := ini.Load(filePath)
  508. if err != nil {
  509. logrus.Error(err)
  510. return
  511. }
  512. iniFile.Section("general").Key("PADRCD").SetValue(info.PadRcdEnable)
  513. iniFile.Section("general").Key("PADRCDDAYS").SetValue(info.PadRcdStorageDays)
  514. iniFile.Section("general").Key("PARCDDAYS").SetValue(info.PaRcdStorageDays)
  515. iniFile.Section("general").Key("CPARCDDAYS").SetValue(info.CpaRcdStorageDays)
  516. iniFile.Section("general").Key("PADRCDDELDAYS").SetValue(info.PadRcdDelDays)
  517. iniFile.Section("general").Key("PARCDDELDAYS").SetValue(info.PaRcdDelDays)
  518. iniFile.Section("general").Key("CPARCDDELDAYS").SetValue(info.CpaRcdDelDays)
  519. iniFile.SaveTo(filePath)
  520. }
  521. */