You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Generate new models for api-version 2025-04-01
* Create public facing methods fro cherry picker
* Add cherry picker tests
* Add DNR tests
* Add missing params on doc comments
* Add DNR tests for traditional search
* Fix linting problems
* Fix linting issues
* Rename ReservationStatus to PhoneNUmberReservationStatus
* Add custom PhoneNumbersReservation
* Format clients
* Fix warnings
* Fix spacing on doc, and naming
* Fix naming
* Update recordings
* Add countryCode to PhoneNumbersBrowseRequest
* Split createOrUpdate reservation into two methods
* Reuse PhoneNumberCost
* Join create and update
* Update tests to use new createOrUpdate reservation method
* Update tests to use new createOrUpdate reservation method
* Remove all unused imports
* Add missing params on doc comments
* Update readme to add remove-empty-child-schemas flag
* Make browse return an AvailablePhoneNumber list
* Remove browseresult model
* Make browseresult model internal
* Replace browseCapabilitiesRequest with regular request
* Replace PhoneNumberCapabilitiesRequest to PhoneNumberCapabilities
* Use createOrUpdateClientOptions
* Add missing comments for CreateOrUpdateReservationOptions
* Add missing comments for CreateOrUpdateReservationOptions
* Remove unused models from public
* Fix comments from CreateOrUpdateReservationOptions
* Fix mappers
* Replace UUID for string
* Fix recordings
* Fix linting issues
* Replace Listo for PhoneNumbersBrowseResult
* Add missing WithResponse methods
* Add missing comment on deleteReservationWithResponse
* Rename AvailablePhoneNumberStatus to PhoneNumberAvailabilityStatus
* Rename BrowseRequest to BrowsePhoneNumbersOptions
* Add fields as readonly
* Add directive to replace PhoneNumberCapabilitiesRequest
* Replace AvailablePhoneNumberError with ResponseError
* Remove unused imports
* Remove unused models
* Make setPhoneNumbers private
* Add accesshelper to PhoneNumbersReservation customization
* Add required fields to constructor
* Add custom PhoneNumberSearchResultError
* Remove params from CreateOrUpdateReservationOptions constructor
* Fix linting on AccssHelper
* Make phoneNUmbers readonly on phoneNumbersBrowseResult
* Exclude PhoneNumbersReservationAccessHelper
* Remove unused setter on CreateOrUpdateReservationOptions
* Update changelog and README
* Add samples
* Fix version on changelog
* Remove unused imports from samples
* Remove unecessary required com.azure.core
* Rename params to match type
* Replace UUID for string on missing function
* Remove setter for country code and number type from BrowseOptions
* Replace getId from UUID to String
* Replace request with reservationOptions on missin method
* Format createOrUpdateReservationWithResponse
* Fix linting
* Update sdk/communication/azure-communication-phonenumbers/README.md
Co-authored-by: Daniel Ortega <[email protected]>
* Solve PR comments for refactoring createOrUpdateReservation
---------
Co-authored-by: Daniel Ortega <[email protected]>
Copy file name to clipboardExpand all lines: sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@
4
4
5
5
### Features Added
6
6
7
+
- Adds support for the Browse Available Phone Numbers and Reservations APIs
8
+
- This adds an alternate way to search and purchase phone numbers that allows customers to select which phone numbers they want to reserve and purchase.
9
+
- Adds support for automated purchases of phone numbers from countries requiring a Do Not Resell agreement.
10
+
- For more information, refer to: https://learn.microsoft.com/azure/communication-services/concepts/numbers/sub-eligibility-number-capability
- A deployed Communication Services resource. You can use the [Azure Portal](https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up.
14
+
-An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
15
+
-[Java Development Kit (JDK)](https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable) version 8 or above.
-A deployed Communication Services resource. You can use the [Azure Portal](https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up.
17
18
18
19
### Include the package
20
+
19
21
#### Include the BOM file
20
22
21
23
Please include the azure-sdk-bom to your project to take dependency on the General Availability (GA) version of the library. In the following snippet, replace the {bom_version_to_target} placeholder with the version number.
@@ -34,6 +36,7 @@ To learn more about the BOM, see the [AZURE SDK BOM README](https://github.com/A
34
36
</dependencies>
35
37
</dependencyManagement>
36
38
```
39
+
37
40
and then include the direct dependency in the dependencies section without the version tag.
38
41
39
42
```xml
@@ -46,11 +49,12 @@ and then include the direct dependency in the dependencies section without the v
46
49
```
47
50
48
51
#### Include direct dependency
52
+
49
53
If you want to take dependency on a particular version of the library that is not present in the BOM,
50
54
add the direct dependency to your project as follows.
@@ -70,6 +74,7 @@ The `direct routing` feature enables connecting your existing telephony infrastr
70
74
The configuration is managed using the `SipRoutingClient`, which provides methods for setting up SIP trunks and voice routing rules, in order to properly handle calls for your telephony subnet.
71
75
72
76
### Initializing Client
77
+
73
78
Clients can be initialized using the Azure Active Directory Authentication.
@@ -131,6 +136,7 @@ SipRoutingClient sipRoutingClient = new SipRoutingClientBuilder()
131
136
.httpClient(httpClient)
132
137
.buildClient();
133
138
```
139
+
134
140
Alternatively, you can provide the entire connection string using the connectionString() function of the client instead of providing the endpoint and access key.
135
141
136
142
### Phone numbers client
@@ -145,6 +151,14 @@ Phone numbers can be searched through the search creation API by providing an ar
145
151
146
152
Phone numbers can also be released using the release API.
147
153
154
+
#### Browsing and reserving phone numbers
155
+
156
+
The Browse and Reservations APIs provide an alternate way to acquire phone numbers via a shopping-cart-like experience. This is achieved by splitting the search operation, which finds and reserves numbers using a single LRO, into two separate synchronous steps, Browse and Reservation.
157
+
158
+
The browse operation retrieves a random sample of phone numbers that are available for purchase for a given country, with optional filtering criteria to narrow down results. The returned phone numbers are not reserved for any customer.
159
+
160
+
Reservations represent a collection of phone numbers that are locked by a specific customer and are awaiting purchase. They have an expiration time of 15 minutes after the last modification or 2 hours from creation time. A reservation can include numbers from different countries, in contrast with the Search operation. Customers can Create, Retrieve, Modify (by adding and removing numbers), Delete, and Purchase reservations. Purchasing a reservation is an LRO.
161
+
148
162
### SIP routing client
149
163
150
164
Direct routing feature allows connecting customer-provided telephony infrastructure to Azure Communication Resources. In order to setup routing configuration properly, customer needs to supply the SIP trunk configuration and SIP routing rules for calls. SIP routing client provides the necessary interface for setting this configuration.
@@ -157,6 +171,7 @@ Once a route is matched, the call is routed to the first trunk in the route's tr
157
171
### PhoneNumbersClient
158
172
159
173
#### Get Purchased Phone Number
174
+
160
175
Gets the specified purchased phone number.
161
176
162
177
```java readme-sample-getPurchasedPhoneNumber
@@ -166,6 +181,7 @@ System.out.println("Phone Number Country Code: " + phoneNumber.getCountryCode())
166
181
```
167
182
168
183
#### Get All Purchased Phone Numbers
184
+
169
185
Lists all the purchased phone numbers.
170
186
171
187
```java readme-sample-listPhoneNumbers
@@ -175,11 +191,36 @@ System.out.println("Phone Number Value: " + phoneNumber.getPhoneNumber());
175
191
System.out.println("Phone Number Country Code: "+ phoneNumber.getCountryCode());
176
192
```
177
193
194
+
### Browse and reserve available phone numbers
195
+
196
+
Use the Browse and Reservations API to reserve a phone number
The Phone Number Client supports a variety of long-running operations that allow indefinite polling time to the functions listed down below.
181
221
182
222
#### Search for Available Phone Numbers
223
+
183
224
Search for available phone numbers by providing the area code, assignment type, phone number capabilities, phone number type, and quantity. The result of the search can then be used to purchase the numbers. Note that for the toll-free phone number type, providing the area code is optional.
184
225
185
226
```java readme-sample-searchAvailablePhoneNumbers
@@ -204,6 +245,7 @@ if (LongRunningOperationStatus.SUCCESSFULLY_COMPLETED == response.getStatus()) {
204
245
```
205
246
206
247
#### Purchase Phone Numbers
248
+
207
249
The result of searching for phone numbers is a `PhoneNumberSearchResult`. This can be used to get the numbers' details and purchase numbers by passing in the `searchId` to the purchase number API.
@@ -311,7 +366,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
311
366
312
367
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [[email protected]][coc_contact] with any additional questions or comments.
313
368
314
-
315
369
## Troubleshooting
316
370
317
371
In progress.
@@ -321,6 +375,7 @@ In progress.
321
375
Check out other client libraries for Azure communication service
0 commit comments