Have you ever wanted presence information across multiple Asterisk servers? Well, making that possible is something that I have worked on a bit here and there. I previously made a post asking for some of that code to be tested. Now, this code has been merged in to Asterisk 1.6.
Asterisk 1.6.1 will have the ability to share device state between servers using a new module, res_ais, which uses the SAForum AIS to share events between Asterisk servers. It has been tested with and developed against the openais implementation of AIS.
In addition to writing res_ais, this effort consisted of a lot of improvements to the Asterisk core to understand distributed device state. My next step is to complete the changes to pbx_dundi to allow Asterisk servers to use DUNDi to share events, as well. This should provide the best results for servers that want to share state information across the Internet, as opposed to servers in a local cluster on a high speed LAN.
Commits related to merging this code into Asterisk 1.6:
While Asterisk 1.6.0 is currently being stabilized for release, we are also actively developing new features for Asterisk 1.6.1. One feature that has been merged into Asterisk trunk, which will be released in Asterisk 1.6.1, is support for multiple parking lots.
This functionality has been available for quite some time from 3rd party modules. So, it’s about time that we got it implemented natively in Asterisk. The code that has been committed was originally written by oej. Another developer, mvanbaak, recently got the code back up to date. Finally, Jeff Peeler of Digium got the code stabilized and converted to some more recent Asterisk APIs.
See the commit of the code here.
In the past week, I have merged patches into Asterisk trunk that provide new features for chan_sip. These features will be available in Asterisk 1.6.
TCP and TLS support
In the past, Asterisk has only had support for UDP as a transport for SIP signaling. Asterisk 1.6 will have support for both TCP and TLS, as well.
This work was done by Brett Bryant and James Golovich, who were both funded by Digium for their work.
SIP Session Timers (RFC 4028)
Asterisk 1.6 will also have support for SIP Session Timers, as defined by RFC 4028. These changes prevent stuck SIP sessions that were not properly torn down due to network or endpoint failures during an established SIP session.
This work was done by Raj Jain. It was funded by John Todd from TalkPlus, Inc., as well as JR Richardson of Ntegrated Solutions.
Both of these features are major steps forward for SIP support in Asterisk!
I just merged a new channel driver into Asterisk trunk which will be in Asterisk 1.6. The module is called chan_console. It is a new console channel driver which uses portaudio as a cross platform audio interface instead of using something like ALSA or OSS directly. I wrote it to give myself a console channel driver that I could use on my Mac. However, portaudio supports a number of other audio interfaces, as well.
The audio interfaces that portaudio supports are
- Advanced Linux Sound Architecture (ALSA)
- AudioScience HPI
- Macintosh Core Audio for OS X
- Windows Direct Sound
- JACK Audio Connection Kit
- Unix Open Sound System (OSS)
- Windows Vista WASAPI
- Windows WDM Kernel Streaming
- Windows MME
Asterisk-dev – Another Module for Testing: chan_console
Asterisk-commits – Commit to Asterisk trunk
Asterisk trunk recently got a pretty cool new feature. You can now use Asterisk as a highly configurable video soft phone. The commit to trunk is here.
The way it works is pretty neat. Asterisk already had a couple of console channel drivers: chan_oss and chan_alsa. These channel drivers allow you to use a local OSS or ALSA sound device as an endpoint for a call. These interfaces are commonly used to interface with overhead paging systems. They are also commonly used by people to use Asterisk as an extremely powerful soft phone.
Now, Asterisk as a softphone just got a lot cooler.
The OSS console channel driver, chan_oss, now has video support. This means that you can make video calls from the Asterisk CLI. For the video source, you currently have a couple of options. The first is to use a webcam. The second, which I find quite interesting, is you can use an X11 screen grabber. That means you can have a section of your local display that gets captured and sent along as the video stream.
There is also a “skinnable” dialpad for use as a graphical softphone interface for dialing.
The code uses libavcodec from ffmpeg for video transcoding. As the commit message states, it currently supports h261, h263, h263+, h264, and mpeg4.
Many thanks to Luigi Rizzo, Sergio Fadda, and Marta Carbone for the great new feature!
A new channel driver has been committed to Asterisk trunk which allows you to use Nortel IP phones with Asterisk. It was submitted by Cedric Hans. See the commit and the original mantis issue. This module will be available in Asterisk 1.6.
There is some basic documentation and a sample configuration file available.
Nortel phones which have been verified to work with this module are the Nortel i2002, i2004 and i2050.
One of the biggest problems with going with a proprietary phone system is vendor lock-in across all aspects of the system. The amazing thing about Asterisk is the amount of choice that is available. Making it possible to use these handsets with Asterisk will allow those that have previously been locked in to switch to a more powerful and more flexible system without having to invest in new handsets.
That brings the number of VoIP protocols natively supported in Asterisk up to 7. There are:
- Cisco Skinny / SCCP
- Jingle / GoogleTalk
Recently, a new module for writing Asterisk dialplan in the Lua programming language was merged into Asterisk trunk. It was developed by Matt Nicholson of Digium, Inc. See the commit and mantis issue. It will be available in Asterisk 1.6.
Lua is a powerful, fast, light-weight, embeddable scripting language.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.
‘Lua’ means ‘moon’ in Portuguese and is pronounced LOO-ah.
This module provides another alternative for native dialplan programming. Check out the example extensions.lua file for an example of how it looks.
There has been some discussion about benchmarking pbx_lua versus the existing extensions.conf and extensions.ael for dialplan execution performance, but no results have been posted as of yet.
In a post on asterisk.org, I described how the generic jitterbuffer works in Asterisk 1.4. Because of the way it was designed, it does not work when a call is connected to an Asterisk application such as Voicemail or MeetMe. It will only work when two channels are bridged together. So, it has been extremely useful for people who are terminating SIP calls to the PSTN, for example.
Someone at Astricon asked me about this, and it made me think of a way to enable the use of the jitterbuffer for calls connected to Asterisk applications. It was quite simple to implement, too. I added support for the generic jitterbuffer to the Local channel driver, which provides a channel interface back into the local Asterisk dialplan.
Since this is a new feature, it was only added to trunk, our development tree, which will soon become Asterisk 1.6. However, I have posted an unofficial backport of the patch to Asterisk 1.4.
To use the feature, you simply use the new ‘j’ option in the Dial() string, in addition to the ‘n’ option that already existed for chan_local. For example:
exten => 5551212,1,Dial(Local/1234@somecontext/nj)
exten => 1234,1,MeetMe(1234)
See the commit of the code here.
Download instructions for Asterisk 1.4:
$ svn co http://svncommunity.digium.com/svn/russell/asterisk-1.4 1.4-backports
There is a file in there called chan_local_jitterbuffer.patch.txt. To apply the patch:
$ cd asterisk-1.4
$ patch -p0 < /path/to/chan_local_jitterbuffer.patch.txt.
$ sudo make install
We got a very interesting patch to improve the reliability of the Inband DTMF detector. Some poor debouncing logic was making it very possible to miss a digit when it didn’t start very clean.
Here is the commit and also the related discussion on the asterisk-dev mailing list.
Many thanks to Tony Mountifield for the patch!