diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d83854..f81915b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [5.11.0](https://github.com/plivo/plivo-java/tree/v5.11.0) (2022-05-05) +**Feature - List all recordings** +- `fromNumber` and `toNumber` added to filtering param [List all recordings](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) +- `recordMinMemberCount` param added in [Add a participant to a multiparty call using API](https://www.plivo.com/docs/voice/api/multiparty-call/participants#add-a-participant) + ## [5.10.0](https://github.com/plivo/plivo-java/tree/v5.10.0) (2022-03-25) **Feature - DialElement** - `confirmTimeout` parameter added to [The Dial element](https://www.plivo.com/docs/voice/xml/dial/) diff --git a/README.md b/README.md index e4b2bc39..9ba1a697 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you are using Maven, use the following XML to include the Plivo SDK as a depe com.plivo plivo-java - 5.10.0 + 5.11.0 ``` diff --git a/pom.properties b/pom.properties index b026f858..74c96996 100644 --- a/pom.properties +++ b/pom.properties @@ -1,5 +1,5 @@ # Written manually. -version=5.10.0 +version=5.11.0 groupId=com.plivo artifactId=plivo-java diff --git a/pom.xml b/pom.xml index 2833832a..c7798573 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.plivo plivo-java - 5.10.0 + 5.11.0 plivo-java A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML diff --git a/src/main/java/com/plivo/api/models/multipartycall/MultiPartyCallParticipantAdd.java b/src/main/java/com/plivo/api/models/multipartycall/MultiPartyCallParticipantAdd.java index cdb71166..5c48f2d6 100644 --- a/src/main/java/com/plivo/api/models/multipartycall/MultiPartyCallParticipantAdd.java +++ b/src/main/java/com/plivo/api/models/multipartycall/MultiPartyCallParticipantAdd.java @@ -45,6 +45,8 @@ public class MultiPartyCallParticipantAdd extends VoiceUpdater { private String subaccount; private String callUuid; + private String fromNumber; + private String toNumber; + private String conferenceName; + private String mpcName; + private String conferenceUuid; + private String mpcUuid; private PropertyFilter addTime; public String subaccount() { @@ -20,6 +26,30 @@ public String callUuid() { return this.callUuid; } + public String fromNumber() { + return this.fromNumber; + } + + public String toNumber() { + return this.toNumber; + } + + public String conferenceName() { + return this.conferenceName; + } + + public String mpcName() { + return this.mpcName; + } + + public String conferenceUuid() { + return this.conferenceUuid; + } + + public String mpcUuid() { + return this.mpcUuid; + } + public PropertyFilter addTime() { return this.addTime; } @@ -33,6 +63,54 @@ public RecordingLister subaccount(final String subaccount) { return this; } + /** + * @param fromNumber Used to filter recordings for a specific fromNumber. + */ + public RecordingLister fromNumber(final String fromNumber) { + this.fromNumber = fromNumber; + return this; + } + + /** + * @param toNumber Used to filter recordings for a specific toNumber. + */ + public RecordingLister toNumber(final String toNumber) { + this.toNumber = toNumber; + return this; + } + + /** + * @param conferenceName Used to filter recordings for a specific conferenceName. + */ + public RecordingLister conferenceName(final String conferenceName) { + this.conferenceName = conferenceName; + return this; + } + + /** + * @param mpcName Used to filter recordings for a specific mpcName. + */ + public RecordingLister mpcName(final String mpcName) { + this.mpcName = mpcName; + return this; + } + + /** + * @param conferenceUuid Used to filter recordings for a specific conferenceUuid. + */ + public RecordingLister conferenceUuid(final String conferenceUuid) { + this.conferenceUuid = conferenceUuid; + return this; + } + + /** + * @param mpcUuid Used to filter recordings for a specific mpcUuid. + */ + public RecordingLister mpcUuid(final String mpcUuid) { + this.mpcUuid = mpcUuid; + return this; + } + /** * @param callUuid Used to filter recordings for a specific call. */ diff --git a/src/main/java/com/plivo/api/xml/MultiPartyCall.java b/src/main/java/com/plivo/api/xml/MultiPartyCall.java index afd29661..40148a12 100644 --- a/src/main/java/com/plivo/api/xml/MultiPartyCall.java +++ b/src/main/java/com/plivo/api/xml/MultiPartyCall.java @@ -28,6 +28,10 @@ public class MultiPartyCall extends PlivoXml implements ResponseNestable { @InRange(message = "must be in range [2-10]", min = 2, max = 10) private Integer maxParticipants = 10; + @XmlAttribute + @InRange(message = "must be in range [1-2]", min = 1, max = 2) + private Integer recordMinMemberCount = 1; + @XmlAttribute @UrlValues private String waitMusicUrl; @@ -173,6 +177,10 @@ public Integer maxParticipants() { return maxParticipants; } + public Integer recordMinMemberCount() { + return recordMinMemberCount; + } + public String waitMusicUrl() { return waitMusicUrl; } @@ -312,6 +320,11 @@ public MultiPartyCall maxParticipants(Integer maxParticipants) { return this; } + public MultiPartyCall recordMinMemberCount(Integer recordMinMemberCount) { + this.recordMinMemberCount = recordMinMemberCount; + return this; + } + public MultiPartyCall waitMusicUrl(String waitMusicUrl) { this.waitMusicUrl = waitMusicUrl; return this; diff --git a/src/main/java/com/plivo/examples/multipartycall/AddParticipant.java b/src/main/java/com/plivo/examples/multipartycall/AddParticipant.java index 670a6182..4794568e 100644 --- a/src/main/java/com/plivo/examples/multipartycall/AddParticipant.java +++ b/src/main/java/com/plivo/examples/multipartycall/AddParticipant.java @@ -27,7 +27,7 @@ private static void startNewMPCWithCustomer(String fromNumber, String toNumber) MultiPartyCallParticipantAddResponse resp = MultiPartyCall.addParticipant(MultiPartyCallUtils.friendlyName("myMPC"), MultiPartyCallUtils.customer, fromNumber, Collections.singletonList(toNumber)). - startMpcOnEnter(false).endMpcOnExit(true).maxDuration(1500).maxParticipants(7).record(true).update(); + startMpcOnEnter(false).endMpcOnExit(true).maxDuration(1500).maxParticipants(7).record(true).recordMinMemberCount(1).update(); System.out.println(resp.getMessage()); System.out.printf("from number matches: %s", resp.getCalls().get(0).getFrom().equals(fromNumber)); diff --git a/src/main/resources/com/plivo/api/version.txt b/src/main/resources/com/plivo/api/version.txt index 509b0b61..c68d476c 100644 --- a/src/main/resources/com/plivo/api/version.txt +++ b/src/main/resources/com/plivo/api/version.txt @@ -1 +1 @@ -5.10.0 +5.11.0 diff --git a/src/test/java/com/plivo/api/MPCTest.java b/src/test/java/com/plivo/api/MPCTest.java index c4aeed13..975e0b5b 100644 --- a/src/test/java/com/plivo/api/MPCTest.java +++ b/src/test/java/com/plivo/api/MPCTest.java @@ -80,6 +80,7 @@ public void addParticipant() throws Exception { put("delay_dial", 0); put("max_duration", 20000); put("max_participants", 10); + put("record_min_member_count", 1); put("wait_music_method", "GET"); put("agent_hold_music_method", "GET"); put("customer_hold_music_method", "GET"); diff --git a/src/test/resources/com/plivo/api/recordingGetResponse.json b/src/test/resources/com/plivo/api/recordingGetResponse.json index 49f728d1..980e4e9f 100644 --- a/src/test/resources/com/plivo/api/recordingGetResponse.json +++ b/src/test/resources/com/plivo/api/recordingGetResponse.json @@ -10,5 +10,7 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/", + "from_number": "+919999323467", + "to_number": "+919891865130" } \ No newline at end of file diff --git a/src/test/resources/com/plivo/api/recordingListResponse.json b/src/test/resources/com/plivo/api/recordingListResponse.json index 8f843c33..0da01418 100644 --- a/src/test/resources/com/plivo/api/recordingListResponse.json +++ b/src/test/resources/com/plivo/api/recordingListResponse.json @@ -19,7 +19,9 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/", + "from_number": "+919999323467", + "to_number": "+919891865130" }, { "add_time": "2014-08-05 16:05:21.993853+05:30", @@ -32,7 +34,9 @@ "recording_start_ms": "1407234829553.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/", + "from_number": "+919999323467", + "to_number": "+919891865130" }, { "add_time": "2014-08-05 15:51:56.582492+05:30", @@ -45,7 +49,9 @@ "recording_start_ms": "1407234081443.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/3e701c9e-1c8a-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/", + "from_number": "+919999323467", + "to_number": "+919891865130" } ] } \ No newline at end of file