All Verbs | /nodes/dial/answer/callback |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class TwilioRequestBase implements IPost, JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $callSid=null,
/** @var string|null */
public ?string $accountSid=null,
/** @var string|null */
public ?string $from=null,
/** @var string|null */
public ?string $to=null,
/** @var string|null */
public ?string $callStatus=null,
/** @var string|null */
public ?string $apiVersion=null,
/** @var string|null */
public ?string $direction=null,
/** @var string|null */
public ?string $forwardedFrom=null,
/** @var string|null */
public ?string $callerName=null,
/** @var string|null */
public ?string $parentCallSid=null,
/** @var string|null */
public ?string $stirVerstat=null,
/** @var string|null */
public ?string $called=null,
/** @var string|null */
public ?string $calledZip=null,
/** @var string|null */
public ?string $calledCity=null,
/** @var string|null */
public ?string $calledState=null,
/** @var string|null */
public ?string $calledCountry=null,
/** @var string|null */
public ?string $caller=null,
/** @var string|null */
public ?string $callerCity=null,
/** @var string|null */
public ?string $callerState=null,
/** @var string|null */
public ?string $callerZip=null,
/** @var string|null */
public ?string $callerCountry=null,
/** @var string|null */
public ?string $fromCity=null,
/** @var string|null */
public ?string $fromState=null,
/** @var string|null */
public ?string $fromZip=null,
/** @var string|null */
public ?string $fromCountry=null,
/** @var string|null */
public ?string $toCity=null,
/** @var string|null */
public ?string $toState=null,
/** @var string|null */
public ?string $toZip=null,
/** @var string|null */
public ?string $toCountry=null,
/** @var string|null */
public ?string $messageSid=null,
/** @var string|null */
public ?string $smsId=null,
/** @var string|null */
public ?string $messagingServiceSid=null,
/** @var string|null */
public ?string $body=null,
/** @var int */
public int $numMedia=0,
/** @var string|null */
public ?string $mediaContentType0=null,
/** @var string|null */
public ?string $mediaUrl0=null,
/** @var string|null */
public ?string $mediaContentType1=null,
/** @var string|null */
public ?string $mediaUrl1=null,
/** @var string|null */
public ?string $mediaContentType2=null,
/** @var string|null */
public ?string $mediaUrl2=null,
/** @var int */
public int $index=0,
/** @var string|null */
public ?string $instanceSid=null,
/** @var string|null */
public ?string $eventType=null,
/** @var string|null */
public ?string $channelSid=null,
/** @var string|null */
public ?string $attributes=null,
/** @var string|null */
public ?string $clientIdentity=null,
/** @var string|null */
public ?string $mediaContentType=null,
/** @var string|null */
public ?string $mediaSid=null,
/** @var string|null */
public ?string $identity=null,
/** @var string|null */
public ?string $digits=null,
/** @var string|null */
public ?string $speechResult=null,
/** @var float */
public float $confidence=0.0,
/** @var int */
public int $callDuration=0,
/** @var string|null */
public ?string $recordingUrl=null,
/** @var string|null */
public ?string $recordingSid=null,
/** @var int */
public int $recordingDuration=0,
/** @var string|null */
public ?string $recordingStatus=null,
/** @var string|null */
public ?string $transcriptionSid=null,
/** @var string|null */
public ?string $transcriptionText=null,
/** @var string|null */
public ?string $transcriptionUrl=null,
/** @var string|null */
public ?string $transcriptionStatus=null,
/** @var string|null */
public ?string $dialCallStatus=null,
/** @var string|null */
public ?string $dialCallSid=null,
/** @var float */
public float $dialCallDuration=0.0,
/** @var bool|null */
public ?bool $dialBridged=null,
/** @var string|null */
public ?string $queueResult=null,
/** @var string|null */
public ?string $queueSid=null,
/** @var int */
public int $queueTime=0,
/** @var string|null */
public ?string $conferenceSid=null,
/** @var string|null */
public ?string $friendlyName=null,
/** @var string|null */
public ?string $statusCallbackEvent=null,
/** @var bool|null */
public ?bool $muted=null,
/** @var bool|null */
public ?bool $hold=null,
/** @var bool|null */
public ?bool $endConferenceOnExit=null,
/** @var bool|null */
public ?bool $startConferenceOnEnter=null,
/** @var string|null */
public ?string $eventName=null,
/** @var string|null */
public ?string $assistantSid=null,
/** @var string|null */
public ?string $dialogueSid=null,
/** @var string|null */
public ?string $userIdentifier=null,
/** @var string|null */
public ?string $currentInput=null,
/** @var string|null */
public ?string $currentTask=null,
/** @var string|null */
public ?string $dialoguePayloadUrl=null,
/** @var string|null */
public ?string $memory=null,
/** @var string|null */
public ?string $channel=null,
/** @var string|null */
public ?string $faxSid=null,
/** @var string|null */
public ?string $faxStatus=null,
/** @var int */
public int $numPages=0,
/** @var string|null */
public ?string $mediaUrl=null,
/** @var string|null */
public ?string $errorCode=null,
/** @var string|null */
public ?string $errorMessage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['callSid'])) $this->callSid = $o['callSid'];
if (isset($o['accountSid'])) $this->accountSid = $o['accountSid'];
if (isset($o['from'])) $this->from = $o['from'];
if (isset($o['to'])) $this->to = $o['to'];
if (isset($o['callStatus'])) $this->callStatus = $o['callStatus'];
if (isset($o['apiVersion'])) $this->apiVersion = $o['apiVersion'];
if (isset($o['direction'])) $this->direction = $o['direction'];
if (isset($o['forwardedFrom'])) $this->forwardedFrom = $o['forwardedFrom'];
if (isset($o['callerName'])) $this->callerName = $o['callerName'];
if (isset($o['parentCallSid'])) $this->parentCallSid = $o['parentCallSid'];
if (isset($o['stirVerstat'])) $this->stirVerstat = $o['stirVerstat'];
if (isset($o['called'])) $this->called = $o['called'];
if (isset($o['calledZip'])) $this->calledZip = $o['calledZip'];
if (isset($o['calledCity'])) $this->calledCity = $o['calledCity'];
if (isset($o['calledState'])) $this->calledState = $o['calledState'];
if (isset($o['calledCountry'])) $this->calledCountry = $o['calledCountry'];
if (isset($o['caller'])) $this->caller = $o['caller'];
if (isset($o['callerCity'])) $this->callerCity = $o['callerCity'];
if (isset($o['callerState'])) $this->callerState = $o['callerState'];
if (isset($o['callerZip'])) $this->callerZip = $o['callerZip'];
if (isset($o['callerCountry'])) $this->callerCountry = $o['callerCountry'];
if (isset($o['fromCity'])) $this->fromCity = $o['fromCity'];
if (isset($o['fromState'])) $this->fromState = $o['fromState'];
if (isset($o['fromZip'])) $this->fromZip = $o['fromZip'];
if (isset($o['fromCountry'])) $this->fromCountry = $o['fromCountry'];
if (isset($o['toCity'])) $this->toCity = $o['toCity'];
if (isset($o['toState'])) $this->toState = $o['toState'];
if (isset($o['toZip'])) $this->toZip = $o['toZip'];
if (isset($o['toCountry'])) $this->toCountry = $o['toCountry'];
if (isset($o['messageSid'])) $this->messageSid = $o['messageSid'];
if (isset($o['smsId'])) $this->smsId = $o['smsId'];
if (isset($o['messagingServiceSid'])) $this->messagingServiceSid = $o['messagingServiceSid'];
if (isset($o['body'])) $this->body = $o['body'];
if (isset($o['numMedia'])) $this->numMedia = $o['numMedia'];
if (isset($o['mediaContentType0'])) $this->mediaContentType0 = $o['mediaContentType0'];
if (isset($o['mediaUrl0'])) $this->mediaUrl0 = $o['mediaUrl0'];
if (isset($o['mediaContentType1'])) $this->mediaContentType1 = $o['mediaContentType1'];
if (isset($o['mediaUrl1'])) $this->mediaUrl1 = $o['mediaUrl1'];
if (isset($o['mediaContentType2'])) $this->mediaContentType2 = $o['mediaContentType2'];
if (isset($o['mediaUrl2'])) $this->mediaUrl2 = $o['mediaUrl2'];
if (isset($o['index'])) $this->index = $o['index'];
if (isset($o['instanceSid'])) $this->instanceSid = $o['instanceSid'];
if (isset($o['eventType'])) $this->eventType = $o['eventType'];
if (isset($o['channelSid'])) $this->channelSid = $o['channelSid'];
if (isset($o['attributes'])) $this->attributes = $o['attributes'];
if (isset($o['clientIdentity'])) $this->clientIdentity = $o['clientIdentity'];
if (isset($o['mediaContentType'])) $this->mediaContentType = $o['mediaContentType'];
if (isset($o['mediaSid'])) $this->mediaSid = $o['mediaSid'];
if (isset($o['identity'])) $this->identity = $o['identity'];
if (isset($o['digits'])) $this->digits = $o['digits'];
if (isset($o['speechResult'])) $this->speechResult = $o['speechResult'];
if (isset($o['confidence'])) $this->confidence = $o['confidence'];
if (isset($o['callDuration'])) $this->callDuration = $o['callDuration'];
if (isset($o['recordingUrl'])) $this->recordingUrl = $o['recordingUrl'];
if (isset($o['recordingSid'])) $this->recordingSid = $o['recordingSid'];
if (isset($o['recordingDuration'])) $this->recordingDuration = $o['recordingDuration'];
if (isset($o['recordingStatus'])) $this->recordingStatus = $o['recordingStatus'];
if (isset($o['transcriptionSid'])) $this->transcriptionSid = $o['transcriptionSid'];
if (isset($o['transcriptionText'])) $this->transcriptionText = $o['transcriptionText'];
if (isset($o['transcriptionUrl'])) $this->transcriptionUrl = $o['transcriptionUrl'];
if (isset($o['transcriptionStatus'])) $this->transcriptionStatus = $o['transcriptionStatus'];
if (isset($o['dialCallStatus'])) $this->dialCallStatus = $o['dialCallStatus'];
if (isset($o['dialCallSid'])) $this->dialCallSid = $o['dialCallSid'];
if (isset($o['dialCallDuration'])) $this->dialCallDuration = $o['dialCallDuration'];
if (isset($o['dialBridged'])) $this->dialBridged = $o['dialBridged'];
if (isset($o['queueResult'])) $this->queueResult = $o['queueResult'];
if (isset($o['queueSid'])) $this->queueSid = $o['queueSid'];
if (isset($o['queueTime'])) $this->queueTime = $o['queueTime'];
if (isset($o['conferenceSid'])) $this->conferenceSid = $o['conferenceSid'];
if (isset($o['friendlyName'])) $this->friendlyName = $o['friendlyName'];
if (isset($o['statusCallbackEvent'])) $this->statusCallbackEvent = $o['statusCallbackEvent'];
if (isset($o['muted'])) $this->muted = $o['muted'];
if (isset($o['hold'])) $this->hold = $o['hold'];
if (isset($o['endConferenceOnExit'])) $this->endConferenceOnExit = $o['endConferenceOnExit'];
if (isset($o['startConferenceOnEnter'])) $this->startConferenceOnEnter = $o['startConferenceOnEnter'];
if (isset($o['eventName'])) $this->eventName = $o['eventName'];
if (isset($o['assistantSid'])) $this->assistantSid = $o['assistantSid'];
if (isset($o['dialogueSid'])) $this->dialogueSid = $o['dialogueSid'];
if (isset($o['userIdentifier'])) $this->userIdentifier = $o['userIdentifier'];
if (isset($o['currentInput'])) $this->currentInput = $o['currentInput'];
if (isset($o['currentTask'])) $this->currentTask = $o['currentTask'];
if (isset($o['dialoguePayloadUrl'])) $this->dialoguePayloadUrl = $o['dialoguePayloadUrl'];
if (isset($o['memory'])) $this->memory = $o['memory'];
if (isset($o['channel'])) $this->channel = $o['channel'];
if (isset($o['faxSid'])) $this->faxSid = $o['faxSid'];
if (isset($o['faxStatus'])) $this->faxStatus = $o['faxStatus'];
if (isset($o['numPages'])) $this->numPages = $o['numPages'];
if (isset($o['mediaUrl'])) $this->mediaUrl = $o['mediaUrl'];
if (isset($o['errorCode'])) $this->errorCode = $o['errorCode'];
if (isset($o['errorMessage'])) $this->errorMessage = $o['errorMessage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->callSid)) $o['callSid'] = $this->callSid;
if (isset($this->accountSid)) $o['accountSid'] = $this->accountSid;
if (isset($this->from)) $o['from'] = $this->from;
if (isset($this->to)) $o['to'] = $this->to;
if (isset($this->callStatus)) $o['callStatus'] = $this->callStatus;
if (isset($this->apiVersion)) $o['apiVersion'] = $this->apiVersion;
if (isset($this->direction)) $o['direction'] = $this->direction;
if (isset($this->forwardedFrom)) $o['forwardedFrom'] = $this->forwardedFrom;
if (isset($this->callerName)) $o['callerName'] = $this->callerName;
if (isset($this->parentCallSid)) $o['parentCallSid'] = $this->parentCallSid;
if (isset($this->stirVerstat)) $o['stirVerstat'] = $this->stirVerstat;
if (isset($this->called)) $o['called'] = $this->called;
if (isset($this->calledZip)) $o['calledZip'] = $this->calledZip;
if (isset($this->calledCity)) $o['calledCity'] = $this->calledCity;
if (isset($this->calledState)) $o['calledState'] = $this->calledState;
if (isset($this->calledCountry)) $o['calledCountry'] = $this->calledCountry;
if (isset($this->caller)) $o['caller'] = $this->caller;
if (isset($this->callerCity)) $o['callerCity'] = $this->callerCity;
if (isset($this->callerState)) $o['callerState'] = $this->callerState;
if (isset($this->callerZip)) $o['callerZip'] = $this->callerZip;
if (isset($this->callerCountry)) $o['callerCountry'] = $this->callerCountry;
if (isset($this->fromCity)) $o['fromCity'] = $this->fromCity;
if (isset($this->fromState)) $o['fromState'] = $this->fromState;
if (isset($this->fromZip)) $o['fromZip'] = $this->fromZip;
if (isset($this->fromCountry)) $o['fromCountry'] = $this->fromCountry;
if (isset($this->toCity)) $o['toCity'] = $this->toCity;
if (isset($this->toState)) $o['toState'] = $this->toState;
if (isset($this->toZip)) $o['toZip'] = $this->toZip;
if (isset($this->toCountry)) $o['toCountry'] = $this->toCountry;
if (isset($this->messageSid)) $o['messageSid'] = $this->messageSid;
if (isset($this->smsId)) $o['smsId'] = $this->smsId;
if (isset($this->messagingServiceSid)) $o['messagingServiceSid'] = $this->messagingServiceSid;
if (isset($this->body)) $o['body'] = $this->body;
if (isset($this->numMedia)) $o['numMedia'] = $this->numMedia;
if (isset($this->mediaContentType0)) $o['mediaContentType0'] = $this->mediaContentType0;
if (isset($this->mediaUrl0)) $o['mediaUrl0'] = $this->mediaUrl0;
if (isset($this->mediaContentType1)) $o['mediaContentType1'] = $this->mediaContentType1;
if (isset($this->mediaUrl1)) $o['mediaUrl1'] = $this->mediaUrl1;
if (isset($this->mediaContentType2)) $o['mediaContentType2'] = $this->mediaContentType2;
if (isset($this->mediaUrl2)) $o['mediaUrl2'] = $this->mediaUrl2;
if (isset($this->index)) $o['index'] = $this->index;
if (isset($this->instanceSid)) $o['instanceSid'] = $this->instanceSid;
if (isset($this->eventType)) $o['eventType'] = $this->eventType;
if (isset($this->channelSid)) $o['channelSid'] = $this->channelSid;
if (isset($this->attributes)) $o['attributes'] = $this->attributes;
if (isset($this->clientIdentity)) $o['clientIdentity'] = $this->clientIdentity;
if (isset($this->mediaContentType)) $o['mediaContentType'] = $this->mediaContentType;
if (isset($this->mediaSid)) $o['mediaSid'] = $this->mediaSid;
if (isset($this->identity)) $o['identity'] = $this->identity;
if (isset($this->digits)) $o['digits'] = $this->digits;
if (isset($this->speechResult)) $o['speechResult'] = $this->speechResult;
if (isset($this->confidence)) $o['confidence'] = $this->confidence;
if (isset($this->callDuration)) $o['callDuration'] = $this->callDuration;
if (isset($this->recordingUrl)) $o['recordingUrl'] = $this->recordingUrl;
if (isset($this->recordingSid)) $o['recordingSid'] = $this->recordingSid;
if (isset($this->recordingDuration)) $o['recordingDuration'] = $this->recordingDuration;
if (isset($this->recordingStatus)) $o['recordingStatus'] = $this->recordingStatus;
if (isset($this->transcriptionSid)) $o['transcriptionSid'] = $this->transcriptionSid;
if (isset($this->transcriptionText)) $o['transcriptionText'] = $this->transcriptionText;
if (isset($this->transcriptionUrl)) $o['transcriptionUrl'] = $this->transcriptionUrl;
if (isset($this->transcriptionStatus)) $o['transcriptionStatus'] = $this->transcriptionStatus;
if (isset($this->dialCallStatus)) $o['dialCallStatus'] = $this->dialCallStatus;
if (isset($this->dialCallSid)) $o['dialCallSid'] = $this->dialCallSid;
if (isset($this->dialCallDuration)) $o['dialCallDuration'] = $this->dialCallDuration;
if (isset($this->dialBridged)) $o['dialBridged'] = $this->dialBridged;
if (isset($this->queueResult)) $o['queueResult'] = $this->queueResult;
if (isset($this->queueSid)) $o['queueSid'] = $this->queueSid;
if (isset($this->queueTime)) $o['queueTime'] = $this->queueTime;
if (isset($this->conferenceSid)) $o['conferenceSid'] = $this->conferenceSid;
if (isset($this->friendlyName)) $o['friendlyName'] = $this->friendlyName;
if (isset($this->statusCallbackEvent)) $o['statusCallbackEvent'] = $this->statusCallbackEvent;
if (isset($this->muted)) $o['muted'] = $this->muted;
if (isset($this->hold)) $o['hold'] = $this->hold;
if (isset($this->endConferenceOnExit)) $o['endConferenceOnExit'] = $this->endConferenceOnExit;
if (isset($this->startConferenceOnEnter)) $o['startConferenceOnEnter'] = $this->startConferenceOnEnter;
if (isset($this->eventName)) $o['eventName'] = $this->eventName;
if (isset($this->assistantSid)) $o['assistantSid'] = $this->assistantSid;
if (isset($this->dialogueSid)) $o['dialogueSid'] = $this->dialogueSid;
if (isset($this->userIdentifier)) $o['userIdentifier'] = $this->userIdentifier;
if (isset($this->currentInput)) $o['currentInput'] = $this->currentInput;
if (isset($this->currentTask)) $o['currentTask'] = $this->currentTask;
if (isset($this->dialoguePayloadUrl)) $o['dialoguePayloadUrl'] = $this->dialoguePayloadUrl;
if (isset($this->memory)) $o['memory'] = $this->memory;
if (isset($this->channel)) $o['channel'] = $this->channel;
if (isset($this->faxSid)) $o['faxSid'] = $this->faxSid;
if (isset($this->faxStatus)) $o['faxStatus'] = $this->faxStatus;
if (isset($this->numPages)) $o['numPages'] = $this->numPages;
if (isset($this->mediaUrl)) $o['mediaUrl'] = $this->mediaUrl;
if (isset($this->errorCode)) $o['errorCode'] = $this->errorCode;
if (isset($this->errorMessage)) $o['errorMessage'] = $this->errorMessage;
return empty($o) ? new class(){} : $o;
}
}
class DialNodeAnswerCallback extends TwilioRequestBase implements JsonSerializable
{
/**
* @param string|null $callSid
* @param string|null $accountSid
* @param string|null $from
* @param string|null $to
* @param string|null $callStatus
* @param string|null $apiVersion
* @param string|null $direction
* @param string|null $forwardedFrom
* @param string|null $callerName
* @param string|null $parentCallSid
* @param string|null $stirVerstat
* @param string|null $called
* @param string|null $calledZip
* @param string|null $calledCity
* @param string|null $calledState
* @param string|null $calledCountry
* @param string|null $caller
* @param string|null $callerCity
* @param string|null $callerState
* @param string|null $callerZip
* @param string|null $callerCountry
* @param string|null $fromCity
* @param string|null $fromState
* @param string|null $fromZip
* @param string|null $fromCountry
* @param string|null $toCity
* @param string|null $toState
* @param string|null $toZip
* @param string|null $toCountry
* @param string|null $messageSid
* @param string|null $smsId
* @param string|null $messagingServiceSid
* @param string|null $body
* @param int $numMedia
* @param string|null $mediaContentType0
* @param string|null $mediaUrl0
* @param string|null $mediaContentType1
* @param string|null $mediaUrl1
* @param string|null $mediaContentType2
* @param string|null $mediaUrl2
* @param int $index
* @param string|null $instanceSid
* @param string|null $eventType
* @param string|null $channelSid
* @param string|null $attributes
* @param string|null $clientIdentity
* @param string|null $mediaContentType
* @param string|null $mediaSid
* @param string|null $identity
* @param string|null $digits
* @param string|null $speechResult
* @param float $confidence
* @param int $callDuration
* @param string|null $recordingUrl
* @param string|null $recordingSid
* @param int $recordingDuration
* @param string|null $recordingStatus
* @param string|null $transcriptionSid
* @param string|null $transcriptionText
* @param string|null $transcriptionUrl
* @param string|null $transcriptionStatus
* @param string|null $dialCallStatus
* @param string|null $dialCallSid
* @param float $dialCallDuration
* @param bool|null $dialBridged
* @param string|null $queueResult
* @param string|null $queueSid
* @param int $queueTime
* @param string|null $conferenceSid
* @param string|null $friendlyName
* @param string|null $statusCallbackEvent
* @param bool|null $muted
* @param bool|null $hold
* @param bool|null $endConferenceOnExit
* @param bool|null $startConferenceOnEnter
* @param string|null $eventName
* @param string|null $assistantSid
* @param string|null $dialogueSid
* @param string|null $userIdentifier
* @param string|null $currentInput
* @param string|null $currentTask
* @param string|null $dialoguePayloadUrl
* @param string|null $memory
* @param string|null $channel
* @param string|null $faxSid
* @param string|null $faxStatus
* @param int $numPages
* @param string|null $mediaUrl
* @param string|null $errorCode
* @param string|null $errorMessage
*/
public function __construct(
?string $callSid=null,
?string $accountSid=null,
?string $from=null,
?string $to=null,
?string $callStatus=null,
?string $apiVersion=null,
?string $direction=null,
?string $forwardedFrom=null,
?string $callerName=null,
?string $parentCallSid=null,
?string $stirVerstat=null,
?string $called=null,
?string $calledZip=null,
?string $calledCity=null,
?string $calledState=null,
?string $calledCountry=null,
?string $caller=null,
?string $callerCity=null,
?string $callerState=null,
?string $callerZip=null,
?string $callerCountry=null,
?string $fromCity=null,
?string $fromState=null,
?string $fromZip=null,
?string $fromCountry=null,
?string $toCity=null,
?string $toState=null,
?string $toZip=null,
?string $toCountry=null,
?string $messageSid=null,
?string $smsId=null,
?string $messagingServiceSid=null,
?string $body=null,
int $numMedia=0,
?string $mediaContentType0=null,
?string $mediaUrl0=null,
?string $mediaContentType1=null,
?string $mediaUrl1=null,
?string $mediaContentType2=null,
?string $mediaUrl2=null,
int $index=0,
?string $instanceSid=null,
?string $eventType=null,
?string $channelSid=null,
?string $attributes=null,
?string $clientIdentity=null,
?string $mediaContentType=null,
?string $mediaSid=null,
?string $identity=null,
?string $digits=null,
?string $speechResult=null,
float $confidence=0.0,
int $callDuration=0,
?string $recordingUrl=null,
?string $recordingSid=null,
int $recordingDuration=0,
?string $recordingStatus=null,
?string $transcriptionSid=null,
?string $transcriptionText=null,
?string $transcriptionUrl=null,
?string $transcriptionStatus=null,
?string $dialCallStatus=null,
?string $dialCallSid=null,
float $dialCallDuration=0.0,
?bool $dialBridged=null,
?string $queueResult=null,
?string $queueSid=null,
int $queueTime=0,
?string $conferenceSid=null,
?string $friendlyName=null,
?string $statusCallbackEvent=null,
?bool $muted=null,
?bool $hold=null,
?bool $endConferenceOnExit=null,
?bool $startConferenceOnEnter=null,
?string $eventName=null,
?string $assistantSid=null,
?string $dialogueSid=null,
?string $userIdentifier=null,
?string $currentInput=null,
?string $currentTask=null,
?string $dialoguePayloadUrl=null,
?string $memory=null,
?string $channel=null,
?string $faxSid=null,
?string $faxStatus=null,
int $numPages=0,
?string $mediaUrl=null,
?string $errorCode=null,
?string $errorMessage=null,
/** @var string|null */
public ?string $sessionId=null,
/** @var string|null */
public ?string $answerUrl=null
) {
parent::__construct($callSid,$accountSid,$from,$to,$callStatus,$apiVersion,$direction,$forwardedFrom,$callerName,$parentCallSid,$stirVerstat,$called,$calledZip,$calledCity,$calledState,$calledCountry,$caller,$callerCity,$callerState,$callerZip,$callerCountry,$fromCity,$fromState,$fromZip,$fromCountry,$toCity,$toState,$toZip,$toCountry,$messageSid,$smsId,$messagingServiceSid,$body,$numMedia,$mediaContentType0,$mediaUrl0,$mediaContentType1,$mediaUrl1,$mediaContentType2,$mediaUrl2,$index,$instanceSid,$eventType,$channelSid,$attributes,$clientIdentity,$mediaContentType,$mediaSid,$identity,$digits,$speechResult,$confidence,$callDuration,$recordingUrl,$recordingSid,$recordingDuration,$recordingStatus,$transcriptionSid,$transcriptionText,$transcriptionUrl,$transcriptionStatus,$dialCallStatus,$dialCallSid,$dialCallDuration,$dialBridged,$queueResult,$queueSid,$queueTime,$conferenceSid,$friendlyName,$statusCallbackEvent,$muted,$hold,$endConferenceOnExit,$startConferenceOnEnter,$eventName,$assistantSid,$dialogueSid,$userIdentifier,$currentInput,$currentTask,$dialoguePayloadUrl,$memory,$channel,$faxSid,$faxStatus,$numPages,$mediaUrl,$errorCode,$errorMessage);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['sessionId'])) $this->sessionId = $o['sessionId'];
if (isset($o['answerUrl'])) $this->answerUrl = $o['answerUrl'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->sessionId)) $o['sessionId'] = $this->sessionId;
if (isset($this->answerUrl)) $o['answerUrl'] = $this->answerUrl;
return empty($o) ? new class(){} : $o;
}
}
PHP DialNodeAnswerCallback DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /nodes/dial/answer/callback HTTP/1.1
Host: team.evovoice.io
Accept: application/json
Content-Type: application/json
Content-Length: length
{"sessionId":"String","answerUrl":"String","callSid":"String","accountSid":"String","from":"String","to":"String","callStatus":"String","apiVersion":"String","direction":"String","forwardedFrom":"String","callerName":"String","parentCallSid":"String","stirVerstat":"String","called":"String","calledZip":"String","calledCity":"String","calledState":"String","calledCountry":"String","caller":"String","callerCity":"String","callerState":"String","callerZip":"String","callerCountry":"String","fromCity":"String","fromState":"String","fromZip":"String","fromCountry":"String","toCity":"String","toState":"String","toZip":"String","toCountry":"String","messageSid":"String","smsId":"String","messagingServiceSid":"String","body":"String","numMedia":0,"mediaContentType0":"String","mediaUrl0":"String","mediaContentType1":"String","mediaUrl1":"String","mediaContentType2":"String","mediaUrl2":"String","index":0,"instanceSid":"String","eventType":"String","channelSid":"String","attributes":"String","clientIdentity":"String","mediaContentType":"String","mediaSid":"String","identity":"String","digits":"String","speechResult":"String","confidence":0,"callDuration":0,"recordingUrl":"String","recordingSid":"String","recordingDuration":0,"recordingStatus":"String","transcriptionSid":"String","transcriptionText":"String","transcriptionUrl":"String","transcriptionStatus":"String","dialCallStatus":"String","dialCallSid":"String","dialCallDuration":0,"dialBridged":false,"queueResult":"String","queueSid":"String","queueTime":0,"conferenceSid":"String","friendlyName":"String","statusCallbackEvent":"String","muted":false,"hold":false,"endConferenceOnExit":false,"startConferenceOnEnter":false,"eventName":"String","assistantSid":"String","dialogueSid":"String","userIdentifier":"String","currentInput":"String","currentTask":"String","dialoguePayloadUrl":"String","memory":"String","channel":"String","faxSid":"String","faxStatus":"String","numPages":0,"mediaUrl":"String","errorCode":"String","errorMessage":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length (string)