Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include <ccss.h>
Data Fields | |
int(* | callee_available )(struct ast_cc_agent *agent) |
Alert the caller that it is time to try recalling. More... | |
void(* | destructor )(struct ast_cc_agent *agent) |
Destroy private data on the agent. More... | |
int(* | init )(struct ast_cc_agent *agent, struct ast_channel *chan) |
CC agent initialization. More... | |
int(* | party_b_free )(struct ast_cc_agent *agent) |
Let the caller know that the callee has become free but that the caller cannot attempt to call back because he is either busy or there is congestion on his line. More... | |
void(* | respond )(struct ast_cc_agent *agent, enum ast_cc_agent_response_reason reason) |
Respond to a CC request. More... | |
int(* | start_monitoring )(struct ast_cc_agent *agent) |
Begin monitoring a busy device. More... | |
int(* | start_offer_timer )(struct ast_cc_agent *agent) |
Start the offer timer. More... | |
int(* | status_request )(struct ast_cc_agent *agent) |
Request the status of the agent's device. More... | |
int(* | stop_offer_timer )(struct ast_cc_agent *agent) |
Stop the offer timer. More... | |
int(* | stop_ringing )(struct ast_cc_agent *agent) |
Request for an agent's phone to stop ringing. More... | |
const char * | type |
Type of agent the callbacks belong to. More... | |
int(* callee_available) (struct ast_cc_agent *agent) |
Alert the caller that it is time to try recalling.
agent | CC core agent control. |
The core will call this function when it receives notice that a monitored party has become available.
The agent's job is to send a message to the caller to notify it of such a change. If the agent is able to discern that the caller is currently unavailable, then the agent should react by calling the ast_cc_caller_unavailable function.
0 | on success. |
-1 | on error. |
Definition at line 1021 of file ccss.h.
Referenced by cc_callee_ready().
void(* destructor) (struct ast_cc_agent *agent) |
Destroy private data on the agent.
agent | CC core agent control. |
The core will call this function upon completion or failure of CC.
Definition at line 1035 of file ccss.h.
Referenced by agent_destroy().
int(* init) (struct ast_cc_agent *agent, struct ast_channel *chan) |
CC agent initialization.
agent | CC core agent control. |
chan | Original channel the agent will attempt to recall. |
This callback is called when the CC core is initialized. Agents should allocate any private data necessary for the call and assign it to the private_data on the agent. Additionally, if any ast_cc_agent_flags are pertinent to the specific agent type, they should be set in this function as well.
0 | on success. |
-1 | on error. |
Definition at line 876 of file ccss.h.
Referenced by cc_agent_init().
int(* party_b_free) (struct ast_cc_agent *agent) |
Let the caller know that the callee has become free but that the caller cannot attempt to call back because he is either busy or there is congestion on his line.
agent | CC core agent control. |
This is something that really only affects a scenario where a phone places a call over ISDN PTMP to Asterisk, who then connects over PTMP again to the ISDN network. For most agent types, there is no need to implement this callback at all because they don't really need to actually do anything in this situation. If you're having trouble understanding what the purpose of this callback is, then you can be safe simply not implementing it.
0 | on success. |
-1 | on error. |
Definition at line 986 of file ccss.h.
Referenced by cc_party_b_free().
void(* respond) (struct ast_cc_agent *agent, enum ast_cc_agent_response_reason reason) |
Respond to a CC request.
agent | CC core agent control. |
reason | CC request response status. |
When the core receives knowledge that a called party has accepted a CC request, it will call this callback. The core may also call this if there is some error when attempting to process the incoming CC request.
The duty of this is to issue a propper response to a CC request from the caller by acknowledging receipt of that request or rejecting it.
Definition at line 928 of file ccss.h.
Referenced by cc_active(), cc_caller_requested(), and cc_do_state_change().
int(* start_monitoring) (struct ast_cc_agent *agent) |
Begin monitoring a busy device.
agent | CC core agent control. |
The core will call this callback if the callee becomes available but the caller has reported that he is busy. The agent should begin monitoring the caller's device. When the caller becomes available again, the agent should call ast_cc_agent_caller_available.
0 | on success. |
-1 | on error. |
Definition at line 1002 of file ccss.h.
Referenced by cc_caller_busy().
int(* start_offer_timer) (struct ast_cc_agent *agent) |
Start the offer timer.
agent | CC core agent control. |
This is called by the core when the caller hangs up after a call for which CC may be requested. The agent should begin the timer as configured.
The primary reason why this functionality is left to the specific agent implementations is due to the differing use of schedulers throughout the code. Some channel drivers may already have a scheduler context they wish to use, and amongst those, some may use the ast_sched API while others may use the ast_sched_thread API, which are incompatible.
0 | on success. |
-1 | on error. |
Definition at line 897 of file ccss.h.
Referenced by cc_caller_offered().
int(* status_request) (struct ast_cc_agent *agent) |
Request the status of the agent's device.
agent | CC core agent control. |
Asynchronous request for the status of any caller which may be a valid caller for the CC transaction. Status responses should be made using the ast_cc_status_response function.
0 | on success. |
-1 | on error. |
Definition at line 943 of file ccss.h.
Referenced by cc_status_request().
int(* stop_offer_timer) (struct ast_cc_agent *agent) |
Stop the offer timer.
agent | CC core agent control. |
This callback is called by the CC core when the caller has requested CC.
0 | on success. |
-1 | on error. |
Definition at line 910 of file ccss.h.
Referenced by cc_caller_requested().
int(* stop_ringing) (struct ast_cc_agent *agent) |
Request for an agent's phone to stop ringing.
agent | CC core agent control. |
The usefulness of this is quite limited. The only specific known case for this is if Asterisk requests CC over an ISDN PTMP link as the TE side. If other phones are in the same recall group as the Asterisk server, and one of those phones picks up the recall notice, then Asterisk will receive a "stop ringing" notification from the NT side of the PTMP link. This indication needs to be passed to the phone on the other side of the Asterisk server which originally placed the call so that it will stop ringing. Since the phone may be of any type, it is necessary to have a callback that the core can know about.
0 | on success. |
-1 | on error. |
Definition at line 965 of file ccss.h.
Referenced by cc_stop_ringing().
const char* type |
Type of agent the callbacks belong to.
Definition at line 857 of file ccss.h.
Referenced by cc_agent_callback_helper(), cc_do_state_change(), cccancel_exec(), ccreq_exec(), ccss_device_state(), find_agent_callbacks(), and Property::load().