Template conversion complete!
Forum » WikiPBX / Announcements » Template conversion complete!
Started by: tleydentleyden
On: 1241413341|%e %b %Y, %H:%M %Z|agohover
Number of posts: 5
rss icon RSS: New posts
Template conversion complete!
tleydentleyden 1241413341|%e %b %Y, %H:%M %Z|agohover

In subversion versions 71-74, the code has been converted to use Django templates for nearly all configuration served up by wikipbx, "nearly call" because the dialplan xml does not use templates .. and I'm not sure if it really needs to. Sofia, xml cdr, event socket, and directory configuration are now all template based.

Now it should be much easier to customize the configuration to your specific needs when that customization is not supported in the web interface / database.

The templates are still outdated compared to the current config, and will be brought up to date soon. But it should be fairly easy since it is just a matter of merging in new parameters to the xml template. (all templates are located in the freeswitchxml subdirectory).

WARNING: don't try to use default variables like $${foo} that are defined in vars.xml in the static freeswitch config. This will be passed verbatim to freeswitch, which will not resolve the variable. Not sure if this is a bug in freeswitch or by design. Only tested against an old version of freeswitch (10300) so your mileage may vary.

Reply  |  Options
Unfold Template conversion complete! by tleydentleyden, 1241413341|%e %b %Y, %H:%M %Z|agohover
Re: Template conversion complete!
stas_shtinstas_shtin 1241431331|%e %b %Y, %H:%M %Z|agohover

Freeswitch docs tell that variables should be resolved normally in this case.

Also, looks like dialplanbuilder.build_xml function has some incostintencies. First we create an XML tree starting with context tag, then check if current extension has condition tag and if it does we use string substitution with another string. So in the latter case there was no need to create XML tree here. Moreover, looks like instead of XML tree we should be able to use dialplan template here to make it more customizable. This would let the users to easily change all dialplans easily, e.g. could be used for setting some variables, silence detection, authorization checks.

Reply  |  Options
Unfold Re: Template conversion complete! by stas_shtinstas_shtin, 1241431331|%e %b %Y, %H:%M %Z|agohover
Re: Template conversion complete!
tleydentleyden 1241457306|%e %b %Y, %H:%M %Z|agohover

I'll clean up the dialplan builidng stuff and convert it to use templates as well.

Thanks for the link to the freeswitch docs .. it sounds like that variable resolution might actually work. I will test it on a later version of freeswitch and see what happens.

Reply  |  Options
Unfold Re: Template conversion complete! by tleydentleyden, 1241457306|%e %b %Y, %H:%M %Z|agohover
Re: Template conversion complete!
tleydentleyden 1241498830|%e %b %Y, %H:%M %Z|agohover

Freeswitch docs tell that variables should be resolved normally in this case.

Yeah, I just tested it against freeswitch revision 13223 and it worked. So it was fixed somewhere between freeswitch revision 10359 snd 13223.

Reply  |  Options
Unfold Re: Template conversion complete! by tleydentleyden, 1241498830|%e %b %Y, %H:%M %Z|agohover
Re: Template conversion complete!
tleydentleyden 1241548409|%e %b %Y, %H:%M %Z|agohover

Moreover, looks like instead of XML tree we should be able to use dialplan template here to make it more customizable.

Done - svn revision 76

Reply  |  Options
Unfold Re: Template conversion complete! by tleydentleyden, 1241548409|%e %b %Y, %H:%M %Z|agohover
New Post
page_revision: 0, last_edited: 1226259295|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License