Skip to content

Instantly share code, notes, and snippets.

@hodgestar
Created January 23, 2012 22:15
Show Gist options
  • Save hodgestar/1665811 to your computer and use it in GitHub Desktop.
Save hodgestar/1665811 to your computer and use it in GitHub Desktop.
Vumi transport_metadata overview

An enumeration of current transport metadata.

HttpRpcTransport based Transports

Unless otherwise noted, these only support outbound messages that are replies to a previous message and only one reply per message.

api.oldapi

Outbound messages are completely unsupported.

  • http_user (unused on outbound)

cellulant

  • session_id (unused on outbound)

infobip

  • session_id (unused on outbound)

vodacom_messaging

  • session_id (unused on outbound)

Other tranports

integrat

Non-reply outbound messages are not supported. Replies are supported.

  • session_id (required)

irc

Non-reply outbound messages are supported.

  • irc_channel (optional, overridable by helper_metadata)

opera

Non-reply outbound messages are supported.

  • provider (unused on outbound)
  • deliver_at (optional, not relevant to vumi applications)
  • expire_at (optional)
  • priority (optional)
  • receipt (optional)
  • from_addr is not used
  • transport_type is not used

smpp

Non-reply outbound messages are supported.

SMPP shoves some values into delivery report transport_metadata (which seems odd) but doesn't appear to use transport_metadata in user messages.

  • from_addr is used but can be overriden by transport configuration.
  • transport_type is not used.

telnet

Non-reply outbound messages are currently not supported. Replies are supported.

  • session_id (required)

twitter

Non-reply outbound messages are supported.

The Twitter transport shoves all of original Twitter message dictionary into the transport metadata but none of it is need on outbound messages.

  • from_addr is not used
  • transport_type is not used

vas2nets

Non-reply outbound messages are supported.

Vas2nets encodes some vas2nets IDs into its vumi message ids. These should probably go into transport_metadata instead.

  • original_message_id (unused on outbound)
  • timestamp (unused on outbound)
  • network_id (required)
  • keyword (optional)
  • tariff (optional)
  • from_addr is used
  • transport_type is not used

xmpp

Non-reply outbound messages are supported.

  • xmpp_id (unused on outbound)
  • from_addr is not used
  • transport_type is not used

The plan for outbound messages

Required arguments to send:

  • to_addr
  • content

Optional arguments:

  • from_addr (defaults to None, transports or dispatchers should override as necessary)
  • transport_name (defaults to None, may be set by dispatchers)
  • transport_type (defaults to None, may be set by dispatchers)
  • transport_metadata (defaults to {}, transports should support empty transport metadata for outgoing messages)
  • helper_metadata (defaults to {}, transports should support empty helper_metadata for outgoing messages)

All optional arguments are also overrideable via Application Worker config.

Arguments that should not be specified:

  • in_reply_to (always None)
  • session_event (always SESSION_NEW)
@jerith
Copy link

jerith commented Jan 24, 2012

Perhaps we should support some kind of "capabilities" declaration for transports? Something along the lines of http://wiki.inspircd.org/RPL_ISUPPORT_Tokens maybe?

@hodgestar
Copy link
Author

I also thought about allowing transports to declare their capabilites (kinds of replies they can receive and transport types they support) but I think that's something for another branch / and ticket (praekeltfoundation/vumi#152).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment