smsframework/providers/loopback.py
def subscribe(self, number, callback):
        """ Register a virtual subscriber which receives messages to the matching number.

            :type number: str
            :param number: Subscriber phone number
            :type callback: callable
            :param callback: A callback(OutgoingMessage) which handles the messages directed to the subscriber.
                The message object is augmented with the .reply(str) method which allows to send a reply easily!
            :rtype: LoopbackProvider
        """
        self._subscribers[digits_only(number)] = callback
        return self
def subscribe(self, number, callback):
        """ Register a virtual subscriber which receives messages to the matching number.

            :type number: str
            :param number: Subscriber phone number
            :type callback: callable
            :param callback: A callback(OutgoingMessage) which handles the messages directed to the subscriber.
                The message object is augmented with the .reply(str) method which allows to send a reply easily!
            :rtype: LoopbackProvider
        """
        self._subscribers[digits_only(number)] = callback
        return self
Register a virtual subscriber which receives messages to the matching number.

            :type number: str
            :param number: Subscriber phone number
            :type callback: callable
            :param callback: A callback(OutgoingMessage) which handles the messages directed to the subscriber.
                The message object is augmented with the .reply(str) method which allows to send a reply easily!
            :rtype: LoopbackProvider