Query Inbound Route List

Query the inbound route list.

Request URL

GET {base_url}/{api_path}/inbound_route/list?access_token={access_token}

Request parameters

Parameter Required Type Description
page No Integer Define which page is displayed.
page_size No Integer Define how many records per page.
sort_by No String Define the sorting field.
Valid value:
  • id
  • pos
  • name
order_by No String Define the display order.

Valid value:

  • asc: Ascending order
  • desc: Descending order

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.
total_number Integer The total number of inbound routes.
last_pos Integer The last position in the inbound route list.
data Array <Inroute_Info> The basic information of the inbound route.
Inroute_Info
Parameter Type Description
id Integer The unique ID of the inbound route.
pos Integer The current position of the inbound route in the list.
name String The name of the inbound route.
default_destination String The default destination of the inbound route.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • call_flow: Call Flow
  • ai_receptionist: AI receptionist
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
default_desination_value String The specific value of the default destination.
current_destination String The current destination of the inbound route.
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext_dest: Match extension range
  • ext_vm: Extension voicemail
  • ivr: IVR
  • call_flow: Call Flow
  • ai_receptionist: AI receptionist
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
current_desination_value String The specific value of the current destination.
time_condition String Time-based routing mode.
  • disabled: Inbound calls are routed to the default condition.
  • global: Inbound calls are routed based on global business hours.
  • route_scope: Inbound calls are routed based on custom business hours.
  • custom: Inbound calls are routed based on custom time periods.
timezone_id Integer Time zone ID.
business_hours_destination String The destination for inbound calls during business hours.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • call_flow: Call Flow
  • ai_receptionist: AI receptionist
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
business_hours_destination_value String The specific value of business hours destination.
outside_business_hours_destination String The destination for inbound calls during outside business hours.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • call_flow: Call Flow
  • ai_receptionist: AI receptionist
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
outside_business_hours_destination_value String The specific value of outside business hours destination.
holidays_hours_destination String The destination for inbound calls during holidays.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • call_flow: Call Flow
  • ring_group: Ring group
  • ai_receptionist: AI receptionist
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
holidays_hours_destination_value String The specific value of holidays destination.
enb_holiday_dest_ignore Integer Whether inbound calls received during holidays are routed according to the business hours destination.
  • 0: Disabled.
  • 1: Enabled.
enb_play_holiday_prompt_global Integer Whether holiday prompt is played before inbound calls received during holidays are routed to the holiday destination.
  • 0: Disabled.
  • 1: Enabled.
prefix_code String The prefix of the feature code to override time condition of the inbound route.
reset_code String The feature code used to switch the inbound route to the destination configured for the then-current time.
Note: This parameter returns a value only when time_condition is set to custom.
holiday_code String The feature code used to switch the inbound route to the holiday destination.
Note: This parameter returns a value only when time_condition is set to custom.
office_code String The feature code used to switch the inbound route to the default destination.
Note: This parameter returns a value only when time_condition is set to custom.
time_condition_value Array <Time_Condition_Info> The information of time condition.
Note: This parameter is displayed only when time_condition is set to route_scope or custom.
timezone_options Object<Timezone_List> The basic information of time zone.
Time_Condition_Info
Parameter Type Description
id Integer The unique ID of the time period.
pos Integer The display order of the time period.
days_of_week Integer The days of the week to which the time period applies.
  • sun: Sunday
  • mon: Monday
  • tue: Tuesday
  • wed: Wednesday
  • thu: Thursday
  • fri: Friday
  • sat: Saturday
times Array<String> The time range of the time period.
months String The months to which the time period applies.
  • 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 String The days of the month to which the time period applies.
dest String

The destination for inbound calls received during the time period.

  • end_call: Hang Up.
  • extension: Extension.
  • ext_vm: Extension Voicemail.
  • group_vm: Group Voicemail.
  • outroute: Outbound Route.
  • ai_receptionist: AI Receptionist.
  • ring_group: Ring Group.
  • queue: Queue.
  • conference: Conference.
  • ivr: IVR.
  • call_flow: Call Flow.
  • external_num: External Number.
  • play_greeting: Play Prompt and Exit.
dest_prefix String The destination prefix for inbound calls during the time period.
Note: This parameter returns value only when time_condition is set to custom or route_scope and dest is set to external_num or play_greeting.
  • If dest is set to external_num, this parameter indicates the dialing prefix prepended before external number.
  • If dest is set to play_greeting, this parameter indicates the number of times that the prompt will be played.
dest_value String The detailed destination for inbound calls received during the time period.
Note: The definition of this parameter depends on the value of dest.
  • If dest is play_greeting, this parameter indicates the filename of custom prompt.
  • If dest is extension, ext_vm, group_vm, ivr, call_flow, ring_group, conference, ai_receptionist, outroute, or queue, this parameter indicates the destination ID.
  • If dest is external_num, this parameter indicates the external number.
time_condition_switch Integer Whether advanced time settings are enabled for flexible scheduling based on a combination of week, month, and date.
  • 0: Disabled.
  • 1: Enabled.
Timezone_List
Parameter Type Description
name String Time zone name configured on PBX.
utc_offset String Time zone information, including the UTC offset and identifier.
timezone_info String Time zone display name.
value String Time zone ID.
type String Time zone type.
  • global
  • custom

Examples

Request example

GET /openapi/v1.0/inbound_route/list?page=1&page_size=20&sort_by=pos&order_by=asc&access_token=VpTsz7k6XSOpfjDntqetBQ7nSE9QsbAN HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 7,
    "last_pos": 7,
    "data": [
        {
            "id": 3,
            "pos": 1,
            "name": "from-pce",
            "default_destination": "extension",
            "current_destination": "extension",
            "time_condition": "disabled",
            "default_desination_value": "1005-Ashley Gardner",
            "current_desination_value": "1005-Ashley Gardner",
            "timezone_id": 1,
            "enb_holiday_dest_ignore": 0,
            "enb_play_holiday_prompt_global": 0,
            "prefix_code": "",
            "reset_code": "",
            "holiday_code": "",
            "office_code": "",
            "timezone_options": {
                "name": "Global Time Zone",
                "utc_offset": "UTC+8 Asia/Shanghai",
                "timezone_info": "8 China (Beijing)",
                "value": "1",
                "type": "global"
            }
        },
        {
            "id": 5,
            "pos": 2,
            "name": "20.58",
            "default_destination": "extension",
            "current_destination": "extension",
            "time_condition": "disabled",
            "default_desination_value": "1002-Terrell Smith",
            "current_desination_value": "1002-Terrell Smith",
            "timezone_id": 1,
            "enb_holiday_dest_ignore": 0,
            "enb_play_holiday_prompt_global": 0,
            "prefix_code": "",
            "reset_code": "",
            "holiday_code": "",
            "office_code": "",
            "timezone_options": {
                "name": "Global Time Zone",
                "utc_offset": "UTC+8 Asia/Shanghai",
                "timezone_info": "8 China (Beijing)",
                "value": "1",
                "type": "global"
            }
        },
        {
            "id": 4,
            "pos": 3,
            "name": "41",
            "default_destination": "extension",
            "current_destination": "extension",
            "time_condition": "disabled",
            "default_desination_value": "1002-Terrell Smith",
            "current_desination_value": "1002-Terrell Smith",
            "timezone_id": 1,
            "enb_holiday_dest_ignore": 0,
            "enb_play_holiday_prompt_global": 0,
            "prefix_code": "",
            "reset_code": "",
            "holiday_code": "",
            "office_code": "",
            "timezone_options": {
                "name": "Global Time Zone",
                "utc_offset": "UTC+8 Asia/Shanghai",
                "timezone_info": "8 China (Beijing)",
                "value": "1",
                "type": "global"
            }
        },
        {
            "id": 1,
            "pos": 4,
            "name": "Default_Inbound_Route",
            "default_destination": "extension",
            "current_destination": "extension",
            "time_condition": "disabled",
            "default_desination_value": "1000-Leo Ball",
            "current_desination_value": "1000-Leo Ball",
            "timezone_id": 1,
            "enb_holiday_dest_ignore": 0,
            "enb_play_holiday_prompt_global": 0,
            "prefix_code": "",
            "reset_code": "",
            "holiday_code": "",
            "office_code": "",
            "timezone_options": {
                "name": "Global Time Zone",
                "utc_offset": "UTC+8 Asia/Shanghai",
                "timezone_info": "8 China (Beijing)",
                "value": "1",
                "type": "global"
            }
        },
        {
            "id": 2,
            "pos": 5,
            "name": "ootest",
            "default_destination": "disabled",
            "current_destination": "extension",
            "time_condition": "route_scope",
            "current_desination_value": "1000-Leo Ball",
            "time_condition_value": [
                {
                    "id": 6,
                    "pos": 1,
                    "days_of_week": "mon tue wed thu fri",
                    "times": [
                        "08:45-11:45",
                        "13:15-18:00"
                    ],
                    "months": "jan feb mar apr may jun jul aug sep oct nov dec",
                    "days": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31",
                    "dest": "",
                    "dest_prefix": "",
                    "dest_value": "",
                    "time_condition_switch": 1
                },
                {
                    "id": 7,
                    "pos": 2,
                    "days_of_week": "mon tue wed thu fri",
                    "times": [
                        "11:45-13:15"
                    ],
                    "months": "",
                    "days": "",
                    "dest": "",
                    "dest_prefix": "",
                    "dest_value": "",
                    "time_condition_switch": 0
                }
            ],
            "business_hours_destination": "extension",
            "business_hours_destination_value": "1000-Leo Ball",
            "outside_business_hours_destination": "group_vm",
            "outside_business_hours_destination_value": "6100-6100",
            "holidays_hours_destination": "ivr",
            "holidays_hours_destination_value": "6200-测试",
            "timezone_id": 1,
            "enb_holiday_dest_ignore": 0,
            "enb_play_holiday_prompt_global": 0,
            "prefix_code": "*8",
            "reset_code": "",
            "holiday_code": "",
            "office_code": "",
            "timezone_options": {
                "name": "Global Time Zone",
                "utc_offset": "UTC+8 Asia/Shanghai",
                "timezone_info": "8 China (Beijing)",
                "value": "1",
                "type": "global"
            }
        },
        {
            "id": 6,
            "pos": 6,
            "name": "aatest",
            "default_destination": "disabled",
            "current_destination": "ring_group",
            "time_condition": "custom",
            "current_desination_value": "6300-6300",
            "time_condition_value": [
                {
                    "id": 8,
                    "pos": 1,
                    "days_of_week": "mon tue wed thu fri",
                    "times": [
                        "08:45-11:45",
                        "13:15-18:00"
                    ],
                    "months": "",
                    "days": "",
                    "dest": "ring_group",
                    "dest_prefix": "",
                    "dest_value": "1",
                    "time_condition_switch": 0
                },
                {
                    "id": 9,
                    "pos": 2,
                    "days_of_week": "mon tue wed thu fri",
                    "times": [
                        "11:45-13:15"
                    ],
                    "months": "",
                    "days": "",
                    "dest": "ivr",
                    "dest_prefix": "",
                    "dest_value": "1",
                    "time_condition_switch": 0
                }
            ],
            "business_hours_destination": "end_call",
            "outside_business_hours_destination": "end_call",
            "holidays_hours_destination": "end_call",
            "timezone_id": 1,
            "enb_holiday_dest_ignore": 0,
            "enb_play_holiday_prompt_global": 0,
            "prefix_code": "*81",
            "reset_code": "*8100",
            "holiday_code": "*8101",
            "office_code": "*8102",
            "timezone_options": {
                "name": "Global Time Zone",
                "utc_offset": "UTC+8 Asia/Shanghai",
                "timezone_info": "8 China (Beijing)",
                "value": "1",
                "type": "global"
            }
        },
        {
            "id": 7,
            "pos": 7,
            "name": "bbb",
            "default_destination": "disabled",
            "current_destination": "end_call",
            "time_condition": "global",
            "business_hours_destination": "end_call",
            "outside_business_hours_destination": "end_call",
            "holidays_hours_destination": "end_call",
            "timezone_id": 1,
            "enb_holiday_dest_ignore": 0,
            "enb_play_holiday_prompt_global": 0,
            "prefix_code": "",
            "reset_code": "",
            "holiday_code": "",
            "office_code": "",
            "timezone_options": {
                "name": "Global Time Zone",
                "utc_offset": "UTC+8 Asia/Shanghai",
                "timezone_info": "8 China (Beijing)",
                "value": "1",
                "type": "global"
            }
        }
    ]
}