23#ifndef _ASTERISK_DIAL_H
24#define _ASTERISK_DIAL_H
26#if defined(__cplusplus) || defined(c_plusplus)
229#if defined(__cplusplus) || defined(c_plusplus)
enum ast_dial_result ast_dial_state(struct ast_dial *dial)
Return state of dial.
ast_dial_result
List of return codes for dial run API calls.
@ AST_DIAL_RESULT_INVALID
@ AST_DIAL_RESULT_ANSWERED
@ AST_DIAL_RESULT_TIMEOUT
@ AST_DIAL_RESULT_PROGRESS
@ AST_DIAL_RESULT_RINGING
@ AST_DIAL_RESULT_PROCEEDING
@ AST_DIAL_RESULT_UNANSWERED
void(* ast_dial_state_callback)(struct ast_dial *)
void ast_dial_set_state_callback(struct ast_dial *dial, ast_dial_state_callback callback)
Set a callback for state changes.
int ast_dial_append(struct ast_dial *dial, const char *tech, const char *device, const struct ast_assigned_ids *assignedids)
Append a channel.
int ast_dial_option_global_disable(struct ast_dial *dial, enum ast_dial_option option)
Disables an option globally.
struct ast_dial * ast_dial_create(void)
New dialing structure.
struct ast_channel * ast_dial_answered(struct ast_dial *dial)
Return channel that answered.
void ast_dial_set_user_data(struct ast_dial *dial, void *user_data)
Set user data on a dial structure.
int ast_dial_prerun(struct ast_dial *dial, struct ast_channel *chan, struct ast_format_cap *cap)
Request all appended channels, but do not dial.
void ast_dial_set_global_timeout(struct ast_dial *dial, int timeout)
Set the maximum time (globally) allowed for trying to ring phones.
void ast_dial_hangup(struct ast_dial *dial)
Hangup channels.
int ast_dial_option_disable(struct ast_dial *dial, int num, enum ast_dial_option option)
Disables an option per channel.
const char * ast_hangup_cause_to_dial_status(int hangup_cause)
Convert a hangup cause to a publishable dial status.
enum ast_dial_result ast_dial_run(struct ast_dial *dial, struct ast_channel *chan, int async)
Execute dialing synchronously or asynchronously.
int ast_dial_option_enable(struct ast_dial *dial, int num, enum ast_dial_option option, void *data)
Enables an option per channel.
enum ast_dial_result ast_dial_join(struct ast_dial *dial)
Cancel async thread.
struct ast_channel * ast_dial_answered_steal(struct ast_dial *dial)
Steal the channel that answered.
void * ast_dial_get_user_data(struct ast_dial *dial)
Return the user data on a dial structure.
int ast_dial_reason(struct ast_dial *dial, int num)
Get the reason an outgoing channel has failed.
void ast_dial_set_timeout(struct ast_dial *dial, int num, int timeout)
Set the maximum time (per channel) allowed for trying to ring the phone.
ast_dial_option
List of options that are applicable either globally or per dialed channel.
@ AST_DIAL_OPTION_DIAL_REPLACES_SELF
@ AST_DIAL_OPTION_ANSWER_EXEC
@ AST_DIAL_OPTION_RINGING
@ AST_DIAL_OPTION_PREDIAL
@ AST_DIAL_OPTION_DISABLE_CALL_FORWARDING
@ AST_DIAL_OPTION_SELF_DESTROY
struct ast_channel * ast_dial_get_channel(struct ast_dial *dial, int num)
Get the dialing channel, if prerun has been executed.
int ast_dial_destroy(struct ast_dial *dial)
Destroys a dialing structure.
int ast_dial_option_global_enable(struct ast_dial *dial, enum ast_dial_option option, void *data)
Enables an option globally.
int ast_dial_append_channel(struct ast_dial *dial, struct ast_channel *chan)
Append a channel using an actual channel object.
Structure to pass both assignedid values to channel drivers.
Main Channel structure associated with a channel.
Dialing channel structure. Contains per-channel dialing options, asterisk channel,...
Main dialing structure. Contains global options, channels being dialed, and more!