[asterisk-bugs] [Asterisk 0012680]: Extension state change random delay
noreply at bugs.digium.com
noreply at bugs.digium.com
Thu Jul 10 08:18:07 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=12680
======================================================================
Reported By: corruptor
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 12680
Category: Channels/chan_sip/Subscriptions
Reproducibility: always
Severity: minor
Priority: normal
Status: feedback
Asterisk Version: 1.4.20
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 05-19-2008 05:04 CDT
Last Modified: 07-10-2008 08:18 CDT
======================================================================
Summary: Extension state change random delay
Description:
asterisk-1.4.20-rc3
Grandstream GXP-2000 is registered as 1100 and subscribed to receive
changes about extensions states.
SIP/1101 is Linksys 942
SIP/1102 is SjPhone.
I've also set notifyringing=yes.
1102 calls 1101. 1101 sends RINGING but asterisk sends NOTIFY to
Grandstream with 3 sec delay. You can see (log is attached) that RINGING
was at 19:11:27 and NOTIFY is sent at 19:11:30.
Later when 1101 answers you can see that device state is changed 9 seconds
after call have been established (19:11:50] DEBUG[24559] devicestate.c:
Changing state for SIP/1102-09551818 - state 4 (Invalid))
When call is over asterisk changes state for one of the extensions almost
instantly but there is 20 seconds delay for 1102 (19:12:20).
Please help to debug this problem.
======================================================================
----------------------------------------------------------------------
aragon - 07-10-08 08:18
----------------------------------------------------------------------
This problem is causing problems all over the bug tracker in relation to
agents not receiving calls.
I'm certainly no expert but based on comments derived from other tickets;
to me this looks like some sort of DNS delay issue.
I think root cause may be buried in an earlier revision which causes DNS
delay or failure to improperly update channel or hint status.
Repository: asterisk
Revision: 96575
U branches/1.4/main/devicestate.c
------------------------------------------------------------------------
r96575 | tilghman | 2008-01-04 16:59:58 -0600 (Fri, 04 Jan 2008) | 7
lines
Fix the problem of notification of a device state change to a device with
a '-'
in the name. Could probably do with a better fix in trunk, but this bug
has
been open way too long without a better solution.
Reported by: stevedavies
Patch by: tilghman
(Closes issue 0009668)
I believe relates to 12771 12680 12672 12627 and probably 12773
I like stp comments in:
http://bugs.digium.com/view.php?id=12771#89723
"There is addition code in devicestate.c , function
__ast_device_state_changed_literal(), that will handle state change on both
device and call. For example, when SIP answer, there will be notification
on state change for device SIP/XXXX and for call SIP/XXXX-YYYYY. By adding
the call to notification list, sip_devicestate() function will search for
device state of the call SIP/XXXX-YYYY. Which is not possible to find,
therefore, sip_devicestate() will call ast_gethostbyname() and get stuck
there for few seconds (about 10 secs). Delay in sip_devicestate() cause
notification thread not be able to process others state change for a while.
So the everything that wait for state change will not work as expect. After
change code in __ast_device_state_changed_literal, my problem is solved and
warning for "UPGRADE.txt" gone.
I also believe that this also a cause for bug [0012680] too."
http://bugs.digium.com/view.php?id=12771#89750
"Another way is to change how sip_devicestate() search for the device.
Instead of always calling ast_gethostbyname(), we should check if there is
a real host name in SIP device name. It may possible to fix by setting
correct DNS so that ast_gethostbyname() can return immediately instead of
waiting for DNS server to response."
Issue History
Date Modified Username Field Change
======================================================================
07-10-08 08:18 aragon Note Added: 0090002
======================================================================
More information about the asterisk-bugs
mailing list