call.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. package action
  2. import (
  3. "errors"
  4. "fmt"
  5. "pbx-api-gin/internal/app/stc/active"
  6. "pbx-api-gin/internal/app/stc/priority"
  7. "pbx-api-gin/pkg/lfshook"
  8. "pbx-api-gin/pkg/utils"
  9. "sort"
  10. "strings"
  11. "time"
  12. )
  13. var Pads = []string{"2413", "2414", "2415", "2421", "2422", "2423", "2424", "2425", "2431", "2432", "2433", "2434", "2435", "2441", "2442", "2443", "2444",
  14. "2445", "2451", "2452", "2453", "2454", "2455", "2461", "2462", "2463", "2464", "2465", "2471", "2472", "2473", "2474", "2475", "2481", "2482", "2483",
  15. "2484", "2485", "2411", "2412"}
  16. var Pacus = []string{"2111", "2121", "2131", "2141", "2151", "2161", "2171", "2181"}
  17. var Speakers = []string{"2111", "2121", "2131", "2141", "2151", "2161", "2171", "2181", "2311", "2381"}
  18. // Function triggered before no cab occupied signal interrupt
  19. func InActiveHangup() {
  20. if active.ActivedCab == "" {
  21. HangupTask("PA")
  22. HangupTask("CPA")
  23. HangupTask("VOL")
  24. HangupTask("PAD-OCC")
  25. }
  26. }
  27. // Hangup 挂断指定分机或通道
  28. func Hangup(channel string) {
  29. lfshook.NewLogger().Infof("hangup extensions/channel %s", channel)
  30. if !utils.IsChannel(channel) {
  31. channel = fmt.Sprintf(`/^(PJ)?SIP\/%s-.*$/`, channel)
  32. }
  33. action := map[string]string{
  34. "Action": "hangup",
  35. "Channel": channel,
  36. }
  37. lfshook.NewLogger().Infof("hangup action %+v", action)
  38. if _, _, err := AminInstance.Send(action); err != nil {
  39. lfshook.NewLogger().Errorf("Hangup %+v", err)
  40. }
  41. }
  42. // Hangup 挂断所有分机,除指定分机和PAD
  43. func HangupAllExcept(caller string) {
  44. //all PACU
  45. for _, ret := range Pacus {
  46. Hangup(ret)
  47. }
  48. switch caller {
  49. case "2311":
  50. Hangup("1411") //IO1
  51. Hangup("1481") //IO8
  52. //Hangup("2311") //ICP1
  53. Hangup("2381") //ICP8
  54. case "2381":
  55. Hangup("1411") //IO1
  56. Hangup("1481") //IO8
  57. Hangup("2311") //ICP1
  58. //Hangup("2381") //ICP8
  59. case "1411":
  60. //Hangup("1411") //IO1
  61. Hangup("1481") //IO8
  62. Hangup("2311") //ICP1
  63. Hangup("2381") //ICP8
  64. case "1481":
  65. Hangup("1411") //IO1
  66. //Hangup("1481") //IO8
  67. Hangup("2311") //ICP1
  68. Hangup("2381") //ICP8
  69. case "":
  70. Hangup("1411") //IO1
  71. Hangup("1481") //IO8
  72. Hangup("2311") //ICP1
  73. Hangup("2381") //ICP8
  74. }
  75. }
  76. // Hangup task
  77. func HangupTask(TaskName string) {
  78. taskInfo, ok := priority.RegistryTask.Get(TaskName)
  79. if ok {
  80. HangupAllLocalChan()
  81. ConfbridgeKick(taskInfo.ConfbridgeID, "all")
  82. Hangup(taskInfo.RunChannel)
  83. }
  84. }
  85. // interrupt the running task
  86. func InterruptRunningTask(toRunTask string) {
  87. var task priority.TaskInfo
  88. var taskName string
  89. var ok bool
  90. if toRunTask != "PA" && toRunTask != "PAD-ICP" && toRunTask != "PAD-TMS" { // ignore C2C
  91. taskName, task, ok = priority.RegistryTask.HighestPriorityRunningTask1()
  92. if !ok {
  93. return
  94. }
  95. } else { // have to check C2C
  96. taskName, task, ok = priority.RegistryTask.HighestPriorityRunningTask()
  97. if !ok {
  98. return
  99. }
  100. }
  101. lfshook.NewLogger().Infof("===InterruptRunningTask=toRuntask=%s==RunningTask:%s===chan:%s", toRunTask, taskName, task.RunChannel)
  102. //same type return
  103. if toRunTask == taskName {
  104. if toRunTask == "PAD-ICP" || toRunTask == "PAD-TMS" {
  105. lfshook.NewLogger().Infof("===InterruptRunningTask=ret==== ")
  106. return
  107. }
  108. }
  109. //pad all reset
  110. if toRunTask == "AlarmHoldResetAll" {
  111. HangupAllLocalChan()
  112. return
  113. }
  114. switch task.RunType {
  115. case "CPA":
  116. //kick CPA members
  117. //taskTmp, ok := priority.RegistryTask.Get("CPA")
  118. //if ok {
  119. CPAConfbridgeKick(task.ConfbridgeID)
  120. //}
  121. case "EMG":
  122. //kick EMG members
  123. //taskTmp, ok := priority.RegistryTask.Get("EMG")
  124. //if ok {
  125. EMGConfbridgeKick(task.ConfbridgeID)
  126. //}
  127. case "C2C": // Interrupt C2C task running,
  128. if toRunTask == "PA" || toRunTask == "PAD-ICP" || toRunTask == "PAD-TMS" {
  129. HangupICP()
  130. return
  131. }
  132. case "PAD-ICP", "PAD-TMS": // Interrupt PAD task running,
  133. priority.InterruptedPad = "PAD-ICP"
  134. lfshook.NewLogger().Infof("===InterruptRunningTask==hangup===PAD-ICP==%s==== ", task.RunType)
  135. chans, err := CoreShowChannels()
  136. if err != nil {
  137. lfshook.NewLogger().Errorf("CoreShowChannels %+v", err)
  138. }
  139. //1. Redirect the connected PAD to 0300,hangup the other pad channel
  140. for _, ret := range chans {
  141. // Redirect the connected PAD to 0300
  142. if utils.IsPAIU(ret.CallerIDNum) {
  143. if ret.ConnectedLineNum == "<unknown>" { //redirect pad chanspy channel
  144. err := Redirect(ret.Channel, "0300", "queues-icp-redirect", "", "PAD")
  145. if err != nil {
  146. lfshook.NewLogger().Errorf("Redirect %+v", err)
  147. }
  148. number := strings.Split(strings.Split(ret.Channel, "-")[0], "/")[1]
  149. active.NotifyPaiu(number, "hold")
  150. //HangupAllLocalChan()
  151. }
  152. }
  153. }
  154. for _, ret := range chans {
  155. //hangup pad call ICP channel
  156. if utils.IsPAIU(ret.CallerIDNum) {
  157. if utils.IsPAIU(ret.CallerIDNum) && ret.ChannelStateDesc == "Up" && utils.IsICP(ret.ConnectedLineNum) {
  158. lfshook.NewLogger().Infof("===Hangup=Chan===%+v==== ", ret.Channel)
  159. Hangup(ret.Channel)
  160. }
  161. }
  162. }
  163. priority.RegistryTask.StopAndUnregister("PAD-ICP")
  164. priority.RegistryTask.StopAndUnregister("PAD-TMS")
  165. //2. hangup task channel (ICP + PACU)
  166. lfshook.NewLogger().Infof("===InterruptRunningTask=2. hangup task channel === ")
  167. HangupAllLocalChan()
  168. HangupICP()
  169. case "PAD-OCC": // Interrupt PAD-OCC task running,
  170. if toRunTask == "C2C" {
  171. HangupICP()
  172. break
  173. } else {
  174. priority.InterruptedPad = "PAD-OCC"
  175. priority.OCCAnswer = 0
  176. resCaller, err := QueueStatus("0301", "") // check OCC queue, get entries
  177. if err != nil {
  178. lfshook.NewLogger().Infof("===QueueStatus==%+v", err)
  179. }
  180. for _, caller := range resCaller.Entrys {
  181. lfshook.NewLogger().Infof("===QueueStatus=entry=%+v", caller)
  182. time.Sleep(time.Millisecond * 50)
  183. RedirectInQueue(caller.CallerIDNum, "0300", "queues-icp-redirect", caller.CallerIDNum) // redirect All PAD redirect to ICP queue
  184. }
  185. priority.RegistryTask.StopAndUnregister("PAD-OCC")
  186. //2. Hangup connected PAD
  187. lfshook.NewLogger().Infof("===InterruptRunningTask=Hangup connected PAD=== ")
  188. Hangup(task.RunChannel)
  189. //3. Hangup OI & ICP
  190. HangupIO()
  191. HangupAllLocalChan()
  192. }
  193. default:
  194. lfshook.NewLogger().Infof("===InterruptRunningTask=default=== ")
  195. //if !strings.Contains(priority.RunningPATaskChan, "0502@default") {
  196. // Hangup(priority.RunningPATaskChan)
  197. //}
  198. Hangup(task.RunChannel)
  199. ConfbridgeKick(task.ConfbridgeID, "all")
  200. }
  201. }
  202. // Hangup all ICP
  203. func HangupICP() {
  204. Hangup("2311") //ICP1
  205. Hangup("2381") //ICP8
  206. }
  207. // Hangup all IO
  208. func HangupIO() {
  209. Hangup("1411") //IO1
  210. Hangup("1481") //IO8
  211. }
  212. // Hangup all PACU
  213. func HangupAllPACU() {
  214. //all PACU
  215. for _, ret := range Pacus {
  216. Hangup(ret)
  217. }
  218. }
  219. func HangupAllLocalChan() {
  220. chans, err := CoreShowChannels()
  221. if err != nil {
  222. lfshook.NewLogger().Errorf("CoreShowChannels %+v", err)
  223. }
  224. for _, ret := range chans {
  225. if strings.Contains(ret.Channel, "Local") && !strings.Contains(ret.Channel, "0502@default") {
  226. lfshook.NewLogger().Infof("HangupAllLocalChan=====hangup========= %+v", ret)
  227. Hangup(ret.Channel)
  228. }
  229. }
  230. }
  231. // Hangup all PACU
  232. func HangupAllPAD() {
  233. //all PAD
  234. for _, ret := range Pads {
  235. Hangup(ret)
  236. }
  237. }
  238. // Hangup all calls
  239. func HangupAll() {
  240. utils.ExecCmdAsync("/usr/sbin/asterisk", "-rx", "hangup request all")
  241. }
  242. // Dial 拨打号码
  243. func Dial(src, dst, dialrule, callerID, callerName string, callType string) {
  244. chanel := fmt.Sprintf("%s/%s@default", "Local", src)
  245. action := map[string]string{
  246. "Action": "Originate",
  247. "Channel": chanel,
  248. "Exten": dst,
  249. "Context": dialrule,
  250. "CallerID": fmt.Sprintf("%s<%s>", callerName, callerID),
  251. "Priority": "1",
  252. "Variable": fmt.Sprintf("CAB=%s", callType),
  253. "async": "true",
  254. }
  255. lfshook.NewLogger().Infof("dial action %+v", action)
  256. res, _, err := AminInstance.Send(action)
  257. if err != nil {
  258. lfshook.NewLogger().Errorf("%+v", err)
  259. }
  260. lfshook.NewLogger().Info(res)
  261. }
  262. // Dial 拨打号码
  263. func DialICP(src, dst, dialrule, callerID, callerName string) {
  264. chanel := fmt.Sprintf("%s/%s@call-icp", "Local", src)
  265. action := map[string]string{
  266. "Action": "Originate",
  267. "Channel": chanel,
  268. "Exten": dst,
  269. "Context": dialrule,
  270. "CallerID": fmt.Sprintf("%s<%s>", callerName, callerID),
  271. "Priority": "1",
  272. "Variable": fmt.Sprintf("CBID=%s", callerID),
  273. "async": "true",
  274. }
  275. lfshook.NewLogger().Infof("dial action %+v", action)
  276. res, _, err := AminInstance.Send(action)
  277. if err != nil {
  278. lfshook.NewLogger().Errorf("%+v", err)
  279. }
  280. lfshook.NewLogger().Info(res)
  281. }
  282. // 获取分机状态
  283. func ExtenStatus(exten string) (Status string) {
  284. action := map[string]string{
  285. "Action": "ExtensionState",
  286. "Exten": exten,
  287. "Context": "default",
  288. }
  289. res, _, err := AminInstance.Send(action)
  290. if err != nil {
  291. lfshook.NewLogger().Errorf("%+v", err)
  292. return ""
  293. }
  294. //lfshook.NewLogger().Infof("================ExtensionState:res %+v", res)
  295. return res["StatusText"]
  296. }
  297. // PACU ChanSpy
  298. func ChanSpy(src, dst string, whisper, bargein bool) {
  299. lfshook.NewLogger().Infof("chan spy src:%s dst:%s", src, dst)
  300. //channel := fmt.Sprintf("%s/%s", utils.DialPrefix, dst)
  301. channel := fmt.Sprintf("Local/%s@aio-rule", dst)
  302. data := fmt.Sprintf("%s/%s,qBE", utils.DialPrefix, src)
  303. /*
  304. if whisper {
  305. data = fmt.Sprintf("%s,w", data)
  306. }
  307. if bargein {
  308. data = fmt.Sprintf("%s,B", data)
  309. }
  310. */
  311. action := map[string]string{
  312. "Action": "Originate",
  313. "Channel": channel, // 不存在的通话
  314. "Application": "ChanSpy",
  315. "Data": data, // 存在的通话
  316. "CallerID": dst,
  317. "Async": "true",
  318. }
  319. lfshook.NewLogger().Infof("PACU ChanSpy action %+v", action)
  320. _, _, err := AminInstance.Send(action)
  321. if err != nil {
  322. lfshook.NewLogger().Errorf("%+v", err)
  323. }
  324. }
  325. // Redirect 转接
  326. func RedirectInQueue(channel, dst, dialrule, callerID string) (err error) {
  327. //callerID := "redirect"
  328. lfshook.NewLogger().Infof("redirect src %s to dst %s", channel, dst)
  329. if !utils.IsChannel(channel) {
  330. //callerID = channel
  331. if channel, err = GetChannelByExtenNotBridged(channel); err != nil {
  332. return err
  333. }
  334. }
  335. action := map[string]string{
  336. "Action": "Redirect",
  337. "Channel": channel,
  338. "Exten": dst,
  339. "Context": dialrule,
  340. "CallerID": callerID,
  341. "Priority": "1",
  342. "async": "true",
  343. }
  344. lfshook.NewLogger().Infof("redirect %+v", action)
  345. res, _, err := AminInstance.Send(action)
  346. if err != nil {
  347. lfshook.NewLogger().Error(err)
  348. }
  349. lfshook.NewLogger().Info(res)
  350. return err
  351. }
  352. // Redirect 转接
  353. func Redirect(channel, dst, dialrule, callerID, callerName string) (err error) {
  354. //callerID := "redirect"
  355. lfshook.NewLogger().Infof("redirect src %s to dst %s", channel, dst)
  356. if !utils.IsChannel(channel) {
  357. callerID = channel
  358. if channel, err = GetChannelByExten(channel); err != nil {
  359. return err
  360. }
  361. }
  362. action := map[string]string{
  363. "Action": "Redirect",
  364. "Channel": channel,
  365. "Exten": dst,
  366. "Context": dialrule,
  367. "CallerID": fmt.Sprintf("%s<%s>", callerName, callerID),
  368. "Priority": "1",
  369. "async": "true",
  370. }
  371. lfshook.NewLogger().Infof("redirect %+v", action)
  372. res, _, err := AminInstance.Send(action)
  373. if err != nil {
  374. lfshook.NewLogger().Error(err)
  375. }
  376. lfshook.NewLogger().Info(res)
  377. return err
  378. }
  379. func SetPadTimer() {
  380. toRunPadpriority := priority.GetPriorityByKey(priority.InterruptedPad) // 获取之前打断的报警优先级
  381. //toRunpriority := priority.GetPriorityByKey("PAD-ICP")
  382. _, taskTmp, ok := priority.RegistryTask.HighestPriorityRunningTask()
  383. if ok {
  384. lfshook.NewLogger().Infof("==SetPadTimer====runing:%d==toRun:%d=", taskTmp.Priority, toRunPadpriority)
  385. if taskTmp.Priority < toRunPadpriority { //higher priority task running ,do not set timer
  386. return
  387. }
  388. }
  389. res, err := QueueStatus("0300", "") // check OCC queue , if empty OCC-PAD start
  390. if err != nil {
  391. lfshook.NewLogger().Infof("===OCC-QueueStatus==%+v", err)
  392. return
  393. }
  394. if res.Calls != "0" {
  395. lfshook.NewLogger().Infof("==SetPadTimer==QueueTimer===1====")
  396. active.SetTimer = true
  397. active.QueueTimer = time.AfterFunc(30*time.Second, func() { // check the PAD 30s timeout
  398. res, err := QueueStatus("0301", "") // check OCC queue , if empty OCC-PAD start
  399. if err != nil {
  400. lfshook.NewLogger().Infof("===OCC-QueueStatus==%+v", err)
  401. return
  402. }
  403. if res.Calls == "0" { // OCC queue empty
  404. resCaller, err := QueueStatus("0300", "") // check ICP queue, get entries
  405. if err != nil {
  406. lfshook.NewLogger().Infof("==ICP=QueueStatus==%+v", err)
  407. return
  408. }
  409. sort.Slice(resCaller.Entrys, func(i, j int) bool {
  410. return resCaller.Entrys[i].Position < resCaller.Entrys[j].Position
  411. })
  412. for _, caller := range resCaller.Entrys {
  413. priority.ICPAnswer = 0
  414. //lfshook.NewLogger().Infof("====SetPadTimer==QueueTimer==2=")
  415. lfshook.NewLogger().Infof("==SetPadTimer==Redirect to 0301 entry:%s=Pos:%s==", caller.CallerIDNum, caller.Position)
  416. //order by pos
  417. RedirectInQueue(caller.CallerIDNum, "0301", "queues-occ", caller.CallerIDNum) // redirect All ICP-PAD redirect to OCC queue
  418. time.Sleep(time.Millisecond * 100) //200 ms delay
  419. }
  420. }
  421. })
  422. }
  423. }
  424. func ConfbridgeKick(confnum, channel string) (res map[string]string, err error) {
  425. action := map[string]string{
  426. "Action": "ConfbridgeKick",
  427. "Conference": confnum,
  428. "Channel": channel,
  429. }
  430. res, _, err = AminInstance.Send(action)
  431. if err != nil {
  432. return nil, err
  433. }
  434. lfshook.NewLogger().Infof("=======ConfbridgeKick==%+v", res)
  435. if res["Response"] != "Success" {
  436. return nil, errors.New(res["Message"])
  437. }
  438. return res, nil
  439. }
  440. func CPAConfbridgeKick(confnum string) (res map[string]string, err error) {
  441. lfshook.NewLogger().Infof("=======CPAConfbridgeKick==%s", confnum)
  442. chans, err := ConfbridgeList(confnum)
  443. if err != nil {
  444. return nil, errors.New(res["Message"])
  445. }
  446. for _, confChan := range chans {
  447. lfshook.NewLogger().Infof("======CPAConfbridgeKick==1=%+v", confChan)
  448. if !strings.Contains(confChan, "PJSIP/1481") {
  449. ConfbridgeKick(confnum, confChan)
  450. }
  451. }
  452. return res, nil
  453. }
  454. func CPAConfbridgeReinvite(confID string) {
  455. lfshook.NewLogger().Infof("=====CPAConfbridgeReinvite==")
  456. time.Sleep(time.Millisecond * 500)
  457. for _, ext := range Speakers {
  458. ConfbridgeReinvite(ext, "call-speakers-cpa", confID)
  459. }
  460. }
  461. func EMGConfbridgeKick(confnum string) (res map[string]string, err error) {
  462. lfshook.NewLogger().Infof("=====EMGConfbridgeKick==%s", confnum)
  463. chans, err := ConfbridgeList(confnum)
  464. if err != nil {
  465. return nil, errors.New(res["Message"])
  466. }
  467. for _, confChan := range chans {
  468. lfshook.NewLogger().Infof("====EMGConfbridgeKick==1=%+v", confChan)
  469. if !strings.Contains(confChan, "0502@default") {
  470. ConfbridgeKick(confnum, confChan)
  471. }
  472. }
  473. return res, nil
  474. }
  475. func EMGConfbridgeReinvite(confID string) {
  476. lfshook.NewLogger().Infof("=======EMGConfbridgeReinvite==")
  477. time.Sleep(time.Millisecond * 500)
  478. for _, ext := range Speakers {
  479. lfshook.NewLogger().Infof("====1===EMGConfbridgeReinvite==")
  480. ConfbridgeReinvite(ext, "call-speakers-emg", confID)
  481. }
  482. }
  483. func ConfbridgeList(confnum string) (chans []string, err error) {
  484. action := map[string]string{
  485. "Action": "ConfbridgeList",
  486. "Conference": confnum,
  487. }
  488. res, events, err := AminInstance.Send(action)
  489. if err != nil {
  490. return nil, err
  491. }
  492. lfshook.NewLogger().Infof("===ConfbridgeList=res=%+v", res)
  493. if res["Response"] == "Success" {
  494. for _, event := range events {
  495. if event.Data["Event"] == "ConfbridgeList" {
  496. //lfshook.NewLogger().Infof("=======ConfbridgeList==%+v", event)
  497. chans = append(chans, event.Data["Channel"])
  498. }
  499. }
  500. return chans, nil
  501. } else {
  502. return nil, errors.New(res["Message"])
  503. }
  504. }
  505. func ConfbridgeReinvite(src, context, confID string) {
  506. lfshook.NewLogger().Infof("========ConfbridgeReinvite=======ext:%s==conf:%s===========", src, confID)
  507. if ExtenStatus(src) != "Idle" {
  508. //lfshook.NewLogger().Infof("===============ext:%s==!Idle===========", src)
  509. return
  510. }
  511. chanel := fmt.Sprintf("Local/%s@%s", src, context)
  512. action := map[string]string{
  513. "Action": "Originate",
  514. "Channel": chanel,
  515. "Exten": "000",
  516. "Context": "confbridge-join",
  517. "CallerID": fmt.Sprintf("%s<%s>", "", ""),
  518. "Priority": "1",
  519. "Variable": fmt.Sprintf("CBID=%s", confID),
  520. "async": "true",
  521. }
  522. lfshook.NewLogger().Infof("dial action %+v", action)
  523. res, _, err := AminInstance.Send(action)
  524. if err != nil {
  525. lfshook.NewLogger().Errorf("%+v", err)
  526. }
  527. lfshook.NewLogger().Info(res)
  528. }
  529. func ICPConfbridgeReinvite(confID, paType string) {
  530. switch paType {
  531. case "PAD-OCC":
  532. go DialICP("8", "2311", "confbridge-join", confID, "1") //ICP1---call
  533. go DialICP("8", "2381", "confbridge-join", confID, "8") //ICP8---call
  534. case "CPA":
  535. go DialICP("2", "2311", "confbridge-join", confID, "1") //ICP1---call
  536. go DialICP("2", "2381", "confbridge-join", confID, "8") //ICP8---call
  537. case "EMG":
  538. go DialICP("3", "2311", "confbridge-join", confID, "1") //ICP1---call
  539. go DialICP("3", "2381", "confbridge-join", confID, "8") //ICP8---call
  540. case "SPC":
  541. go DialICP("6", "2311", "confbridge-join", confID, "1") //ICP1---call
  542. go DialICP("6", "2381", "confbridge-join", confID, "8") //ICP8---call
  543. case "STN":
  544. go DialICP("4", "2311", "confbridge-join", confID, "1") //ICP1---call
  545. go DialICP("4", "2381", "confbridge-join", confID, "8") //ICP8---call
  546. case "DCS":
  547. go DialICP("5", "2311", "confbridge-join", confID, "1") //ICP1---call
  548. go DialICP("5", "2381", "confbridge-join", confID, "8") //ICP8---call
  549. case "CHK":
  550. go DialICP("10", "2311", "confbridge-join", confID, "1") //ICP1---call
  551. go DialICP("10", "2381", "confbridge-join", confID, "8") //ICP8---call
  552. case "VOL":
  553. go DialICP("11", "2311", "confbridge-join", confID, "1") //ICP1---call
  554. go DialICP("11", "2381", "confbridge-join", confID, "8") //ICP8---call
  555. }
  556. }