public class OperationSetAutoAnswerSipImpl extends AbstractOperationSetBasicAutoAnswer implements OperationSetAdvancedAutoAnswer
answerUnconditional, answerWithVideo, protocolProvider
AUTO_ANSWER_COND_NAME_PROP, AUTO_ANSWER_COND_VALUE_PROP, AUTO_ANSWER_FWD_NUM_PROP
AUTO_ANSWER_UNCOND_PROP, AUTO_ANSWER_WITH_VIDEO_PROP
Constructor and Description |
---|
OperationSetAutoAnswerSipImpl(ProtocolProviderServiceSipImpl protocolProvider)
Creates this operation set, loads stored values, populating
local variable settings.
|
Modifier and Type | Method and Description |
---|---|
boolean |
autoAnswer(Call call)
Makes a check after creating call locally, should we answer it.
|
protected void |
clearLocal()
Clear local settings.
|
boolean |
forwardCall(javax.sip.message.Request invite,
javax.sip.ServerTransaction serverTransaction)
Makes a check before locally creating call, should we just forward it.
|
java.lang.String |
getAutoAnswerHeaderName()
Returns the name of the header if conditional auto answer is set.
|
java.lang.String |
getAutoAnswerHeaderValue()
Returns the value of the header for the conditional auto answer.
|
java.lang.String |
getCallForward()
Get the value for automatically forward all calls to the specified
number using the same provider.
|
boolean |
isAutoAnswerConditionSet()
Is the auto answer option set to conditionally
answer all incoming calls.
|
protected void |
load()
Load values from account properties.
|
protected boolean |
satisfyAutoAnswerConditions(Call call)
Checks if the call satisfy the auto answer conditions.
|
protected void |
save()
Saves values to account properties.
|
void |
setAutoAnswerCondition(java.lang.String headerName,
java.lang.String value)
Sets a specified header and its value if they exist in the incoming
call packet this will activate auto answer.
|
void |
setCallForward(java.lang.String numberTo)
Set to automatically forward all calls to the specified
number using the same provider.
|
answerCall, autoAnswer, clear, isAutoAnswerUnconditionalSet, isAutoAnswerWithVideoSet, setAutoAnswerUnconditional, setAutoAnswerWithVideo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear
public OperationSetAutoAnswerSipImpl(ProtocolProviderServiceSipImpl protocolProvider)
protocolProvider
- the parent Protocol Provider.protected void load()
load
in class AbstractOperationSetBasicAutoAnswer
protected void save()
save
in class AbstractOperationSetBasicAutoAnswer
public void setAutoAnswerCondition(java.lang.String headerName, java.lang.String value)
setAutoAnswerCondition
in interface OperationSetAdvancedAutoAnswer
headerName
- the name of the header to searchvalue
- the value for the header, can be null.public boolean isAutoAnswerConditionSet()
isAutoAnswerConditionSet
in interface OperationSetAdvancedAutoAnswer
public void setCallForward(java.lang.String numberTo)
setCallForward
in interface OperationSetAdvancedAutoAnswer
numberTo
- number to use for forwardingpublic java.lang.String getCallForward()
getCallForward
in interface OperationSetAdvancedAutoAnswer
protected void clearLocal()
clearLocal
in class AbstractOperationSetBasicAutoAnswer
public java.lang.String getAutoAnswerHeaderName()
getAutoAnswerHeaderName
in interface OperationSetAdvancedAutoAnswer
public java.lang.String getAutoAnswerHeaderValue()
getAutoAnswerHeaderValue
in interface OperationSetAdvancedAutoAnswer
public boolean forwardCall(javax.sip.message.Request invite, javax.sip.ServerTransaction serverTransaction)
invite
- the current invite to check.serverTransaction
- the transaction.protected boolean satisfyAutoAnswerConditions(Call call)
satisfyAutoAnswerConditions
in class AbstractOperationSetBasicAutoAnswer
call
- The new incoming call to auto-answer if needed.public boolean autoAnswer(Call call)
call
- The new incoming call to auto-answer if needed.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.