Your Asterisk module is loaded, but is it running?

Often a tiny new feature can be just as exciting as a big one. Well, you should be aware of this tiny new feature in Asterisk Trunk (Asterisk 12 is the next release you would see it in).

Thanks to a very active Asterisk community developer and all around great contributor – Michael L. Young (aka ‘elguero‘ on IRC) – now all of you Asterisk administrators can easily see when an Asterisk module is loaded, *and* in its running state.

As an example, let’s take a case where Asterisk decides to load, but not run the chan_motif.so module due to some invalid configuration in motif.conf.

If you noticed that chan_motif was unresponsive to XMPP traffic, then the first thing you might do would be to check if the module is loaded. In the Asterisk CLI output below, notice the new “Status” column:

*CLI> module show like chan_motif
Module                         Description                              Use Count  Status
chan_motif.so                  Motif Jingle Channel Driver              0          Not Running
1 modules loaded

Yup! You can see it’s loaded, but it isn’t running. So, then you may think to check the Asterisk full log:

Feb 20 10:20:56] ERROR[29536] chan_motif.c: Unable to read config file motif.conf. Module loaded but not running.

For brevity I’ve removed the debug ahead of that line that would tell you what particular parsing problems caused the issue. You can clearly see that the module was loaded, but is not running due to a failure reading the configuration file for motif.conf

In the past, you would have only been able to tell that the module was either loaded or not, which could cause confusion if an administrator doesn’t realize that a module can still be loaded and yet not running afterward. Now you have a clearer picture! Thanks again to Michael and all the others who contribute to Asterisk every day!

If you are curious about how you can get started developing in Asterisk head over here. Still wondering what chan_motif is? Check out Matt’s post on the motive for motif.

About the author

Rusty has been with Digium for over six years, working on various teams within Digium's Technical Support, Sales and Software Development departments. Prior to joining Digium, he spent more than five years in the Telecom and IT industries, installing, configuring and maintaining legacy PBXs as well as supporting SMB computer networks. He is currently Digium's Asterisk Community Support Manager - responsible for ensuring that Digium’s community services are providing what the community members need, that the systems are operating properly, and that issues and questions are getting the attention they deserve. He works along with David Duffett (our Community Director) at the greater aim of supporting the worldwide Asterisk community in all it's needs.

Leave a Reply