[TriLUG] Re: TriLUG Asterisk Routing Project

Tanner Lovelace clubjuggler at gmail.com
Mon Feb 20 15:43:29 EST 2006


On 2/20/06, Kevin Otte <nivex at nivex.net> wrote:
> On Mon, Feb 20, 2006 at 01:50:16PM -0500, Tanner Lovelace wrote:
> > Cool.  So, it sounds like there are about 3 parts to this.  Please correct me
> > if I'm wrong, or if I've left anything out:
> >
> > 1. Central TriLUG directory.
> >     - Accessible on a trilug web server
>
> Right.  I envision this as just a simple CSV file that can be parsed with a
> PHP script.
>
> > 2. AGI script
> >     - Available for download on the trilug server
> >     - Installed by each Asterisk admin on their local asterisk server
>
> Turns out even AGI may be a bit overkill.  Asterisk has a function called
> CURL (so long as curl-dev was present at Asterisk compile time).  So it
> could be as simple as:
>
> exten => _5XXX,1,Dial(${CURL(http://trilug.org/voipdir.php?num=${EXTEN:1})})
>
> ...and just have voipdir.php return a text/plain document with the callurl.
>
> Of course you may want to use a SetVar(foo=${CURL(...)}) and then do some
> sanity checking on foo before actually dialing.  Perhaps have the PHP script
> return INVALID and use GotoIf to handle that condition.  There doesn't seem
> to be much documentation on how CURL handles other errors though.
>
> Some reference material:
> http://www.voip-info.org/wiki/index.php?page=Asterisk+func+curl
> http://www.voip-info.org/wiki/view/Asterisk+variables


So, how soon until you have a prototype up and running? O:-)

Cheers,
Tanner

--
Tanner Lovelace
clubjuggler at gmail dot com
http://wtl.wayfarer.org/
(fieldless) In fess two roundels in pale, a billet fesswise and an
increscent, all sable.



More information about the TriLUG mailing list