elixir_mod_event v0.0.6 FSModEvent.Kazoo
Interface to mod_kazoo. Should be somewhat compatible with mod_erlang_event.
Copyright 2015 Marcelo Gornstein marcelog@gmail.com
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Summary
Functions
Runs an API command in foreground
Runs an API command in background. Returns a job id. The caller process will receive a message with a tuple like this {:fs_job_result, job_id, status, result}
Binds the caller process as a configuration provider for the given configuration section. The sections are the same as for mod_xml_curl, see: https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl
Sends an XML in response to a configuration message (see config_bind). The XML should be the same as the one supported by mod_xml_curl, see: https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl
Subscribe to an event
Closes the connection
Unsubscribes from an event
Disable all events
Returns the fake pid of the “erlang process” running in the freeswitch erlang node
Functions
Runs an API command in foreground.
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-api
Runs an API command in background. Returns a job id. The caller process will receive a message with a tuple like this {:fs_job_result, job_id, status, result}
Where:
job_id :: String.t status :: :ok | :error result :: :timeout | String.t
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-bgapi
Specs
config_bind(node, String.t) :: :ok | no_return
Binds the caller process as a configuration provider for the given configuration section. The sections are the same as for mod_xml_curl, see: https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl.
You will receive messages of the type:
{fetch,
Where FetchID is the ID you received in the request and XMLString is the XML reply you want to send. FetchID and XML can be binaries or strings.
To tell the switch to take some action, send back a reply of the format:
{fetch_reply,
Sends an XML in response to a configuration message (see config_bind). The XML should be the same as the one supported by mod_xml_curl, see: https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl.
Specs
event(node, [String.t]) :: :ok | no_return
Subscribe to an event.
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-event
Specs
exit(node) :: :ok | no_return
Closes the connection.
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-exit
Specs
nixevent(node, [String.t]) :: :ok | no_return
Unsubscribes from an event.
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-nixevent
Specs
noevents(atom) :: pid | no_return
Disable all events.
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-noevents
Specs
pid(atom) :: pid | no_return
Returns the fake pid of the “erlang process” running in the freeswitch erlang node.
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-getpid
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-sendevent
Specs
sendmsg_nomedia(node, String.t, String.t) :: FSModEvent.Packet.t
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-sendmsg
Specs
See: https://freeswitch.org/confluence/display/FREESWITCH/mod_erlang_event#mod_erlang_event-sendmsg