bboxapi-voicemail

Experimental Java/Android client library for unofficial Bbox VoiceMail API

License

License

GroupId

GroupId

fr.bmartel
ArtifactId

ArtifactId

bboxapi-voicemail
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

bboxapi-voicemail
Experimental Java/Android client library for unofficial Bbox VoiceMail API
Project URL

Project URL

https://github.com/bertrandmartel/bboxapi-voicemail
Source Code Management

Source Code Management

https://github.com/bertrandmartel/bboxapi-voicemail

Download bboxapi-voicemail

How to add to project

<!-- https://jarcasting.com/artifacts/fr.bmartel/bboxapi-voicemail/ -->
<dependency>
    <groupId>fr.bmartel</groupId>
    <artifactId>bboxapi-voicemail</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/fr.bmartel/bboxapi-voicemail/
implementation 'fr.bmartel:bboxapi-voicemail:1.0.0'
// https://jarcasting.com/artifacts/fr.bmartel/bboxapi-voicemail/
implementation ("fr.bmartel:bboxapi-voicemail:1.0.0")
'fr.bmartel:bboxapi-voicemail:jar:1.0.0'
<dependency org="fr.bmartel" name="bboxapi-voicemail" rev="1.0.0">
  <artifact name="bboxapi-voicemail" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.bmartel', module='bboxapi-voicemail', version='1.0.0')
)
libraryDependencies += "fr.bmartel" % "bboxapi-voicemail" % "1.0.0"
[fr.bmartel/bboxapi-voicemail "1.0.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.httpcomponents : httpmime jar 4.3
org.apache.httpcomponents : httpclient jar 4.5.3
org.jsoup : jsoup jar 1.10.3

Project Modules

There are no modules declared in this project.

Bbox Voicemail API

Build Status Download Maven Central Javadoc License

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.

API List

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("[email protected]", "password");

This will only work with your @bbox account (no such service for mobile)

Include into your project

  • with Gradle, from JCenter or MavenCentral :
compile 'fr.bmartel:bboxapi-voicemail:1.0.0'

Usage

Get welcome message

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");

Upload welcome message

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);

Set dual call state

api.setDualCallState(DualCallState.ENABLE);

Set incognito mode

api.setIncognitoMode(IncognitoState.DISABLE);

Set SMS notification

enable SMS notification to specified phone number on new voicemail and on missed call :

api.setVoiceMailSMS(NotificationState.ENABLE, NotificationState.ENABLE, "0123456789");

Set voicemail state

enable/disable voicemail and set the ring number (default 5)

api.setVoiceMailState(VoiceMailState.ENABLE, 5);

Set welcome message state

enable/disable welcome message :

api.setWelcomeMessageState(WelcomeMessageState.ENABLE);

Other APIs

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

Get voicemail list

VoiceMailResponse voiceMailResponse = api.getVoiceMailList();

if (voiceMailResponse.getStatus() == HttpStatus.OK) {

    List<VoiceMail> voiceMailList = voiceMailResponse.getVoiceMailList();
}

Delete voicemail

api.deleteVoiceMail("1234567");

Get user info

api.getCustomerInfo();

Forward call

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");

Android integration

  • add bboxapi-voicemail & httpcomponents lib depedency to build.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.** { *; }

External Library

License

The MIT License (MIT) Copyright (c) 2017 Bertrand Martel

Versions

Version
1.0.0