[Home]

Summary:ASTERISK-24497: Hints change to Idle from InUse after sip reload.
Reporter:Krzysztof Chmielewski (kristoff)Labels:
Date Opened:2014-11-05 08:16:58.000-0600Date Closed:2014-12-29 10:35:19.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_queue Resources/res_config_odbc Resources/res_odbc
Versions:11.10.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) issue_24497.txt
( 1) sippeers.sql
Description:Hello,
I've got two real time SIP accounts in my Astetisk. Every time after chan_sip reload I have noticed that hint state and queue member state for thous two accounts changes from InUse to Idle. Also there is manager event (ExtensionStante) informing that thous accounts change their states.

Is this OK?

Scenario
SIP_test001 calls to SIP_test002

Hints:
{code}
core show hints

   -= Registered Asterisk Dial Plan Hints =-
                   cc1@PBX              : Queue:cc1             State:Unavailable     Watchers  0
               test003@PBX              : SIP/test003&Custom:t  State:InUse           Watchers  0
               test002@PBX              : SIP/test002&Custom:t  State:InUse           Watchers  0
               test001@PBX              : SIP/test001&Custom:t  State:Idle            Watchers  0
               test004@PBX              : SIP/test004&Custom:t  State:Unavailable     Watchers  0
{code}


Queue:
{code}
queue show
cc1 has 0 calls (max unlimited) in 'random' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
  Members:
     LOCAL/test002@PBX/nb (ringinuse disabled) (realtime) (In use) has taken no calls yet
     LOCAL/test003@PBX/nb (ringinuse disabled) (realtime) (In use) has taken no calls yet
{code}

After chan_sip reload (after few sec)
{code}
queue show
cc1 has 0 calls (max unlimited) in 'random' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
  Members:
     LOCAL/test002@PBX/nb (ringinuse disabled) (realtime) (Not in use) has taken no calls yet
     LOCAL/test003@PBX/nb (ringinuse disabled) (realtime) (Not in use) has taken no calls yet
  No Callers
{code}

and

{code}
core show hints

   -= Registered Asterisk Dial Plan Hints =-
                   cc1@PBX              : Queue:cc1             State:Unavailable     Watchers  0
               test003@PBX              : SIP/test003&Custom:t  State:Idle            Watchers  0
               test002@PBX              : SIP/test002&Custom:t  State:Idle            Watchers  0
               test001@PBX              : SIP/test001&Custom:t  State:Idle            Watchers  0
               test004@PBX              : SIP/test004&Custom:t  State:Unavailable     Watchers  0
{code}



Comments:By: Matt Jordan (mjordan) 2014-11-05 08:53:46.766-0600

We require a complete debug log to help triage the issue. This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Krzysztof Chmielewski (kristoff) 2014-11-05 09:44:53.046-0600

A have attached log in issue_24497.txt according to Doc You mentioned.

Dial starts at line 1614
Call was answered at line 2386
Chan_sip reload was at line 5063


By: Rusty Newton (rnewton) 2014-11-06 17:14:52.494-0600

Did this work for you in a previous version? If so, what exact version?

By: Krzysztof Chmielewski (kristoff) 2014-11-10 04:57:32.808-0600

I will provide You with feedback by the end of this day.

By: Krzysztof Chmielewski (kristoff) 2014-11-10 16:42:58.129-0600

Hi,
the same problem occurs in Asterisk 11.14.0, 11.10.0 and 1.8.19.1

I didn't check on versions between 11.14.0 and 11.10.0

By: Rusty Newton (rnewton) 2014-11-13 11:07:15.534-0600

Thank you for the debug and additional information.

{quote}
Every time after chan_sip reload I have noticed that hint state and queue member state for thous two accounts changes from InUse to Idle
{quote}

Does the issue only occur with the realtime extensions?

What realtime modules are you using and what backend? Please include all versions where applicable.

By: Krzysztof Chmielewski (kristoff) 2014-11-18 04:38:56.120-0600

I will provide You with feedback by the end of this day.

By: Krzysztof Chmielewski (kristoff) 2014-11-24 16:03:37.523-0600

Hey,
I'm sorry for taking me so many time to provide feedback.

At this point I cannot reproduce this problem for non real time configuration.

In my production environment I am using pure real time configuration. All sip.conf, pears, hints, friends and dialplan is acquiring from data base.
For backedn i am using PostgreSQL 9.1.3 and odbc connector (unixODBC 2.2.11).

My table for sippeers is in sippeers.conf attachment.

By: Rusty Newton (rnewton) 2014-12-04 17:37:34.687-0600

I don't believe realtime hints are currently supported. Meaning, they may work partially.

https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration
{quote}
Limitations

Currently, realtime extensions do not support realtime hints. There is a workaround available by using func_odbc. See the sample func_odbc.conf for more information.
{quote}

Are your hints configured in static dialplan?

By: Krzysztof Chmielewski (kristoff) 2014-12-10 04:06:40.943-0600

I will provide You with feedback by the end of this week.

By: Krzysztof Chmielewski (kristoff) 2014-12-22 09:39:16.816-0600

Hi,
my hints are from real time configuration stored in PostgreSQL DB. For example:

{code}
test001,hint,SIP/test001&Custom:test001
{code}

Hints configuration is relatively constant.

By: Matt Jordan (mjordan) 2014-12-29 10:35:15.368-0600

As the documentation states, realtime hints aren't supported. Providing this functionality would constitute an improvement. As such, I'm closing this out as "Not a Bug".

By: Maciej Krajewski (jamicque) 2014-12-29 11:00:06.602-0600

Hi,
it's not a realtime configuration it's a static configuration stored in DB. The same thing occurs with static configuration in conf files.
Matt, please reopen the ticket.

By: Rusty Newton (rnewton) 2015-01-02 09:41:17.460-0600

[~jamicque] can you post reproduction steps showing how to reproduce this issue without realtime involved, with only static configuration?



By: Maciej Krajewski (jamicque) 2015-01-05 06:35:14.529-0600

Rusty I was wrong, the congiuration is static (both hints and queue where static) but the peers are realtime.
The problem is as follows scnario A calls B (no queues)
Hints behave as they should, however after the reload of asterisk when the first registration comes from A iit changes the hint status to not in use. The same happens with B.