Asterisk - The Open Source Telephony Project  18.5.0
Data Fields
cdr_object_fn_table Struct Reference

A virtual table used for cdr_object. More...

Data Fields

void(*const init_function )(struct cdr_object *cdr)
 An initialization function. This will be called automatically when a cdr_object is switched to this type in cdr_object_transition_state. More...
 
const char * name
 Name of the subclass. More...
 
enum process_bridge_enter_results(*const process_bridge_enter )(struct cdr_object *cdr, struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *channel)
 Process the entering of a bridge by this CDR. The purpose of this callback is to have the CDR prepare itself for the bridge and attempt to find a valid Party B. The act of creating new CDRs based on the entering of this channel into the bridge is handled by the higher level message handler. More...
 
int(*const process_bridge_leave )(struct cdr_object *cdr, struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *channel)
 Process the leaving of a bridge by this CDR. More...
 
int(*const process_dial_begin )(struct cdr_object *cdr, struct ast_channel_snapshot *caller, struct ast_channel_snapshot *peer)
 Process the beginning of a dial. A dial message implies one of two things: The cdr_object's Party A has been originated The cdr_object's Party A is dialing its Party B. More...
 
int(*const process_dial_end )(struct cdr_object *cdr, struct ast_channel_snapshot *caller, struct ast_channel_snapshot *peer, const char *dial_status)
 Process the end of a dial. At the end of a dial, a CDR can be transitioned into one of two states - DialedPending (dialed_pending_state_fn_table) or Finalized (finalized_state_fn_table). More...
 
int(*const process_parked_channel )(struct cdr_object *cdr, struct ast_parked_call_payload *parking_info)
 Process an update informing us that the channel got itself parked. More...
 
int(*const process_parking_bridge_enter )(struct cdr_object *cdr, struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *channel)
 Process entering into a parking bridge. More...
 
int(*const process_party_a )(struct cdr_object *cdr, struct ast_channel_snapshot *snapshot)
 Process a Party A update for the cdr_object. More...
 
void(*const process_party_b )(struct cdr_object *cdr, struct ast_channel_snapshot *snapshot)
 Process a Party B update for the cdr_object. More...
 

Detailed Description

A virtual table used for cdr_object.

Note that all functions are optional - if a subclass does not need an implementation, it is safe to leave it NULL.

Definition at line 416 of file cdr.c.

Field Documentation

◆ init_function

void(* const init_function) (struct cdr_object *cdr)

An initialization function. This will be called automatically when a cdr_object is switched to this type in cdr_object_transition_state.

Parameters
cdrThe cdr_object that was just transitioned

Definition at line 427 of file cdr.c.

Referenced by cdr_object_transition_state_init().

◆ name

const char* name

Name of the subclass.

Definition at line 418 of file cdr.c.

Referenced by cdr_object_transition_state_init(), PathSegment::get_child(), Parameter::load(), SwaggerType::load(), and Property::load().

◆ process_bridge_enter

enum process_bridge_enter_results(* const process_bridge_enter) (struct cdr_object *cdr, struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *channel)

Process the entering of a bridge by this CDR. The purpose of this callback is to have the CDR prepare itself for the bridge and attempt to find a valid Party B. The act of creating new CDRs based on the entering of this channel into the bridge is handled by the higher level message handler.

Note that this handler is for when a channel enters into a "normal" bridge, where people actually talk to each other. Parking is its own thing.

Parameters
cdrThe cdr_object
bridgeThe bridge that the Party A just entered into
channelThe ast_channel_snapshot for this CDR's Party A
Return values
process_bridge_enter_resultsDefines whether or not this CDR was able to fully handle the bridge enter message.

Definition at line 503 of file cdr.c.

Referenced by dialed_pending_state_process_bridge_enter(), and handle_standard_bridge_enter_message().

◆ process_bridge_leave

int(* const process_bridge_leave) (struct cdr_object *cdr, struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *channel)

Process the leaving of a bridge by this CDR.

Parameters
cdrThe cdr_object
bridgeThe bridge that the Party A just left
channelThe ast_channel_snapshot for this CDR's Party A
Return values
0This CDR left successfully
1Error

Definition at line 533 of file cdr.c.

Referenced by handle_bridge_leave_message().

◆ process_dial_begin

int(* const process_dial_begin) (struct cdr_object *cdr, struct ast_channel_snapshot *caller, struct ast_channel_snapshot *peer)

Process the beginning of a dial. A dial message implies one of two things: The cdr_object's Party A has been originated The cdr_object's Party A is dialing its Party B.

Parameters
cdrThe cdr_object
callerThe originator of the dial attempt
peerThe destination of the dial attempt
Return values
0if the parties in the dial were handled by this CDR
1if the parties could not be handled by this CDR

Definition at line 462 of file cdr.c.

Referenced by handle_dial_message().

◆ process_dial_end

int(* const process_dial_end) (struct cdr_object *cdr, struct ast_channel_snapshot *caller, struct ast_channel_snapshot *peer, const char *dial_status)

Process the end of a dial. At the end of a dial, a CDR can be transitioned into one of two states - DialedPending (dialed_pending_state_fn_table) or Finalized (finalized_state_fn_table).

Parameters
cdrThe cdr_object
callerThe originator of the dial attempt
peerthe Destination of the dial attempt
dial_statusWhat happened
Return values
0if the parties in the dial were handled by this CDR
1if the parties could not be handled by this CDR

Definition at line 480 of file cdr.c.

Referenced by handle_dial_message().

◆ process_parked_channel

int(* const process_parked_channel) (struct cdr_object *cdr, struct ast_parked_call_payload *parking_info)

Process an update informing us that the channel got itself parked.

Parameters
cdrThe cdr_object
channelThe parking information for this CDR's party A
Return values
0This CDR successfully parked itself
1This CDR couldn't handle the park

Definition at line 546 of file cdr.c.

Referenced by handle_parked_call_message().

◆ process_parking_bridge_enter

int(* const process_parking_bridge_enter) (struct cdr_object *cdr, struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *channel)

Process entering into a parking bridge.

Parameters
cdrThe cdr_object
bridgeThe parking bridge that Party A just entered into
channelThe ast_channel_snapshot for this CDR's Party A
Return values
0This CDR successfully transitioned itself into the parked state
1This CDR couldn't handle the parking transition and we need a new CDR.

Definition at line 519 of file cdr.c.

Referenced by handle_parking_bridge_enter_message().

◆ process_party_a

int(* const process_party_a) (struct cdr_object *cdr, struct ast_channel_snapshot *snapshot)

Process a Party A update for the cdr_object.

Parameters
cdrThe cdr_object to process the update
snapshotThe snapshot for the CDR's Party A
Return values
0the CDR handled the update or ignored it
1the CDR is finalized and a new one should be made to handle it

Definition at line 437 of file cdr.c.

Referenced by base_process_parked_channel(), dialed_pending_state_process_party_a(), handle_channel_snapshot_update_message(), handle_parking_bridge_enter_message(), and handle_standard_bridge_enter_message().

◆ process_party_b

void(* const process_party_b) (struct cdr_object *cdr, struct ast_channel_snapshot *snapshot)

Process a Party B update for the cdr_object.

Parameters
cdrThe cdr_object to process the update
snapshotThe snapshot for the CDR's Party B

Definition at line 446 of file cdr.c.

Referenced by cdr_object_update_party_b().


The documentation for this struct was generated from the following file: