Hi, maybe it's an obvious 'discovery' for you, but i think i figured out how to wait for the call to be answerred when executing an outbound, mod_httapi-controlled call:
simply use the 'wait_for_answer' application before starting the playback.
Here's my current dial script:
<document type="text/freeswitch-httapi">
<params>
<stage>1</stage>
</params>
<variables />
<work>
<execute application="wait_for_answer" />
<execute application="answer" />
<pause milliseconds="1000" />
<playback file="xyz.wav" name="user_answer" loops="2" digit-timeout="20000">
<bind>~\d</bind>
</playback>
</work>
</document>
Of course you need to enable 'wait_for_answer' application in mod_httapi config file.
PS but if you know the answer to to my 2nd question please post it here because I'm not really happy having to hard-code the origination_caller_id in my call scripts
Best regards
RG