reject Action

Rejects an inbound call that is still in the inbound state, specifying a cause for the rejection.


The reject properties are:

PropertyRequired/OptionalDefaultDescription
cause optional "rejected" The cause of the rejection. One of:
  • "busy"
  • "noanswer"
  • "unobtainable"
  • "changed"
  • "outoforder"
  • "barred"
  • "rejected"
  • "nochannels"
  • "congestion"
raw cause optional null A raw protocol-specific clearing cause that is passed directly to the service provider, for example, a SIP response code (see SIP Response Codes). A string provided here will override cause.
  • Examples:

    • Reject a call using the default:

      "reject" : 
      {
      }
      
    • Reject a call and specify a busy cause:

      "reject" :
      {
          "cause" : "busy"
      }
      
    • Reject a call specifying a SIP 'Busy Here' raw cause:

      "reject" :
      {
          "raw_cause" : "486",
      }
      
  • API Reference:

    class Reject : TelephonyAction

    Represents a reject action.

    Constructors:

    Reject();
    Reject(String cause);
    

    Members:

    String Cause;
    String RawCause;
    

    Examples:

    • Reject a call with the default cause:

      actions.Add(new Reject());
      
    • Reject a call with the busy cause:

      actions.Add(new Reject("busy"));
      
    • Reject a call specifying a SIP 'Busy Here' raw cause:

      Reject rejectAction = new Reject();
      rejectAction.RawCause = "486";
      actions.Add(rejectAction);
      
  • API Reference:

    Class Reject Inherits TelephonyAction

    Represents a reject action.

    Constructors:

    New()
    New(cause As String)
    

    Members:

    Cause As String
    RawCause As String
    

    Examples:

    • Reject a call with the default cause:

      actions.Add(New Reject())
      
    • Reject a call with the busy cause:

      actions.Add(New Reject("busy"))
      
    • Reject a call specifying a SIP 'Busy Here' raw cause:

      Dim rejectAction As Reject = New Reject()
      rejectAction.RawCause = "486"
      actions.Add(rejectAction)
      
  • API Reference:

    class Reject extends TelephonyAction

    Represents a reject action.

    Constructors:

    Reject();
    Reject(String cause);
    

    Members:

    setCause(String cause);
    setRawCause(String rawCause);
    

    Examples:

    • Reject a call with the default cause:

      actions.add(new Reject());
      
    • Reject a call with the busy cause:

      actions.add(new Reject("busy"));
      
    • Reject a call specifying a SIP 'Busy Here' raw cause:

      Reject rejectAction = new Reject();
      rejectAction.setRawCause("486");
      actions.add(rejectAction);
      
  • API Reference:

    class Reject

    Represents a reject action.

    Constructors:

    Reject(cause=None, raw_cause=None)
    

    Examples:

    • Reject a call with the default cause:

      from aculab.telephony_rest_api import Actions, Reject
      
      my_actions = Actions(token='Usage example 1: Reject')
      my_actions.add(Reject())
      
      response_body = my_actions.get_json()
      
    • Reject a call with the busy cause:

      from aculab.telephony_rest_api import Actions, Reject
      
      my_actions = Actions(token='Usage example 2: Reject')
      my_actions.add(Reject(cause='busy'))
      
      response_body = my_actions.get_json()
      
    • Reject a call specifying a SIP 'Busy Here' raw cause:

      from aculab.telephony_rest_api import Actions, Reject
      
      my_actions = Actions(token='Usage example: Reject')
      my_actions.add(Reject(raw_cause='486'))
      
      response_body = my_actions.get_json()
      
  • API Reference:

    The Reject class

    Introduction

    Represents a reject action.

    Class synopsis

    class Reject extends ActionBase {
    
        /* methods */
        public __construct()
        public static Reject cause(string cause)
        public static Reject rawCause(string raw_cause)
        public void setCause(string $cause)
        public void setRawCause(string $raw_cause)
    }
    

    Examples:

    • Reject a call using the defaults:

      $actions->add(new Aculab\TelephonyRestAPI\Reject());
      
    • Reject a call and specify a busy cause:

      $actions->add(Aculab\TelephonyRestAPI\Reject::cause('busy'));
      
    • Reject a call specifying a SIP 'Busy Here' raw cause:

      $reject = new Aculab\TelephonyRestAPI\Reject();
      $reject->setRawCause('486');
      $actions->add($reject);