Asterisk-Java

org.asteriskjava.live
Interface OriginateCallback


public interface OriginateCallback

Callback interface for asynchronous originates.

Contract:
onDialing(AsteriskChannel) is called exactly once iif originate did not fail. It is called immediately after the channel has been created and before it is ringing.
In case of a failure onFailure(LiveException) is the only method that is called and it is called exactly once.
Otherwise one of onSuccess(AsteriskChannel) onBusy(AsteriskChannel) or onNoAnswer(AsteriskChannel) is called exactly once.

Since:
0.3
Version:
$Id: OriginateCallback.java 938 2007-12-31 03:23:38Z srt $
Author:
srt
See Also:
AsteriskServer.originateToApplicationAsync(String, String, String, long, OriginateCallback), AsteriskServer.originateToApplicationAsync(String, String, String, long, CallerId, java.util.Map, OriginateCallback), AsteriskServer.originateToExtensionAsync(String, String, String, int, long, OriginateCallback), AsteriskServer.originateToExtensionAsync(String, String, String, int, long, CallerId, java.util.Map, OriginateCallback)

Method Summary
 void onBusy(AsteriskChannel channel)
          Called if the originate was unsuccessful because the called party was busy.
 void onDialing(AsteriskChannel channel)
          Called when the channel has been created and before it starts ringing.
 void onFailure(LiveException cause)
          Called if the originate failed for example due to an invalid channel name or an originate to an unregistered SIP or IAX peer.
 void onNoAnswer(AsteriskChannel channel)
          Called if the originate was unsuccessful because the called party did not answer the call.
 void onSuccess(AsteriskChannel channel)
          Called if the originate was successful and the called party answered the call.
 

Method Detail

onDialing

void onDialing(AsteriskChannel channel)
Called when the channel has been created and before it starts ringing.

Parameters:
channel - the channel created.

onSuccess

void onSuccess(AsteriskChannel channel)
Called if the originate was successful and the called party answered the call.

Parameters:
channel - the channel created.

onNoAnswer

void onNoAnswer(AsteriskChannel channel)
Called if the originate was unsuccessful because the called party did not answer the call.

Parameters:
channel - the channel created.

onBusy

void onBusy(AsteriskChannel channel)
Called if the originate was unsuccessful because the called party was busy.

Parameters:
channel - the channel created.

onFailure

void onFailure(LiveException cause)
Called if the originate failed for example due to an invalid channel name or an originate to an unregistered SIP or IAX peer.

Parameters:
cause - the exception that caused the failure.

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.