| Libgami Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
#include <gami.h>
GamiManager;
GamiManagerClass;
void (*GamiResponseFunc) (GamiResponse *response,
gpointer user_data);
void (*GamiManagerNewAsyncFunc) (GamiManager *gami,
gpointer user_data);
enum GamiEventMask;
enum GamiModuleLoadType;
GamiManager * gami_manager_new (const gchar *host,
const gchar *port);
void gami_manager_new_async (const gchar *host,
const gchar *port,
GamiManagerNewAsyncFunc func,
gpointer user_data);
gboolean gami_manager_connect (GamiManager *ami,
GError **error);
GamiResponse * gami_manager_login (GamiManager *ami,
const gchar *username,
const gchar *secret,
const gchar *auth_type,
GamiEventMask events,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_logoff (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_challenge (GamiManager *ami,
const gchar *auth_type,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_absolute_timeout (GamiManager *ami,
const gchar *channel,
gint timeout,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_agi (GamiManager *ami,
const gchar *channel,
const gchar *command,
const gchar *command_id,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_bridge (GamiManager *ami,
const gchar *channel1,
const gchar *channel2,
gboolean tone,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_hangup (GamiManager *ami,
const gchar *channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_originate (GamiManager *ami,
const gchar *channel,
const gchar *application_exten,
const gchar *data_context,
const gchar *priority,
guint timeout,
const gchar *caller_id,
const gchar *account,
const GHashTable *variables,
gboolean async,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_redirect (GamiManager *ami,
const gchar *channel,
const gchar *extra_channel,
const gchar *exten,
const gchar *context,
const gchar *priority,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_set_cdr_user_field (GamiManager *ami,
const gchar *channel,
const gchar *user_field,
gboolean append,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_mailbox_count (GamiManager *ami,
const gchar *mailbox,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_mailbox_status (GamiManager *ami,
const gchar *mailbox,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_voicemail_users_list (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_meetme_list (GamiManager *ami,
const gchar *meetme,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_meetme_mute (GamiManager *ami,
const gchar *meetme,
const gchar *user_num,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_meetme_unmute (GamiManager *ami,
const gchar *meetme,
const gchar *user_num,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_monitor (GamiManager *ami,
const gchar *channel,
const gchar *file,
const gchar *format,
gboolean mix,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_change_monitor (GamiManager *ami,
const gchar *channel,
const gchar *file,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_pause_monitor (GamiManager *ami,
const gchar *channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_unpause_monitor (GamiManager *ami,
const gchar *channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_stop_monitor (GamiManager *ami,
const gchar *channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_queue_add (GamiManager *ami,
const gchar *queue,
const gchar *iface,
guint penalty,
gboolean paused,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_queue_log (GamiManager *ami,
const gchar *queue,
const gchar *event,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_queue_pause (GamiManager *ami,
const gchar *queue,
const gchar *iface,
gboolean paused,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_queue_penalty (GamiManager *ami,
const gchar *queue,
const gchar *iface,
guint penalty,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_queue_remove (GamiManager *ami,
const gchar *queue,
const gchar *iface,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_queue_summary (GamiManager *ami,
const gchar *queue,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_agent_callback_login (GamiManager *ami,
const gchar *agent,
const gchar *exten,
const gchar *context,
gboolean ack_call,
guint wrapup_time,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_agent_logoff (GamiManager *ami,
const gchar *agent,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_agents (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_park (GamiManager *ami,
const gchar *channel,
const gchar *channel2,
guint timeout,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_parked_calls (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_get_var (GamiManager *ami,
const gchar *channel,
const gchar *variable,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_set_var (GamiManager *ami,
const gchar *channel,
const gchar *variable,
const gchar *value,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_db_del (GamiManager *ami,
const gchar *family,
const gchar *key,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_db_del_tree (GamiManager *ami,
const gchar *family,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_db_get (GamiManager *ami,
const gchar *family,
const gchar *key,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_db_put (GamiManager *ami,
const gchar *family,
const gchar *key,
const gchar *val,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_sip_peers (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_sip_show_peer (GamiManager *ami,
const gchar *peer,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_sip_show_registry (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_iax_peer_list (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_dahdi_dial_offhook (GamiManager *ami,
const gchar *dahdi_channel,
const gchar *number,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_dahdi_dnd_off (GamiManager *ami,
const gchar *dahdi_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_dahdi_dnd_on (GamiManager *ami,
const gchar *dahdi_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_dahdi_hangup (GamiManager *ami,
const gchar *dahdi_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_dahdi_restart (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_dahdi_show_channels (GamiManager *ami,
const gchar *dahdi_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_dahdi_transfer (GamiManager *ami,
const gchar *dahdi_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_zap_dial_offhook (GamiManager *ami,
const gchar *zap_channel,
const gchar *number,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_zap_dnd_off (GamiManager *ami,
const gchar *zap_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_zap_dnd_on (GamiManager *ami,
const gchar *zap_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_zap_hangup (GamiManager *ami,
const gchar *zap_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_zap_restart (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_zap_show_channels (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_zap_transfer (GamiManager *ami,
const gchar *zap_channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_list_commands (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_core_settings (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_core_status (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_core_show_channels (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_status (GamiManager *ami,
const gchar *channel,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_ping (GamiManager *ami,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_module_check (GamiManager *ami,
const gchar *module,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_module_load (GamiManager *ami,
const gchar *module,
GamiModuleLoadType load_type,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_reload (GamiManager *ami,
const gchar *module,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_extension_state (GamiManager *ami,
const gchar *exten,
const gchar *context,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_send_text (GamiManager *ami,
const gchar *channel,
const gchar *message,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_jabber_send (GamiManager *ami,
const gchar *jabber,
const gchar *screen_name,
const gchar *message,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_play_dtmf (GamiManager *ami,
const gchar *channel,
gchar digit,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_events (GamiManager *ami,
GamiEventMask event_mask,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_user_event (GamiManager *ami,
const gchar *user_event,
const GHashTable *headers,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_wait_event (GamiManager *ami,
guint timeout,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_list_categories (GamiManager *ami,
const gchar *filename,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_get_config (GamiManager *ami,
const gchar *filename,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_get_config_json (GamiManager *ami,
const gchar *filename,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
GamiResponse * gami_manager_create_config (GamiManager *ami,
const gchar *filename,
const gchar *action_id,
GamiResponseFunc response_func,
gpointer response_data,
GError **error);
"host" gchar* : Read / Write / Construct Only "port" gchar* : Read / Write / Construct Only
GamiManager is an implementation of the Asterisk Manager Interface based on GObject. It supports both synchronious and asynchronious operation and integrates well with glib's signal / callback system.
Each manager action returns an GamiResponse and takes at least four parameters common to each action: An optional ActionID as supported by the underlying asterisk API, a callback function for asynchronious operation, optional user data to pass to said function and an optional GError to report underlying network errors. If used asynchroniously, the response will contain a boolean value indicating whether the action request was send successfully. Otherwise, the action response will be returned directly.
Asynchronious callbacks and events require the use of GMainLoop (or derived
implementations as gtk_main().
typedef struct _GamiManager GamiManager;
GamiManager represents a connection to an Asterisk server using the manager API. It is used to send actions to the server and receive responses and events.
typedef struct {
GObjectClass parent_class;
} GamiManagerClass;
The class structure for the GamiManager type
GObjectClass |
GamiManager's parent class (of type GObjectClass) |
void (*GamiResponseFunc) (GamiResponse *response, gpointer user_data);
Specifies the type of functions passed as callback to manager actions
|
the action's GamiResponse. |
|
user data passed to the action |
void (*GamiManagerNewAsyncFunc) (GamiManager *gami, gpointer user_data);
Specifies the type of functions passed to gami_manager_new_async()
|
the newly created GamiManager |
|
user data passed to the function |
typedef enum
{
GAMI_EVENT_MASK_NONE = 0,
GAMI_EVENT_MASK_CALL = 1 << 0,
GAMI_EVENT_MASK_CDR = 1 << 1,
GAMI_EVENT_MASK_SYSTEM = 1 << 2,
GAMI_EVENT_MASK_AGENT = 1 << 3,
GAMI_EVENT_MASK_LOG = 1 << 4,
GAMI_EVENT_MASK_USER = 1 << 5,
GAMI_EVENT_MASK_ALL = 1 << 6
} GamiEventMask;
Flag values to specify any events your application is interested in as
passed to gami_manager_login() and gami_manager_events().
| do not receive any events | |
| do receive 'call' events | |
| do receive 'cdr' events | |
| do receive 'system' events | |
| do receive 'agent' events | |
| do receive 'log' events | |
| do receive 'user' events | |
| do receive all events |
typedef enum {
GAMI_MODULE_LOAD,
GAMI_MODULE_RELOAD,
GAMI_MODULE_UNLOAD
} GamiModuleLoadType;
An enum type used to determine the operation mode in
gami_manager_module_load()
GamiManager * gami_manager_new (const gchar *host, const gchar *port);
This function creates an instance of GAMI_TYPE_MANAGER connected to
host:port.
|
Asterisk manager host. |
|
Asterisk manager port. |
Returns : |
A new GamiManager |
void gami_manager_new_async (const gchar *host, const gchar *port, GamiManagerNewAsyncFunc func, gpointer user_data);
Asynchronously create a GamiManager connected to host:port. The new
object will be passed as a parameter to func when finished.
|
Asterisk manager host. |
|
Asterisk manager port. |
|
Callback function called when object has been created |
|
data to pass to func
|
gboolean gami_manager_connect (GamiManager *ami, GError **error);
Connect GamiManager with the Asterisk server defined by the object properties "host" and "port".
Note that it is not usually necessary to call this function, as it is called
by gami_manager_new() and gami_manager_new_async(). Use it only in classes
inheritting from GamiManager.
|
GamiManager |
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_login (GamiManager *ami, const gchar *username, const gchar *secret, const gchar *auth_type, GamiEventMask events, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Authenticate to asterisk and open a new manager session
|
GamiManager |
|
Username to use for authentification |
|
Password to use for authentification |
|
AuthType to use for authentification - if set to "md5", secret
is expected to contain an MD5 hash of the result string of
gami_manager_challenge() and the user's password
|
|
Flags of type GamiEventMask, indicating which events should be
received initially. It is possible to modify this setting using the
gami_manager_events() action
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_logoff (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Close the manager session and disconnect from asterisk
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_challenge (GamiManager *ami, const gchar *auth_type, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve a challenge string to use for authentification of type auth_type
|
GamiManager |
|
The authentification type to generate challenge for (e.g. "md5") |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
the generated challenge on success, FALSE on failure
|
GamiResponse * gami_manager_absolute_timeout (GamiManager *ami, const gchar *channel, gint timeout, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set timeout for call on channel to timeout seconds
|
GamiManager |
|
The name of the channel to set the timeout for |
|
The maximum duration of the current call, in seconds |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_agi (GamiManager *ami, const gchar *channel, const gchar *command, const gchar *command_id, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Execute AGI command command in channel
|
GamiManager |
|
The name of the channel to execute command in
|
|
The name of the AGI command to execute |
|
(optional) CommandID for matching in AGI notification events |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_bridge (GamiManager *ami, const gchar *channel1, const gchar *channel2, gboolean tone, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Bridge together the existing channels channel1 and channel2
|
GamiManager |
|
The name of the channel to bridge to channel2
|
|
The name of the channel to bridge to channel1
|
|
Whether to play courtesy tone to channel2
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_hangup (GamiManager *ami, const gchar *channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Hang up channel
|
GamiManager |
|
The name of the channel to hang up |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_originate (GamiManager *ami, const gchar *channel, const gchar *application_exten, const gchar *data_context, const gchar *priority, guint timeout, const gchar *caller_id, const gchar *account, const GHashTable *variables, gboolean async, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Generate an outbound call from Asterisk and connect the channel to Exten / Context / Priority or execute Application (Data) on the channel
|
GamiManager |
|
The name of the channel to call. Once the channel has answered, the call will be passed to the specified exten/context/priority or application/data |
|
Extension to dial or application to call (depending on
priority)
|
|
Context to dial or data to pass to application (depending on
priority)
|
|
(optional) Priority to dial - if NULL, application_exten will
be interpretated as application and data_context as data
|
|
(optional) Time to wait for channel to answer in milliseconds
|
|
(optional) CallerID to set on the outgoing channel |
|
(optional) AccountCode to set for the call |
|
(optional) A GHashTable with name / value pairs to pass as channel variables |
|
(optional) Whether to originate call asynchronously - this allows to originate further calls before a response is received |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_redirect (GamiManager *ami, const gchar *channel, const gchar *extra_channel, const gchar *exten, const gchar *context, const gchar *priority, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Redirect channel to exten@context:priority
|
GamiManager |
|
The name of the channel redirect |
|
(optional) Second call leg to transfer |
|
The extension channel should be redirected to
|
|
The context channel should be redirected to
|
|
The priority channel should be redirected to
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_set_cdr_user_field (GamiManager *ami, const gchar *channel, const gchar *user_field, gboolean append, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set CDR user field for channel
|
GamiManager |
|
The name of the channel to set user_field for
|
|
The value for the CDR user field |
|
(optional) Whether to append user_field to current value
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_mailbox_count (GamiManager *ami, const gchar *mailbox, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve count of new and old messages in mailbox
|
GamiManager |
|
The mailbox to check messages for |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GHashTable with message counts on success, NULL on failure
|
GamiResponse * gami_manager_mailbox_status (GamiManager *ami, const gchar *mailbox, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Check the status of mailbox
|
GamiManager |
|
The mailbox to check status for |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GHashTable with status variables on success, NULL on failure
|
GamiResponse * gami_manager_voicemail_users_list (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve a list of voicemail users
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of voicemail users (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_meetme_list (GamiManager *ami, const gchar *meetme, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
List al users in conference meetme
|
GamiManager |
|
The MeetMe conference bridge number |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of user information (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_meetme_mute (GamiManager *ami, const gchar *meetme, const gchar *user_num, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Mutes user_num in conference meetme
|
GamiManager |
|
The MeetMe conference bridge number |
|
The user number in the specified bridge |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_meetme_unmute (GamiManager *ami, const gchar *meetme, const gchar *user_num, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Unmutes user_num in conference meetme
|
GamiManager |
|
The MeetMe conference bridge number |
|
The user number in the specified bridge |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_monitor (GamiManager *ami, const gchar *channel, const gchar *file, const gchar *format, gboolean mix, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Start monitoring channel
|
GamiManager |
|
Channel to start monitoring |
|
(optional) Filename to use for recording |
|
(optional) Format to use for recording |
|
(optional) Whether to mix in / out channel into one file |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_change_monitor (GamiManager *ami, const gchar *channel, const gchar *file, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Change the file name of the recording occuring on channel
|
GamiManager |
|
Monitored channel |
|
New filename to use for recording |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_pause_monitor (GamiManager *ami, const gchar *channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Pause monitoring of channel
|
GamiManager |
|
Monitored channel |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_unpause_monitor (GamiManager *ami, const gchar *channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Continue monitoring of channel
|
GamiManager |
|
Monitored channel |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_stop_monitor (GamiManager *ami, const gchar *channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Stop monitoring channel
|
GamiManager |
|
Monitored channel |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_queue_add (GamiManager *ami, const gchar *queue, const gchar *iface, guint penalty, gboolean paused, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Add iface to queue
|
GamiManager |
|
Existing queue to add member |
|
Member interface to add to queue
|
|
Penalty for new member |
|
whether iface should be initially paused
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_queue_log (GamiManager *ami, const gchar *queue, const gchar *event, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Generate a queue_log entry for queue
|
GamiManager |
|
Queue to generate queue_log entry for |
|
Log event to generate |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_queue_pause (GamiManager *ami, const gchar *queue, const gchar *iface, gboolean paused, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
(Un)pause iface
|
GamiManager |
|
(optional) Existing queue for which iface should be (un)paused
|
|
Member interface (un)pause |
|
Whether to pause or unpause iface
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_queue_penalty (GamiManager *ami, const gchar *queue, const gchar *iface, guint penalty, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Change the penalty value of iface
|
GamiManager |
|
(optional) Limit penalty change to existing queue
|
|
Member interface change penalty for |
|
New penalty to set for iface
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_queue_remove (GamiManager *ami, const gchar *queue, const gchar *iface, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Remove iface from queue
|
GamiManager |
|
Existing queue to remove member from |
|
Member interface to remove from queue
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_queue_summary (GamiManager *ami, const gchar *queue, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Get summary of queue statistics
|
GamiManager |
|
(optional) Only send summary information for queue
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of queue statistics (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_agent_callback_login (GamiManager *ami, const gchar *agent, const gchar *exten, const gchar *context, gboolean ack_call, guint wrapup_time, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Log in agent and register callback to exten (note that the action has
been deprecated in asterisk-1.4 and was removed in asterisk-1.6)
|
GamiManager |
|
The ID of the agent to log in |
|
The extension to use as callback |
|
(optional) The context to use as callback |
|
(optional) Whether calls should be acknowledged by the agent (by pressing #) |
|
(optional) The minimum amount of time after hangup before the agent will receive a new call |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_agent_logoff (GamiManager *ami, const gchar *agent, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Log off agent
|
GamiManager |
|
The ID of the agent to log off |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_agents (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
List information about all configured agents and their status
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of agents (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_park (GamiManager *ami, const gchar *channel, const gchar *channel2, guint timeout, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Park a channel in the parking lot
|
GamiManager |
|
Channel name to park |
|
Channel to announce park info to (and return the call to if the parking times out) |
|
(optional) Milliseconds to wait before callback |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_parked_calls (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve a list of parked calls
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of parked calls (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_get_var (GamiManager *ami, const gchar *channel, const gchar *variable, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Get value of variable (either from channel or as global)
|
GamiManager |
|
(optional) Channel to retrieve variable from |
|
Name of the variable to retrieve |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
value of variable or FALSE
|
GamiResponse * gami_manager_set_var (GamiManager *ami, const gchar *channel, const gchar *variable, const gchar *value, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set variable (optionally on channel channel) to value
|
GamiManager |
|
(optional) Channel to set variable for |
|
Name of the variable to set |
|
New value for variable
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_db_del (GamiManager *ami, const gchar *family, const gchar *key, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Remove AstDB entry family/key
|
GamiManager |
|
The AstDB key family in which to delete the key |
|
The name of the AstDB key to delete |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_db_del_tree (GamiManager *ami, const gchar *family, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Remove AstDB key family
|
GamiManager |
|
The AstDB key family to delete |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_db_get (GamiManager *ami, const gchar *family, const gchar *key, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve value of AstDB entry family/key
|
GamiManager |
|
The AstDB key family from which to retrieve the value |
|
The name of the AstDB key |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
the value of family/key on success, FALSE on failure
|
GamiResponse * gami_manager_db_put (GamiManager *ami, const gchar *family, const gchar *key, const gchar *val, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set AstDB entry family/key to value
|
GamiManager |
|
The AstDB key family in which to set the value |
|
The name of the AstDB key |
|
The value to assign to the key |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_sip_peers (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve a list of SIP peers
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of SIP peers (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_sip_show_peer (GamiManager *ami, const gchar *peer, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve status information for peer
|
GamiManager |
|
SIP peer to get status information for |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GHashTable of peer status information on success, NULL on failure
|
GamiResponse * gami_manager_sip_show_registry (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve registry information of SIP peers
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of registry information (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_iax_peer_list (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve a list of IAX2 peers
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of IAX2 peers (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_dahdi_dial_offhook (GamiManager *ami, const gchar *dahdi_channel, const gchar *number, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Dial over DAHDI channel while offhook
|
GamiManager |
|
The DAHDI channel on which to dial number
|
|
The number to dial |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_dahdi_dnd_off (GamiManager *ami, const gchar *dahdi_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set DND (Do Not Disturb) status on dahdi_channel to off
|
GamiManager |
|
The DAHDI channel on which to turn off DND status |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_dahdi_dnd_on (GamiManager *ami, const gchar *dahdi_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set DND (Do Not Disturb) status on dahdi_channel
|
GamiManager |
|
The DAHDI channel on which to turn on DND status |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_dahdi_hangup (GamiManager *ami, const gchar *dahdi_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Hangup DAHDI channel
|
GamiManager |
|
The DAHDI channel to hang up |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_dahdi_restart (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Restart DAHDI channels. Any active calls will be terminated
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_dahdi_show_channels (GamiManager *ami, const gchar *dahdi_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Show the status of all DAHDI channels
|
GamiManager |
|
(optional) Limit status information to this channel |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of DAHDI channels (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_dahdi_transfer (GamiManager *ami, const gchar *dahdi_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Transfer DAHDI channel
|
GamiManager |
|
The channel to be transferred |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_zap_dial_offhook (GamiManager *ami, const gchar *zap_channel, const gchar *number, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Dial over ZAP channel while offhook
|
GamiManager |
|
The ZAP channel on which to dial number
|
|
The number to dial |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_zap_dnd_off (GamiManager *ami, const gchar *zap_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set DND (Do Not Disturb) status on zap_channel to off
|
GamiManager |
|
The ZAP channel on which to turn off DND status |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_zap_dnd_on (GamiManager *ami, const gchar *zap_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set DND (Do Not Disturb) status on zap_channel
|
GamiManager |
|
The ZAP channel on which to turn on DND status |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_zap_hangup (GamiManager *ami, const gchar *zap_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Hangup ZAP channel
|
GamiManager |
|
The ZAP channel to hang up |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_zap_restart (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Restart ZAP channels. Any active calls will be terminated
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_zap_show_channels (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Show the status of all ZAP channels
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of ZAP channels (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_zap_transfer (GamiManager *ami, const gchar *zap_channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Transfer ZAP channel
|
GamiManager |
|
The channel to be transferred |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_list_commands (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
List available Asterisk manager commands - the available actions may vary between different versions of Asterisk and due to the set of loaded modules
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
A GHashTable of action names / descriptions on success,
NULL on failure
|
GamiResponse * gami_manager_core_settings (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve information about PBX core settings (as Asterisk/GAMI version etc.)
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GHashTable with settings variables on success, NULL on failure
|
GamiResponse * gami_manager_core_status (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve information about the current PBX core status (as active calls, startup time etc.)
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GHashTable with status variables on success, NULL on failure
|
GamiResponse * gami_manager_core_show_channels (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve a list of currently active channels
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of active channels (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_status (GamiManager *ami, const gchar *channel, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Retrieve status information of active channels (or channel)
|
GamiManager |
|
(optional) Only retrieve status information for this channel |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GSList of status information (stored as GHashTable) on success,
NULL on failure
|
GamiResponse * gami_manager_ping (GamiManager *ami, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Query the Asterisk server to make sure it is still responding. May be used to keep the connection alive
|
GamiManager |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_module_check (GamiManager *ami, const gchar *module, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Check whether module is loaded
|
GamiManager |
|
Asterisk module name (not including extension) |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE if module is loaded, FALSE otherwise
|
GamiResponse * gami_manager_module_load (GamiManager *ami, const gchar *module, GamiModuleLoadType load_type, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Perform action indicated by load_type for module
|
GamiManager |
|
Asterisk module name (not including extension) |
|
Load action to perform (load, reload or unload) |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE if module is loaded, FALSE otherwise
|
GamiResponse * gami_manager_reload (GamiManager *ami, const gchar *module, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Reload module or all modules
|
GamiManager |
|
(optional) The name of the module to reload (not including extension) |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_extension_state (GamiManager *ami, const gchar *exten, const gchar *context, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Check extension state of exten@context - if hints are properly configured
on the server, the action will report the status of the device connected to
exten
|
GamiManager |
|
The name of the extension to check |
|
The context of the extension to check |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
GHashTable of status information on success, NULL on failure
|
GamiResponse * gami_manager_send_text (GamiManager *ami, const gchar *channel, const gchar *message, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Send message to channel
|
GamiManager |
|
The name of the channel to send message to
|
|
The message to send to channel
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_jabber_send (GamiManager *ami, const gchar *jabber, const gchar *screen_name, const gchar *message, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Send message from Jabber / GTalk account jabber to account screen_name
|
GamiManager |
|
Jabber / GTalk account to send message from |
|
Jabber / GTalk account to send message to |
|
The message to send |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_play_dtmf (GamiManager *ami, const gchar *channel, gchar digit, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Play a DTMF digit digit on channel
|
GamiManager |
|
The name of the channel to send digit to
|
|
The DTMF digit to play on channel
|
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_events (GamiManager *ami, GamiEventMask event_mask, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Set GamiEventMask for the connection to control which events shall be received
|
GamiManager |
|
GamiEventMask to set for the connection |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_user_event (GamiManager *ami, const gchar *user_event, const GHashTable *headers, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Send the user defined event user_event with an optional payload of headers
|
GamiManager |
|
The user defined event to send |
|
(optional) Optional header to add to the event |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_wait_event (GamiManager *ami, guint timeout, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Wait for an event to occur
|
GamiManager |
|
(optional) Maximum time to wait for events in seconds |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
GamiResponse * gami_manager_list_categories (GamiManager *ami, const gchar *filename, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
List categories in filename
|
GamiManager |
|
The name of the configuration file to list categories for |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
A GHashTable of category number / name on success,
NULL on failure
|
GamiResponse * gami_manager_get_config (GamiManager *ami, const gchar *filename, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Get content of configuration file filename
|
GamiManager |
|
The name of the configuration file to get content for |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
A GHashTable of line number / values on success,
NULL on failure
|
GamiResponse * gami_manager_get_config_json (GamiManager *ami, const gchar *filename, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Get content of configuration file filename as JS hash for use with JSON
|
GamiManager |
|
The name of the configuration file to get content for |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
A GHashTable with file dump on success,
NULL on failure
|
GamiResponse * gami_manager_create_config (GamiManager *ami, const gchar *filename, const gchar *action_id, GamiResponseFunc response_func, gpointer response_data, GError **error);
Create an empty configurion file filename
|
GamiManager |
|
The name of the configuration file to create |
|
(optional) ActionID to ease response matching |
|
Callback for asynchronious operation. Passing NULL will
trigger synchronious mode
|
|
User data to pass to the callback. If NULL is passed for
response_func, the parameter is ignored
|
|
A location to return an error of type GIOChannelError |
Returns : |
TRUE on success, FALSE on failure
|
"host" property"host" gchar* : Read / Write / Construct Only
The Asterisk manager host to connect to
Default value: "localhost"
"port" property"port" gchar* : Read / Write / Construct Only
The Asterisk manager port to connect to
Default value: "5038"
"connected" signalvoid user_function (GamiManager *ami, gpointer user_data) : Run Last
The ::connected signal is emitted after successfully establishing a connection to the Asterisk server
|
The GamiManager that received the signal |
|
user data set when the signal handler was connected. |
"disconnected" signalvoid user_function (GamiManager *ami, gpointer user_data) : Run Last
The ::disconnected event is emitted each time the connection to the Asterisk server is lost
|
The GamiManager that received the signal |
|
user data set when the signal handler was connected. |
"event" signalvoid user_function (GamiManager *ami, GHashTable *event, gpointer user_data) : Run Last
The ::event signal is emitted each time Asterisk emits an event
|
The GamiManager that received the signal |
|
The event that occurred (stored as a GHashTable) |
|
user data set when the signal handler was connected. |