@@ -0,0 +1,2702 @@
+package com.twilio.ivrrecording.servlet.extension;%0A%0Aimport com.twilio.ivrrecording.models.Agent;%0Aimport com.twilio.ivrrecording.repositories.AgentRepository;%0Aimport com.twilio.ivrrecording.servlet.WebAppServlet;%0Aimport com.twilio.ivrrecording.servlet.common.Redirect;%0Aimport com.twilio.sdk.verbs.*;%0Aimport com.twilio.sdk.verbs.Number;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport java.io.IOException;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic class ConnectServlet extends WebAppServlet %7B%0A%0A    private AgentRepository agentRepository;%0A%0A    public ConnectServlet() %7B%0A        this(new AgentRepository());%0A    %7D%0A%0A    public ConnectServlet(AgentRepository agentRepository) %7B%0A        this.agentRepository = agentRepository;%0A    %7D%0A%0A    @Override%0A    protected void doPost(HttpServletRequest request, HttpServletResponse response)%0A            throws IOException %7B%0A%0A        String selectedOption = request.getParameter(%22Digits%22);%0A%0A        Agent agent = findAgentByExtension(selectedOption);%0A        if (agent == null) %7B%0A            try %7B%0A                redirectToMenu(response);%0A            %7D catch (TwiMLException e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D else %7B%0A            TwiMLResponse twiMLResponse = new TwiMLResponse();%0A            Say say = new Say(%22You'll be connected shortly to your planet.%22);%0A            say.setVoice(%22alice%22);%0A            say.setLanguage(%22en-GB%22);%0A%0A            Dial dial = new Dial();%0A            dial.setAction(String.format(%22/agents/call?agentId=%25s%22, agent.getId()));%0A%0A            Number number = new Number(agent.getPhoneNumber());%0A            number.setUrl(%22/agents/screen-call%22);%0A%0A            try %7B%0A                dial.append(number);%0A                twiMLResponse.append(dial);%0A            %7D catch (TwiMLException e) %7B%0A                e.printStackTrace();%0A            %7D%0A            respondTwiML(response, twiMLResponse);%0A        %7D%0A    %7D%0A%0A    private void redirectToMenu(HttpServletResponse response)%0A            throws TwiMLException, IOException %7B%0A        TwiMLResponse twiMLResponse = new TwiMLResponse();%0A        twiMLResponse.append(new com.twilio.sdk.verbs.Redirect(%22/ivr/welcome%22));%0A%0A        respondTwiML(response, twiMLResponse);%0A    %7D%0A%0A    private Agent findAgentByExtension(String extension) %7B%0A        Map%3CString, String%3E planetsExtensiosn = new HashMap%3C%3E();%0A        planetsExtensiosn.put(%222%22, %22Brodo%22);%0A        planetsExtensiosn.put(%223%22, %22Dagobah%22);%0A        planetsExtensiosn.put(%224%22, %22Oober%22);%0A%0A%0A        return planetsExtensiosn.containsKey(extension)%0A                ? agentRepository.findByExtension(planetsExtensiosn.get(extension))%0A                : null;%0A    %7D%0A%7D%0A

Fix missing file and git troubles