Summary: | ASTERISK-13521: state of non existent extensions should not be "Idle" | ||
Reporter: | pj (pj) | Labels: | |
Date Opened: | 2009-02-05 10:26:44.000-0600 | Date Closed: | 2009-07-13 09:55:43 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Subscriptions |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20090206__bug14413.diff.txt | |
Description: | If user subscribes to extension, that doesn't exist at all in sip.conf, asterisk should not report state of this extension as 'idle' as it currently does, but instead, 'unknown' state we be more apropriate. I'm using pattern match feature for hints definition in dialplan: context linestates { hint(SIP/${EXTEN}) _ZXX! => NoOP; } | ||
Comments: | By: Tilghman Lesher (tilghman) 2009-02-05 12:30:56.000-0600 What is the output of the command: dialplan show linestates By: pj (pj) 2009-02-05 12:32:58.000-0600 [ Context 'linestates' created by 'pbx_ael' ] '_ZXX!' => hint: SIP/${EXTEN} [pbx_ael] 1. NoOP() [pbx_ael] By: Tilghman Lesher (tilghman) 2009-02-05 13:58:04.000-0600 The fact that it is alone like this means that the hint isn't being used at all. A hint for a specific line uses the pattern match to create a hint without the pattern. By: pj (pj) 2009-02-05 14:02:19.000-0600 hints are working fine in this way (my previous output was from time, when nobody had subscribed), so I'm sending again dialplan show and core show hints... [ Context 'linestates' created by 'pbx_ael' ] '322' => hint: SIP/322 [pbx_ael] '324' => hint: SIP/324 [pbx_ael] '324p' => hint: SIP/324p [pbx_ael] '408' => hint: SIP/408 [pbx_ael] '455' => hint: SIP/455 [pbx_ael] '726' => hint: SIP/726 [pbx_ael] '743' => hint: SIP/743 [pbx_ael] '888' => hint: SIP/888 [pbx_ael] '_ZXX!' => hint: SIP/${EXTEN} [pbx_ael] 1. NoOP() [pbx_ael] -= Registered Asterisk Dial Plan Hints =- 888@linestates : SIP/888 State:Idle Watchers 1 743@linestates : SIP/743 State:Unavailable Watchers 1 726@linestates : SIP/726 State:Idle Watchers 1 455@linestates : SIP/455 State:Unavailable Watchers 1 408@linestates : SIP/408 State:Idle Watchers 1 324p@linestates : SIP/324p State:Idle Watchers 1 324@linestates : SIP/324 State:Idle Watchers 1 322@linestates : SIP/322 State:Unavailable Watchers 1 _ZXX!@linestates : SIP/${EXTEN} State:Idle Watchers 0 ---------------- - 9 hints registered By: pj (pj) 2009-02-05 14:04:39.000-0600 In previsous example, you can see, that SIP/888 has State:Idle, but this extension isn't configured at all in asterisk, so it should display 'unknown' (or invalid) state, instead of Idle. By: Tilghman Lesher (tilghman) 2009-02-05 14:24:33.000-0600 Yes, but that's actually the extension state, not the device state. The extension state is Idle. The device state is Invalid. By: Tilghman Lesher (tilghman) 2009-02-05 14:27:53.000-0600 btw, if you want to make the extension cease existing, you should get rid of that NoOp. That is what is making the extension exist. By: pj (pj) 2009-02-05 14:39:41.000-0600 If I remove NoOP, so my dialplan will look like: context linestates { hint(SIP/${EXTEN}) _ZXX! => ; } nothing is changed in this behaviour, extension is still shown and reported as "Idle" to user, that has subscribed to this "non existent" extension. By: Tilghman Lesher (tilghman) 2009-02-05 17:44:49.000-0600 Okay, that makes sense. Patch uploaded. By: pj (pj) 2009-02-06 02:32:15.000-0600 patched successfully, but nothing changed, non existent devices are still considered as idle, like 'SIP/888phone' from my example... -= Registered Asterisk Dial Plan Hints =- 888phone@linestates : SIP/888phone State:Idle Watchers 1 743@linestates : SIP/743 State:Unavailable Watchers 1 726@linestates : SIP/726 State:Idle Watchers 1 455@linestates : SIP/455 State:Unavailable Watchers 1 408@linestates : SIP/408 State:Idle Watchers 1 324p@linestates : SIP/324p State:Idle Watchers 1 324@linestates : SIP/324 State:Idle Watchers 1 322@linestates : SIP/322 State:Unavailable Watchers 1 _ZXX!@linestates : SIP/${EXTEN} State:Idle Watchers 0 ---------------- By: Tilghman Lesher (tilghman) 2009-02-06 12:26:33.000-0600 Patch updated. By: pj (pj) 2009-02-06 13:39:43.000-0600 tested again, but sad to say, no change :( By: pj (pj) 2009-03-27 15:13:43 supplied patch was tested some weeks ago, but doesn't solve issue reported, so please change status of this bugreport from "ready for testing" so that solving can start again. thanks. By: Marcin Kowalczyk (kowalma) 2009-06-21 13:31:56 Hi, I've found same bug in 1.6.1.1 Asterisk-node1*CLI> core show hints Asterisk-node1*CLI> -= Registered Asterisk Dial Plan Hints =- 1063@hints : SIP/1063 State:Idle Watchers 0 1064@hints : SIP/1064 State:Idle Watchers 0 ---------------- - 2 hints registered Asterisk-node1*CLI> but 1063 does not exist at all Asterisk-node1*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status Realtime 1064/1064 94.209.100.75 D N 5064 OK (91 ms) Cached RT 1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline] Asterisk-node1*CLI> By: Digium Subversion (svnbot) 2009-06-26 14:31:15 Repository: asterisk Revision: 203702 U trunk/include/asterisk/devicestate.h U trunk/main/devicestate.c U trunk/main/pbx.c ------------------------------------------------------------------------ r203702 | russell | 2009-06-26 14:31:14 -0500 (Fri, 26 Jun 2009) | 5 lines Make invalid hints report Unavailable instead of Idle. (closes issue ASTERISK-13521) Reported by: pj ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203702 By: Digium Subversion (svnbot) 2009-06-26 14:37:44 Repository: asterisk Revision: 203704 _U branches/1.6.1/ U branches/1.6.1/include/asterisk/devicestate.h U branches/1.6.1/main/devicestate.c U branches/1.6.1/main/pbx.c ------------------------------------------------------------------------ r203704 | russell | 2009-06-26 14:37:44 -0500 (Fri, 26 Jun 2009) | 12 lines Merged revisions 203702 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r203702 | russell | 2009-06-26 14:31:14 -0500 (Fri, 26 Jun 2009) | 5 lines Make invalid hints report Unavailable instead of Idle. (closes issue ASTERISK-13521) Reported by: pj ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203704 By: Digium Subversion (svnbot) 2009-06-26 14:49:29 Repository: asterisk Revision: 203715 _U branches/1.6.2/ U branches/1.6.2/include/asterisk/devicestate.h U branches/1.6.2/main/devicestate.c U branches/1.6.2/main/pbx.c ------------------------------------------------------------------------ r203715 | russell | 2009-06-26 14:49:28 -0500 (Fri, 26 Jun 2009) | 12 lines Merged revisions 203702 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r203702 | russell | 2009-06-26 14:31:14 -0500 (Fri, 26 Jun 2009) | 5 lines Make invalid hints report Unavailable instead of Idle. (closes issue ASTERISK-13521) Reported by: pj ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203715 |