Query Information of an Inbound Route
Query the detailed information of an inbound route.
Request URL
GET {base_url}/{api_path}/inbound_route/get?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of the inbound route. Note: You can query the inbound route's ID
using Search Specific Inbound Routes. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| data | Object<Inroute_Details> | The detailed information of the inbound route. |
- Inroute_Details
-
Parameter Type Description id Integer The unique ID of the inbound route. name String The name of the inbound route. alert_info String Inbound alert info. did_option String DID matching mode. patterns: Match DID patterns.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.
did_pattern_list Array<DID_Pattern_List> The DID matching pattern list when the did_optionispatterns.did_pattern_to_ext String The DID matching pattern to extensions when the did_optionispattern_to_ext.did_to_ext_start String The start number of the DID matching pattern range when the did_optionisrange_to_ext.did_to_ext_end String The end number of the DID matching pattern range when the did_optionisrange_to_ext.did_pattern_to_ext_list Array <DID_Ext_List> The list of DID numbers and the corresponding extensions when the did_optionispattern_to_ext_list.cid_option String Caller ID matching pattern. patterns: Match Caller ID patterns.phonebook: Match contacts' caller ID in specific phonebooks
cid_pattern_list Array<CID_Pattern_List> The Caller ID matching pattern list when the cid_optionispatterns.cid_to_phonebook Array<Integer> The ID of the selected phonebook when the cid_optionisphonebook.trunk_list Array<Trunk_List> The list of the selected trunk in the inbound route. def_dest String Default destination. disabledend_call: Hang upextension: Extensionpattern_to_ext: Match DID pattern to extensionsrange_to_ext: Match DID range to extension rangepattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.ext_vm: Extension voicemailivr: IVRcall_flow: Call Flowai_receptionist: AI receptionistring_group: Ring groupqueue: Queuegroup_vm: Group voicemailconference: Conferenceexternal_num: External numberoutroute: Outbound routeplay_greeting: Play greeting then hang upfax_to_email: Fax to email
def_dest_prefix String This parameter returns different information depending on the def_dest.- When
def_destisexternal_num, this parameter returns the prefix of the external number. - When
def_destisplay_greeting, this parameter returns the playback count of the greeting.
def_dest_value String This parameter returns different results depending on the def_dest.- When
def_destisexternal_num, this parameter returns the external number. - When
def_destisplay_greeting, this parameter returns the prompt name. - When
def_destisrange_to_ext, this parameter returns the extension range. - When
def_destis other destinations, this parameter returns the unique ID of the destination.For example, the destination is the extension 2002, then this field will return the ID of the extension 2002.
def_dest_ext_list Array<Ext_List> The selected extensions/extension groups when the def_destispattern_to_ext.ringback_tone String The filename of custom prompt played for the caller before the extension user answers the call when the def_destisextension.enb_time_condition Integer Whether time condition is enabled. 0: Disabled.1: Enabled.
timezone_id Integer Time zone ID. time_condition String Time-based routing mode. 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.
time_condition_value Array<Custom_Time> Custom business hours or time periods. business_hours_destination String The destination for inbound calls received during business hours.
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.
business_hours_destination_value String The detailed destination for inbound calls received during business hours. Note: The definition of this parameter depends on the value ofbusiness_hours_destination.- If
business_hours_destinationisplay_greeting, this parameter indicates the filename of custom prompt. - If
business_hours_destinationisextension,ext_vm,group_vm,ivr,call_flow,ring_group,conference,ai_receptionist,outroute, orqueue, this parameter indicates the destination ID. - If
business_hours_destinationisexternal_num, this parameter indicates the external number.
outside_business_hours_destination String The destination for inbound calls received outside business hours.
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.
outside_business_hours_destination_value String The detailed destination for inbound calls received outside business hours. Note: The definition of this parameter depends on the value ofoutside_business_hours_destination.- If
outside_business_hours_destinationisplay_greeting, this parameter indicates the filename of custom prompt. - If
outside_business_hours_destinationisextension,ext_vm,group_vm,ivr,call_flow,ring_group,conference,ai_receptionist,outroute, orqueue, this parameter indicates the destination ID. - If
outside_business_hours_destinationisexternal_num, this parameter indicates the external number.
holidays_hours_destination String The destination for inbound calls received during holidays.
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.
holidays_hours_destination_value String The detailed destination for inbound calls received during holidays. Note: The definition of this parameter depends on the value ofholidays_hours_destination.- If
holidays_hours_destinationisplay_greeting, this parameter indicates the filename of custom prompt. - If
holidays_hours_destinationisextension,ext_vm,group_vm,ivr,call_flow,ring_group,conference,ai_receptionist,outroute, orqueue, this parameter indicates the destination ID. - If
holidays_hours_destinationisexternal_num, this parameter indicates the external number.
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 whentime_conditionis set tocustom.holiday_code String The feature code used to switch the inbound route to the holiday destination. Note: This parameter returns a value only whentime_conditionis set tocustom.office_code String The feature code used to switch the inbound route to the default destination. Note: This parameter returns a value only whentime_conditionis set tocustom.timezone_options Object<Timezone_List> The basic information of time zone.
- DID_Pattern_List
-
Parameter Type Description id Integer The unique ID of the DID pattern. did_pattern String The DID matching rules.
- DID_Ext_List
-
Parameter Type Description id Integer The unique ID of the DID number matching rule. did_pattern String The DID number. did_pattern_to_ext String The ID of the extension that corresponds to the DID number.
- CID_Pattern_List
-
Parameter Type Description id Integer The unique ID of the Caller ID pattern. cid_pattern String The Caller ID matching rules. - Trunk_List
-
Parameter Type Description id Integer The unique ID of the selected trunk. name String Trunk name. type String Trunk type.
- Ext_List
-
Parameter Type Description value String The unique ID of the extension/extension group. name String The name of the extension/extension group. number String Extension number. type String The type of the selected item. extensionext_group
- Custom_Time
-
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: Sundaymon: Mondaytue: Tuesdaywed: Wednesdaythu: Thursdayfri: Fridaysat: Saturday
times Array<String> The time range of the time period. months String The months to which the time period applies. jan: Januaryfeb: Februarymar: Marchapr: Aprilmay: Mayjun: Junejul: Julyaug: Augustsep: Septemberoct: Octobernov: Novemberdec: 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 whentime_conditionis set tocustomorroute_scopeanddestis set toexternal_numorplay_greeting.- If
destis set toexternal_num, this parameter indicates the dialing prefix prepended before external number. - If
destis set toplay_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 ofdest.- If
destisplay_greeting, this parameter indicates the filename of custom prompt. - If
destisextension,ext_vm,group_vm,ivr,call_flow,ring_group,conference,ai_receptionist,outroute, orqueue, this parameter indicates the destination ID. - If
destisexternal_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. globalcustom
Examples
Request example
GET /openapi/v1.0/inbound_route/get?id=30&access_token=LC0V0aZjQCf3LBs9yn8RmXacl2GlrXPn HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "data": { "id": 30, "name": "test5", "did_option": "range_to_ext", "did_to_ext_start": "5503301", "did_to_ext_end": "5503310", "cid_option": "phonebook", "cid_to_phonebook": "[10,5]", "trunk_list": [ { "id": 28, "name": "6700-account-trunking", "type": "account" } ], "def_dest": "range_to_ext", "def_dest_value": "2001-2010", "ringback_tone": "", "enb_time_condition": 1, "timezone_id": 1, "time_condition": "global", "time_condition_value": null, "business_hours_destination": "extension", "business_hours_destination_value": "159", "outside_business_hours_destination": "group_vm", "outside_business_hours_destination_value": "1", "holidays_hours_destination": "ivr", "holidays_hours_destination_value": "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" } } }