<div dir="ltr">Thanks guys<div style>R</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 9:25 PM, Mariusz Czulada <span dir="ltr"><<a href="mailto:manieq@wp.eu" target="_blank">manieq@wp.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>Rafał,</p>
<p> </p>
<p>Dnia Czwartek, 27 Czerwca 2013 12:52 Rafal Gwizdala <<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@gmail.com</a>> napisał(a)</p>
<blockquote dir="ltr"><div class="im">On Thu, Jun 27, 2013 at 12:49 PM, Rafal Gwizdala <span dir="ltr"><<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@gmail.com</a>></span> wrote:<br>
</div><div class="im"><div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<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> </div>
</div>
</div>
</blockquote>
</div>
</div>
</div></blockquote>
<p><br>Session is established when you send 200/OK response (that's what "answer" does). This means media will be send in both directions.</p>
<p> </p>
<p>What you experienced here is an early media mode. Because you did not explicitly called any responding app (neiher "answer" not "pre_answer") so mod_sofia did the second for you. "pre_answer" sends 183/Sesion Progress response. This means that B-side (your server) is willing to send media to other side. You should receive PRACK as a "response to response" if A-side accepts it. From this point you can send anything, but _should_ not expect any media to received. This is a situation similar
to commonly used custom ring tones (with music).</p>
<p> </p>
<p>Of course it is possible to use media in both/either side by setting P-Early-Media header in 183 response. Refer to RFC5009 for details.</p>
<p> </p>
<p>Also keep in mind, that 183 _does_ _not_ establish a session. It means that calling side may expexty this is a free time like during ringing. If A-side is a UE of a local user (in terms of service, not distance/net) it will be probably ok. But if you connect FSW to some class 4/5 softswitch, it may be misleading, because the call can be not charged on calling side (i.e. provider). Only after sending 200/OK again ("answer" later) you will establish a call.</p>
<p> </p>
<p>For all above I suggest you to explicitly call "answer" or "pre_answer" _before_ sending any media to other side. You will have 100% control of a call status and also not relay on mod_sofia responses which [are fine of course, but] may be different from what you intended (but now executed).</p>
<p> </p>
<p>Hope it is clear enough ;)</p>
<p> </p>
<p>Regards,</p>
<p>Mariusz</p><br>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>