[asterisk-bugs] [JIRA] (ASTERISK-25966) Database based hints empty during AMI reload or startup
xrobau (JIRA)
noreply at issues.asterisk.org
Tue Apr 26 18:44:56 CDT 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-25966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230427#comment-230427 ]
xrobau commented on ASTERISK-25966:
-----------------------------------
Note that doing a 'dialplan reload' alone *does process the hints*. It's as if the dialplan is trying to reload at the same time as the database module, and the database module is returning nothing instead of telling dialplan to wait (.. or the equivalent thereof).
However, a simple function DOES work:
{code}
exten => *998,hint,derp_${IF($[ "X" == "Y" ]?true:false)}
{code}
As soon as you reference the database, it returns an empty string, without any (apparent) error.
> Database based hints empty during AMI reload or startup
> -------------------------------------------------------
>
> Key: ASTERISK-25966
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25966
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Affects Versions: 11.21.2, 13.8.1, 13.8.2
> Reporter: Andrew Nagy
>
> In asterisk set a DB value:
> {code}
> asterisk -rx 'database put AMPUSER/1000 voicemail default'
> {code}
> Now add a hint with a context that references that database value (valid)
> {code}
> [xrobau]
> exten => *999,hint,derp_${DB(AMPUSER/1000/voicemail)}
> {code}
> Issue a CLI based reload.
> {code}
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau : derp_default State:Unavailable Presence:not_set Watchers 0
> {code}
> That is correct!
> Now issue a reload over AMI only (https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_Reload)
> {code}
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau : derp_ State:Unavailable Presence:not_set Watchers 0
> {code}
> This is bad. Seems like it couldn't find the database value after a simple AMI reload.
> Ok now restart Asterisk. It should pick it up right?
> {code}
> [root at freepbxdev1 voicemail]# service asterisk restart
> Stopping safe_asterisk: [ OK ]
> Shutting down asterisk: [ OK ]
> Starting asterisk: [ OK ]
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau : derp_ State:Unavailable Presence:not_set Watchers 0
> {code}
> Still bad. The only way to fix it at this point is issue a CLI reload
> {code}
> [root at freepbxdev1 voicemail]# asterisk -rx "core reload"
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau : derp_default State:Unavailable Presence:not_set Watchers 0
> {code}
> In Asterisk 13 the issue surfaces during Startup AND AMI Reload
> In Asterisk 11 the issue surfaces only during Startup
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list