Read Phone Number

Read phone number routing for your domain.

POST/?object=phonenumber&action=read

Request URL

POST
https://uc.hopdial.com/ns-api/?object=phonenumber&action=read

Send your access token in the Authorization: Bearer header. Body parameters are sent as application/x-www-form-urlencoded. New to the API? Start with authentication and rate limits.

Parameters

NameTypeDescription
dialplan
requiredbody
string

Must be "DID Table"

dest_domain
optionalbody
string

Filter by domain

Default: *

matchrule
optionalbody
string

Filter by a specific DID. Must be 10 digit DID with a prefix of "sip:1" and a post file of "@*"

Default: *

to_user
optionalbody
string

Filter by the destination user the DID Is pointed to

Default: *

Example request

text
curl https://uc.hopdial.com/ns-api/ \
   -H 'Authorization: Bearer 7bet078rqljh451l31uh34lsd0f80dsf' \
   -d object='phonenumber' \
   -d action='read' \
   -d dest_domain='abc-company.11111.service' \
   -d dialplan = 'DID Table' \
   -d matchrule = 'sip:14071112222@*' \
   -d to_user = '204'

Responses

200 · application/xml
<?xml version="1.0" encoding="UTF-8"?>
<xml>
   <phonenumber>
      <matchrule>sip:14071112222@*</matchrule>
      <match_from>*</match_from>
      <dow>*</dow>
      <tod_from>*</tod_from>
      <tod_to>*</tod_to>
      <valid_from>*</valid_from>
      <valid_to>*</valid_to>
      <responder>sip:start@to-user</responder>
      <parameter />
      <to_scheme>sip:</to_scheme>
      <to_user>204</to_user>
      <to_host>abc-company.11111.service</to_host>
      <from_name>[*]</from_name>
      <from_scheme>sip:</from_scheme>
      <from_user>[*]</from_user>
      <from_host>[*]</from_host>
      <dialplan>DID Table</dialplan>
      <domain>admin-only</domain>
      <plan_description>DID</plan_description>
      <domain_owner>abc-company.11111.service</domain_owner>
      <domain_description>ABC Company</domain_description>
   </phonenumber>
</xml>
400 · application/json
{}

More Phone Number endpoints

Read and route the phone numbers (DIDs) on your domain.

Need a Client ID and Client Secret or help with this endpoint? Contact HopDial support or call (866) 305-0407.