Coder Social home page Coder Social logo

bboxapi-voicemail's Introduction

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

bboxapi-voicemail's People

Contributors

bertrandmartel avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.