[Freeswitch-users] Bridge calls to Java ESL socket does not work as expected

Hector Geraldino Hector.Geraldino at ip-soft.net
Fri Oct 7 01:34:40 MSD 2011


This might sound a little bit Off-Topic but, why are you willing to bind only one call per running instance? I cannot imagine any user scenario where this is desirable. Maybe as a proof of concept is Ok, but having an equivalence between calls and instances mmm... I don't know.

Can you please tell me what are you willing to accomplish? I'm really curious about it.

-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Anthony Minessale
Sent: Thursday, October 06, 2011 3:20 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Bridge calls to Java ESL socket does not work as expected

don't actually hang it up just don't connect the socket or connnect it
and disconnect it right away and the app will fail on in the
dial-plan.

again you could try mod_limit otherwise.


On Thu, Oct 6, 2011 at 11:28 AM, xl127 <x.liu at hw.ac.uk> wrote:
> Thanks for the suggestions!
>
> I thought about and tried to make my outbound socket application
> fail e.g. by send a hangup message but it didn't work.
>
> What I did is that I set a public variable channelUUID with initial
> value null in MyOutboundHandler,
> I check if it is null in the handleConnectionResponse method. If it not
> null, a hangup command is sent to FS.
> But it looks like each call channel creates its own Java thread, so the
> channelUUID is always null before the connection.
> So my approach doesn't work.
>
> Any idea about checking if the remote application is answering a call?
>
> Thanks!
> Xing
>
>
> On 06/10/11 16:43, Anthony Minessale wrote:
>> Really the socket app has not limit to how many simultaneous
>> connections it can handle.
>> You could try mod_limit, or make the remote end of you application
>> fail when there are too many connections.
>>
>>
>> On Thu, Oct 6, 2011 at 10:30 AM, xl127<x.liu at hw.ac.uk>  wrote:
>>> Hello,
>>>
>>> I am trying to bridge multiple calls to multiple Java ESL outbound
>>> socket applications.
>>>
>>> Basically I want to check if the first socket app is engaged then the
>>> call should be transferred
>>> to the second socket app and so on.
>>>
>>> For initial test, I tried two concurrent calls, the problem is both
>>> calls are always answered
>>> by the first outbound socket.
>>>
>>> I have following setting in the dialplan:
>>>
>>> <extension name="sipgateDialedIn">
>>> <condition field="destination_number" expression="^5800$">
>>> <action application="set" data="continue_on_fail=true"/>
>>> <action application="set" data="hangup_after_bridge=true"/>
>>> <action application="bridge" data="loopback/5801"/>
>>> <action application="bridge" data="loopback/5802"/>
>>>
>>> <action application="set" data="tts_engine=flite"/>
>>> <action application="set" data="tts_voice=kal"/>
>>> <action application="speak" data="Sorry, I am busy at the moment. Please
>>> try again later."/>
>>> <action application="sleep" data="10"/>
>>> <action application="hangup"/>
>>> </condition>
>>> </extension>
>>>
>>> <extension name="myOutboundESL5801">
>>> <condition field="destination_number" expression="^5801$">
>>> <action application="socket" data="127.0.0.1:9981 async full"/>
>>> </condition>
>>> </extension>
>>>
>>> <extension name="myOutboundESL5802">
>>> <condition field="destination_number" expression="^5802$">
>>> <action application="socket" data="127.0.0.1:9982 async full"/>
>>> </condition>
>>> </extension>
>>>
>>> I expect the first call to 5800 would be asnwered by extension 5801, the
>>> second concurrent call to 5800 will be
>>> answered by extension 5802, and the third call gets a busy message.
>>>
>>> I use Java ESL client-0.9.2 libraries. How do I check in the dialplan if
>>> the socket is engaged?
>>>
>>> I've tried and googled a while but without success.
>>>
>>> Any advices please?
>>>
>>> Many thanks!
>>> Xing
>>>
>>>
>>>
>>> --
>>> Heriot-Watt University is a Scottish charity
>>> registered under charity number SC000278.
>>>
>>> Heriot-Watt University is the Sunday Times
>>> Scottish University of the Year 2011-2012
>>>
>>>
>>>
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>
>
>
> --
> Heriot-Watt University is a Scottish charity
> registered under charity number SC000278.
>
> Heriot-Watt University is the Sunday Times
> Scottish University of the Year 2011-2012
>
>
>
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900


FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list