Realtime not working for hotdesking

Hello,
I am following the guide in the Asterisk book to use realtime for hot desking. When I try to use the config I get the following error.

ERROR[29655]: pbx.c:2772 ast_func_read: Function MYSQL_HOTDESK not registered

Realtime mysql is working , i.e
asterisk # realtime mysql status
Connected to asterisk@127.0.0.1, port 3306 with username asterisk for …

Mysql is working for the cdr db.

This is bit from func_odbc.conf seems not to be referenced

[HOTDESK]
prefix=MYSQL
dsn=asterisk
read=SELECT ${ARG1} FROM ast_hotdesk WHERE extension = ‘${ARG2}’

Any suggestions where I have gone wrong?

Resolved,

The problem was that the res_odbc module was not loaded after I reinstalled asterisk as non root.