[asterisk-dev] Creating a FastAGI equivalent for realtime configs

Tilghman Lesher tlesher at digium.com
Mon Nov 9 13:30:59 CST 2009


On Monday 09 November 2009 12:23:06 pm Alistair Cunningham wrote:
> I'm interesting in having some new code written to create an equivalent
> of FastAGI for realtime configuration. This could perhaps be called
> "res_config_passthrough.so". The implementation method is not final, but
> what I have in mind is:
>
> - When Asterisk starts, the module loads and reads its config file.
>
> - It makes a TCP connection to a server.
>
> - Any time Asterisk has a realtime configuration request, it asks this
> module according to extconfig.conf.
>
> - This module sends the request as structured text (simple text fields,
> or perhaps XML) to the remote server.
>
> - The server returns an answer as structured text.
>
> - The module returns the data to Asterisk.
>
> - The module leaves the connection open between requests to reduce
> connection time on the next request.
>
> - If the connection drops, the module keeps retrying the connection.
>
> Has anyone ever created such a module? Would anyone be interested in
> working on this? Is there a better way to implement this?

Sounds like res_config_curl, which is in 1.6.0 and greater.  A sample
server-side script resides in contrib/scripts/dbsep.cgi, written in Perl,
which should provide enough detail about the expected encoding to
get it to work in other languages, as well.  As implicit in the name, the
realtime queries are all structured as HTTP requests.

-- 
Tilghman



More information about the asterisk-dev mailing list