Example #1
0
 def wrapper(*args, **kwargs):
     try:
         input = web.input()
         acguid = input.AccountGuid
         if acguid != settings.AccountGuid:
             raise Exception('request must come from twilio')
     except:
         return util.twilio_say('Request must come from twilio')
     return f(*args, **kwargs)
Example #2
0
 def GET(self):
     web.header('Content-Type', 'text/xml')
     callerid = web.input().Caller
     input = web.input()
     logging.info(dir(input))
     if input.has_key('Digits'):
         digits = input.Digits
     else:
         digits = ''
     logging.info('removerejectee digits: %s' % digits)
     reject = RejectList.gql('WHERE rejectee = :p', p=callerid).get()
     if reject is not None and len(digits) > 0:
         reject.delete()
         return util.twilio_say('You have been removed from the system')
       
     if reject is not None and len(digits) == 0:
         return util.twilio_say('Your phone number remains in the system')
     else:
         return util.twilio_say('Bye')