[Asterisk-Dev] Signal timing can bring down Asterisk

Kristian Nielsen kn at sifira.dk
Tue Aug 16 00:02:38 MST 2005


Hans Petter Selasky <hselasky at c2i.net> writes:

> Hi,
> 
> I'm writing a channel driver for asterisk and I have hit some problems.
> 
> 1)
> 
> I want to have my channel driver under a BSD license, but I see no
> ASTERISK_BSD_KEY. Must all code be under GPL or is BSD also allowed?

The question is whether your code could be considered to be a derived
work of Asterisk. If it can, then to distribute it you must have the
permission from Digium, which you can have either by distributing under
the GPL, or by special agreement. This also depends on how copyright
works in your country, of course.

One could argue that any channel driver is so derived from Asterisk
because of the tight integration (struct ast_channel_tech ...). The
ASTERISK_GPL_KEY also makes a strong case for being derived work (though
you would be free to distribute a GPL Asterisk without the
ASTERISK_GPL_KEY along with your module).

So as I see it, _if_ your code is a derived work of Asterisk, you can't
use BSD license without special permission from Digium. I doubt anyone
will be able to give you a definitive answer as to whether it is so
derived or not.

> What happens if two different threads call "ast_hangup()" at the same time on 
> the same "ast_channel" ?

I believe this won't happen. I think the ast_hangup() call is meant to
free the channel, being dual to ast_call(). User hangup events are
signalled by passing a hangup event to ast_write(), or by returning one
from ast_read(). Check f.ex. the source for the "Dial" application, that
should show you how it is used exactly.

 - Kristian.

-- 
Kristian Nielsen   kn at sifira.dk
Development Manager, Sifira A/S




More information about the asterisk-dev mailing list