Skip to content

Commit 35facb3

Browse files
Release/azure communication phone numbers 1.4.0 (#46308)
1 parent 6421926 commit 35facb3

File tree

17 files changed

+482
-92
lines changed

17 files changed

+482
-92
lines changed

eng/versioning/version_client.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ com.azure:azure-communication-email;1.0.24;1.1.0-beta.2
7979
com.azure:azure-communication-identity;1.6.7;1.7.0-beta.1
8080
com.azure:azure-communication-jobrouter;1.1.15;2.0.0-beta.1
8181
com.azure:azure-communication-messages;1.1.6;1.2.0-beta.2
82-
com.azure:azure-communication-phonenumbers;1.3.2;1.4.0-beta.1
82+
com.azure:azure-communication-phonenumbers;1.3.2;1.4.0
8383
com.azure:azure-communication-rooms;1.2.3;1.3.0-beta.1
8484
com.azure:azure-communication-sms;1.1.35;1.2.0-beta.1
8585
com.azure:azure-compute-batch;1.0.0-beta.4;1.0.0-beta.5

sdk/communication/azure-communication-phonenumbers/CHANGELOG.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Release History
22

3-
## 1.4.0-beta.1 (Unreleased)
3+
## 1.4.0 (unreleased)
44

55
### Features Added
6+
- GA release of mobile number type
67

7-
### Breaking Changes
8-
9-
### Bugs Fixed
8+
## 1.4.0-beta.1 (2025-07-22)
109

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

1315
## 1.3.2 (2025-08-21)
1416

@@ -30,7 +32,6 @@
3032
- Upgraded `azure-core-http-netty` from `1.15.12` to version `1.15.13`.
3133
- Upgraded `azure-core` from `1.55.4` to version `1.55.5`.
3234

33-
3435
## 1.3.0 (2025-06-20)
3536

3637
### Features Added
@@ -68,7 +69,6 @@
6869
- Upgraded `azure-core` from `1.55.2` to version `1.55.3`.
6970
- Upgraded `azure-core-http-netty` from `1.15.10` to version `1.15.11`.
7071

71-
7272
## 1.2.1 (2025-03-03)
7373

7474
### Other Changes
@@ -78,7 +78,6 @@
7878
- Upgraded `azure-core-http-netty` from `1.15.8` to version `1.15.10`.
7979
- Upgraded `azure-core` from `1.55.0` to version `1.55.2`.
8080

81-
8281
## 1.2.0 (2025-02-11)
8382

8483
### Other Changes
@@ -604,5 +603,3 @@ PhoneNumbersAsyncClient.getPurchasedPhoneNumberWithResponse and PhoneNumbersClie
604603
### Breaking Changes
605604
- 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].
606605
- 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].
607-
608-

sdk/communication/azure-communication-phonenumbers/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ add the direct dependency to your project as follows.
5959
<dependency>
6060
<groupId>com.azure</groupId>
6161
<artifactId>azure-communication-phonenumbers</artifactId>
62-
<version>1.3.0</version>
62+
<version>1.4.0</version>
6363
</dependency>
6464
```
6565

6666
## Key concepts
6767

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

70-
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.
70+
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.
7171
They are managed using the `PhoneNumbersClient`
7272

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

144144
#### Phone Number Types overview
145145

146-
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.
146+
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.
147+
148+
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.
147149

148150
#### Searching and Purchasing and Releasing numbers
149151

sdk/communication/azure-communication-phonenumbers/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/communication/azure-communication-phonenumbers",
5-
"Tag": "java/communication/azure-communication-phonenumbers_ac7d2e0f8b"
5+
"Tag": "java/communication/azure-communication-phonenumbers_04c7cd3d26"
66
}

sdk/communication/azure-communication-phonenumbers/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<groupId>com.azure</groupId>
1717
<artifactId>azure-communication-phonenumbers</artifactId>
1818
<packaging>jar</packaging>
19-
<version>1.4.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-phonenumbers;current} -->
19+
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-communication-phonenumbers;current} -->
2020

2121
<name>Microsoft Azure client phone numbers library for communication</name>
2222
<description>

sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,31 @@ public PagedFlux<PhoneNumberCountry> listAvailableCountries() {
827827
@ServiceMethod(returns = ReturnType.COLLECTION)
828828
public PagedFlux<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision) {
829829
try {
830-
return client.listAvailableLocalitiesAsync(countryCode, null, null, administrativeDivision, acceptLanguage);
830+
return client.listAvailableLocalitiesAsync(countryCode, null, null, administrativeDivision, acceptLanguage,
831+
null);
832+
} catch (RuntimeException ex) {
833+
return new PagedFlux<>(() -> monoError(logger, ex));
834+
}
835+
}
836+
837+
/**
838+
* Gets the list of the available localities. I.e. cities, towns.
839+
*
840+
* @param countryCode The ISO 3166-2 country code.
841+
* @param administrativeDivision An optional parameter. The name or short name
842+
* of the state/province within which to list the
843+
* localities.
844+
* @param phoneNumberType {@link PhoneNumberType} Optional parameter. Restrict the
845+
* localities to the phone number type.
846+
* @return A {@link PagedFlux} of {@link PhoneNumberLocality} instances
847+
* representing available localities with phone numbers.
848+
*/
849+
@ServiceMethod(returns = ReturnType.COLLECTION)
850+
public PagedFlux<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
851+
PhoneNumberType phoneNumberType) {
852+
try {
853+
return client.listAvailableLocalitiesAsync(countryCode, null, null, administrativeDivision, acceptLanguage,
854+
phoneNumberType);
831855
} catch (RuntimeException ex) {
832856
return new PagedFlux<>(() -> monoError(logger, ex));
833857
}
@@ -879,6 +903,29 @@ public PagedFlux<PhoneNumberAreaCode> listAvailableGeographicAreaCodes(String co
879903
}
880904
}
881905

906+
/**
907+
* Gets the list of the available Mobile area codes for a given country and
908+
* locality.
909+
*
910+
* @param countryCode The ISO 3166-2 country code.
911+
* @param assignmentType {@link PhoneNumberAssignmentType} The phone
912+
* number assignment type.
913+
* @param locality The name of the locality (e.g. city or town
914+
* name) in which to fetch area codes.
915+
* @return A {@link PagedFlux} of {@link PhoneNumberAreaCode} instances
916+
* representing purchased telephone numbers.
917+
*/
918+
@ServiceMethod(returns = ReturnType.COLLECTION)
919+
public PagedFlux<PhoneNumberAreaCode> listAvailableMobileAreaCodes(String countryCode,
920+
PhoneNumberAssignmentType assignmentType, String locality) {
921+
try {
922+
return client.listAreaCodesAsync(countryCode, PhoneNumberType.MOBILE, null, null, assignmentType, locality,
923+
null, acceptLanguage);
924+
} catch (RuntimeException ex) {
925+
return new PagedFlux<>(() -> monoError(logger, ex));
926+
}
927+
}
928+
882929
/**
883930
* Gets the list of the available phone number offerings for the given country.
884931
*

sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ public PagedIterable<PhoneNumberCountry> listAvailableCountries(Context context)
806806
@ServiceMethod(returns = ReturnType.COLLECTION)
807807
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode,
808808
String administrativeDivision) {
809-
return this.listAvailableLocalities(countryCode, administrativeDivision, null);
809+
return this.listAvailableLocalities(countryCode, administrativeDivision, null, null);
810810
}
811811

812812
/**
@@ -825,7 +825,49 @@ public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String country
825825
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
826826
Context context) {
827827
context = context == null ? Context.NONE : context;
828-
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage, context);
828+
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage, null,
829+
context);
830+
}
831+
832+
/**
833+
* Gets the list of the available localities. I.e. cities, towns.
834+
*
835+
* @param countryCode The ISO 3166-2 country code.
836+
* @param administrativeDivision An optional parameter. The name or short name
837+
* of the state/province within which to list the
838+
* localities.
839+
* @param phoneNumberType {@link PhoneNumberType} Optional parameter. Restrict
840+
* the localities to the phone number type.
841+
* @return A {@link PagedIterable} of {@link PhoneNumberLocality} instances
842+
* representing available localities with phone numbers.
843+
*/
844+
@ServiceMethod(returns = ReturnType.COLLECTION)
845+
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
846+
PhoneNumberType phoneNumberType) {
847+
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage,
848+
phoneNumberType, Context.NONE);
849+
}
850+
851+
/**
852+
* Gets the list of the available localities. I.e. cities, towns.
853+
*
854+
* @param countryCode The ISO 3166-2 country code.
855+
* @param administrativeDivision An optional parameter. The name or short name
856+
* of the state/province within which to list the
857+
* localities.
858+
* @param phoneNumberType {@link PhoneNumberType} Optional parameter. Restrict
859+
* the localities to the phone number type.
860+
* @param context A {@link Context} representing the request
861+
* context.
862+
* @return A {@link PagedIterable} of {@link PhoneNumberLocality} instances
863+
* representing available localities with phone numbers.
864+
*/
865+
@ServiceMethod(returns = ReturnType.COLLECTION)
866+
public PagedIterable<PhoneNumberLocality> listAvailableLocalities(String countryCode, String administrativeDivision,
867+
PhoneNumberType phoneNumberType, Context context) {
868+
context = context == null ? Context.NONE : context;
869+
return client.listAvailableLocalities(countryCode, null, null, administrativeDivision, acceptLanguage,
870+
phoneNumberType, context);
829871
}
830872

831873
/**
@@ -876,6 +918,46 @@ public PagedIterable<PhoneNumberAreaCode> listAvailableGeographicAreaCodes(Strin
876918
null);
877919
}
878920

921+
/**
922+
* Gets the list of the available Mobile area codes for a given country and
923+
* locality.
924+
*
925+
* @param countryCode The ISO 3166-2 country code.
926+
* @param assignmentType {@link PhoneNumberAssignmentType} The phone
927+
* number assignment type.
928+
* @param locality The name of the locality (e.g. city or town
929+
* name) in which to fetch area codes.
930+
* @param context A {@link Context} representing the request
931+
* context.
932+
* @return A {@link PagedIterable} of {@link PhoneNumberAreaCode} instances
933+
* representing purchased telephone numbers.
934+
*/
935+
@ServiceMethod(returns = ReturnType.COLLECTION)
936+
public PagedIterable<PhoneNumberAreaCode> listAvailableMobileAreaCodes(String countryCode,
937+
PhoneNumberAssignmentType assignmentType, String locality, Context context) {
938+
context = context == null ? Context.NONE : context;
939+
return client.listAreaCodes(countryCode, PhoneNumberType.MOBILE, null, null, assignmentType, locality, null,
940+
acceptLanguage, context);
941+
}
942+
943+
/**
944+
* Gets the list of the available Mobile area codes for a given country and
945+
* locality.
946+
*
947+
* @param countryCode The ISO 3166-2 country code.
948+
* @param assignmentType {@link PhoneNumberAssignmentType} The phone
949+
* number assignment type.
950+
* @param locality The name of the locality (e.g. city or town
951+
* name) in which to fetch area codes.
952+
* @return A {@link PagedIterable} of {@link PhoneNumberAreaCode} instances
953+
* representing purchased telephone numbers.
954+
*/
955+
@ServiceMethod(returns = ReturnType.COLLECTION)
956+
public PagedIterable<PhoneNumberAreaCode> listAvailableMobileAreaCodes(String countryCode,
957+
PhoneNumberAssignmentType assignmentType, String locality) {
958+
return this.listAvailableMobileAreaCodes(countryCode, assignmentType, locality, null);
959+
}
960+
879961
/**
880962
* Gets the list of the available Geographic area codes for a given country and
881963
* locality.

sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersServiceVersion.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ public enum PhoneNumbersServiceVersion implements ServiceVersion {
2222
/**
2323
* Cherry Picker GA {@code 2025-04-01}
2424
*/
25-
V2025_04_01("2025-04-01");
25+
V2025_04_01("2025-04-01"),
26+
27+
/**
28+
* Mobile Numbers GA {@code 2025-06-01}
29+
*/
30+
V2025_06_01("2025-06-01");
2631

2732
private final String version;
2833

@@ -47,6 +52,6 @@ public String getVersion() {
4752
*/
4853
public static PhoneNumbersServiceVersion getLatest() {
4954

50-
return V2025_04_01;
55+
return V2025_06_01;
5156
}
5257
}

sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumberAdminClientImplBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public PhoneNumberAdminClientImplBuilder retryPolicy(RetryPolicy retryPolicy) {
253253
public PhoneNumberAdminClientImpl buildClient() {
254254
this.validateClient();
255255
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
256-
String localApiVersion = (apiVersion != null) ? apiVersion : "2025-04-01";
256+
String localApiVersion = (apiVersion != null) ? apiVersion : "2025-06-01";
257257
SerializerAdapter localSerializerAdapter
258258
= (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter();
259259
PhoneNumberAdminClientImpl client

0 commit comments

Comments
 (0)