Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.14 KB

README.md

File metadata and controls

55 lines (40 loc) · 1.14 KB

esl

Yet another Go ESL for FreeSwitch, to build lightweight FS event socket application :)

Inbound Client Example

// TODO...

Outbound Server Example

func main() {
  server := NewServer(context.TODO(),"0.0.0.0:8080")
  server.Callback = func(channel *OutboundChannel) {
    channel.Connect()
    channel.Answer()
    // TODO: create your own state machine model
		for event := range channel.Events {
			switch event.Name {
        case EslEventCustom: 
        {// custom event logic
            channel.Hangup()
        }
        case EslEventChannelHangupComplete: // create a new cdr send to channel
      }
    }
    channel.Shutdown()
	}
}

Event Socket concurrency pattern

What is SC?

TODO:

How to build your FS control logic

TODO:

Clearfy FS Manual and Concepts

Here is a simple clearfy FS manual and introduce some confused concepts in FS not only Channel lifecycle and more.

TODO:

TODO List

  1. When Inbound disconnected and how to recover the inbound connection state?
  2. If sendmsg could recover the session
  3. Wrap the fsctl commands in this package
  4. Total callcenter example single node no cluster