GithubHelp home page GithubHelp logo

davec82 / freeswitch-outboundsocket Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 5.0 61 KB

An Elixir FreeSWITCH's Event Socket Outbound

License: MIT License

Elixir 100.00%
elixir freeswitch outbound event-socket voip

freeswitch-outboundsocket's Introduction

Event Socket Outbound

Hex.pm Build Status Coverage Status

EventSocketOutbound is an Elixir protocol for the FreeSWITCH's Event Socket. This protocol provides support for Outbound method of the Event Socket.

Installation

Add event_socket_outbound to your list of dependencies in mix.exs:

    def deps do
      [{:event_socket_outbound, "~> 0.5.1"}]
    end

Getting started

# In your config/config.exs file
config :event_socket_outbound, EventSocketOutbound.Call.Manager,
  call_mgt_adapter: MySample.Call

where MySample.Call will be a module that implements EventSocketOutbound.CallMgmt behaviour and logic for controlling the call. By default EventSocketOutbound uses EventSocketOutbound.ExampleCallMgmt module which answers the call and play a welcome message.

Usage

  1. Start EventSocketOutbound without options.
>Application.start(:ranch)
:ok
>EventSocketOutbound.start
{:ok, #PID<0.172.0>}
  1. Start EventSocketOutbound with options.
>Application.start(:ranch)
:ok
>EventSocketOutbound.start port: 8090, acceptors: 50
{:ok, #PID<0.174.0>}
  1. Add the child specs to your supervision tree, using EventSocketOutbound.Protocol as protocol. For more info, refer to ranch docs.
child_spec = :ranch.child_spec(ref, :ranch_tcp, %{num_acceptors: acceptors, socket_opts: [{:port, port}]}, EventSocketOutbound.Protocol :ranch)

Copyright and License

Copyright (c) 2021, Davide Colombo.

EventSocketOutbound source code is licensed under the MIT License.

freeswitch-outboundsocket's People

Contributors

davec82 avatar xadhoom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

freeswitch-outboundsocket's Issues

fix data parser

data parser fails when two events are in the same chunk and last event is processed only if you receive other data on tcp connection

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.