Experimental Java/Android client library for unofficial Bbox VoiceMail API
Most of these API are using web scraping. Page content may change in the future so it can be deprecated at any time. Create an issue if you notice something broken.
description | api |
---|---|
get welcome message | getWelcomeMessage(int id, String fileDest) |
upload welcome message | uploadWelcomeMessage(String filePath, int messageId, int selectedId) |
set dual call state | setDualCallState(DualCallState state) |
set incognito mode | setIncognitoMode(IncognitoState state) |
set SMS notification | setVoiceMailSMS(NotifState voiceMail, NotifState missedCall, String number) |
set voiceMail state | setVoiceMailState(VoiceMailState state, int ringNumber) |
set welcome message state | setWelcomeMessageState(WelcomeMessageState state) |
Note: If you need to list voicemail, read voicemail, get voicemail URL, forward call, use official Bbox Router API with Java/Android client for Bbox Router API
All APIs need authentication via :
VoiceMailApi api = new VoiceMailApi();
api.login("username@bbox.fr", "password");
This will only work with your @bbox
account (no such service for mobile)
- with Gradle, from JCenter or MavenCentral :
compile 'fr.bmartel:bboxapi-voicemail:1.0.0'
This will store the welcome message to a local file. The following will store the welcome message with id 1 under /home/user/message.wav
:
api.getWelcomeMessage(1, "/home/user/message.wav");
The following will upload /home/user/message2.mp3
as the welcome message with id 2 and select the welcome message with id 2 :
api.uploadWelcomeMessage("/home/user/message2.mp3", 2, 2);
api.setDualCallState(DualCallState.ENABLE);
api.setIncognitoMode(IncognitoState.DISABLE);
enable SMS notification to specified phone number on new voicemail and on missed call :
api.setVoiceMailSMS(NotificationState.ENABLE, NotificationState.ENABLE, "0123456789");
enable/disable voicemail and set the ring number (default 5)
api.setVoiceMailState(VoiceMailState.ENABLE, 5);
enable/disable welcome message :
api.setWelcomeMessageState(WelcomeMessageState.ENABLE);
For reference, the following API are implemented :
description | api |
---|---|
get voicemail list | getVoiceMailList() |
delete voicemail | deleteVoiceMail(int id) |
get user info | getCustomerInfo() |
forward call | setCallForwarding(CallForwardType type, String phoneNumber) |
Don't use these API above, use official Bbox Router API instead with Java/Android client for Bbox Router API
VoiceMailResponse voiceMailResponse = api.getVoiceMailList();
if (voiceMailResponse.getStatus() == HttpStatus.OK) {
List<VoiceMail> voiceMailList = voiceMailResponse.getVoiceMailList();
}
api.deleteVoiceMail("1234567");
api.getCustomerInfo();
disable forward call
api.setCallForwarding(CallForwardType.DISABLE, "");
forward all call to voicemail :
api.setCallForwarding(CallForwardType.ALL_TO_VOICEMAIL, "");
forward all call to phone number :
api.setCallForwarding(CallForwardType.ALL_TO_NUMBER, "0123456789");
forward unanswered call to phone number :
api.setCallForwarding(CallForwardType.UNANSWERED_CALL_TO_NUMBER, "0123456789");
forward call to phone number when line is occupied :
api.setCallForwarding(CallForwardType.LINE_OCCUPIED_TO_NUMBER, "0123456789");
forward call to pĥone number when line is unavailable :
api.setCallForwarding(CallForwardType.LINE_UNAVAILABLE_TO_NUMBER, "0123456789");
- add
bboxapi-voicemail
&httpcomponents
lib depedency tobuild.gradle
:
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
compile 'fr.bmartel:bboxapi-voicemail:1.0.0'
- add Internet permission to manifest :
<uses-permission android:name="android.permission.INTERNET" />
- proguard config (keep model & response packages) :
-keep class fr.bmartel.bboxapi.voicemail.model.** { *; }
-keep class fr.bmartel.bboxapi.voicemail.response.** { *; }
The MIT License (MIT) Copyright (c) 2017 Bertrand Martel