<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thanks Michael!<br>
    <br>
    I am not quite clear how to check if the outbound socket is
    answering a call by using FS global_setvar and global_getvar APIs,<br>
    but will have a look at them.<br>
    <br>
    Cheers,<br>
    Xing<br>
    <br>
    <br>
    On 06/10/11 18:08, Michael Collins wrote:
    <blockquote
cite="mid:CAKzWOxUTR3EOr+fUaC3RXXcz7G5Rq49S4ZgiDbTb1WfeDLqxgg@mail.gmail.com"
      type="cite">Perhaps you could rely on FreeSWITCH's global_setvar
      and global_getvar APIs. You could perhaps create a global var
      whose name is the uuid and then put some meaningful value in it.
      You would just need to make absolutely certain that you clear out
      that variable manually, otherwise you'll have a lot of junk
      variables.&nbsp;
      <div>
        <br>
      </div>
      <div>-MC<br>
        <br>
        <div class="gmail_quote">On Thu, Oct 6, 2011 at 9:28 AM, xl127 <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:x.liu@hw.ac.uk" target="_blank">x.liu@hw.ac.uk</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            Thanks for the suggestions!<br>
            <br>
            I thought about and tried to make my outbound socket
            application<br>
            fail e.g. by send a hangup message but it didn't work.<br>
            <br>
            What I did is that I set a public variable channelUUID with
            initial<br>
            value null in MyOutboundHandler,<br>
            I check if it is null in the handleConnectionResponse
            method. If it not<br>
            null, a hangup command is sent to FS.<br>
            But it looks like each call channel creates its own Java
            thread, so the<br>
            channelUUID is always null before the connection.<br>
            So my approach doesn't work.<br>
            <br>
            Any idea about checking if the remote application is
            answering a call?<br>
            <br>
            Thanks!<br>
            Xing<br>
            <div>
              <div><br>
                <br>
                On 06/10/11 16:43, Anthony Minessale wrote:<br>
                &gt; Really the socket app has not limit to how many
                simultaneous<br>
                &gt; connections it can handle.<br>
                &gt; You could try mod_limit, or make the remote end of
                you application<br>
                &gt; fail when there are too many connections.<br>
                &gt;<br>
                &gt;<br>
                &gt; On Thu, Oct 6, 2011 at 10:30 AM, xl127&lt;<a
                  moz-do-not-send="true" href="mailto:x.liu@hw.ac.uk"
                  target="_blank">x.liu@hw.ac.uk</a>&gt; &nbsp;wrote:<br>
                &gt;&gt; Hello,<br>
                &gt;&gt;<br>
                &gt;&gt; I am trying to bridge multiple calls to
                multiple Java ESL outbound<br>
                &gt;&gt; socket applications.<br>
                &gt;&gt;<br>
                &gt;&gt; Basically I want to check if the first socket
                app is engaged then the<br>
                &gt;&gt; call should be transferred<br>
                &gt;&gt; to the second socket app and so on.<br>
                &gt;&gt;<br>
                &gt;&gt; For initial test, I tried two concurrent calls,
                the problem is both<br>
                &gt;&gt; calls are always answered<br>
                &gt;&gt; by the first outbound socket.<br>
                &gt;&gt;<br>
                &gt;&gt; I have following setting in the dialplan:<br>
                &gt;&gt;<br>
                &gt;&gt; &lt;extension name="sipgateDialedIn"&gt;<br>
                &gt;&gt; &lt;condition field="destination_number"
                expression="^5800$"&gt;<br>
                &gt;&gt; &lt;action application="set"
                data="continue_on_fail=true"/&gt;<br>
                &gt;&gt; &lt;action application="set"
                data="hangup_after_bridge=true"/&gt;<br>
                &gt;&gt; &lt;action application="bridge"
                data="loopback/5801"/&gt;<br>
                &gt;&gt; &lt;action application="bridge"
                data="loopback/5802"/&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; &lt;action application="set"
                data="tts_engine=flite"/&gt;<br>
                &gt;&gt; &lt;action application="set"
                data="tts_voice=kal"/&gt;<br>
                &gt;&gt; &lt;action application="speak" data="Sorry, I
                am busy at the moment. Please<br>
                &gt;&gt; try again later."/&gt;<br>
                &gt;&gt; &lt;action application="sleep" data="10"/&gt;<br>
                &gt;&gt; &lt;action application="hangup"/&gt;<br>
                &gt;&gt; &lt;/condition&gt;<br>
                &gt;&gt; &lt;/extension&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; &lt;extension name="myOutboundESL5801"&gt;<br>
                &gt;&gt; &lt;condition field="destination_number"
                expression="^5801$"&gt;<br>
                &gt;&gt; &lt;action application="socket" data="<a
                  moz-do-not-send="true" href="http://127.0.0.1:9981"
                  target="_blank"><font color="red"><b>MailScanner has
                      detected a possible fraud attempt from
                      "127.0.0.1:9981" claiming to be</b></font>
                  127.0.0.1:9981</a> async full"/&gt;<br>
                &gt;&gt; &lt;/condition&gt;<br>
                &gt;&gt; &lt;/extension&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; &lt;extension name="myOutboundESL5802"&gt;<br>
                &gt;&gt; &lt;condition field="destination_number"
                expression="^5802$"&gt;<br>
                &gt;&gt; &lt;action application="socket" data="<a
                  moz-do-not-send="true" href="http://127.0.0.1:9982"
                  target="_blank"><font color="red"><b>MailScanner has
                      detected a possible fraud attempt from
                      "127.0.0.1:9982" claiming to be</b></font>
                  127.0.0.1:9982</a> async full"/&gt;<br>
                &gt;&gt; &lt;/condition&gt;<br>
                &gt;&gt; &lt;/extension&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; I expect the first call to 5800 would be
                asnwered by extension 5801, the<br>
                &gt;&gt; second concurrent call to 5800 will be<br>
                &gt;&gt; answered by extension 5802, and the third call
                gets a busy message.<br>
                &gt;&gt;<br>
                &gt;&gt; I use Java ESL client-0.9.2 libraries. How do I
                check in the dialplan if<br>
                &gt;&gt; the socket is engaged?<br>
                &gt;&gt;<br>
                &gt;&gt; I've tried and googled a while but without
                success.<br>
                &gt;&gt;<br>
                &gt;&gt; Any advices please?<br>
                &gt;&gt;<br>
                &gt;&gt; Many thanks!<br>
                &gt;&gt; Xing<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; --<br>
                &gt;&gt; Heriot-Watt University is a Scottish charity<br>
                &gt;&gt; registered under charity number SC000278.<br>
                &gt;&gt;<br>
                &gt;&gt; Heriot-Watt University is the Sunday Times<br>
                &gt;&gt; Scottish University of the Year 2011-2012<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; FreeSWITCH-users mailing list<br>
                &gt;&gt; <a moz-do-not-send="true"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org"
                  target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
                &gt;&gt; <a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                &gt;&gt; UNSUBSCRIBE:<a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                &gt;&gt; <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
                &gt;&gt;<br>
                &gt;<br>
                &gt;<br>
                <br>
                <br>
                <br>
                --<br>
                Heriot-Watt University is a Scottish charity<br>
                registered under charity number SC000278.<br>
                <br>
                Heriot-Watt University is the Sunday Times<br>
                Scottish University of the Year 2011-2012<br>
                <br>
                <br>
                <br>
                <br>
                FreeSWITCH-users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org"
                  target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                UNSUBSCRIBE:<a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </body>
<BR />
<HR>
<FONT FACE="ARIAL,HELVETICA" SIZE="-1" COLOR="GRAY">
Heriot-Watt University is a Scottish charity 
registered under charity number SC000278.
<BR />
<BR />
Heriot-Watt University is the Sunday Times 
Scottish University of the Year 2011-2012
<BR />
</FONT>
</html>