freeswitch icon indicating copy to clipboard operation
freeswitch copied to clipboard

mod_erlang_event emits failed WARNING on successful connection

Open toraritte opened this issue 3 years ago • 1 comments

Describe the bug With mod_erlang_event set up in outbound mode, fs_cli emits the warning below when the Erlang node is started,

[WARNING] ei_helpers.c:87 Failed to link to process on node@host

but everything works as expected. This is not a big deal, but it is misleading (it certainly led me into rabbit holes trying to troubleshoot it when I first started experimenting with FreeSWITCH).

To Reproduce

  1. Install FreeSWITCH on Debian 11 following the official instructions
  2. Configure mod_erlang_event
  3. Use outbound mode dialplan action in the format:
    <action application="erlang" data="myhandler:launch mynode@myserver"/>
    
  4. Start Erlang node:
    erl -eval "{ignored_atom, 'freeswitch@my-server'} ! register_event_handler." -sname the_node -setcookie cookie
    
  5. Both nodes(hidden) on the Erlang shell and erlang listeners on fs_cli confirm the connection between the nodes, but more importantly, everything works as expected.

Package version or git hash

Erlang/OTP 24 [erts-12.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]
FreeSWITCH Version 1.10.7-release-19-883d2cb662~64bit (-release-19-883d2cb662 64bit)

Started digging into it, but the FreeSWITCH codebase is still new to me.

https://github.com/signalwire/freeswitch/blob/92caab3647f7006f67af8bf835e84dbb94e735b9/src/mod/event_handlers/mod_erlang_event/ei_helpers.c#L62-L90

toraritte avatar Oct 26 '22 22:10 toraritte

mod_erlang_event seems to be broken when used with v1.10.12 (issue https://github.com/signalwire/freeswitch/issues/2808) and not sure what role this one plays in that. The external node definitely sees the C-node (e.g., with nodes(hidden).) and vice versa (FreeSWITCH API commands do get logged by the C node), so this may only be a cosmetic error?

There is an open PR https://github.com/signalwire/freeswitch/pull/2085, but haven't tried it out yet.

toraritte avatar Oct 28 '22 21:10 toraritte