Summary: | ASTERISK-04803: Global variables not evaluated by Realtime in extension name | ||
Reporter: | alexb (alexb) | Labels: | |
Date Opened: | 2005-08-10 06:12:30 | Date Closed: | 2005-08-26 19:17:24 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) extensions_table.sql ( 1) typescript.txt | |
Description: | I have a variable defined in extensions.conf Globals section, [globals] MY_EXT=201 There is also a context in extensions.conf in which I have the following line: [sip] exten => ${MY_EXT},1,... Since now I use Realtime, I moved each line of [sip] in the extensions_table and edited the context as follows: [sip] switch => Realtime/@extensions Unfortunately, Realtime seems not to evaluate the ${MY_EXT} variable. | ||
Comments: | By: Michael Jerris (mikej) 2005-08-10 08:04:23 can we see the verbose of this call and a dump of the table please. By: alexb (alexb) 2005-08-10 10:46:09 sip.conf [304] . context=sip-kleis-in . . extensions.conf [globals] AREACODE=045 [pstn-locals-out] switch=>Realtime/@extensions [sip-kleis-in] include=>pstn-locals-out . . . switch=>Realtime/@extensions Please note that I manually edited the db dump to simplify my configuration for a more comfortable reading, so where you can read 'sip' it must be intended as 'sip-kleis-in'. Sorry for the inconvenience. By: alexb (alexb) 2005-08-10 14:44:42 I think that a better explanation is needed since my second note shows a slightly different situation. The behaviour, however, is conceptually the same. I place a call from the SIP client '304' to a landline number starting with 045, which is my local area code. In the context pstn_locals_out the extension '_045.' is substituted by '_${AREACODE}.', defined in the globals section. When using static config files everything works fine. When I use Realtime, it fails 'cause the global variable seems not being evaluated but matched as text. By: alexb (alexb) 2005-08-10 15:37:54 Additional info: 1) I use MySQL 2) currently extensions.conf is also loaded from the db (it's mapped to the ast_config table). I can't test now if loading from the static file could make the difference, sorry. By: alexb (alexb) 2005-08-16 07:18:53 Is anybody there? :) By: Kevin P. Fleming (kpfleming) 2005-08-26 19:17:16 This cannot be implemented without severely impacting performance of realtime lookups for extensions. |