Class a.c.CallHandle(CallHandleBase):

Part of aculab.callcontrol View Source View In Hierarchy

Known subclasses: aculab.callcontrol.Call

An Aculab call handle, and common operations on it.

All events are delegated to the controller; some events are handled internally to maintain the state.

Logging: output from a CallHandle is prefixed with cc-
Method __init__ Initialise the CallHandle, guess the timeslot type and determine
Method get_module Return a unique identifier for module comparisons.
Method get_switch Return a unique identifier for module comparisons.
Method get_datafeed Return the datafeed (always None for a CallHandle).
Method get_timeslot Get the transmit timeslot for TDM switch connections.
Method openin Open a call handle for incoming calls.
Method _outparms Used internally.
Method openout Make an outgoing call.
Method feature_send Send feature information at different stages during the lifetime of
Method enquiry Make an enquiry call, i.e. a call to a third party while
Method transfer Transfer to another call.
Method hold Put a call on hold.
Method reconnect Retrieve a call that was previously put on hold.
Method send_overlap Send overlap digits.
Method send_keypad_info Untested.
Method listen_to Listen to a timeslot on a CTbus.
Method speak_to Talk to a timeslot on a CTBus.
Method get_cause Return the cause for a disconnected or failed call.
Method get_details Return (and cache) the details of a call.
Method get_feature_details Return (and cache) the feature details of a call.
Method accept Accept the incoming call.
Method incoming_ringing Signal incoming ringing to the far end.
Method disconnect Disconnect a call.
Method release Release the call.
Method close Alias for release.
Method ev_incoming_call_det Internal event handler for EV_INCOMING_CALL_DETECTED.
Method ev_ext_hold_request Internal event handler for EV_EXT_HOLD_REQUEST.
Method ev_outgoing_ringing Internal event handler for EV_OUTGOING_RINGING.
Method ev_details Internal event handler for EV_DETAILS.
Method ev_call_connected Internal event handler for EV_CALL_CONNECTED.
Method ev_idle Internal event handler for EV_IDLE, called before the
Method ev_idle_post Internal event handler for EV_IDLE, called after the

Inherited from CallHandleBase:

Method push_controller Push a new controller onto the controller stack.
Method pop_controller Pop a controller from the stack.
def __init__(self, controller, user_data=None, card=0, port=0, timeslot=None, ts_type=None, reactor=Reactor): (source)
Initialise the CallHandle, guess the timeslot type and determine the switch card to use with this handle.
def get_module(self): (source)
Return a unique identifier for module comparisons. Used by switching.
def get_switch(self): (source)
Return a unique identifier for module comparisons. Used by switching.
def get_datafeed(self): (source)
Return the datafeed (always None for a CallHandle). Used by switching.
def get_timeslot(self): (source)
Get the transmit timeslot for TDM switch connections.
def openin(self, unique=None, cnf=None): (source)
Open a call handle for incoming calls.
Parametersuniquesee unique_xparms.
cnfsee cnf
def _outparms(self, destination_address, sending_complete=True, originating_address='', unique=None, feature_type=None, feature=None, cnf=None): (source)
Used internally.
def openout(self, destination_address, sending_complete=True, originating_address='', unique=None, feature_type=None, feature=None, cnf=None): (source)
Make an outgoing call.
Parametersdestination_addressnumber to dial.
sending_completeTypically True, unless overlap sending is used. See send_overlap.
originating_addressoften also called the CLI.
uniquesee unique_xparms.
feature_typesee feature_information.
featuresee feature_union.
cnfsee cnf.
def feature_send(self, feature_type, feature, message_control=lowlevel.CONTROL_NEXT_CC_MESSAGE): (source)
Send feature information at different stages during the lifetime of a call.
Parametersfeature_typesee feature_information.
featuresee feature_union.
message_control

see message_control. Default is CONTROL_NEXT_CC_MESSAGE.

See also: call_feature_send.
def enquiry(self, destination_address, sending_complete=1, originating_address='', unique=None, feature_type=None, feature=None, cnf=None): (source)
Make an enquiry call, i.e. a call to a third party while another call is on hold.
Parametersdestination_addressnumber to dial.
sending_completeTypically True, unless overlap sending is used. See send_overlap.
originating_addressoften also called the CLI.
uniquesee unique_xparms.
feature_typesee feature_information.
featuresee feature_union.
cnfsee cnf
def transfer(self, call): (source)

Transfer to another call.

This call must be on hold and other call must have been initiated with tenquiry.
Parameterscall

The call to transfer to.

See call_transfer.
def hold(self): (source)

Put a call on hold.

See call_hold.
def reconnect(self): (source)

Retrieve a call that was previously put on hold.

See call_reconnect.
def send_overlap(self, addr, complete=False): (source)

Send overlap digits.

See call_send_overlap.
Parameterssending_completeSet this to True if you know that the number is complete. This is of limited use: if you know the entire number, you don't need overlap sending, and if you use overlap sending, you typically don't know when the number is complete.
addrI don't remember whether this should be the entire number so far or incremental digits. Aculab's tech writers don't know either.
def send_keypad_info(self, keypad='', display=''): (source)

Untested.

See call_send_keypad_info.
def listen_to(self, source): (source)
Listen to a timeslot on a CTbus.
Parameterssource

a tuple of (stream, timeslot). @returns a NetEndpoint.

Used internally. Applications should use switching.connect.
def speak_to(self, sink): (source)
Talk to a timeslot on a CTBus.
Parameterssource

a tuple of (stream, timeslot). @returns a CTBusEndpoint.

Used internally. Applications should use switching.connect.
def get_cause(self): (source)

Return the cause for a disconnected or failed call.

See call_getcause.
Returnsa CAUSE_XPARMS structure.
def get_details(self): (source)

Return (and cache) the details of a call.

See call_details.
Returnsa DETAIL_XPARMS structure.
def get_feature_details(self, type): (source)

Return (and cache) the feature details of a call.

See call_feature_details.
Returnsa FEATURE_DETAIL_XPARMS structure.
def accept(self): (source)

Accept the incoming call.

See call_accept.
def incoming_ringing(self): (source)

Signal incoming ringing to the far end.

See call_incoming_ringing.
def disconnect(self, cause=None): (source)

Disconnect a call.

See call_disconnect.
Parameterscausethis may be a CAUSE_XPARMS struct or an int for an Aculab cause value.
def release(self, cause=None): (source)

Release the call.

See call_release.
Parameterscausethis may be a CAUSE_XPARMS struct or an int for an Aculab cause value.
def close(self): (source)
Alias for release.
def ev_incoming_call_det(self): (source)

Internal event handler for EV_INCOMING_CALL_DETECTED.

Calls get_details to cache them.
def ev_ext_hold_request(self): (source)

Internal event handler for EV_EXT_HOLD_REQUEST.

Calls get_details to update the details.
def ev_outgoing_ringing(self): (source)

Internal event handler for EV_OUTGOING_RINGING.

Calls get_details to cache them.
def ev_details(self): (source)

Internal event handler for EV_DETAILS.

Calls get_details to update the details.
def ev_call_connected(self): (source)

Internal event handler for EV_CALL_CONNECTED.

Calls get_details to update the details.
def ev_idle(self): (source)

Internal event handler for EV_IDLE, called before the controller's ev_idle.

This method calls:
def ev_idle_post(self): (source)

Internal event handler for EV_IDLE, called after the controller's ev_idle.

This method:
  • sets the call's user_data to None
  • calls idle_net_ts to assert a suitable idle pattern (for ISDN, see Q.522, section 2.12).
API Documentation for pyAculab, generated by pydoctor at 2009-01-02 15:12:29.