Packages

Jellyfish Server SDK

Retired package: Renamed - Renamed to fishjam_server_sdk

Current section

Files

Jump to
jellyfish_server_sdk lib jellyfish component sip.ex
Raw

lib/jellyfish/component/sip.ex

defmodule Jellyfish.Component.SIP do
@moduledoc """
Options for the SIP component.
For the description of these options refer to [Jellyfish
documentation](https://jellyfish-dev.github.io/jellyfish-docs/getting_started/components/sip).
"""
@behaviour Jellyfish.Component.Deserializer
@enforce_keys [:registrar_credentials]
defstruct @enforce_keys
@type t :: %__MODULE__{
registrar_credentials: %{
address: String.t(),
password: String.t(),
username: String.t()
}
}
@impl true
def properties_from_json(%{
"registrarCredentials" => %{
"address" => address,
"password" => password,
"username" => username
}
}) do
%{
registrar_credentials: %{
address: address,
password: password,
username: username
}
}
end
end