(cls, backend_type, phone_number, domain=None)
return backend
Get the appropriate outbound backend to communicate with phone_number.

        backend_type - SQLMobileBackend.SMS or SQLMobileBackend.IVR
        phone_number - the phone number
        domain - the domain
Get the appropriate outbound backend to communicate with phone_number.
Get the appropriate outbound backend to communicate with phone_number .
def load_default_by_phone_and_domain(cls, backend_type, phone_number, domain=None):
        """
        Get the appropriate outbound backend to communicate with phone_number.

        backend_type - SQLMobileBackend.SMS or SQLMobileBackend.IVR
        phone_number - the phone number
        domain - the domain
        """
        backend = None

        if domain:
            backend = cls.load_default_backend(backend_type, phone_number, domain=domain)

        if not backend:
            backend = cls.load_default_backend(backend_type, phone_number)

        if not backend:
            raise BadSMSConfigException("No suitable backend found for phone "
                                        "number and domain %s, %s" %
                                        (phone_number, domain))

        return backend
def load_default_by_phone_and_domain ( cls , backend_type , phone_number , domain = None ) : backend = None if domain : backend = cls . load_default_backend ( backend_type , phone_number , domain = domain ) if not backend : backend = cls . load_default_backend ( backend_type , phone_number ) if not backend : raise BadSMSConfigException ( "No suitable backend found for phone " "number and domain %s, %s" % ( phone_number , domain ) ) return backend