Liking cljdoc? Tell your friends :D

com.ingemark.pbxis


ami-connectclj

(ami-connect host username password cfg)

Connects to the AMI back-end and performs all other initialization tasks.

host: host name or IP address of the Asterisk server. username, password: AMI username/password cfg: a map of configuration parameters---

:location-prefix -- string to prepend to agent's extension in order to form the agent "location" as known to Asterisk. This is typically "SCCP/", "SIT/" or similar.

:originate-context -- the value to use for the context attribute on the AMI Originate action. Default is "default".

:redirect-context -- the value to use for the context attribute on the AMI Redirect action. Default is "default".

Connects to the AMI back-end and performs all other initialization
tasks.

host: host name or IP address of the Asterisk server.
username, password: AMI username/password
cfg: a map of configuration parameters---

  :location-prefix -- string to prepend to agent's extension
    in order to form the agent "location" as known to
    Asterisk. This is typically "SCCP/", "SIT/" or similar.

  :originate-context -- the value to use for the context attribute on the
    AMI Originate action. Default is "default".

  :redirect-context -- the value to use for the context attribute on the
    AMI Redirect action. Default is "default".
sourceraw docstring

ami-disconnectclj

(ami-disconnect amich)

Disconnects from the AMI and releases all resources. Publishes a PBXIS event of type "closed" before closing the event hub.

Disconnects from the AMI and releases all resources. Publishes a PBXIS event
of type "closed" before closing the event hub.
sourceraw docstring

configclj

source

decrefclj

(decref agnts)
source

default-configclj

source

DUE-EVENT-WAIT-SECONDSclj

source

event-channelclj

(event-channel agnts qs summaryEvents)

agnts: a collection of agents' phone extension numbers. qs: a collection of agent queue names.

Sets up and returns a lamina channel that will emit events related to the supplied agents and queues. Depending on its type, an event may have the properties :agent and/or :queue, called the "scope properties". An event channel will receive an event iff the value of each scope property of the event exists in the corresponding list in the configuration of the event channel. So an event with neither property is received by all channels and an event with both properties is received only by channels that include both the agent and the queue in their configuration.

agnts: a collection of agents' phone extension numbers.
qs: a collection of agent queue names.

Sets up and returns a lamina channel that will emit events related
to the supplied agents and queues. Depending on its type, an event
may have the properties :agent and/or :queue, called the "scope
properties". An event channel will receive an event iff the value
of each scope property of the event exists in the corresponding
list in the configuration of the event channel. So an event with
neither property is received by all channels and an event with both
properties is received only by channels that include both the agent
and the queue in their configuration.
sourceraw docstring

find-channelsclj

(find-channels extension)
(find-channels extension ami-status-events)

Finds channels connected to the provided extension.

Finds all bridged channels that on one side have a channel connected to the provided extension. Input parameter status-events is a sequence of events returned by Asterisk on Status action. Function returns an array of maps of the shape [{:agentChannel, :bridgedChannel, :callerIdNum}, ...]

Finds channels connected to the provided extension.

Finds all bridged channels that on one side have a channel connected to the
provided extension. Input parameter status-events is a sequence of events
returned by Asterisk on Status action. Function returns an array of maps of
the shape
[{:agentChannel, :bridgedChannel, :callerIdNum}, ...]
sourceraw docstring

FORGET-PHONENUM-DELAYclj

source

increfclj

(incref agnts)
source

originate-callclj

(originate-call agnt phone & {:keys [caller-id variables]})

Issues a request to originate a call to the supplied phone number and patch it through to the supplied agent's extension.

If a :caller-id named argument is provided, use it as the callerId parameter on the Originate action.

If a :variables named argument is provided, its value must be a map. The map's keys will be stringified and the result will be used as the variables parameter on the Originate action.

Returns the ID (string) of the request. The function returns immediately and doesn't wait for the call to be established. In the case of failure, an event will be received by the client referring to this ID.

In the case of a successful call, only a phoneNumber event will be received.

Issues a request to originate a call to the supplied phone number
and patch it through to the supplied agent's extension.

If a :caller-id named argument is provided, use it as the callerId
parameter on the Originate action.

If a :variables named argument is provided, its value must be a map.
The map's keys will be stringified and the result will be used as
the variables parameter on the Originate action.

Returns the ID (string) of the request. The function returns
immediately and doesn't wait for the call to be established. In the
case of failure, an event will be received by the client referring
to this ID.

In the case of a successful call, only a phoneNumber event will be
received.
sourceraw docstring

ORIGINATE-CALL-TIMEOUT-SECONDSclj

source

park-and-announceclj

(park-and-announce agnt-or-chan)

Parks a call so it can be retrieved by calling another extension number. The number is announced in voice on the channel that was bridged to the parked channel. If the call is not retrieved within ORIGINATE-CALL-TIMEOUT-SECONDS, it is returned to the owner of the bridged channel. The supplied argument is either the raw name of the channel to park, or an agent's extension number (a string in both cases). In the latter case a channel belonging to the agent will be looked up and its bridged channel is the one that gets parked. If there are several channels belonging to the agent, a map of the shape {:candidates [{:agentChannel, :bridgedChannel, :callerIdNum}, ...]} will be returned, listing all the agent's channels, their bridged channels, and the associated caller IDs of the remote parties. This can then be used to call this function again with the chosen channel name.

Parks a call so it can be retrieved by calling another
extension number. The number is announced in voice on the
channel that was bridged to the parked channel. If the call is
not retrieved within ORIGINATE-CALL-TIMEOUT-SECONDS, it is
returned to the owner of the bridged channel. The supplied
argument is either the raw name of the channel to park, or an
agent's extension number (a string in both cases). In the latter
case a channel belonging to the agent will be looked up and its
bridged channel is the one that gets parked. If there are several
channels belonging to the agent, a map of the shape
{:candidates [{:agentChannel, :bridgedChannel, :callerIdNum}, ...]}
will be returned, listing all the agent's channels, their bridged
channels, and the associated caller IDs of the remote parties. This
can then be used to call this function again with the chosen
channel name.
sourceraw docstring

publish-q-summary-statusclj

(publish-q-summary-status)
source

queue-actionclj

(queue-action type params)

Executes an action against a queue. This is a thin wrapper around an actual AMI QueueXxxAction.

type: action type, for example :add, :pause, :remove. params: a map of action parameters: :agent the agent on whose behalf the action is executed. :queue the queue name. :memberName full name of the agent, to be associated with this agent in this queue. :paused the requested new paused-state of the agent.

The :queue param applies to all actions; the :paused param applies to all except "remove", and :member-name applies only to "add".

Executes an action against a queue. This is a thin wrapper
around an actual AMI QueueXxxAction.

type: action type, for example :add, :pause, :remove.
params: a map of action parameters:
  :agent        the agent on whose behalf the action is executed.
  :queue        the queue name.
  :memberName   full name of the agent, to be associated with this
                agent in this queue.
  :paused       the requested new paused-state of the agent.

The :queue param applies to all actions; the :paused param
applies to all except "remove", and :member-name applies only to
"add".
sourceraw docstring

queue-statusclj

(queue-status q)
source

redirect-callclj

(redirect-call agnt-or-chan destination)

Redirects (transfers) a call to another extension. First argument is either the raw name of the channel which to redirect to the new destination, or an agent's extension number. In the latter case a channel belonging to the agent will be looked up and its bridged channel will be the one that gets redirected. If there are several channels belonging to the agent, a map of the shape {:candidates [{:agentChannel, :bridgedChannel, :callerIdNum}, ...]} will be returned, listing all the agent's channels, their bridged channels, and the associated caller IDs of the remote parties. This can then be used to call this function again with the chosen channel name.

Note: the type of all parameters is string.

Redirects (transfers) a call to another extension.
First argument is either the raw name of the channel which to
redirect to the new destination, or an agent's extension number.
In the latter case a channel belonging to the agent will be
looked up and its bridged channel will be the one that gets
redirected. If there are several channels belonging to the agent,
a map of the shape
{:candidates [{:agentChannel, :bridgedChannel, :callerIdNum}, ...]}
will be returned, listing all the agent's channels, their bridged
channels, and the associated caller IDs of the remote parties. This
can then be used to call this function again with the chosen
channel name.

Note: the type of all parameters is string.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close