Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ac86d7c
Sofiar/beta mobile numbers (#45734)
sofiar-msft Jul 18, 2025
ce11c8d
Add date to package (#46113)
sofiar-msft Jul 22, 2025
9fee185
Merge branch 'main' into release/1.4.0-beta.1
andrewjhopkins Aug 5, 2025
915c49b
Update changelog. Set new version
andrewjhopkins Aug 5, 2025
b0cd6e7
Merge branch 'Azure:main' into release/azure-communication-phone-numb…
andrewjhopkins Aug 7, 2025
8c3dcf7
update version client
andrewjhopkins Aug 7, 2025
9a068c3
Merge branch 'release/azure-communication-phone-numbers-1.4.0' of git…
andrewjhopkins Aug 7, 2025
d55c2de
Merge branch 'main' into release/azure-communication-phone-numbers-1.4.0
andrewjhopkins Aug 7, 2025
04b7578
update version
andrewjhopkins Aug 7, 2025
0478f74
Merge branch 'release/azure-communication-phone-numbers-1.4.0' of git…
andrewjhopkins Aug 7, 2025
568c16f
update comment
andrewjhopkins Aug 8, 2025
c0ecf22
change version
andrewjhopkins Aug 8, 2025
c28a4f7
Merge branch 'main' into release/azure-communication-phone-numbers-1.4.0
andrewjhopkins Aug 8, 2025
32102d4
change version
andrewjhopkins Aug 8, 2025
6eb1280
Merge branch 'release/azure-communication-phone-numbers-1.4.0' of git…
andrewjhopkins Aug 8, 2025
3343bb3
Merge branch 'main' into release/azure-communication-phone-numbers-1.4.0
andrewjhopkins Aug 19, 2025
9780bab
Merge branch 'main' into release/azure-communication-phone-numbers-1.4.0
andrewjhopkins Aug 20, 2025
83a62cd
Merge branch 'main' into release/azure-communication-phone-numbers-1.4.0
andrewjhopkins Aug 26, 2025
fba5631
fix version
andrewjhopkins Aug 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ com.azure:azure-communication-email;1.0.23;1.1.0-beta.2
com.azure:azure-communication-identity;1.6.6;1.7.0-beta.1
com.azure:azure-communication-jobrouter;1.1.14;2.0.0-beta.1
com.azure:azure-communication-messages;1.1.5;1.2.0-beta.2
com.azure:azure-communication-phonenumbers;1.3.1;1.4.0-beta.1
com.azure:azure-communication-phonenumbers;1.3.1;1.4.0
com.azure:azure-communication-rooms;1.2.2;1.3.0-beta.1
com.azure:azure-communication-sms;1.1.34;1.2.0-beta.1
com.azure:azure-compute-batch;1.0.0-beta.4;1.0.0-beta.5
Expand Down
17 changes: 7 additions & 10 deletions sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Release History

## 1.4.0-beta.1 (Unreleased)
## 1.4.0 (unreleased)

### Features Added
- GA release of mobile number type

### Breaking Changes

### Bugs Fixed
## 1.4.0-beta.1 (2025-07-22)

### Other Changes
### Features Added
- Adds support for mobile number types
- mobile numbers are location associated phone numbers with SMS capabilities
- API version `2025-06-01` is the default.

## 1.3.1 (2025-07-29)

Expand All @@ -19,7 +21,6 @@
- Upgraded `azure-core-http-netty` from `1.15.12` to version `1.15.13`.
- Upgraded `azure-core` from `1.55.4` to version `1.55.5`.


## 1.3.0 (2025-06-20)

### Features Added
Expand Down Expand Up @@ -57,7 +58,6 @@
- Upgraded `azure-core` from `1.55.2` to version `1.55.3`.
- Upgraded `azure-core-http-netty` from `1.15.10` to version `1.15.11`.


## 1.2.1 (2025-03-03)

### Other Changes
Expand All @@ -67,7 +67,6 @@
- Upgraded `azure-core-http-netty` from `1.15.8` to version `1.15.10`.
- Upgraded `azure-core` from `1.55.0` to version `1.55.2`.


## 1.2.0 (2025-02-11)

### Other Changes
Expand Down Expand Up @@ -593,5 +592,3 @@ PhoneNumbersAsyncClient.getPurchasedPhoneNumberWithResponse and PhoneNumbersClie
### Breaking Changes
- PhoneNumberAsyncClient has been replaced with PhoneNumbersAsyncClient, which has the same functionality but different APIs. To learn more about how PhoneNumbersAsyncClient works, refer to the [README.md][https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/communication/azure-communication-phonenumbers/README.md].
- PhoneNumberClient has been replaced with PhoneNumbersClient, which has the same functionality but different APIs. To learn more about how PhoneNumbersClient works, refer to the [README.md][https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/communication/azure-communication-phonenumbers/README.md].


Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ add the direct dependency to your project as follows.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-phonenumbers</artifactId>
<version>1.3.0</version>
<version>1.4.0</version>
</dependency>
```

## Key concepts

This SDK provides functionality to easily manage `direct offer` and `direct routing` numbers.

The `direct offer` numbers come in two types: Geographic and Toll-Free. Geographic phone plans are phone plans associated with a location, whose phone numbers' area codes are associated with the area code of a geographic location. Toll-Free phone plans are phone plans not associated location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888.
The `direct offer` numbers come in three types: Geographic, Toll-Free and Mobile. Geographic and Mobile phone plans are phone plans associated with a location, whose phone numbers' area codes are associated with the area code of a geographic location. Toll-Free phone plans are phone plans not associated location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888.
They are managed using the `PhoneNumbersClient`

The `direct routing` feature enables connecting your existing telephony infrastructure to ACS.
Expand Down Expand Up @@ -143,7 +143,9 @@ Alternatively, you can provide the entire connection string using the connection

#### Phone Number Types overview

Phone numbers come in two types; Geographic and Toll-Free. Geographic phone plans are phone plans associated with a location, whose phone numbers' area codes are associated with the area code of a geographic location. Toll-Free phone plans are phone plans not associated location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888.
Phone numbers come in three types; Geographic, Toll-Free and Mobile. Toll-Free numbers are not associated with a location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888. Geographic and Mobile phone numbers are phone numbers associated with a location.

Phone number types with the same country are grouped into a phone plan group with that phone number type. For example all Toll-Free phone numbers within the same country are grouped into a phone plan group.

#### Searching and Purchasing and Releasing numbers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/communication/azure-communication-phonenumbers",
"Tag": "java/communication/azure-communication-phonenumbers_ac7d2e0f8b"
"Tag": "java/communication/azure-communication-phonenumbers_04c7cd3d26"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<groupId>com.azure</groupId>
<artifactId>azure-communication-phonenumbers</artifactId>
<packaging>jar</packaging>
<version>1.4.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-phonenumbers;current} -->
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-communication-phonenumbers;current} -->

<name>Microsoft Azure client phone numbers library for communication</name>
<description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,31 @@ public PagedFlux<PhoneNumberCountry> listAvailableCountries() {
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision) {
try {
return client.listAvailableLocalitiesAsync(countryCode, null, null, administrativeDivision, acceptLanguage);
return client.listAvailableLocalitiesAsync(countryCode, null, null, administrativeDivision, acceptLanguage,
null);
} catch (RuntimeException ex) {
return new PagedFlux<>(() -> monoError(logger, ex));
}
}

/**
* Gets the list of the available localities. I.e. cities, towns.
*
* @param countryCode The ISO 3166-2 country code.
* @param administrativeDivision An optional parameter. The name or short name
* of the state/province within which to list the
* localities.
* @param phoneNumberType {@link PhoneNumberType} Optional parameter. Restrict the
* localities to the phone number type.
* @return A {@link PagedFlux} of {@link PhoneNumberLocality} instances
* representing available localities with phone numbers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
PhoneNumberType phoneNumberType) {
try {
return client.listAvailableLocalitiesAsync(countryCode, null, null, administrativeDivision, acceptLanguage,
phoneNumberType);
} catch (RuntimeException ex) {
return new PagedFlux<>(() -> monoError(logger, ex));
}
Expand Down Expand Up @@ -879,6 +903,29 @@ public PagedFlux<PhoneNumberAreaCode> listAvailableGeographicAreaCodes(String co
}
}

/**
* Gets the list of the available Mobile area codes for a given country and
* locality.
*
* @param countryCode The ISO 3166-2 country code.
* @param assignmentType {@link PhoneNumberAssignmentType} The phone
* number assignment type.
* @param locality The name of the locality (e.g. city or town
* name) in which to fetch area codes.
* @return A {@link PagedFlux} of {@link PhoneNumberAreaCode} instances
* representing purchased telephone numbers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<PhoneNumberAreaCode> listAvailableMobileAreaCodes(String countryCode,
PhoneNumberAssignmentType assignmentType, String locality) {
try {
return client.listAreaCodesAsync(countryCode, PhoneNumberType.MOBILE, null, null, assignmentType, locality,
null, acceptLanguage);
} catch (RuntimeException ex) {
return new PagedFlux<>(() -> monoError(logger, ex));
}
}

/**
* Gets the list of the available phone number offerings for the given country.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ public PagedIterable<PhoneNumberCountry> listAvailableCountries(Context context)
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode,
String administrativeDivision) {
return this.listAvailableLocalities(countryCode, administrativeDivision, null);
return this.listAvailableLocalities(countryCode, administrativeDivision, null, null);
}

/**
Expand All @@ -825,7 +825,49 @@ public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String country
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
Context context) {
context = context == null ? Context.NONE : context;
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage, context);
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage, null,
context);
}

/**
* Gets the list of the available localities. I.e. cities, towns.
*
* @param countryCode The ISO 3166-2 country code.
* @param administrativeDivision An optional parameter. The name or short name
* of the state/province within which to list the
* localities.
* @param phoneNumberType {@link PhoneNumberType} Optional parameter. Restrict
* the localities to the phone number type.
* @return A {@link PagedIterable} of {@link PhoneNumberLocality} instances
* representing available localities with phone numbers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
PhoneNumberType phoneNumberType) {
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage,
phoneNumberType, Context.NONE);
}

/**
* Gets the list of the available localities. I.e. cities, towns.
*
* @param countryCode The ISO 3166-2 country code.
* @param administrativeDivision An optional parameter. The name or short name
* of the state/province within which to list the
* localities.
* @param phoneNumberType {@link PhoneNumberType} Optional parameter. Restrict
* the localities to the phone number type.
* @param context A {@link Context} representing the request
* context.
* @return A {@link PagedIterable} of {@link PhoneNumberLocality} instances
* representing available localities with phone numbers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
PhoneNumberType phoneNumberType, Context context) {
context = context == null ? Context.NONE : context;
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage,
phoneNumberType, context);
}

/**
Expand Down Expand Up @@ -876,6 +918,46 @@ public PagedIterable<PhoneNumberAreaCode> listAvailableGeographicAreaCodes(Strin
null);
}

/**
* Gets the list of the available Mobile area codes for a given country and
* locality.
*
* @param countryCode The ISO 3166-2 country code.
* @param assignmentType {@link PhoneNumberAssignmentType} The phone
* number assignment type.
* @param locality The name of the locality (e.g. city or town
* name) in which to fetch area codes.
* @param context A {@link Context} representing the request
* context.
* @return A {@link PagedIterable} of {@link PhoneNumberAreaCode} instances
* representing purchased telephone numbers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<PhoneNumberAreaCode> listAvailableMobileAreaCodes(String countryCode,
PhoneNumberAssignmentType assignmentType, String locality, Context context) {
context = context == null ? Context.NONE : context;
return client.listAreaCodes(countryCode, PhoneNumberType.MOBILE, null, null, assignmentType, locality, null,
acceptLanguage, context);
}

/**
* Gets the list of the available Mobile area codes for a given country and
* locality.
*
* @param countryCode The ISO 3166-2 country code.
* @param assignmentType {@link PhoneNumberAssignmentType} The phone
* number assignment type.
* @param locality The name of the locality (e.g. city or town
* name) in which to fetch area codes.
* @return A {@link PagedIterable} of {@link PhoneNumberAreaCode} instances
* representing purchased telephone numbers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<PhoneNumberAreaCode> listAvailableMobileAreaCodes(String countryCode,
PhoneNumberAssignmentType assignmentType, String locality) {
return this.listAvailableMobileAreaCodes(countryCode, assignmentType, locality, null);
}

/**
* Gets the list of the available Geographic area codes for a given country and
* locality.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public enum PhoneNumbersServiceVersion implements ServiceVersion {
/**
* Cherry Picker GA {@code 2025-04-01}
*/
V2025_04_01("2025-04-01");
V2025_04_01("2025-04-01"),

/**
* Mobile Numbers GA {@code 2025-06-01}
*/
V2025_06_01("2025-06-01");

private final String version;

Expand All @@ -47,6 +52,6 @@ public String getVersion() {
*/
public static PhoneNumbersServiceVersion getLatest() {

return V2025_04_01;
return V2025_06_01;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public PhoneNumberAdminClientImplBuilder retryPolicy(RetryPolicy retryPolicy) {
public PhoneNumberAdminClientImpl buildClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
String localApiVersion = (apiVersion != null) ? apiVersion : "2025-04-01";
String localApiVersion = (apiVersion != null) ? apiVersion : "2025-06-01";
SerializerAdapter localSerializerAdapter
= (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter();
PhoneNumberAdminClientImpl client
Expand Down
Loading