Moho is an open source Java framework for developing multi-channel communications applications. Today, building communications apps in Java requires that you write to several different standards and cobble together multiple technologies. Moho unifies real time communications under a single API, allowing developers to write better applications faster, with less code. Moho’s unified API for connecting to communications standards is shipping today with drivers for SIP Servlets and Media Control (JSR 289 and JSR 309) allowing developers to rapidly build SIP applications. The platform supports the creation of drivers for other protocols like XMPP, Jingle, SNMP, and other voice, IM, and SMS standards.
Moho runs on any application server that supports SIP servlets, including Voxeo Prism, Sailfin, and Mobicents. It features an asynchronous programming model and comes with many commonly-needed concepts for telephony applications built in, including conferencing, muting, answering machine detection, transcoding, and call queues.
Building an IVR system can be as simple as answering the call and playing a prompt.
MediaService media; ApplicationContext context; CallableEndpoint salesEndpoint; @State public void start(final InviteEvent invite) throws Exception { final Call call = invite.acceptCall(this); call.join().get(); call.setApplicationState("main menu"); media = call.getMediaService(false); salesEndpoint = (CallableEndpoint) context.getEndpoint("tel:18005551212"); media.prompt("Press 1 for sales or 2 for support", "1,2", 0); } @State("main menu") public void mainMenu(final InputCompleteEvent event) { switch (event.getCause()) { case MATCH: final Call call = (call) event.getSource(); if (event.getConcept().equals("1")) { call.setApplicationState("sales"); media.prompt("Who would you like to speak with?", SALES_GUYS, 0); } else { call.setApplicationState("support"); final Call outgoingCall = salesEndpoint.call(null, null, this); call.join( outgoingCall, JoinType.DIRECT, Joinable.Direction.DUPLEX ); } break; } }
The repository also includes a series of Moho code samples.
Moho projects are built using Maven. To build it, simply follow these steps:
- Verify that Maven has been installed in your box. you can do this by running the command
mvn --version
in a terminal. - If Maven has been installed, it should print out your installed version of Maven. If not, please install Maven first, refer to Maven site.
- Now you can run Maven to build Moho projects. Run
mvn package
to build the project and package the jars.
Moho is designed to run on any platform that supports JSR 289 and JSR 309. Voxeo Prism is recommended and has Moho included by default.
To run Moho applications on Voxeo Prism, simply deploy any Moho application package to Prism’s app directory. Please note that unless you deploy a custom application router to Voxeo Prism, only one Moho application can be deployed and run at any time.
Moho is released under Apache 2 license. Please refer to Apache 2.0 License for details.
Voxeo unlocks communications. We loathe the locks that make voice, SMS, instant messaging, Twitter, web chat, and mobile web unified communication and self-service applications difficult to create, manage, analyze, optimize and afford. Every day we work to unlock the neglected value of these communications solutions with open standards, disruptive innovation and a passion for problem solving—fueled by a company-wide obsession with customer success. We do so for more than 100,000 developers, 45,000 companies and half of the Fortune 100 from our headquarters in Orlando, Beijing, Cologne, and London.
Visit us or join our conversations on the web at blogs.voxeo.com or on Twitter @voxeo.