Here is the code Stefan.
public Runnable originateCall(final String channel,final String
context,final String exten)
throws IllegalArgumentException, IllegalStateException,
IOException, TimeoutException{
Runnable origaction = new Runnable(){
public void run(){
final Long originateTimeout = new Long(60000);
OriginateAction originateAction = new OriginateAction();
originateAction.setChannel(channel);
originateAction.setContext(context);
originateAction.setExten(exten);
originateAction.setPriority(1);
originateAction.setTimeout(originateTimeout);
try{
managerResponse =
managerConnection.sendAction(originateAction);
}catch(Exception e){}
}
};
return origaction;
}
it will be called by
new Thread(manager.originateCall(extensions.get(e.getSipNumber
()).getChannel(),extensions.get(sipnumber).getContext(),
extensions.get(sipnumber).getExten())).start();
If I will be using the DefaultAsteriskServer in the Asterisk Live, will it
block the events generated in the Manager API?
On Feb 17, 2008 7:52 AM, Mark Harold Rivera <mar...@ya...>
wrote:
> Hello everyone,
> Is there a way where I can originate multiple calls using
> OriginateAction at once? I have used threads but still it didn't work.
> For example:
> First originateAction -> okay
> Second OriginateAction -> fails when the first originateAction is not done
> yet.
>
> Also, events are blocked whenever i send an originateAction, How can i
> solve this?
>
>
>
> Yours,
>
> Mark Rivera
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Asterisk-java-users mailing list
> Ast...@li...
> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users
>
>
|