Skip to content

Action Progress

Contains interim progress information for ongoing actions that support it.

Used by actions receive fax, send fax and in HTTP Request

language wrappers and examples

It contains the following properties:

PropertyAvailabilityDescription
actionalwaysA string. The name of the action for which progress information is being supplied. The following actions generate an action progress: send fax and receive fax.
progressalwaysAn object containing the progress information supplied for the current action.

Examples:

The action progress of a send fax action:
{
    "action" : "send_fax",
    "progress" :
    {  
        "negotiated_settings" :
        {
            "data_rate" : 9600,
            "modem" : "V17",
            "remote_subscriber_id" : "12345"
        },
        "pages_sent" : 3,
        "reconnects" : 0
    }
}
The action progress of a receive fax action:
{
    "action" : "receive_fax",
    "progress" :
    {
        "negotiated_settings" :
        {
            "data_rate" : 9600,
            "modem" : "V17",
            "remote_subscriber_id" : "12345"
        },
        "pages_received" : 3
    }
}

ActionProgress Class

Namespace: Aculab.Cloud.RestAPIWrapper

Assembly: Aculab.Cloud.RestAPIWrapper.dll

Base class for all progress classes.

These provide progress information for an action.

public class ActionProgress 
{
    // Members
    public string Action;
}

Examples:

Get the number of pages sent by a send fax action:
// Unpack the request
var telephonyRequest = new TelephonyRequest(Request);

var sendFaxProgress = (SendFaxProgress)telephonyRequest.InstanceInfo.ActionProgress;
var pagesSent = sendFaxProgress.PagesSent;
Get the number of pages received by a receive fax action:
// Unpack the request
var telephonyRequest = new TelephonyRequest(Request);

var receiveFaxProgress = (ReceiveFaxProgress)telephonyRequest.InstanceInfo.ActionProgress;
var pagesReceived = receiveFaxProgress.PagesReceived;
public class ActionProgress 
{
    // Members
    public string Action;
}

Examples:

Get the number of pages sent by a send fax action:
// Unpack the request
var telephonyRequest = new TelephonyRequest(Request);

var sendFaxProgress = (SendFaxProgress)telephonyRequest.InstanceInfo.ActionProgress;
var pagesSent = sendFaxProgress.PagesSent;
Get the number of pages received by a receive fax action:
// Unpack the request
var telephonyRequest = new TelephonyRequest(Request);

var receiveFaxProgress = (ReceiveFaxProgress)telephonyRequest.InstanceInfo.ActionProgress;
var pagesReceived = receiveFaxProgress.PagesReceived;
public class ActionProgress 
{
    // Members
    public string Action;
}

Examples:

Get the number of pages sent by a send fax action:
// Unpack the request
var telephonyRequest = await TelephonyRequest.UnpackRequestAsync(Request);

var sendFaxProgress = (SendFaxProgress)telephonyRequest.InstanceInfo.ActionProgress;
var pagesSent = sendFaxProgress.PagesSent;
Get the number of pages received by a receive fax action:
// Unpack the request
var telephonyRequest = await TelephonyRequest.UnpackRequestAsync(Request);

var receiveFaxProgress = (ReceiveFaxProgress)telephonyRequest.InstanceInfo.ActionProgress;
var pagesReceived = receiveFaxProgress.PagesReceived;

ActionProgress Class

Namespace: Aculab.Cloud.RestAPIWrapper

Assembly: Aculab.Cloud.RestAPIWrapper.dll

Base class for all progress classes.

These provide progress information for an action.

Public Class ActionProgress
    ' Members
    Public Property Action As String
End Class

Examples:

Get the number of pages sent by a send fax action:
' Unpack the request
Dim telephonyRequest = New TelephonyRequest(Request)

Dim sendFaxProgress As SendFaxProgress = telephonyRequest.InstanceInfo.ActionProgress
Dim pagesSent = sendFaxProgress.PagesSent
Get the number of pages received by a receive fax action:
' Unpack the request
Dim telephonyRequest = New TelephonyRequest(Request)

Dim receiveFaxProgress As ReceiveFaxProgress = telephonyRequest.InstanceInfo.ActionProgress
Dim pagesReceived = receiveFaxProgress.PagesReceived
Public Class ActionProgress
    ' Members
    Public Property Action As String
End Class

Examples:

Get the number of pages sent by a send fax action:
' Unpack the request
Dim telephonyRequest = New TelephonyRequest(Request)

Dim sendFaxProgress As SendFaxProgress = telephonyRequest.InstanceInfo.ActionProgress
Dim pagesSent = sendFaxProgress.PagesSent
Get the number of pages received by a receive fax action:
' Unpack the request
Dim telephonyRequest = New TelephonyRequest(Request)

Dim receiveFaxProgress As ReceiveFaxProgress = telephonyRequest.InstanceInfo.ActionProgress
Dim pagesReceived = receiveFaxProgress.PagesReceived

class ActionProgress

Base class for all progress classes. These provide progress information for an action.

Class synopsis:

// Members:
public final String getAction()

Examples:

Get the number of pages sent by a send fax action:
TelephonyRequest myRequest = new TelephonyRequest(request);
ActionProgress actionProgress = myRequest.getInstanceInfo().getActionProgress();

if (actionProgress.getAction() == "send_fax")
{
    SendFaxProgress faxProgress = (SendFaxProgress)actionProgress;

    int pagesSent = faxProgress.getPagesSent();

    // Your code here...
}
Get the number of pages received by a receive fax action:
TelephonyRequest myRequest = new TelephonyRequest(request);
ActionProgress actionProgress = myRequest.getInstanceInfo().getActionProgress();

if (actionProgress.getAction() == "receive_fax")
{
    ReceiveFaxProgress faxProgress = (ReceiveFaxProgress)actionProgress;

    int pagesReceived = faxProgress.getPagesReceived();

    // Your code here...
}

TelephonyRequest.get_action_progress()

Returns a dictionary that represents a Action Progress support class.

Examples:

Get the number of pages sent by a send fax action:
my_request = TelephonyRequest(request)
action_progress = my_request.get_action_progress()

if action_progress.get("action") == "send_fax":
    progress = action_progress.get("progress")
    negotiated_settings = progress.get("negotiated_settings")
    pages_sent = progress.get("pages_sent")
    reconnects = progress.get("reconnects")
Get the number of pages received by a receive fax action:
my_request = TelephonyRequest(request)
action_progress = my_request.get_action_progress()

if action_progress.get("action") == "receive_fax":
    progress = action_progress.get("progress")
    negotiated_settings = progress.get("negotiated_settings")
    pages_received = progress.get("pages_received")

The ActionProgress class

Introduction

The base class for all action progress results.

Class synopsis

abstract class ActionProgress extends PropertyHolder {

    /* methods */
    public string getAction()
}

Examples:

Get the number of pages sent by a send fax action
$info = InstanceInfo::getInstanceInfo();
$sendFaxProgress = $info->getActionProgress();
$numberPagesSent = $sendFaxProgress->getPagesSent();
Get the number of pages received by a receive fax action
$info = InstanceInfo::getInstanceInfo();
$receiveFaxProgress = $info->getActionProgress();
$numberPagesReceived = $receiveFaxProgress->getPagesReceived();