Edit an Outbound Route

Edit the configuration of an outbound route.

Request URL

POST {base_url}/{api_path}/outbound_route/update?access_token={access_token}

Request parameters

Parameter Required Type Description
id Yes Integer The unique ID of the outbound route.
Note: To obtain the outbound route's ID, see Search Specific Outbound Routes.
name No String Outbound route name.
outbound_cid No String Outbound caller ID.
dial_pattern_list No Array<Dial_Pattern_List> The dial pattern of the outbound route.
trunk_list No Array<Trunk_List> The selected trunk in the outbound route.
ext_list No Array<Ext_List> The selected extensions in the outbound route.
pin_protect No String Outbound route password.
Valid value:
  • disable
  • single_pin
  • pin_list
pin No String Single PIN code.
Note: This parameter is required when the value of pin_protect is set to single_pin.
pin_list No Integer The unique ID of the selected PIN list.
Note:
  • This parameter is required when the value of pin_protect is set to pin_list.
  • You can query the PIN list ID using Get Menu Options.

available_time

No

String

The time when the outbound route is available to use.

Valid value:

  • always: Always available.
  • global: Based on business hours configured for the time zone.
  • route_scope: Based on custom business hours.
  • custom: Based on custom time periods.

enb_holiday

No

Integer

Whether to allow the outbound route to be used during holidays.

Valid value:

  • 0: Disabled
  • 1: Enabled

enb_office_time

No

Integer

Whether to allow the outbound route to be used during business hours.

Valid value:

  • 0: Disabled
  • 1: Enabled

enb_out_of_office_time

No

Integer

Whether to allow the outbound route to be used outside business hours.

Valid value:

  • 0: Disabled
  • 1: Enabled

office_time_list

No

Array<Time_Setting>

The list of business time periods.

timezone_id

No

Integer

The ID of the time zone.
Note: You can obtain the ID using the Query Time Zone List interface.
Dial_Pattern_List
Parameter Required Type Description
pattern No String The dial pattern matching rules.
strip No Integer The number of digits that will be stripped from the beginning of a dialed number before the call is placed.
prepend No String The digits that will be prepended to the phone number before the call is placed.
Trunk_List
Parameter Required Type Description
id Yes Integer The unique ID of the selected trunk.
name No String Trunk name.
type No String Trunk type.
Ext_List
Parameter Required Type Description
id Yes Integer The unique ID of the selected extension/extension group/organization.
Note: You can query the desired ID using Get Menu Options.
ext_number No String Extension number.
ext_name No String The name of the extension/extension group/organization.
type Yes String The selected type.

Valid value:

  • extension
  • ext_group
  • organization
Time_Setting
Parameter Required Type Description
months No String The months during which the business hour applies.
Note:
  • This parameter takes effect only when the advanced time condition is enabled (time_condition_switch is 1).
  • Separate multiple months by spaces.

Valid value:

  • all: Every month.
  • jan: January.
  • feb: February.
  • mar: March.
  • apr: April.
  • may: May.
  • jun: June.
  • jul: July.
  • aug: August.
  • sep: September.
  • oct: October.
  • nov: November.
  • dec: December.
days_of_week No String The days of the week on which the business hour applies.
Note:
  • Required when time_condition_switch is 0.
  • Separate multiple values by spaces.

Valid value:

  • all: Every day.
  • sun: Sunday.
  • mon: Monday.
  • tue: Tuesday.
  • wed: Wednesday.
  • thu: Thursday.
  • fri: Friday.
  • sat: Saturday.
days No String The days of the month on which the business hour applies.
Note: This parameter takes effect only when the advanced time condition is enabled (time_condition_switch is 1).

Valid value:

  • all: Every day.
  • 1 - 31

office_times

No

Array<Time_Periods> The list of time periods.
time_condition_switch No Integer Whether to enable the advanced time condition.

Valid value:

  • 0: Disabled.
  • 1: Enabled.
    Note: If enabled, the months and days parameters take effect.
Time_Periods
Parameter Type Description
value String The time period in the format HH:MM-HH:MM.
Note: The end time must be later than the start time.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

POST /openapi/v1.0/outbound_route/update?access_token=EepE7JpKkhEWCjiOVqi9u3TJnYF1vLg1 HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "id": 19,
    "pin_protect":"single_pin",
    "pin":"1234"
}

Response example

HTTP 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}