<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 3:49 AM, Rafal Gwizdala <span dir="ltr"><<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, Michael, for prompting me to do some homework<div><br></div><div>I made some tests and the conclusions are:</div>
<div><br></div><div>1. You don't need to answer the call in the dialplan before calling into httapi</div>
<div>Both extensions below will make httapi requests to my application:</div><div><br></div><div><div><extension name="test1"></div><div> <condition field="destination_number" expression="^6622$"></div>
<div> <action application="httapi" data="{url=<a href="http://localhost/simver/FSHttApi/Test" target="_blank">http://localhost/simver/FSHttApi/Test</a>}" /></div><div> </condition></div>
<div>
</extension></div><div> </div><div> <extension name="test2"></div><div> <condition field="destination_number" expression="^6621$"></div><div> <action application="answer" /></div>
<div> <action application="httapi" data="{url=<a href="http://localhost/simver/FSHttApi/Test" target="_blank">http://localhost/simver/FSHttApi/Test</a>}" /></div><div> </condition></div>
<div>
</extension></div><div><br></div><div>2. You don't need to answer the call in the httapi script</div><div>This one looks quite strange but I think I finally understood it - I can play back sounds or 'say' something without explicitly 'answerring' the call. But the call is 'pre-answerred' only and in this state you won't be able to collect dtmf, for example. I don't know what is the exact difference between a pre-answerred and answerred call but one nice thing is that when you <hangup /> or <break /> in this state the call will be rejected and the caller will hear a 'busy' signal.</div>
<div><br></div><div>3. Answerring the call</div><div>You can answer the call with </div><div><application name="answer"/> <br></div><div>but by default there's no permission to run the 'answer' application from httapi script so you need to enable it in httapi.conf.xml</div>
<div>From now on the call is answerred and everything runs as usual.</div><div><br></div><div>Best regards</div><span class="HOEnZb"><font color="#888888"><div>Rafal</div><div><br></div><div><br></div><div><br></div></font></span></div>
<br clear="all"></div></blockquote><div>Thanks for sharing your research with us - it is much appreciated. I've added this to the <a href="http://wiki.freeswitch.org/wiki/Mod_httapi#Answer_and_pre-answer_before_httapi">HTTAPI wiki page</a>. If you don't mind please request a wiki account (done at the wiki login page) and you can add to/edit the wiki also. <br>
</div><div>-MC<br></div></div><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br><br>
</div></div>