标签:
通过ESL 调取FS的状态,比如show calls : 用golang eventsocket 实现
conn, err := eventsocket.Dial("192.168.5.32:8021","ClueCon")
if err != nil {
this.emitError(so, 413)
return ""
}
ev, _ := conn.Send(fmt.Sprintf("api show calls"))
calls := strings.Split(ev.Body, "\n")
for i := 1; i < len(calls)-3; i++ {
//处理每一条记录
}
标签:
原文地址:http://www.cnblogs.com/logo-fox/p/5121965.html