-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #856 from drocek/feature/CF-569_allowed_to_create_…
…voice_call_provider_as_extension CF-569: Allowed to create voice call provider as extension
- Loading branch information
Showing
8 changed files
with
182 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
.../generalbytes/batm/server/extensions/communication/voicecall/IVoiceCallErrorResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/************************************************************************************* | ||
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved. | ||
* | ||
* This software may be distributed and modified under the terms of the GNU | ||
* General Public License version 2 (GPL2) as published by the Free Software | ||
* Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
* this file. Please note that GPL2 Section 2[b] requires that all works based | ||
* on this software must also be made publicly available under the terms of | ||
* the GPL2 ("Copyleft"). | ||
* | ||
* Contact information | ||
* ------------------- | ||
* | ||
* GENERAL BYTES s.r.o. | ||
* Web : http://www.generalbytes.com | ||
* | ||
************************************************************************************/ | ||
|
||
package com.generalbytes.batm.server.extensions.communication.voicecall; | ||
|
||
public interface IVoiceCallErrorResponse { | ||
|
||
/** | ||
* Error message. | ||
*/ | ||
String getErrorMessage(); | ||
|
||
/** | ||
* Making of voice call failed due the number is on black list. | ||
*/ | ||
boolean isBlacklisted(); | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...a/com/generalbytes/batm/server/extensions/communication/voicecall/IVoiceCallProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/************************************************************************************* | ||
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved. | ||
* | ||
* This software may be distributed and modified under the terms of the GNU | ||
* General Public License version 2 (GPL2) as published by the Free Software | ||
* Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
* this file. Please note that GPL2 Section 2[b] requires that all works based | ||
* on this software must also be made publicly available under the terms of | ||
* the GPL2 ("Copyleft"). | ||
* | ||
* Contact information | ||
* ------------------- | ||
* | ||
* GENERAL BYTES s.r.o. | ||
* Web : http://www.generalbytes.com | ||
* | ||
************************************************************************************/ | ||
|
||
package com.generalbytes.batm.server.extensions.communication.voicecall; | ||
|
||
/** | ||
* Provider for making voice call. | ||
*/ | ||
public interface IVoiceCallProvider { | ||
|
||
/** | ||
* Name of the voice call provider. | ||
*/ | ||
String getName(); | ||
|
||
/** | ||
* Make the voice call. | ||
* | ||
* @param credentials Credentials. | ||
* @param phoneNumber Phone number. | ||
* @param message Message. | ||
* @param messageType Type of message. | ||
* @param language Language in ISO 639-1 standard used at terminal. | ||
* @return {@link IVoiceCallResponse} | ||
*/ | ||
IVoiceCallResponse makeVoiceCall(String credentials, String phoneNumber, String message, MessageType messageType, String language); | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...a/com/generalbytes/batm/server/extensions/communication/voicecall/IVoiceCallResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/************************************************************************************* | ||
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved. | ||
* | ||
* This software may be distributed and modified under the terms of the GNU | ||
* General Public License version 2 (GPL2) as published by the Free Software | ||
* Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
* this file. Please note that GPL2 Section 2[b] requires that all works based | ||
* on this software must also be made publicly available under the terms of | ||
* the GPL2 ("Copyleft"). | ||
* | ||
* Contact information | ||
* ------------------- | ||
* | ||
* GENERAL BYTES s.r.o. | ||
* Web : http://www.generalbytes.com | ||
* | ||
************************************************************************************/ | ||
|
||
package com.generalbytes.batm.server.extensions.communication.voicecall; | ||
|
||
public interface IVoiceCallResponse { | ||
|
||
enum ResponseStatus { | ||
OK, | ||
ERROR | ||
} | ||
|
||
/** | ||
* ID of voice call. | ||
*/ | ||
String getSid(); | ||
|
||
/** | ||
* Response status [OK, ERROR]. | ||
*/ | ||
ResponseStatus getStatus(); | ||
|
||
/** | ||
* Error information. | ||
*/ | ||
IVoiceCallErrorResponse getErrorResponse(); | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...ain/java/com/generalbytes/batm/server/extensions/communication/voicecall/MessageType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/************************************************************************************* | ||
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved. | ||
* | ||
* This software may be distributed and modified under the terms of the GNU | ||
* General Public License version 2 (GPL2) as published by the Free Software | ||
* Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
* this file. Please note that GPL2 Section 2[b] requires that all works based | ||
* on this software must also be made publicly available under the terms of | ||
* the GPL2 ("Copyleft"). | ||
* | ||
* Contact information | ||
* ------------------- | ||
* | ||
* GENERAL BYTES s.r.o. | ||
* Web : http://www.generalbytes.com | ||
* | ||
************************************************************************************/ | ||
|
||
package com.generalbytes.batm.server.extensions.communication.voicecall; | ||
|
||
public enum MessageType { | ||
MESSAGE, | ||
OTP | ||
} |