FreeSWITCH          




Page tree
Skip to end of metadata
Go to start of metadata

Introduction

GoESL is a very simple and straight forward Go package designed to interact with FreeSWITCH ESL. GoESL supports both client and server. Server is used to bind and listen for incoming FreeSWITCH messages where client is used for sending API commands. GoESL package contains few helpers which can be found in helpers.go so you can easily answer, hangup or send api events.

Installation

GoESL is a package designed to be extended. Standard go get will get you going :) Make sure to have Go properly setup on your box.

If you're unsure how to do it Go Getting Started will help you out.

 

Installing GoESL package

How To / Examples

Following block of the code is the only thing you will need to do in order to import GoESL



All available examples can be found at GoESL Examples

Client Example

Following example will connect to FreeSWITCH event socket interface and send originate api command
 


You can run this code by saving it as client.go and than running



Server Example (TTS)

Following example will start server and listen for incoming messages. Once received speak (TTS) will be initiated to the originator.

 


You can run this code by saving it as tts_server.go and than running

See Also



 

1 Comment

  1. go build client.go && ./client
    not worked

    $ go build client.go && ./client
    bash: ./client: No such file or directory