Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

call_routing_rule.save

Description

Save a new call routing rule or changes to an existing call routing rule.

Versioning Notes

In versions of the API prior to 1.1, "name" is not a valid attribute. Rather "rule_name" is used in its place.

Arguments

name

required

value type

default

call_origin

yes

object_id of required origin, or if channel, "port-x-channel-x"

none

call_throughs

yes

array of object_ids of destination where gateway will attempt to send call out , or if channels, strings "port-x-channel-x"

none

cid_name

no

caller ID name to force

none

cid_num

no

caller ID number to force

none

match_everything

no

0/1, whether to skip DID matching

1, if num_* are blank

order

no

number

last

name

yes

string

none

old_name

no

string

previous value of "name" when attempting to rename a rule.

simple_mode

no

0/1, whether to show advanced fields

none

num_begins

no

number

none

num_length_end

no

number

none

num_length_start

no

number

none

prepend

no

number

none

trim

no

number

none

Example Requests & Responses

Example One

Request

Save a new call routing rule or changes to an existing call routing rule.

  • NOTE: call_throughs array and call_origin parameter will be the object_id of the object to match on, or in the case of a single T1 channel, a string in the format "port-x-channel-x".

{
    'method' => 'call_routing_rule.save',
    'parameters' => {
          'name' => 'port 1 to erins gateway',
          'simple_mode' => 1,
          'call_origin' => '3',
          'match_everything' => 1,
          'call_throughs' => [
                               '200'
                             ],
          'order' => '1',
        }

Response

{
          'result' => 'success'
 }

Or

{
          'result' => 'error',
          'error' => 'An Error String',
          'error_key' => 'AN_ERROR_LANGUAGE_KEY',
 }
  • No labels