title: Call an agent in our team (SIP client) and then connect them to a customer (PSTN number)
body: <p>please could anyone help with advice on how to do this using the API? I am looking to use some javascript to call our agent first on their SIP address and then start outbound calling the customer on their PSTN number from the agent. </p>
  
  <p>The snippet below will achieve it, but in the wrong order as it sets up the customer call first, waits until they answer, and then calls the agent SIP client.</p>
  
  <p>I want to call the agent first, wait until they answer, then call the customer.</p>
  
  <p>This is a 121 call, not a conference so I don't think I can use that method because if the agent hangs up I want the call to end completely.</p>
  
  <p>Many thanks!</p>
  
  <pre><code>client.calls
  .create({     
  to: '+44xxCUSTOMERNUMBERxxxxx',
  from: '+44xxxCALLERIDxxxx',
  twiml: '&lt;Response&gt;&lt;Dial&gt;&lt;Sip&gt;agent@domain.sip.us1.twilio.com;region=ie1&lt;/Sip&gt;&lt;/Dial&gt;&lt;/Response&gt;'
  })
  </code></pre>
  
  <p>.then(call => console.log(call.sid));</p>