@ -58,18 +58,18 @@ public OperationSetDTMFSipImpl(ProtocolProviderServiceSipImpl pps)
* This is just a copy of the bye method from the OpSetBasicTelephony ,
* which was enhanced with a body in order to send the DTMF tone
*
* @param callP articipant destination of the DTMF tone
* @param callP eer destination of the DTMF tone
* @param dtmftone DTMF tone to send
* @throws OperationFailedException
* /
private void sayInfo ( CallPeerSipImpl callP articipant ,
private void sayInfo ( CallPeerSipImpl callP eer ,
String dtmftone )
throws OperationFailedException
{
Request info = null ;
try
{
info = callP articipant . getDialog ( ) . createRequest ( Request . INFO ) ;
info = callP eer . getDialog ( ) . createRequest ( Request . INFO ) ;
}
catch ( SipException ex )
{
@ -103,7 +103,7 @@ private void sayInfo(CallPeerSipImpl callParticipant,
ClientTransaction clientTransaction = null ;
try
{
clientTransaction = callP articipant . getJainSipProvider ( )
clientTransaction = callP eer . getJainSipProvider ( )
. getNewClientTransaction ( info ) ;
}
catch ( TransactionUnavailableException ex )
@ -119,7 +119,7 @@ private void sayInfo(CallPeerSipImpl callParticipant,
try
{
if ( callP articipant . getDialog ( ) . getState ( )
if ( callP eer . getDialog ( ) . getState ( )
= = DialogState . TERMINATED )
{
//this is probably because the call has just ended, so don't
@ -129,7 +129,7 @@ private void sayInfo(CallPeerSipImpl callParticipant,
return ;
}
callP articipant . getDialog ( ) . sendRequest ( clientTransaction ) ;
callP eer . getDialog ( ) . sendRequest ( clientTransaction ) ;
logger . debug ( "sent request:\n" + info ) ;
}
catch ( SipException ex )
@ -143,7 +143,7 @@ private void sayInfo(CallPeerSipImpl callParticipant,
/ * *
* Does nothing
*
*
* @param requestEvent the event request
* @return < tt > true < / tt > if the specified event has been handled by this
* processor and shouldn ' t be offered to other processors registered
@ -161,7 +161,7 @@ public boolean processRequest(RequestEvent requestEvent)
/ * *
* Just look if the DTMF signal was well received , and log it
*
*
* @param responseEvent the response event
* @return < tt > true < / tt > if the specified event has been handled by this
* processor and shouldn ' t be offered to other processors registered
@ -195,7 +195,7 @@ public boolean processResponse(ResponseEvent responseEvent)
/ * *
* In case of timeout , just terminate the transaction
*
*
* @param timeoutEvent the timeout event
* @return < tt > true < / tt > if the specified event has been handled by this
* processor and shouldn ' t be offered to other processors registered
@ -210,7 +210,7 @@ public boolean processTimeout(TimeoutEvent timeoutEvent)
/ * *
* Just log the exception
*
*
* @param exceptionEvent the event we have to handle
* @return < tt > true < / tt > if the specified event has been handled by this
* processor and shouldn ' t be offered to other processors registered
@ -230,7 +230,7 @@ public boolean processIOException(IOExceptionEvent exceptionEvent)
/ * *
* Just log the end of the transaction
*
*
* @param transactionTerminatedEvent the event we have to handle
* @return < tt > true < / tt > if the specified event has been handled by this
* processor and shouldn ' t be offered to other processors registered
@ -246,7 +246,7 @@ public boolean processTransactionTerminated(
/ * *
* Just log the end of the dialog
*
*
* @param dialogTerminatedEvent the event we have to handle
* @return < tt > true < / tt > if the specified event has been handled by this
* processor and shouldn ' t be offered to other processors registered
@ -261,34 +261,34 @@ public boolean processDialogTerminated(
}
/ * *
* Sends the < tt > DTMFTone < / tt > < tt > tone < / tt > to < tt > callP articipant < / tt > .
* Sends the < tt > DTMFTone < / tt > < tt > tone < / tt > to < tt > callP eer < / tt > .
*
* @param callP articipant the call participant to send < tt > tone < / tt > to .
* @param tone the DTMF tone to send to < tt > callP articipant < / tt > .
* @param callP eer the call peer to send < tt > tone < / tt > to .
* @param tone the DTMF tone to send to < tt > callP eer < / tt > .
*
* @throws OperationFailedException with code OPERATION_NOT_SUPPORTED if
* DTMF tones are not supported for < tt > callP articipant < / tt > .
* DTMF tones are not supported for < tt > callP eer < / tt > .
*
* @throws NullPointerException if one of the arguments is null .
*
* @throws IllegalArgumentException in case the call p articipant does not
* @throws IllegalArgumentException in case the call p eer does not
* belong to the underlying implementation .
* /
public void sendDTMF ( CallPeer callP articipant , DTMFTone tone )
public void sendDTMF ( CallPeer callP eer , DTMFTone tone )
throws OperationFailedException ,
NullPointerException ,
IllegalArgumentException
{
if ( callP articipant = = null | | tone = = null )
if ( callP eer = = null | | tone = = null )
{
throw new NullPointerException ( ) ;
}
if ( ! ( callP articipant instanceof CallPeerSipImpl ) )
if ( ! ( callP eer instanceof CallPeerSipImpl ) )
{
throw new IllegalArgumentException ( ) ;
}
CallPeerSipImpl cp = ( CallPeerSipImpl ) ( callP articipant ) ;
CallPeerSipImpl cp = ( CallPeerSipImpl ) ( callP eer ) ;
this . sayInfo ( cp , tone . getValue ( ) ) ;
}
}