Get phone number details
Overview
To get information on the phone number, make the PUT request to /accounts/{accountSID}/numbers/{numberSID}.
Request example
The following cURL example demonstrates getting the number details.
curl –X GET https://api.apifonica.com/v2/accounts/{accountSID}/numbers/{numberSID} \
-u {accountSID}:{authToken}
Response example
{
"number_sid": "{numberSID}",
"account_sid": "{accountSID}",
"number": "447480600503",
"name": "",
"token": "autc1cfb5bd-a371-3653-bc34-3bd6709dee96",
"pool_sid": null,
"country_code": "virtual",
"country_name": "virtual",
"type": "sip",
"call_controller": "http://172.16.102.175:8082/voicexml/getxml?xml_variant=welcome_to_apifonica",
"call_method": "POST",
"msg_controller": "https://events.apifonica.com/messaging/event",
"msg_method": "POST",
"msg_app_sid": "default_msg_app_sid",
"call_app_sid": "app47449776-12d9-3900-9cef-34718e931648",
"endpoint_sid": null,
"created": "Thu, 18 Jun 2020 06:43:07 +0000",
"updated": "Thu, 18 Jun 2020 06:43:51 +0000",
"voice": true,
"messaging": false,
"voice_recording": true,
"mode": "sip_phone",
"call_outbound_mode": "sip_phone",
"call_inbound_mode": "sip_phone"
}
Response parameters
Parameter | Description |
---|---|
number_sid | Number identifier. |
account_sid | Account identifier. |
number | Phone number in E.164 format. |
token | Authentication token (if number type is sip and null for other types) |
country_code | Either country code according to ISO 3166-1 alpha-2 or international. |
country_name | Full name of the country. |
type | Number type. One of the following: local, mobile or sip. |
call_controller | URL which will be used to make a request for an XML controller file for incoming calls. |
call_method | Method which will be used to make a request. |
msg_controller | URL which will be used to send the events about the status change. |
msg_method | Method which will be used to make a request. |
msg_app_sid | Unique ID of the messaging application. |
call_app_sid | Unique ID of the calling application. |
endpoint_sid | Endpoint unique identifier. |
created | Rental date. |
updated | Date of the last update. |
voice | Availability of voice communications for this number. Either true or false. |
messaging | Availability of messaging for this number. Either true or false. |
voice_recording | Availability of voice recording function for this number. Either true or false. |
mode | Parameter which regulates the phone number mode. Modes can be as following: end_point - enables sip-trunking mode; |