The default contrib application allows your project to define a default response to an IncomingMessage that is not handled by any other application. The response string is defined in DEFAULT_RESPONSE.


To use default, add "rapidsms.contrib.default" to the end of INSTALLED_APPS in your settings file:

    # Your other installed apps
    "rapidsms.contrib.default"  # must be last


The default application operates during the default message processing stage. It is very important that the router loads this application last, both because all other applications should have the opportunity to handle the message before falling back to this one, and because this application does not prevent the execution of the default stages of the applications that come after it.

This application passes the value of PROJECT_NAME to the response string. To include the project name, use %(project_name)s in the response string.

If DEFAULT_RESPONSE is None, the default application will not send a message.

By default, DEFAULT_RESPONSE is defined as:

DEFAULT_RESPONSE = "Sorry, %(project_name)s could not understand your message."