[Asterisk-Users] Asterisk Newsletter :: Back online!

Olle E. Johansson oej at edvina.net
Sun Nov 21 09:31:26 MST 2004


Time to reboot and re-start Asterisk, well, hrrm, monthly, news.
It's been a hectic fall with a lot to do, both before and
after Astricon.

At this time, we're preparing for two Astricon shows in 2005. And no,
we haven't made a decision on where to run the European Astricon,
not yet.

I am preparing to travel to the USA again this coming week. Today,
I'm spending my time finding and fixing problems in the SIP channel.

While I tend to agree with Mark, that SIP is not easy to understand
and deploy, I still want Asterisk to be a fully SIP compliant PBX.
We still have a lot to do to reach that goal. Apart from the small,
but important signalling problems that we discover now and then,
we need to implement more major features like SIP timers, SIP over
tcp and TLS as well as SIP subscription support. A lot of things
to do, a lot of code to write. Join the effort, help us move
forward. Asterisk 2.0 to me means a significant change in the
SIP channel.

In Stockholm we now have very short days and three decimeters
of snow. It's winter time and everyone is preparing for
christmas. I hope that the weather is better in Kansas City,
in our US office. While it's not southern California, I still
think that Steven has a nicer climate. The grass is always
greener on the other side of the fence, right?

Let's dive into this issue of Asterisk News:

*** In this issue
- The Asterisk CVS branch: Going crazy, going forward
- The Asterisk stable branch: Moving carefully forward
- The realtime database architecture
- res_perl: A shining Perl within your Asterisk PBX!
- Sitting on your own Asterisk code? Contribute!
- Reporting a bug? Read the instructions first!
- SIP Patch: Adding and reading SIP INVITE headers
- SIP Patch: Outbound Proxy Support
- Read the daily news channel

*** The Asterisk CVS branch: Going crazy, going forward
-------------------------------------------------------

Since the release of Asterisk 1.0 at Astricon in September,
the CVS has branched into two trees - a development branch
and one stable branch. There is a lot of changes to the
development branch, some minor and a lot of major additions.
The dialplan logic has been improved, the database support
totally changed and... There are countless of new stuff we
need to document, add to the wiki and the doc project and
start testing.

The CVS branch, also called HEAD, is not for production use.
Changes to the code are not always fully tested in all kinds of
environments Asterisk run in. This is a playground for new
ideas, for new architectures and new applications.

If you are using Asterisk, why not install the CVS branch
on a new machine and start testing it. If you find bugs,
report them to the bug tracker.

The Asterisk CVS branch is managed by Mark Spencer.


*** The Asterisk stable branch: Moving carefully forward
--------------------------------------------------------

The stable branch, v1-0, is distributed as distribution
tarballs as well as CVS updates. Both ways, they are
stable. No exciting new features, no dangerous new
architectures are added to this code. The only changes
are bug fixes. The current FTP distribution is version
1.0.2.

This is a version you can safely use in production
servers.

The Asterisk stable branch is maintained by Russel
Bryant, aka "drumkilla". He is doing a great job
maintaining this source code tree, adding patches
carefully and avoiding risky code.


*** The realtime database architecture
--------------------------------------
In Asterisk CVS head, there is a new architecture for
database configurations. In the 1.0 tree, there are
multiple patches for various kinds of databases with
database specific access code in the various source
code files, like voicemail, chan_sip and chan_iax2.

In the new architecture, all database specific code
is moved to database specific drivers. The channel just
calls a generic routine to do database lookup. Much
cleaner, simpler and manageable from a coding standpoint.

The database is accessed with three functions:
* STATIC: This is used to load static configuration
   when a module is loaded
* REALTIME: This is used to lookup objects during
   a call (or another event)
* UPDATE: This is used to update objects

The database support in the channel is not changed. There
are "normal" static peers/users and database peers/users.
The static ones, regardless if these are loaded from a
text file or a database configuration, are kept in-memory
and in the  SIP channel we provide them with NAT traversal
support and message waiting indication if needed.

The database peers/users are not kept in memory. These
are only loaded when we have a call and then deleted,
so there's no support for NAT keep-alives (qualify=)
or voicemail indications for these peers.

The realtime architecture is not documented very well
yet, but there is a lot of testing and development
still being done on this architecture. Documentation
will follow!

*** res_perl: A shining Perl within your Asterisk PBX!
------------------------------------------------------
Anthony Minessale, anthm, is hereby awarded the
"Asterisk programmer of the month" award. He has
written a large number of additions to Asterisk and
continues to add great applications and functions to
Asterisk.

One of the most unknown is res_perl, code that was
added to the asterisk_addons cvs repository this
fall. This module is very much like Apache's mod_perl,
it adds a PERL interpreter inside of your Asterisk
server and by doing that, opens up for a lot of new
features.

The current version is 3.0. Anthony writes:
"This is res_perl the "mod_perl" of sorts for Asterisk.
It is an actual live Perl Interpreter embeded in a
module so when it starts up the perl stays resident
in memory the whole life of the Asterisk process."

In the Readme, there's also this comment:
"BUGS: If you stare at the source code from about 2 feet
back for approx 30 seconds you will start
to see that the entire thing is in itself 1 large bug.
I am not so much a C programmer as I am
a Perl programmer so that was my motivation for
this idea but it probably is sucky to some
arrogant linux zelot somewhere out there.
If that is you , ha ha I made you download it....."

Even if Anthony considers this one large bug, I
feel that the res_perl module is much more important
than the Asterisk community have realized. We need
more tests of this new feature, input on the
functionality and more documentation on what you
can do and can't do!

This module is not ready for production use,
but really good for Asterisk adventures!

* Asterisk CVS instructions
   http://www.asterisk.org/index.php?menu=download
   res_perl is in the asterisk-addons repository



*** Sitting on your own Asterisk code? Contribute!
--------------------------------------------------

Asterisk is an Open Source project. That means that there's
no single company producing all code and providing everyone
with support. The Asterisk source contains materials from
a lot of developers and companies that use Asterisk.

If you add code to your own Asterisk - why not contribute to
the community and provide the project with your additions.
Even if the code isn't perfect, it is propably better than
no code at all - and there are plenty of people that like
to improve, correct and clean up code.

Add a patch to the bug tracker and help us improve
Asterisk!


*** Reporting a bug? Read the instructions first!
-------------------------------------------------

The Asterisk bug tracker is at http://bugs.digium.com
If you think you've found a bug, go there and log in.
Before you open a new bug report:

* Check if there is already a report in there
   Add your comments and findings to that report
* Read the bug tracker instructions!
   Do this BEFORE you open a bug report.

Without sufficent data and clear data about your
problem, there is no way we can help you. Bug marshals
will check the report quickly and tell you if something
is missing, but the whole process will be easier to
go through if you follow the instructions from start.

If you are unsure whether you have a bug or not, use
the mailing list to check. The bug tracker is not supposed
to be used for support.

At this point, we have a lot of open bugs. We need help
going through all of them, testing patches, sorting
out problems. Moving Asterisk forward is a community
project. Roll up your sleeves and join us.

* Bug Reporting Guidelines:
   http://www.digium.com/bugguidelines.html


*** SIP Patch: Adding and reading SIP INVITE headers
----------------------------------------------------

The SIP protocol is text based, just like HTTP and SMTP.
One of the ideas with protocols that implement text based headers
is the ability to expand functionality by adding new headers.
In SIP, a lot of phones add or read special headers. Cisco 7960
read a special SIP header in order to get a URL to a web page to
display on the screen. SNOM phones send a special accounting header.
In many provider networks, an incoming SIP proxy adds headers that
are read by internal SIP proxys or gateways.

With two Asterisk servers, this kind of functionality could be used
to send account codes between a registration server and a SIP to PSTN
gateway.

In the past, we have added special functions for each specific header.
I wanted to create a generic way of doing this, instead of adding
new code for each phone and vendor.

This functionality has been in my test SIP channel for a while. I've
now produced two patches that adds support for adding and reading
SIP headers in INVITEs to CVS head chan_sip. If this is useful for
you, please test the patches and add a comment to the bug report.
In order for this to be included in the CVS, it seems like I need some
support from SIP users :-)

* SIPgetheader: http://bugs.digium.com/bug_view_page.php?bug_id=0002838
* SIPaddheader: http://bugs.digium.com/bug_view_page.php?bug_id=0002846


*** SIP Patch: Outbound Proxy Support
-------------------------------------

There are a lot of different SIP servers. Some of the most used are:

* SIP registrar server: Accepts registrations and keep track of phones
* SIP proxy server: Forwards SIP messages
* SIP user agent server: Answers calls (part of a SIP phone or PBX)
* SIP outbound proxy server

The SIP outbound proxy server is a bit difficult to explain.

A SIP phone (UA) is an intelligent device. If you enter a SIP uri,
it resolves the SIP domain address with DNS, finds the proper SIP
server to receive the outbound call and sends an INVITE. By default, it
doesn't send all invites to the server that handles incoming calls
to the phone, it sends to the server indicated by the domain in the URI.

If you want it to send everything, regardless of URI and domain, to
the same SIP proxy server, you need to configure an outbound proxy in
the phone. Now, the phone doesn't care if the call is addressed to
"digium.com" or "edvina.net" - it just sends the call to the proxy and
let the proxy find out how to get the conversation going.

The Asterisk SIP ua has not got support for this kind of proxy. It
always resolves the SIP address and places the call its own way.

With my patch, you can configure one general outbound proxy for the
SIP channel. From that point, ALL sip invites will be sent to that
proxy. If you want to send invites to the local network (where you
have phones) directly, you can configure localnet= networks in
sip.conf and those addresses will be excluded from the outbound
proxy setting.

This patch has been tested with a number of outbound proxies, but
may still need some testing. It is really useful if you are
using a SIP proxy as a NAT traversal SIP server, like the
equipment from Ingate and Intertex.

Please test this, and add your comments to the bug tracker!

* SIP Outbound Proxy for Asterisk CVS head:
   http://bugs.digium.com/bug_view_page.php?bug_id=0002859


*** Read the daily news channel
-------------------------------

There is a new news source for Asterisk news on the net, if you
haven't found it already. A daily news channel, trying to cover
important discussions on the mailing list, CVS additions and
new third-party applications. Stay updated - read the Asterisk
daily news!

* http://www.sineapps.com/news.php


*** Useful Asterisk web links:
------------------------------
* Asterisk: http://www.asterisk.org
* Asterisk mailing lists: http://lists.digium.com
   (users, bsd, dev, biz and cvs mailing list)
* Asterisk bug tracker: http://bugs.digium.com
* Asterisk IRC channel: #asterisk on irc.freenode.net
* Digium: http://www.digium.com
* Wiki: http://www.voip-info.org
* Voip Search: http://search.voip-forum.com
* Asterisk documentation project: http://www.asteriskdocs.org
* Asterisk News: http://www.asterisknews.com

*** Epilogue: Open Source Business models and Asterisk
------------------------------------------------------

The term "Open Source" was coined by a group of people who believed
in free code, but not trying to connecting it to a political agenda.
Some of them wanted to find a way to make Open Source Business acceptable.
Open Source means business - but a different business model than what the closed
source world practises.

There are room both for people who believe that free software should
be non-commercial and for people that wants to find new ways of working
in the software industry, working for a profit but still sharing ideas
and code in a free and open way.

We need to respect each other, accept that there are different views.
Not spend time throwing dirt. Asterisk is an Open Source project,
with a lot of business going on around it. Digium is the main
contributor and main copyright holder of Asterisk. Without Digium
and Mark Spencer, Asterisk wouldn't exist.

Personally, I have no problem giving Digium the right to include
my code in products they sell with other licenses, I have gotten
so much of code for free from them. I still have the copyright on
my code, so I can do whatever I want with it. With the productivity
that I see from Mark and the rest of the staff at Digium, I feel
quite comfortable about the future of Asterisk. The source code
will always be available under the GPL, regardless of the future
of Digium. I am not worried.

However, if you want to create Asterisk hardware, there is a
community problem. We need to find a way to create an open market for
third-party Asterisk hardware. There must be a way for companies
to compete with Digium's hardware and still be an integrated part
of the Asterisk community. Competing with Digium at this time
may be seen as a threat to the Asterisk community by the community
itself. Buying Digium hardware is the recommended way of supporting
the Asterisk.org project - a model which is broken when a third
party want to sell Asterisk hardware - of course they don't want
to support Digium. Let's discuss this and find a solution! I am
sure that with a community as large and vibrating as Asterisk.org,
we will find a way to solve this before the spring. We have a long,
dark winter with plenty of time to sit indoors and think. At least
here in Sweden :-)

Cheers from Sollentuna!

/Olle

PS: If you have topics that you want me to cover in Asterisk
[weekly/monthly/quarterly] news, please feel free to drop me
an e-mail or find me on the irc.



More information about the asterisk-users mailing list