[117 total ]
Asterisk 1.6.0-beta1 Released

Since a few days the first beta of Asterisk 1.6.0 is available for download.

So far, Asterisk-Java seems to work fine with the new release.

If you encounter any problems feel free to post a comment, join our mailing list or post a bug report.

FAQ: Where is the Mailing List?

It seems we've hidden the link to our mailing lists a bit too well.

We have two mailing lists:

Asterisk-Java Users for users of Asterisk-Java seeking help
Asterisk-Java Devel for developers of Asterisk-Java, i.e. the guys ... [More] enhancing the library code itself. This list not intended to provide support regarding the use of Asterisk-Java.

You can find the subscription details for both lists here.

You might also be interested in our Bug Tracker where you can look for known issues, post new bug reports and submit patches. [Less]

MD5 Authentication Bug in Asterisk
MD5 Authentication Bug in Asterisk

The good news is: Asterisk-Java seems to work quite well with the latest development version of Asterisk.

One issue came up with a discussion on igniterealtime.org concerning Asterisk-IM though. Asterisk-IM had problems authenticating to the ... [More] latest development version of Asterisk. As it turned out the reason for this was a
bug in Asterisk introduced a few months ago:

When using challenge/reponse authentication with AMI the "Login" action uses the secret supplied with the "Login" action instead of the one from manager.conf to calculate the MD5 hash.

This has two effects:

Login with "AuthType: MD5" and "Key:" but without a "Secret:" always fails
Anybody who knows a valid username can login without knowing the secret configured in manager.conf

As Asterisk-Java uses MD5 based challenge/response authentication by default there are probably other users out there that are affected by the problem.

The solution is easy: Just upgrade to the latest revision from trunk. Tilghman just commited a fix with r98536. [Less]

Adding Support for Asterisk 1.4
Originate Using Asterisk Local Channels
Integrating AGI and Apache Tomcat

I've already described how the Spring Framework can be used to externalize your AGI configuration. That blog entry asumed you are running your AGI server as a stand alone application. What is the best way to run it within an app server or a servlet ... [More] container like Tomcat however?

When you just place the snippet from here into your applicationContext.xml you will notice that Tomcat will hang on start up and that you won't be able to shut it down properly.
The reason for this is that the AGI server is blocking Tomcat and waits for incoming AGI requests. To solve this you have to wrap your AgiServer in a thread so that it runs in the background. Asterisk-Java comes with a utility class called AgiServerThread that just does this.

So the following snippet will work as expected:

<bean class="org.asteriskjava.fastagi.AgiServerThread"
init-method="startup" destroy-method="shutdown">
<property name="agiServer" ref="agiServer"/>
</bean>

<bean id="agiServer" class="org.asteriskjava.fastagi.DefaultAgiServer">
<property name="bindPort" value="4573"/>
<property name="mappingStrategy">
<bean class="xxx">
...
</bean>
</property>
</bean>

References:

Externalize your AGI Configuration [Less]

AGI scripts in Groovy

With a little bit of glue code you can implement your AGI scripts in Groovy, an agile dynamic language for the Java Platform. Your scripts run still in the Java VM on top of Asterisk-Java.

A very simple Groovy AGI script might look like ... [More] this:

channel.streamFile('tt-monkeysintro')

Save it as hello.groovy, put it into your Groovy AGI directory and access it from Asterisk via

exten => 1234,1,Agi(agi://your.agi.server.org/hello.groovy)

Using Groovy for AGI scripts is great for rapid prototyping as you only have to edit your Groovy script to modify the applications behavior. Recompilation happens automatically. You get the benefits of scripting languages and still run on the JVM.

Here is the glue code to make this work:

public class GroovyAgiScript implements AgiScript
{
private GroovyScriptEngine gse;

public GroovyAgiScript() throws IOException
{
this.gse = new GroovyScriptEngine("/my/groovy/scripts");
}

public void service(AgiRequest request, AgiChannel channel)
throws AgiException
{
String script;
Binding binding;

script = request.getScript();
binding = new Binding();
binding.setVariable("request", request);
binding.setVariable("channel", channel);

try
{
gse.run(script, binding);
}
catch (ResourceException e)
{
throw new AgiException("Unable to load groovy script '" script "'", e);
}
catch (ScriptException e)
{
throw new AgiException("Exception while running groovy script '"
script "'", e);
}
}
}

References:

Groovy Homepage
Embedding Groovy in the Advanced Usage Guide [Less]

Users: QLess

QLess is a virtual queue management system for restaurants, theme parks, casinos, doctor's offices -- basically anywhere people are standing around waiting for a service. It holds the user's spot in line and lets them know how the line is moving ... [More] along and when they reach the front by calling their cell phone. Then the user is free to wander off and make better use of his time.

You can check out their web site at http://qless.com and try out the voice interface at 877-4-0-LINES.

The entire app is written in Java, and they are using Asterisk and Asterisk-Java for all of the voice communication pieces. "It was unbelievably easy to get up and running with both technologies, and they have both been rock-solid reliable. Thanks so much for all of the great work, and keep it coming!" says Tim McCune, their Chief Technical Architect & Cofounder. [Less]

Using Asterisk-Java with AstManProxy

AstManProxy
is a proxy application for the Asterisk Manager API that allows connecting multiple servers and clients through a central point of contact.

From a client perspective AstManProxy is almost transparent. Modified behavior ... [More] includes a different protocol identifier and a changed logout message. Additionally AstManProxy does not correctly handle ActionIDs during the authentication phase.

Support for the protocol identifier of AstManProxy is available in Asterisk-Java since 0.3.1. The fix for the ActionID requires a modification of AstManProxy. Gaetan Minet has now done the work and provides a patch to fix it.

Additionally you will find support for the server property in the latest 1.0.0-SNAPSHOTs of Asterisk-Java. This property is now available in ManagerEvent – the base class of all events in Asterisk-Java – and contains the name of the Asterisk server that sent the event.

Reference: Gaetan Minet's patch to make AstManProxy work with Asterisk-Java [Less]