MTN Nigeria

MTN Nigeria USSD Transport

class vumi.transports.mtn_nigeria.mtn_nigeria_ussd.MtnNigeriaUssdTransport(options, config=None)

Bases: vumi.transports.base.Transport

USSD transport for MTN Nigeria.

This transport connects as a TCP client and sends messages using a custom protocol whose packets consist of binary headers plus an XML body.

CONFIG_CLASS

alias of MtnNigeriaUssdTransportConfig

class vumi.transports.mtn_nigeria.mtn_nigeria_ussd.MtnNigeriaUssdTransportConfig(config_data, static=False)

Bases: vumi.transports.base.TransportConfig

MTN Nigeria USSD transport configuration.

Configuration options:

Parameters:
  • amqp_prefetch_count (int) – The number of messages fetched concurrently from each AMQP queue by each worker instance.
  • transport_name (str) – The name this transport instance will use to create its queues.
  • publish_status (bool) – Whether status messages should be published by the transport
  • server_hostname (str) – Hostname of the server the transport’s client should connect to.
  • server_port (int) – Port that the server is listening on.
  • username (str) – The username for this transport.
  • password (str) – The password for this transport.
  • application_id (str) – An application ID required by MTN Nigeria for client authentication.
  • enquire_link_interval (int) – The interval (in seconds) between enquire links sent to the server to check whether the connection is alive and well.
  • timeout_period (int) – How long (in seconds) after sending an enquire link request the client should wait for a response before timing out. NOTE: The timeout period should not be longer than the enquire link interval
  • user_termination_response (str) – Response given back to the user if the user terminated the session.
  • redis_manager (dict) – Parameters to connect to Redis with
  • session_timeout_period (int) – Max length (in seconds) of a USSD session