On 5/30/06, Ian Service <[EMAIL PROTECTED]> wrote:
I use realtime and I'm in the same boat, never ever reboot the box.
How does nufone do all that cool stuff without realtime?
I've never used realtime... well, I spent 2 hours trying to get it
setup once, and decided it was far too much work. I could probably set
it up a lot easier now that I've got about a years worth of database
work under my belt. However, I've not found a use for realtime.. I
think it just adds a layer of complexity to Asterisk that is really
just not needed.
Oh, but how do I access information from a database you say? The
answer if func_odbc!!!
WHAT?! You haven't heard of func_odbc? This cool little dialplan
function allows you to read and write information to a database
directly from the dialplan -- thereby allowing you to use an existing
database schema, or build a brand new one (and not restricted to
whatever realtime wants you to use).
However, this function, since it's in the dialplan, doesn't allow you
to authenticate callers -- so you still need to write some sort of
script that generates the users and peers in your sip.conf (iax.conf)
files.
The way I do this (and NuFone) is that whenever you make a change in
your GUI, it marks a flag for whichever modules need to be reloaded.
Then you just run the script every minute in a cronjob. It checks if
the flag is set to 1, and if so, it generates a new file and reloads
JUST the module that was affected (don't do a complete reload,
especially with verbosity on, because with a large dialplan, Asterisk
will block while it's reloading, and you won't be able to accept
calls).
Honestly, I've found that the dialplan is all you really need for
complex situations (even in clustering like what I've been working
on). For some really special situations you may need an AGI script or
something, but that is not very often for me. The one thing I may end
up using out of the realtime though is the end-point authentication...
but we'll see. I might just still to my script and flags.
--
Leif Madsen.
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk