call.go 17 KB

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