[asterisk-users] realtime extensions, labels
Tim Panton
tim at mexuar.com
Sat Jan 13 08:47:25 MST 2007
On 12 Jan 2007, at 17:58, Brian Capouch wrote:
> Julian Lyndon-Smith wrote:
>> I cannot seem to find any reference to labels in realtime
>> extensions - using 1.4.
>> I've googled until my eyes have bled, and also scoured voip-info.org.
>> Is there anything that helps me here ?
>
> You have to have numbered priorities with realtime.
>
> This is because (as I understand it, corrections very welcome) in
> the case of file-based configuration it is parsed once into an
> internal structure, so the parser can make use of the "n" construct
> to autonumber.
>
> Realtime is totally dynamic, so that convenience doesn't apply.
Depending on your database it might be possible to re-create it using a
view onto a table that resembles the file dialplan and a bit of PL-SQL
(or your databases' equivalent) that interprets the labels and 'n'
re-writing them before returning the results to asterisk.
Then again it would be cheaper to do the re-write at insert time with
a trigger.
Tim Panton
www.mexuar.net
www.westhawk.co.uk/
More information about the asterisk-users
mailing list