FSModEvent.Connection

Connection process. A GenServer that you can plug into your own supervisor tree.

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket

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.

Source

Summary

api(name, command, args \\ "")

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-api

bgapi(name, command, args \\ "")

Executes an API command in background. Returns a Job ID. The calling process will receive a message like {:fs_job_result, job_id, packet} with the result

disable_divert_events(name)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-divert_events

enable_divert_events(name)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-divert_events

event(name, events)

This will always prepend your list with “plain”

exit(name)

https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-exit

filter(name, key, value \\ "")

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-filter

filter_delete(name, key, value \\ "")

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-filterdelete

linger(name)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-linger

log(name, level)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-log

myevents(name, uuid)

This will always prepend your list with “plain”

nixevent(name, events)

Suppress the specified type of event

noevents(name)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-noevents

nolinger(name)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-nolinger

nolog(name)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-nolog

sendevent(name, event, headers \\ [], body \\ "")

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendevent

sendmsg_exec(name, uuid, command, args \\ "", loops \\ 1, body \\ "")

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

sendmsg_hangup(name, uuid, cause \\ 16)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

sendmsg_nomedia(name, uuid, info \\ "")

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

sendmsg_unicast(name, uuid, transport \\ "tcp", flags \\ "native", local_ip \\ "127.0.0.1", local_port \\ 8025, remote_ip \\ "127.0.0.1", remote_port \\ 8026)

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

start(name, host, port, password)

Starts a connection to FreeSWITCH

start_link(name, host, port, password)

Starts and links a connection to FreeSWITCH

start_listening(name, filter_fun \\ fn _ -> true end)

Registers the caller process as a receiver for all the events for which the filter_fun returns true

stop_listening(name)

Unregisters the caller process as a listener

Functions

api(name, command, args \\ "")

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-api

For a list of available commands see: https://freeswitch.org/confluence/display/FREESWITCH/mod_commands

Source
bgapi(name, command, args \\ "")

Specs:

Executes an API command in background. Returns a Job ID. The calling process will receive a message like {:fs_job_result, job_id, packet} with the result.

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-bgapi

Source
disable_divert_events(name)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-divert_events

Source
enable_divert_events(name)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-divert_events

Source
event(name, events)

Specs:

This will always prepend your list with “plain”.

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-event

Source
exit(name)

Specs:

https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-exit

Source
filter(name, key, value \\ "")

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-filter

Source
filter_delete(name, key, value \\ "")

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-filterdelete

Source
linger(name)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-linger

Source
log(name, level)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-log

Source
myevents(name, uuid)

Specs:

This will always prepend your list with “plain”.

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-SpecialCase-'myevents

Source
nixevent(name, events)

Specs:

Suppress the specified type of event.

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-nixevent

Source
noevents(name)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-noevents

Source
nolinger(name)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-nolinger

Source
nolog(name)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-nolog

Source
sendevent(name, event, headers \\ [], body \\ "")

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendevent

Source
sendmsg_exec(name, uuid, command, args \\ "", loops \\ 1, body \\ "")

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

Source
sendmsg_hangup(name, uuid, cause \\ 16)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

Source
sendmsg_nomedia(name, uuid, info \\ "")

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

Source
sendmsg_unicast(name, uuid, transport \\ "tcp", flags \\ "native", local_ip \\ "127.0.0.1", local_port \\ 8025, remote_ip \\ "127.0.0.1", remote_port \\ 8026)

Specs:

See: https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-sendmsg

Source
start(name, host, port, password)

Specs:

Starts a connection to FreeSWITCH.

Source
start_link(name, host, port, password)

Specs:

Starts and links a connection to FreeSWITCH.

Source
start_listening(name, filter_fun \\ fn _ -> true end)

Specs:

Registers the caller process as a receiver for all the events for which the filter_fun returns true.

Source
stop_listening(name)

Specs:

Unregisters the caller process as a listener.

Source