'Add a phone number as a 3pid identifier
Also optionally binds msisdn to the given user_id on the identity server
Args:
user_id (str): id of user
threepid (object): m.login.msisdn auth response
token (str): access_token for the user
bind_email (bool): true if the client requested the email to be
bound at the identity server
Returns:
defer.Deferred:'

@defer.inlineCallbacks
def _register_msisdn_threepid(self, user_id, threepid, token, bind_msisdn):

    reqd = ('medium', 'address', 'validated_at')
    if any(((x not in threepid) for x in reqd)):
        logger.info("Can't    add    incomplete    3pid")
        defer.returnValue()
    (yield self.auth_handler.add_threepid(user_id, threepid['medium'], threepid['address'], threepid['validated_at']))
    if bind_msisdn:
        logger.info('bind_msisdn    specified:    binding')
        logger.debug('Binding    msisdn    %s    to    %s', threepid, user_id)
        (yield self.identity_handler.bind_threepid(threepid['threepid_creds'], user_id))
    else:
        logger.info('bind_msisdn    not    specified:    not    binding    msisdn')
