answer Action
Answers an inbound call that is currently in the inbound
state. If the inbound call is
in the answered
state this action is ignored.
Note that calls are answered implicitly by the first action that interacts with the caller. Setting the
Early media
advanced setting for an inbound service will allow the application to play media before answering the call.
The answer properties are:
Property | Required/Optional | Default | Description |
---|---|---|---|
extra_sip_headers from API V2.0 |
optional | - | A list of SIP header objects. These represent additional headers to include when answering the call. |
-
Examples:
Answer an inbound call:
"answer" : { }
Answer an inbound call and include extra SIP headers:
"answer" : { "extra_sip_headers" : [ { "name" : "X-EstimatedQueueWaitTime", "value" : "150" } ] }
-
Answer Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dllAn action to explicitly answer an inbound call.
-
public class Answer : TelephonyAction { // Constructors public Answer(); // Members public void AddExtraSIPHeader(SIPHeader header); }
Examples:
-
Answer an inbound call:
List<TelephonyAction> actions = new List<TelephonyAction>(); actions.Add(new Answer());
-
Answer an inbound call and include an extra SIP header
List<TelephonyAction> actions = new List<TelephonyAction>(); var answer = new Answer(); answer.AddExtraSIPHeader(new SIPHeader("X-EstimatedQueueWaitTime", "150")); actions.Add(answer);
-
-
public class Answer : TelephonyAction { // Constructors public Answer(); // Members public void AddExtraSIPHeader(SIPHeader header); }
Examples:
-
Answer an inbound call:
List<TelephonyAction> actions = new List<TelephonyAction>(); actions.Add(new Answer());
-
Answer an inbound call and include an extra SIP header
List<TelephonyAction> actions = new List<TelephonyAction>(); var answer = new Answer(); answer.AddExtraSIPHeader(new SIPHeader("X-EstimatedQueueWaitTime", "150")); actions.Add(answer);
-
-
public class Answer : TelephonyAction { // Constructors public Answer(); // Members public void AddExtraSIPHeader(SIPHeader header); }
Examples:
-
Answer an inbound call:
List<TelephonyAction> actions = new List<TelephonyAction>(); actions.Add(new Answer());
-
Answer an inbound call and include an extra SIP header
List<TelephonyAction> actions = new List<TelephonyAction>(); var answer = new Answer(); answer.AddExtraSIPHeader(new SIPHeader("X-EstimatedQueueWaitTime", "150")); actions.Add(answer);
-
-
-
Answer Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dllAn action to explicitly answer an inbound call.
-
Public Class Answer Inherits TelephonyAction ' Constructors Public Sub New () ' Members Public Function AddExtraSIPHeader(header As Sipheader) As Void End Class
Examples:
-
Answer an inbound call:
Dim actions = New List(Of TelephonyAction) actions.Add(New Answer())
-
Answer an inbound call And include an extra SIP header:
Dim actions = New List(Of TelephonyAction) Dim answer = New Answer() answer.AddExtraSIPHeader(New SIPHeader("X-EstimatedQueueWaitTime", "150")) actions.Add(answer)
-
-
Public Class Answer Inherits TelephonyAction ' Constructors Public Sub New () ' Members Public Function AddExtraSIPHeader(header As Sipheader) As Void End Class
Examples:
-
Answer an inbound call:
Dim actions = New List(Of TelephonyAction) actions.Add(New Answer())
-
Answer an inbound call And include an extra SIP header:
Dim actions = New List(Of TelephonyAction) Dim answer = New Answer() answer.AddExtraSIPHeader(New SIPHeader("X-EstimatedQueueWaitTime", "150")) actions.Add(answer)
-
-
-
class Answer extends TelephonyAction
Represents an answer action.
Class synopsis:
// Constructors: public Answer() // Members: public void addExtraSIPHeader(SIPHeader sipHeader) public JSONObject toJSONObject()
Examples:
Answer an inbound call:
List<TelephonyAction> actions = new ArrayList<TelephonyAction>(); actions.add(new Answer());
Answer an inbound call and include an extra SIP header:
List<TelephonyAction> actions = new ArrayList<TelephonyAction>(); Answer answerAction = new Answer(); answerAction.addExtraSIPHeader(new SIPHeader("X-EstimatedQueueWaitTime", "150")); actions.add(answerAction);
-
class Answer
Represents an answer action.
Class synopsis:
# Answer object: Answer() # Instance methods: Answer.add_extra_sip_header(name, value)
Examples:
Answer an inbound call:
# Create a list of actions that will be passed to the TelephonyResponse constructor list_of_actions = [] list_of_actions.append(Answer())
Answer an inbound call and include an extra SIP header:
# Create a list of actions that will be passed to the TelephonyResponse constructor list_of_actions = [] answer_action = Answer() answer_action.add_extra_sip_header("X-EstimatedQueueWaitTime", "150") list_of_actions.append(answer_action)
-
The Answer class
Introduction
Represents an answer action.
Class synopsis
class Answer extends ActionBase { /* methods */ public __construct() public self addExtraSIPHeader(string $name, string $value) }
Examples:
Answer an inbound call:
$response->addAction(new Aculab\TelephonyRestAPI\Answer());
Answer an inbound call and include an extra SIP header:
$answer = new Aculab\TelephonyRestAPI\Answer(); $answer->addExtraSIPHeader("X-EstimatedQueueWaitTime", "150"); $response->addAction($answer);