<br><br><div class="gmail_quote">On Mon, Sep 6, 2010 at 12:45 PM, Malay Thakershi <span dir="ltr">&lt;<a href="mailto:mthakershi@gmail.com">mthakershi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I plan to call Originate API from managed ESL (.NET).<br>
<br>
1. How can I detect if a call isn&#39;t answered (it keeps ringing on the<br>
other end) for say 2 minutes? I would like the command to end the call<br>
after that much time.<br></blockquote><div>IMHO it&#39;s easier to detect that a call is answered instead of detecting that it is still unanswered. Something like &quot;execute_on_answer&quot; is handy, or even &quot;execute_on_media&quot;. (See the chan vars page on the wiki.)<br>
 <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
2. How do I listen to events (say I fire Originate and then would like<br>
to know sequence of events happening regarding that particular call)?<br>
<br></blockquote><div>The originate API returns the UUID of the call leg, so you can filter on that. (The bgapi returns a &quot;job uuid&quot; so be sure to get the job uuid first if you are using bgapi. See chapter 9 of the FS book.)<br>
<br>-MC <br></div></div><br>