On Thu, Jun 27, 2013 at 3:49 AM, Rafal Gwizdala <rafal.gwizdala@gmail.com>wrote:
Thanks, Michael, for prompting me to do some homework
I made some tests and the conclusions are:
1. You don't need to answer the call in the dialplan before calling into httapi Both extensions below will make httapi requests to my application:
<extension name="test1"> <condition field="destination_number" expression="^6622$"> <action application="httapi" data="{url= http://localhost/simver/FSHttApi/Test}" /> </condition> </extension>
<extension name="test2"> <condition field="destination_number" expression="^6621$"> <action application="answer" /> <action application="httapi" data="{url= http://localhost/simver/FSHttApi/Test}" /> </condition> </extension>
2. You don't need to answer the call in the httapi script 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.
3. Answerring the call You can answer the call with <application name="answer"/> 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 From now on the call is answerred and everything runs as usual.
Best regards Rafal
Thanks for sharing your research with us - it is much appreciated. I've added this to the HTTAPI wiki page<http://wiki.freeswitch.org/wiki/Mod_httapi#Answer_and_pre-answer_before_httapi>. 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. -MC
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org