在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:asterisk-java/asterisk-java开源软件地址:https://github.com/asterisk-java/asterisk-java开源编程语言:Java 99.5%开源软件介绍:README for Asterisk-JavaINTRODUCTIONThe Asterisk-Java package consists of a set of Java classes that allow you to easily build Java applications that interact with an Asterisk PBX Server. Asterisk-Java supports both interfaces that Asterisk provides for this scenario: The FastAGI protocol and the Manager API. You can find the Java docs for the lastest version here: JavaDoc FastAGIFastAGI lets you create a service that manages a call in a similar way to what a webserver handles a http request. FastAGI can be (and should be) used to replace dialplan. FastAGI is thousands of times faster than dialplan, easier to debug and lets you do call control in a language that you are familiar with. The FastAGI implementation supports all commands currently available from Asterisk. Manager APIThe Manager API implementation supports receiving events from the Asterisk server (e.g. call progess, registered peers, channel state) and sending actions to Asterisk (e.g. originate call, agent login/logoff, start/stop voice recording). If you like, the Manager API allows you start and manipulate calls. A complete list of the available events and actions is available in the javadocs. ActivitiesActivities are new to asterisk-java 2.0. The aim of Activities is to provide a high level interface to interactions with Asterisk. Whist Activities use both FastAGI and the Manager API you would normally consider Activities as a replacement for the Manager API. Activities provide a simple and consistent method of interaction with Asterisk without having to worry about issues such as connection management and without having to understand the intricacies of Asterisk Manager Actions and Events. GETTING ASTERISK-JAVAAsterisk-Java is available from here Maven DependencyAsterisk-Java 3.x (Java 1.8 and Asterisk Version 10 thru 18) (master)
INSTALLATION FROM SOURCE
After the build is complete, the jar will then be built as target/asterisk-java.jar in the asterisk-java directory. EXAMPLEThe file 'examples/ExampleCallIn.java' will answer the call and playback the audio file 'tt-monkeys'.
The file 'examples/fastagi.properties' maps your Asterisk diaplan context to the class you would like to invoke above.
To compile and run do:
SYSTEM REQUIREMENTSAsterisk-Java needs a Java Virtual Machine of at least version 1.8 (Java SE 8.0). If you want to build the jar from source, you will also need Maven. LEGALAsterisk-Java is subject to the terms detailed in the license agreement accompanying it. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论