[Home]

Summary:ASTERISK-06565: member_config is returning nothing during reload_queue_rt
Reporter:Michael Scott (mgscott)Labels:
Date Opened:2006-03-18 11:20:47.000-0600Date Closed:2006-05-30 10:31:12
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Use of ODBC database to populate dynamic queues and queue members. Reading the queue and parameters is ok from table called QUEUES, also have a table called QUEUE_MEMBERS. This is loaded with a single record.

I can force adding members via the dialplan no problem.

I added some debug flags within the config.c, app_queue.c code and compiled, the process seems to be failing to either return the multi_odbc struct from realtime_multi_odbc or the category browse is not receiving anything within join queue of app_queue.c, as the interface always returns no.

The database query is fine, retuning my record, see following debug flags.
app_queue.c:913 join_queue: queue_name Q1234513736
res_config_odbc.c:325 realtime_multi_odbc: chunk Q1234513736 (queue)
res_config_odbc.c:325 realtime_multi_odbc: chunk 1234561111 (interface)
res_config_odbc.c:325 realtime_multi_odbc: chunk 1 (penalty)

Then when the reload_queue_rt is called it is either destroying the content of member_config or member_config was always null, even after the data was read/returned to it.

Later i added some additional debug flags to the join queue, which shows that member_config is null or the category_browse void is not working. The following is what is being passed to ast_category_browse, via the interface = ast_category_browse(member_config, NULL); call in join queue.

join_queue: Before Queue Reload Q1234513736
config.c:267 ast_category_browse: config->last_browse: (null)
config.c:268 ast_category_browse: config->last_browse->name: (null)
config.c:269 ast_category_browse: config->root:
config.c:292 ast_category_browse: Category Browse Results: (null)
app_queue.c:863 reload_queue_rt: INTERFACE: (null)
config.c:267 ast_category_browse: config->last_browse:
config.c:268 ast_category_browse: config->last_browse->name:
config.c:269 ast_category_browse: config->root:
config.c:292 ast_category_browse: Category Browse Results: (null)
config.c:299 ast_category_browse: Return NULL;

As you can see the ast_category_browse is returning nothing.

Everything else seems to be fine, i cannot seem to add debug flags to the reload_queue_rt as this crashes asterisk.

Does anybody know what is causing this? or has seen this before?

Comments:By: Tilghman Lesher (tilghman) 2006-03-20 14:20:59.000-0600

Would you mind upgrading to 1.2.5 or the latest 1.2 from SVN and trying this again?

By: Michael Scott (mgscott) 2006-03-21 06:54:25.000-0600

I have updated to v1.2.5, there is no change, still getting the error ast_request: No channel type registered for '', seems that it is returning null and hence asterisk is assuming that there are no interfaces/members in the memebers queue.

The data is still being selected correctly via realtime fromt the database.

Is there anywhere i can check for some memory or other errors reported by asterisk when the member_config returns?

By: Michael Scott (mgscott) 2006-04-02 14:29:36

I have added a category browser immediately after the line in app_queue.c

member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL);

The category browse line i added was

interface = ast_category_browse(member_config, NULL);

I also added debug flags in the ast_load_realtime_multientry and category browse, the load realtime does loop through the database, however immediately after the call and return to member_config, the category_browse function returns null always...

I have attempted to try changing all the datatypes of the database, but this is doing nothing.

Asterisk does not report any errors and still allows the callee to enter the queue.

I can connect to the queue via the addqueuemember from the CLI, which then works fine....

Any thoughts?

By: Serge Vecher (serge-v) 2006-05-04 09:24:26

where are we with this issue?

By: Michael Scott (mgscott) 2006-05-04 09:39:30

I found the problem, it was an issue in the app_queue.c, where the ast_realtime_multi was populating the interface structure with upper case interface, later, during the ategory_browse it was looking for the lowercase.

We are using Oracle, which maybe the issue, however we ended up plugging this for now with a strupr statement on the call to category browse, then moved on.

We are continuing the investigations to see how this plug may impact the rest of the queue functionality.

By: Michael Scott (mgscott) 2006-05-04 09:40:53

Sorry, that is the category was INTERFACE returned from the realtime_multi populating member_config structure. later in the app_queue.c is was reading the member_config for all interfaces in realtime, not finding anything as it was looking for interface and didnot find INTERFACE.

By: Serge Vecher (serge-v) 2006-05-04 09:42:19

mgscott: can you please post the patch, so that others can help you with it?

Also, if you don't have a disclaimer on file, please file it with Digium.

Thanks!

By: Serge Vecher (serge-v) 2006-05-12 11:04:36

BJ: do you want to pitch in on this one?

thanks.

By: Serge Vecher (serge-v) 2006-05-22 14:46:07

mgscott: need your response here ...

By: Serge Vecher (serge-v) 2006-05-30 10:31:12

Please feel free to reopen if this is still an issue in latest stable 1.2 (rev > 31000). If so, please note the current revision you are running at that time.

Thanks.