balena / elixir-sippet

An Elixir library designed to be used as SIP protocol middleware.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error, module could not be loaded", Sippet.Transaction

martinos opened this issue · comments

When I send an OPTION request, I get the following error message:

sipsak -vv -c sip:joe@example.com -s sip:nobody@localhost
18:49:09.272 [error] GenStateMachine {Sippet.Transactions.Registry, ~K[z9hG4bK.74bac126|:options|127.0.0.1:62145]} terminating
** (ErlangError) Erlang error: {:"module could not be loaded", Sippet.Transaction}
    (sippet) lib/sippet/transactions/server/non_invite.ex:12: Sippet.Transactions.Server.NonInvite.trying/3
    (stdlib) gen_statem.erl:1240: :gen_statem.call_state_function/5
    (stdlib) gen_statem.erl:1058: :gen_statem.loop_event_enter/11
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

Here is my Core implementation:

defmodule MyCore do
  use Sippet.Core
  require Logger
  alias Sippet.Transaction
  alias Sippet.Message

  def receive_request(request, server_key) do
    Logger.info("logging request: #{inspect(request)}")
    request |> Message.to_response(302) |> Transaction.send_response(server_key)
  end
end

Maybe I don't understand exactly how to declare a Core module.

Oups, I just realized that I mistyped Sippet.Transaction, it should have been Sippet.Transactions.