Problem with Asterisk Realtime and Hints

Hi everybody,

I am having problems when I try to generate hints from “extensions” mysql table. Im using Asterisk 13.18.

I have several realtime tables:

sippeers => odbc,odbc-asterisk,rt_sipfriends
voicemail => odbc,odbc-asterisk,rt_voicemail_users
extensions => odbc,odbc-asterisk,rt_dialplan
queues => odbc,odbc-asterisk,rt_queues
queue_members => odbc,odbc-asterisk,rt_queue_members
meetme => odbc,odbc-asterisk,rt_meetme
queue_log => odbc,odbc-asterisk,rt_queue_log
select * from rt_queue_members;
+----------+------------+--------------------------------------+------------+------------------------+---------+--------+--------------+---------------------+---------------------+
| uniqueid | queue_name | interface                            | membername | state_interface        | penalty | paused | extension | created_at          | updated_at          |
+----------+------------+--------------------------------------+------------+------------------------+---------+--------+--------------+---------------------+---------------------+
|       76 | 000001100  | Local/P01-201@000001_inbound_queue | Pepe     | hint:201@000001_01_blf |       0 |      0 |          201 | 2017-12-20 16:05:20 | 2017-12-20 16:05:20 |
|       77 | 000001100  | Local/P2-203@000001_inbound_queue | Pepito     | hint:203@000001_01_blf |       0 |      0 |          203 | 2017-12-20 16:05:20 | 2017-12-20 16:05:20 |
|       78 | 000001100  | Local/P3-208@000001_inbound_queue | Pepote     | hint:208@000001_01_blf |       0 |      0 |          208 | 2017-12-20 16:05:20 | 2017-12-20 16:05:20 |
+----------+------------+--------------------------------------+------------+------------------------+---------+--------+--------------+---------------------+---------------------+
3 rows in set (0.00 sec)

extensions.conf

[000001_01_blf]
switch => Realtime/000001_01_blf@extensions

select * from dialplan;
+----+------------------------------+-----------+----------+--------+----------------------------------------------------------------+---------------------+---------------------+
| id | context                      | exten     | priority | app    | appdata                                                        | created_at          | updated_at          |
+----+------------------------------+-----------+----------+--------+----------------------------------------------------------------+---------------------+---------------------+
...
| 47 | 000001_01_blf                | 201       |        -1 | hint   | SIP/100000201                                               | 2017-12-20 16:02:07 | 2017-12-20 16:02:07 |
| 48 | 000001_01_blf                | 203       |        -1 | hint   | SIP/100000203                                               | 2017-12-20 16:02:07 | 2017-12-20 16:02:07 |
| 49 | 000001_01_blf                | 208       |        -1 | hint   | SIP/100000208                                               | 2017-12-20 16:02:07 | 2017-12-20 16:02:07 |
...
+----+------------------------------+-----------+----------+--------+----------------------------------------------------------------+---------------------+---------------------+
*CLI> queue show 000001100
000001100 has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:2, SL:0.0% within 0s
   Members:
      Pepe (Local/P1-201@000001_inbound_queue from hint:201@000001_01_blf) (ringinuse enabled) (realtime) (Invalid) has taken no calls yet
      Pepito (Local/P2-203@000001_inbound_queue from hint:203@000001_01_blf) (ringinuse enabled) (realtime) (Invalid) has taken no calls yet
      Pepote (Local/P3-208@000001_inbound_queue from hint:208@000001_01_blf) (ringinuse enabled) (realtime) (Invalid) has taken no calls yet
   No Callers
  
*CLI> core show hints
There are no registered dialplan hints

It doesn’t appears hints and it shows the members of the queues like “Invalid”

But If I define the same hints on extensions.conf the problem doesn’t appear:

extensions.conf

[000001_01_blf]
exten => 201,hint,SIP/100000201
exten => 203,hint,SIP/100000203
exten => 208,hint,SIP/100000208

*CLI> queue show 000001100
000001100 has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:2, SL:0.0% within 0s
   Members:
      Pepe (Local/P1-201@000001_inbound_queue from hint:201@000001_01_blf) (ringinuse enabled) (realtime) (Not in use) has taken no calls yet
      Pepito (Local/P2-203@000001_inbound_queue from hint:203@000001_01_blf) (ringinuse enabled) (realtime) (Not in use) has taken no calls yet
      Pepote (Local/P3-208@000001_inbound_queue from hint:208@000001_01_blf) (ringinuse enabled) (realtime) (Not in use) has taken no calls yet
   No Callers

*CLI> core show hints
    -= Registered Asterisk Dial Plan Hints =-
203@000001_01_blf   : SIP/100000203      State:Idle            Presence:not_set         Watchers  0
201@000001_01_blf   : SIP/100000201      State:Idle            Presence:not_set         Watchers  0
208@000001_01_blf   : SIP/100000208      State:Idle            Presence:not_set         Watchers  0

Anybody knows If is possible to create hints from extensions table? Or only can be created from extensions.conf?

Have you tried having something actually subscribe to the hints in your Realtime dialplan?

Hi Matt,

I have 3 extensions registered: 201,203 and 207; and at least one of them is subscribed to the rest. I think that 201 is subscribed to 203 and 207; I dont have conection on this moment to my Asterisk machine but If you execute “core show hints” I remember have watched something like:

*CLI> core show hints
-= Registered Asterisk Dial Plan Hints =-
203@000001_01_blf : SIP/100000203 State:Idle Presence:not_set Watchers 1
201@000001_01_blf : SIP/100000201 State:Idle Presence:not_set Watchers 0
208@000001_01_blf : SIP/100000208 State:Idle Presence:not_set Watchers 1

This info. only appears when you define the hints on extensions.conf

If you define the hints on realtime dialplan it appears:

*CLI> core show hints
There are no registered dialplan hints