asterisk query bugfix, cache id fix