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

xl127 x.liu at hw.ac.uk
Thu Oct 6 20:28:41 MSD 2011


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





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