Git Product home page Git Product logo

esip's Introduction

eSIP

CI Coverage Status Hex version

ProcessOne SIP server component in Erlang.

Building

Erlang SIP component can be build as follow:

./configure && make

It is a rebar-compatible OTP application. Alternatively, you can build it with rebar:

rebar compile

Dependencies

Module depends on fast_tls and as such you need to have OpenSSL 1.0+.

Please refer to fast_tls build instruction is you need help setting your OpenSSL environment: Building Fast TLS

Development

Test

Unit test

You can run eunit test with the command:

$ rebar eunit

esip's People

Contributors

badlop avatar mremond avatar nosnilmot avatar prefiks avatar santosh653 avatar silviucpp avatar weiss avatar zinid avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esip's Issues

Package not found in registry

If we compile under rebar3, than Rebar3DepsFilter rewrites deps from git format to hex format.
Rebar3DepsFilter is too aggressive. Not all tags are present on Hex.

The transformation should be optional.

Error example:

./rebar3 compile
Package not found in registry: fast_tls-1.0.17

Remove erlang:now/0 deprecations

Here are the deprecations:

rc/esip_transaction.erl:224: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
src/esip_transaction.erl:226: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.

src/esip.erl:758: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
Compiled src/esip.erl
src/esip_codec.erl:1352: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
src/esip_codec.erl:1355: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
Compiled src/esip_codec.erl

esip_codec:encode_via not check member value =:= undefined

For example, if host =:= undefined, it just encode record with some atom undefined, the encode returns ok, and it's result can not transfer to binary or send with udp port. I think it should return error, or just encode "undefined" to some string but not an atom.

balance udp traffic over the process pool

It might be a better idea to use a random distribution for the received udp packages instead the one that sends the packets from the same ip, port pair to the same process.

In case all the traffic comes from a sip proxy (very common use to balance sip traffic) only one process is used to handle the traffic and all other 99 are idle.

get_proc_random() ->
    {_, _, MicroSecs} = os:timestamp(),
    get_proc((MicroSecs rem get_pool_size()) + 1).

Instead:

get_proc_by_hash(Source) ->
    N = erlang:phash2(Source, get_pool_size()) + 1,
    get_proc(N).

Provides a significant performance boost.

Silviu

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.