I feel like my current logic could be improved...tips?

I have a web application (apache2 web server) that creates call files and things when a user submits a form. I’m using PHP to do all of this…create the call file, create the .gsm, edit extensions.conf with the context needed for that specific call and so on. (the form performs a POST to the .php file and the .php file does all kinds of stuff)

One thing that I’m unsure about, and hoping for a better solution, is when I submit the form…the php file opens /etc/asterisk/extensions.conf, appends a context to the bottom of the file…then reloads the dialplan from the same PHP script.

Is this overkill? Is there some other method of doing all of this? AGI?

hi,

you might put the dialplan in mysql. with realtime extensions, your php could make immediate dialplan changes via updating table ‘extensions_table’.

regards,
derek

Hi,

Could you make use of macros, etc in the dialplan to make code more generic. So removing the need to auto-generate new contexts?

Regards,
Mark

[quote=“dereklinrs”]hi,

you might put the dialplan in mysql. with realtime extensions, your php could make immediate dialplan changes via updating table ‘extensions_table’.

regards,
derek[/quote]

derek, I’m sorry…I don’t follow =\