Packages

Elixir libraries and OTP behaviours for building telecom applications with SIP protocol and media handling

Current section

Files

Jump to
parrot_platform lib parrot application.ex
Raw

lib/parrot/application.ex

defmodule Parrot.Application do
use Application
def start(_type, _args) do
Parrot.Config.init()
handler_module = ParrotSupport.SipHandler
handler_state = %{}
Application.put_env(:parrot, :sip_handler, {handler_module, handler_state})
children = [
{Registry, keys: :unique, name: Parrot.Registry},
Parrot.Sip.Transport.Supervisor,
Parrot.Sip.Transaction.Supervisor,
Parrot.Sip.Dialog.Supervisor,
Parrot.Sip.HandlerAdapter.Supervisor,
Parrot.Media.MediaSessionSupervisor
]
opts = [strategy: :one_for_one, name: Parrot.Supervisor]
Supervisor.start_link(children, opts)
end
end