Ejemplo n.º 1
0
 def post(self):
     self.render_json(db_helper.agent_login(self.request.params))
     call = db_helper.get_call_from_queue()
     if call:
         params = dict(aleg_url="https://go-for-plivo.appspot.com/route", aleg_method="POST")
         response = plivo.RestAPI("MAMWQ3MJCWMJI0ZME5MD","ZDNhYmZhY2U4NWRlNGY2MGI4MzMwZjQxZGZjZWJh").Call.transfer(call.Id, **params)
         log.info(response)
Ejemplo n.º 2
0
    def end(self):
        try:
            db_helper.call_completed(self.request.params.get("CallUUID"))
        except NoResultFound:
            log.error("Thats no good. Where did "+self.request.params.get("CallUUID")+" go?")


        call = db_helper.get_call_from_queue()
        if call:
            params = dict(aleg_url="https://go-for-plivo.appspot.com/route", aleg_method="POST")
            response = plivo.RestAPI("MAMWQ3MJCWMJI0ZME5MD","ZDNhYmZhY2U4NWRlNGY2MGI4MzMwZjQxZGZjZWJh").Call.transfer(call.Id, **params)
            log.info(response)