Asterisk.org: Developer Documentation (28 Oct 2009)

Wed Oct 28 15:49:24 2009

## Asterisk developer's documentation

# Channel states

Bits 0-15 of state are reserved for the state (up/down) of the line. More...

## Defines

#define | AST_STATE_BUSY 7
#define | AST_STATE_DIALING 3
#define | AST_STATE_DIALING_OFFHOOK 8
#define | AST_STATE_DOWN 0
#define | AST_STATE_MUTE (1 << 16)
#define | AST_STATE_OFFHOOK 2
#define | AST_STATE_PRERING 9
#define | AST_STATE_RESERVED 1
#define | AST_STATE_RING 4
#define | AST_STATE_RINGING 5
#define | AST_STATE_UP 6

## Detailed Description

Bits 0-15 of state are reserved for the state (up/down) of the line.

## Define Documentation

#define AST_STATE_BUSY 7

Line is busy

Definition at line 527 of file channel.h.

Referenced by ast_state2str(), misdn_indication(), pbx_builtin_busy(), pbx_builtin_congestion(), rpt(), zt_call(), and zt_handle_event().

#define AST_STATE_DIALING 3

Digits (or equivalent) have been dialed

Definition at line 519 of file channel.h.

Referenced by agent_call(), ast_state2str(), misdn_call(), modem_call(), zt_call(), zt_digit(), and zt_handle_event().

#define AST_STATE_DIALING_OFFHOOK 8

Digits (or equivalent) have been dialed while offhook

Definition at line 529 of file channel.h.

Referenced by zt_handle_event().

#define AST_STATE_DOWN 0

Channel is down and available

Definition at line 513 of file channel.h.

Referenced by __oh323_new(), agent_request(), alsa_new(), alsa_request(), ast_channel_alloc(), ast_iax2_new(), ast_modem_new(), ast_request(), ast_setstate(), ast_state2str(), cb_events(), check_availability(), features_request(), handle_hd_hf(), handle_message(), handle_request(), handle_request_invite(), iax2_call(), iax2_request(), local_request(), mgcp_call(), mgcp_new(), mgcp_request(), misdn_call(), modem_call(), modem_hangup(), modem_request(), nbs_call(), nbs_hangup(), nbs_new(), nbs_request(), oh323_call(), oh323_request(), oss_new(), oss_request(), phone_call(), phone_hangup(), phone_new(), phone_request(), release_chan(), sip_call(), sip_new(), sip_request_call(), skinny_call(), skinny_new(), skinny_request(), vpb_call(), vpb_hangup(), vpb_new(), vpb_request(), zt_call(), and zt_handle_event().

#define AST_STATE_MUTE (1 << 16)

Do not transmit voice data

Definition at line 535 of file channel.h.

#define AST_STATE_OFFHOOK 2

Channel is off hook

Definition at line 517 of file channel.h.

Referenced by ast_state2str().

#define AST_STATE_PRERING 9

Channel has detected an incoming call and is waiting for ring

Definition at line 531 of file channel.h.

Referenced by handle_init_event(), ss_thread(), and zt_handle_event().

#define AST_STATE_RESERVED 1

Channel is down, but reserved

Definition at line 515 of file channel.h.

Referenced by agent_hangup(), ast_state2str(), cb_events(), handle_init_event(), iax2_call(), mgcp_call(), misdn_call(), misdn_hangup(), misdn_request(), modem_call(), nbs_call(), oh323_call(), phone_call(), release_chan(), sip_call(), skinny_call(), vpb_call(), zt_call(), zt_handle_event(), zt_hangup(), and zt_request().

#define AST_STATE_RING 4

Line is ringing

Definition at line 521 of file channel.h.

Referenced by __oh323_new(), ast_answer(), ast_modem_new(), ast_pickup_call(), ast_state2str(), handle_hd_hf(), handle_init_event(), handle_request_invite(), local_new(), mgcp_new(), mgcp_ss(), misdn_new(), modem_mini_packet(), monitor_handle_notowned(), nbs_new(), oh323_indicate(), phone_check_exception(), phone_new(), pickup_exec(), sip_indicate(), sip_new(), sip_transfer(), skinny_new(), skinny_ss(), socket_read(), ss_thread(), vpb_new(), zt_handle_event(), zt_indicate(), and zt_new().

#define AST_STATE_RINGING 5

Remote end is ringing

Definition at line 523 of file channel.h.

Referenced by __zt_exception(), agent_call(), answer_call(), ast_answer(), ast_parse_device_state(), ast_pickup_call(), ast_state2str(), attempt_transfer(), available(), cb_events(), chan_ringing(), console_dial(), handle_request_invite(), handle_response_invite(), iax2_call(), mgcp_call(), misdn_indication(), nbs_call(), oh323_indicate(), phone_call(), phone_exception(), pickup_exec(), skinny_call(), ss_thread(), vpb_call(), vpb_fixup(), zt_answer(), zt_bridge(), zt_call(), zt_fixup(), zt_handle_event(), zt_indicate(), and zt_read().

#define AST_STATE_UP 6

Line is up

Definition at line 525 of file channel.h.

Referenced by __ast_request_and_dial(), __login_exec(), __zt_exception(), agent_call(), agent_hangup(), agent_read(), agi_exec_full(), alarmreceiver_exec(), alsa_answer(), alsa_read(), aopen_handle_escape(), app_exec(), ast_answer(), ast_cdr_init(), ast_control_streamfile(), ast_feature_request_and_dial(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_prod(), ast_quiet_chan(), ast_read(), ast_state2str(), async_wait(), auth_exec(), available(), background_detect_exec(), bestdata_handle_escape(), bestdata_write(), builtin_atxfer(), check_availability(), check_goto_on_transfer(), conf_exec(), connection_made(), count_exec(), datetime_exec(), dial_exec_full(), directory_exec(), disa_exec(), do_chanreads(), do_monitor(), handle_answer(), handle_message(), handle_request(), handle_request_invite(), handle_response_invite(), i4l_handle_escape(), ices_exec(), mgcp_answer(), milliwatt_exec(), modem_answer(), modem_call(), modem_write(), monitor_handle_notowned(), monitor_handle_owned(), nbs_xwrite(), oh323_answer(), oh323_hangup(), oh323_indicate(), oss_answer(), oss_read(), park_call_exec(), park_exec(), parkandannounce_exec(), pbx_builtin_answer(), pbx_builtin_background(), pbx_builtin_busy(), pbx_builtin_congestion(), phone_answer(), phone_exception(), phone_write(), playback_exec(), privacy_exec(), read_exec(), record_exec(), rpt(), rpt_exec(), sayunixtime_exec(), send_waveform_to_channel(), sip_answer(), sip_hangup(), sip_indicate(), sip_write(), skel_exec(), skinny_answer(), skinny_indicate(), sms_exec(), testclient_exec(), testserver_exec(), try_calling(), vm_exec(), vm_execmain(), vpb_answer(), vpb_indicate(), vpb_new(), vpb_write(), wait_for_answer(), zapateller_exec(), zapras_exec(), zt_answer(), zt_call(), zt_handle_event(), zt_hangup(), zt_indicate(), and zt_read().