mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 13:19:53 +05:00
Updating fsock with slice for event filters
This commit is contained in:
2
glide.lock
generated
2
glide.lock
generated
@@ -12,7 +12,7 @@ imports:
|
||||
- name: github.com/cgrates/aringo
|
||||
version: 47cdb110c5ff42bddf2b801dc5ae8ceb15d2d602
|
||||
- name: github.com/cgrates/fsock
|
||||
version: a8ffdbdfc8440016df008ba91e6f05f806d7a69f
|
||||
version: 5b60f0d72ff4f8885289bffab55435e5b8adfb55
|
||||
- name: github.com/cgrates/kamevapi
|
||||
version: a376b1f937ba959857929fa3e111c0f3243278c0
|
||||
- name: github.com/cgrates/osipsdagram
|
||||
|
||||
@@ -292,7 +292,7 @@ func (sm *FSSessionManager) onChannelHangupComplete(ev engine.Event) {
|
||||
// Connects to the freeswitch mod_event_socket server and starts
|
||||
// listening for events.
|
||||
func (sm *FSSessionManager) Connect() error {
|
||||
eventFilters := map[string]string{"Call-Direction": "inbound"}
|
||||
eventFilters := map[string][]string{"Call-Direction": []string{"inbound"}}
|
||||
errChan := make(chan error)
|
||||
for _, connCfg := range sm.cfg.EventSocketConns {
|
||||
connId := utils.GenUUID()
|
||||
@@ -311,7 +311,7 @@ func (sm *FSSessionManager) Connect() error {
|
||||
}
|
||||
}()
|
||||
if fsSenderPool, err := fsock.NewFSockPool(5, connCfg.Address, connCfg.Password, 1, sm.cfg.MaxWaitConnection,
|
||||
make(map[string][]func(string, string)), make(map[string]string), utils.Logger.GetSyslog(), connId); err != nil {
|
||||
make(map[string][]func(string, string)), make(map[string][]string), utils.Logger.GetSyslog(), connId); err != nil {
|
||||
return fmt.Errorf("Cannot connect FreeSWITCH senders pool, error: %s", err.Error())
|
||||
} else if fsSenderPool == nil {
|
||||
return errors.New("Cannot connect FreeSWITCH senders pool.")
|
||||
|
||||
Reference in New Issue
Block a user