<div dir="ltr">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:<div style>simply use the 'wait_for_answer' application before starting the playback.</div>
<div style><br></div><div style>Here's my current dial script:</div><div><document type="text/freeswitch-httapi"></div><div> <params></div><div> <stage>1</stage></div><div> </params></div>
<div> <variables /></div><div> <work></div><div> <execute application="wait_for_answer" /></div><div> <execute application="answer" /></div><div> <pause milliseconds="1000" /></div>
<div> <playback file="xyz.wav" name="user_answer" loops="2" digit-timeout="20000"></div><div> <bind>~\d</bind></div><div> </playback></div><div> </work></div>
<div></document></div><div style> </div><div style>Of course you need to enable 'wait_for_answer' application in mod_httapi config file.</div><div style>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</div>
<div style><br></div><div style>Best regards</div><div style>RG</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 12, 2013 at 4:06 PM, 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">Hi,<div><br></div><div>Thanks for great support so far.</div><div>I have another two questions to you:</div>
<div>1. I'm originating a call to a mobile phone where the second leg is a httapi-based IVR service. </div>
<div>My originate command looks like this:</div><div><br></div><div>originate {origination_caller_id_number=2234567890}sofia/gateway/ipfon/<a href="tel:606999888" value="+48606999888" target="_blank">606999888</a> 6668 <br>
</div><div><br></div><div>The '6668' extension is an httapi script that plays an audio file and collects some digits.</div>
<div>The problem is that my httapi ivr starts the playback even before the mobile phone is answerred.</div><div>As a result, the called person doesn't hear the beginning of the recording.</div><div>
Can I somehow make my httapi script wait for the mobile to be answerred?</div><div><br></div><div>2. If origination_caller_id_number is not specified in the originate call FreeSWITCH will send </div><div>
<span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Remote-Party-ID: <</span><a href="mailto:sip%3A0000000000@sip.ipfon.pl" style="font-family:arial,sans-serif;font-size:12.800000190734863px" target="_blank">sip:0000000000@sip.ipfon.pl</a><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">></span> in INVITE request that goes to the voip gateway.</div>
<div>Is there a way to specify a default caller id for all outgoing connections that go through a particular gateway, so I wouldn't have to specify it in originate options?</div><div><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888">
<div>RG</div></font></span></div>
</blockquote></div><br></div>