ICall Interface

Represents full call control interface, together with Caller/Receiver information

Definition

Namespace: CallFlow
Assembly: 3CX.CallFlow (in 3CX.CallFlow.dll) Version: 20.0.1
C#
public interface ICall : ActiveConnection, IOMSnapshot, 
	IEquatable<Object>, IDisposable
Implements
IDisposable, IEquatableObject, ActiveConnection, IOMSnapshot

Properties

AttachedData Additional data attached by PBX
(Inherited from ActiveConnection)
CallConnectionID each connection has unique identifier in the call.
(Inherited from ActiveConnection)
CallerICallerInfo
CallHandler Script interface. Currently only Start is defined.
CallID Unique identifier of the call on PBX. All ActiveConnection with the same CallID are participants of the same conversation.
This ID is run-time identifier for TCX.PBXAPI
(Inherited from ActiveConnection)
DialedNumber Provides number which was dialed by the originator of an outbound connection. This property provides valid information only for outbound connections on external line. (DN property is an ExternalLine object)
(Inherited from ActiveConnection)
DN Connection is associated with this DN
(Inherited from ActiveConnection)
ExternalParty provides caller id or dialed number in case if DN is the ExternalLine
(Inherited from ActiveConnection)
HasAttached Indicates that the object has attached data for saving transaction
(Inherited from IOMSnapshot)
HistoryIDOfTheCall Each call has unique history ID.
It is persistent unique ID of the call in call history database.
(obsolete) v14 - call history database does not use this ID.
(Inherited from ActiveConnection)
Obsolete.
ID each object has unique ID. It is the same as the value returned by GetHashCode. (legacy) new object has ID=0. After successful call to save snapshot gets persistent ID.
(Inherited from IOMSnapshot)
InternalParty Points to internal entity (DN) which is on other side of call.
(Inherited from ActiveConnection)
IsInbound Specifies call direction
Actual only during call setup and simple call scenario.
Cannot provide correct information for calls which were transferred, diverded, parked etc.
(Inherited from ActiveConnection)
IsOutbound Specifies call direction
Actual only during call setup and simple call scenario.
Cannot provide correct information for calls which were transferred, diverded, parked etc.
(Inherited from ActiveConnection)
Item returns value of specific Key in AttachedData. All string keys of the Active connection can be obtained by AttachedData property
(Inherited from ActiveConnection)
LastChangeStatus specifies the time when connection had changed its status to Status
(Inherited from ActiveConnection)
LocalRecordingState Current State of the local recording. LocalRecordingState
LocalRecordingStream Content of the last recording started by successful call to {0} Overload This property allows to read "partial" content of the recording. If user code requires complete "WAV file" content after calling StopRecording(Boolean) it needs wait for LocalRecordingState!=RECORDING
MediaCancellation Script can use this cancellation token to cancel tasks which are requiring media channel. All tasks which are initiated by ICall is cancelled using this token.
MediaChannelReady Availability of media channel. CallFlow route point can be configured to start the script before the media channel is available. Script can check availablity of the media channel using this property and use Answer/RunWithMedia(Action) to control execution of media channel related code.
OfferProvided Information which is provided for Ringing status. When call is addressed to the specific device, CallManager gives inforamtion about SDP negotiation state.
This information could be used by sip endpoints which are integrated with CallControl API.
Allows to execute SIP pickup request with most optimal SDP negotiation: if OfferProvided is True - Pickup should be performed with request for offer if OfferProvided is False - Pickup should be performed with SDP offer
(Inherited from ActiveConnection)
OnBehalfOf the connection is made on behalf of this DN.
(Inherited from ActiveConnection)
OriginatedBy Originator of the connection. Initiator of the connection. specifies DN which creating the connection. RouteToAsync(ActiveConnection, RouteRequest)
(Inherited from ActiveConnection)
OriginatedByConnection Originator connection. it is the connection which initiating RouteToAsync(ActiveConnection, RouteRequest)
(Inherited from ActiveConnection)
OtherCallParties reports parties of this connection.
(Inherited from ActiveConnection)
PartyConnectionID id of party connection
(Inherited from ActiveConnection)
PS reference to PhoneSystem.Root (see object model) It may be null, if script don't have rights to access ObjectModel. Exposed as dynamic. Later will be converted to the well defined interface of PhoneSystem
RecordingState Current state of the recording
(Inherited from ActiveConnection)
ReferredBy Initiator of Blind Transfer procedure. This property specifies CallConnectionID of the ActiveConnection which has initiated Blind Transfer Note: Initiator of Blind Transfer may leave the call before tranfer has finished. This value is valid only for ActiveConnection in Ringing state.
(Inherited from ActiveConnection)
ReferredByDN gives the reference to the DN which parforms blind transfer procedure
(Inherited from ActiveConnection)
RouteTarget special routing attribute. effectively, the connection is created as "routing to the DN" valid only for ActiveConnection on ROUTER RoutePoint
(Inherited from ActiveConnection)
Status specifies current status of connection. ConnectionStatus
(Inherited from ActiveConnection)

Methods

Answer Assures that the request answer was sent to the route point. this method hides Answer from the CallFlow script
Default behavior of CallFlow routepoint is to answer the call automatically.
The RoutePoint can be configured to not answer the call and launch the script in "Ringing" state
It this case, script can perform subset of operations which are not require interactions with user (DTMF input, audio playback)
Script can manipulate caller's attached data and use Divert(String, Boolean) or Divert(RegistrarRecord) to reroute call when finishes work with caller
Script can decide when to answer the call if it is required for the script logic. RunWithMedia(Action)
script should use this method only when executed in Active mode.
AnswerAsync Awaitable vesion of the Answer Works similar to AssureMedia but gurantee that call will be "answered" as well.
Script should use this method only when executed in Active mode.
AssureMedia Awaitable version of RunWithMedia(Action) which guarantees availability of media channel.
script should use this method only when executed in Active mode.
AttachCallerData(DictionaryString, String) Awaitable version of AttachCallerData(DictionaryString, String, ActionBoolean)
AttachCallerData(DictionaryString, String, ActionBoolean) Attaches specified data to the "Caller" connection. This data is preserved and can be accessed by other call flow and server. this method works "asynchronously" and return control to the calling code instantly. Use completed to assure that data is available in tha MyCall.Caller connection Script should use this method only when executed in Active mode.
AttachConnectionData Allows to attach data to the existing connection. The data will be available using AttachedData and indexer of ActiveConnection Ignores all keys which are not started with "public_" prefix.
(Inherited from ActiveConnection)
AttachOnSave(IEnumerableIOMSnapshot) This method allows to add other object updates to the main object saving transaction
(Inherited from IOMSnapshot)
AttachOnSave(IOMSnapshot) This method allows to add other object updates to the saving transaction of main object
(Inherited from IOMSnapshot)
Bargein(RegistrarRecord, PBXConnectionBargeInMode) barge in the device to the call of the connection. in case if mode is Whisper the ActiveConnection will hear the new participant.
(Inherited from ActiveConnection)
Bargein(String, PBXConnectionBargeInMode) Barge in to the call. Call manager will make a call to all devices attachec to specified DN. Answered connection will barge in to the call of the ActiveConnection
(Inherited from ActiveConnection)
Call(String, DictionaryString, String) Awaitable version of Call(String, ActionBoolean, DictionaryString, String)
Script should use this method only when executed in Active mode.
Call(String, ActionBoolean, DictionaryString, String) Delegates call hanling to the new call flow started by the new instance of the specified script. The reference to MyCall and subscriptions to the MyCall events are left alive and calling script can continue to perform operations When new call flow is calling Return(Boolean) it is detached from MyCall and then delegate completed is called
Script should use this method only when executed in Active mode.
CancelReroute cancels current route
script should use this method only when executed in Active mode.
CancelRerouteRequest Cancels specific route requested by Reroute(IEnumerableRouteRequest) Can be called at any time to ensure that route has been ended.
(Inherited from ActiveConnection)
ChangeRecordingState Recording control
(Inherited from ActiveConnection)
Clone Makes fresh snapshot of the object without modifications
(Inherited from IOMSnapshot)
CreateRTAudioFeed creates local audio feed which can be set as background or foreground audio sent to the caller.
use SetBackgroundAudio(Boolean, String) to set Name as background audio or use PlayPrompt(String, String, PlayPromptOptions) to set it as foreground.
CreateTextAndSpeechConversation initiates STT/TTS channel
Critical Critical script failure
Debug Script debug message
DeleteOnSave(IEnumerableIOMSnapshot) Allows to remove other objects as a part of the main object saving transaction.
(Inherited from IOMSnapshot)
DeleteOnSave(IOMSnapshot) Allows to remove other objects as a part of the main object saving transaction.
(Inherited from IOMSnapshot)
Divert(RegistrarRecord)PickupCall(RegistrarRecord, ActiveConnection). Reroute the incoming call to specifc device
(Inherited from ActiveConnection)
Divert(String, Boolean) mirrored action of PickupCall(String, ActiveConnection). Reroute the connection to new destination
(Inherited from ActiveConnection)
Drop Drop the connection
This action is performed as emulation of the Reject/Drop action on the device. Request to drop call is coming from the server side.
(Inherited from ActiveConnection)
Error Script error message
Exception Script exeption message
GetHashCode Hash code is "record" identifier. So all snapshots of the object has the same hash.
(Inherited from IOMSnapshot)
GetPartyConnection Party Connection. As specified by CallManager
(Inherited from ActiveConnection)
Info Script information message
Log Add message to the log of CallFlowService
Obsolete.
MoveTo Reserved for future use. Move connection to specified device. If connection is established, it can be moved to another device. Routing rules will not be applied to the transfer operation.
(Inherited from ActiveConnection)
PlayPrompt(String, String, PlayPromptOptions) Awaitable version of the PlayPrompt(String, String, PlayPromptOptions, ActionBoolean)
script should use this method only when executed in Active mode.
PlayPrompt(String, String, PlayPromptOptions, ActionBoolean) Plays prompt sequence of the files and notify when playback will finished. if files is empty, the parameter finished is ignored. If playback is active - it will be cancelled and its finished delegate will be called with "false".
script should use this method only when executed in Active mode.
ReplaceWith Transfer operation. Replace the connection with new connection made with specified number
(Inherited from ActiveConnection)
ReplaceWithPartyOf Replaces the connection with the party of the other connection on the same device. It is last step of Attended transfer
(Inherited from ActiveConnection)
Reroute Request to replace the connection with one of the route build for specified targets. if one of the route will answer, this connection will be replaced with answered route. All other routes will be cancelled. All ActiveConnections created for the Reroute request will have attached key "requested-target-id".
(Inherited from ActiveConnection)
Return returns control to the calling script. See Call(String, ActionBoolean, DictionaryString, String)
if there is no handlers in the stack, Caller will be redirected to the destination which was specified by the last call to SetDefaultRoute(String, String)
Script can wrapup the work action after calling to Return(Boolean). The code which is executed as wrapup action MUST NOT:
1. Access MyCall object. If some data is required for wrapup, the ICallHandler should copy it in own state.
2. Wait for ICall events - Call is detached from the handler.

Script should use this method only when executed in Active mode.
RouteTo(String, String, Int32) Awaitable version of RouteTo(String, String, Int32, ActionBoolean)
script should use this method only when executed in Active mode.
RouteTo(String, String, Int32, ActionBoolean) Reroute call to the new destination.
script should use this method only when executed in Active mode.
RunWithMedia Checks availability of the media channel and optionaly run specified action if media (becomes) ready
script should use this method only when executed in Active mode.
SetBackgroundAudio This music is played as a backround and plays role of "music on hold". It is muffled when prompt is played. PlayPrompt may stop or resume playback using [Stop/Resume]Background flag default music is started by default.
script should use this method only when executed in Active mode.
SetDefaultRoute Script may specify "default" destination for the call. Default destination is triggered when: 1. Return(Boolean) is called by the initial CallFlow (no scripts objects to return). 2. unrecoverable failures in call flow.
StartRecording(RecordDirection) Awaitable version of StartRecording(RecordDirection, ActionBoolean)
script should use this method only when executed in Active mode.
StartRecording(RecordDirection, ActionBoolean)StartRecording(String, RecordDirection, ActionBoolean) with default temporary filename location. Script should use this method only when executed in Active mode.
StartRecording(String, RecordDirection) Awaitable version of StartRecording(String, RecordDirection, ActionBoolean)
script should use this method only when executed in Active mode.
StartRecording(String, RecordDirection, ActionBoolean) Records CallFlow audio.
Request to start local recording using specified temporary file name. Script should use this method only when executed in Active mode.
StopRecording Stops current recording
script should use this method only when executed in Active mode. Stop recording does not generate exceptions. It just ask implementation to stop current recording if any.
User code must use LocalRecordingState and wait until recording content will be fully available.
SwitchTo Script instance may detach itself from the call processing and ask another script instance to continue. new script instance will inherit execution context and will use the same Caller data overrides and return point (see Return(Boolean)) Caller script will be switched to Wrapup
Script should use this method only when executed in Active mode.
Terminate Terminate connection with RoitingExtension. Call may continue (returned back to transferror, or rerouted by CallManager
script should use this method only when executed in Active mode.
ToString Brief description of object in term of Object model. default implementation is ToString. Concrete implementation may be more verbose.
(Inherited from IOMSnapshot)
Trace Script trace message
TransferToVoiceMail Transfers call to Voicemail of the specific internal number
Warn Script warning

Events

OnDTMFInput delivers dtmf input. DTMF input may be blocked using PlayPrompt command.
when script is in "passive mode" it may receive such events (f.e. when "passive mode" is triggered by {0} Overload
OnPartyChanged The party was changed. This event is fired when caller was replaced with other one by Attanded or Blond transfers made by the caller. script can handle this situation.
must not be handled in "passive mode"
OnTerminated When call is disconnected from RoutingExtenison (sctipt)

Extension Methods

AnswerAsync request to answer of the call if device supports direct contol. Currently supported only by uacsta devices.
(Defined by CallControlAPI)
AttachConnectionDataAsync Attaches data to ActiveConnection the participant connection.
Attaches only subset of the keys which are started with "public_"
(Defined by CallControlAPI)
BargeInCallbackAsync barge-in to the call of the specifid participant form the Extension
(Defined by CallControlAPI)
BargeInCallbackAsync Barge in to the participant from the specific Extension device
(Defined by CallControlAPI)
ChangeRecordingStateAsync changing recording state on behalf of participant
(Defined by CallControlAPI)
Deserialize deserializes object and remenber repeatlist. object can be saved
(Defined by SerializationExtension)
DivertAsync Diverts call to the specified destination
(Defined by CallControlAPI)
DivertAsync divert to number with voicemail flag. This is for backward compatibility.
(Defined by CallControlAPI)
DropAsync the request to terminate connection.
(Defined by CallControlAPI)
GetSerializableProperties Returns list of properties which are require serialization
(Defined by SerializationExtension)
OMDelete Apply update of the specific snapshot. virtually any object may be updated even those which are not supporting IOMStorable interface.
(Defined by CollectionTransactionsHelper)
OMSave Apply update of the specific snapshot. virtually any object may be updated even those which are not supporting IOMStorable interface.
(Defined by CollectionTransactionsHelper)
ReplaceWithAsync BlindTransfer to specific destination. It is most flexible version which allows to choose any type of destination. Allows to bypass routing rules.
(Defined by CallControlAPI)
ReplaceWithAsync BlindTransfer to the specific device. Ignores all forwarding rules and tries to deliver call to specific device.
(Defined by CallControlAPI)
ReplaceWithAsync Blind transfer with route to number. Does not allow to bypass forwarding/routing rules.
(Defined by CallControlAPI)
ReplaceWithInitOnlyAsync Overload of ReplaceWithInitOnlyAsync(ActiveConnection, String, DN, CallControlAPIDivertReason) for DestinationStruct
(Defined by CallControlAPI)
ReplaceWithInitOnlyAsync Init only request of ReplaceWithAsync(ActiveConnection, RegistrarRecord, DN, CallControlAPIDivertReason)
(Defined by CallControlAPI)
ReplaceWithInitOnlyAsync Special version when the caller needs to initiate transfer without waiting for result
(Defined by CallControlAPI)
ReplaceWithPartyOfAsync Final step of Attended transfer procedure.
(Defined by CallControlAPI)
RouteToAsync the request to route call to specific endpoint. the connection is assumed as Parent. Routing request could create many "ringing" destinations, but only one may answer The answering connection is replacing the parent connection. If all destination have failed, task is completed with failed state and Parent connection left alive.
(Defined by CallControlAPI)
RouteToAsync Simplified vertion which receives DestinationStruct and Timeout
(Defined by CallControlAPI)
RouteToAsync Simplified vertion which receives Destination
(Defined by CallControlAPI)
SerializeObject Deserializer for IOMSnapshot
(Defined by SerializationExtension)
SerializeProperty returns false if there are no enough information at the moment and it should be repeated after after all objects will be restored. Typical case is forward reference to the DN object.
(Defined by SerializationExtension)
TryDeserializeProperty returns false if there are no enough information at the moment and it should be repeated after after all objects will be restored. Typical case is forward reference to the DN object.
(Defined by SerializationExtension)

See Also