AMIProtocol¶
-
class
obelus.ami.AMIProtocol¶ Higher-level AMI protocol implementation, including response and event matching.
-
data_received(data)¶ Call this when some data (a bytestring) is received.
-
greeting_received(api_name, api_version)¶ Called when the AMI’s initial greeting line is received. Typical values for api_name and api_version are “Asterisk Call Manager” and “1.1”, respectively.
Override this method to do something with said information.
-
line_received(line)¶ Processing an incoming line of AMI data.
-
register_event_handler(name, func)¶ Register a callable event handler func for the event name.
-
send_action(name, headers, variables=())¶ Send the AMI action with the given name (a str object) and headers (a dict mapping names onto values). Return a Handler which will be fired when the AMI returns a response for the action.
-
serialize_message(headers)¶ Serialize a message comprised of the given headers. Each header value can be either a str or a list of str objects.
-
unhandled_event_received(event)¶ Called when an event is received for which no handler has been registered.
-
unregister_event_handler(name)¶ Unregister the handler for event name.
-
-
class
obelus.ami.Event¶
-
class
obelus.ami.Response¶