Ticket #3274 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

DND or DND toggle devstate only changes Follow me hint and not DND hints

Reported by: brettm Assigned to:
Priority: major Milestone: 2.5
Component: Do-Not-Disturb (DND) Version: 2.5-branch
Keywords: devstate Cc:
Confirmation: Need testing Distro:
Backend Engine: Asterisk 1.4.x Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description (Last modified by p_lindheimer)

Dial DND on feature code

 Extension Changed 425[ext-local] new state InUse for Notify User 435 
    -- Executing [*78@from-internal:1] Answer("SIP/425-b4f177d8", "") in new stack
 Extension Changed 425[ext-local] new state InUse for Notify User 424 
 Extension Changed 425[ext-local] new state InUse for Notify User 427 
    -- Executing [*78@from-internal:2] Wait("SIP/425-b4f177d8", "1") in new stack
    -- Executing [*78@from-internal:3] Macro("SIP/425-b4f177d8", "user-callerid|") in new stack

 -- Executing [*78@from-internal:4] Set("SIP/425-b4f177d8", "DB(DND/425)=YES") in new stack
    -- Executing [*78@from-internal:5] Set("SIP/425-b4f177d8", "STATE=BUSY") in new stack
    -- Executing [*78@from-internal:6] Gosub("SIP/425-b4f177d8", "sstate|1") in new stack
    -- Executing [sstate@from-internal:1] Set("SIP/425-b4f177d8", "DEVICES=425") in new stack
    -- Executing [sstate@from-internal:2] GotoIf("SIP/425-b4f177d8", "0?return") in new stack
    -- Executing [sstate@from-internal:3] Set("SIP/425-b4f177d8", "LOOPCNT=1") in new stack
    -- Executing [sstate@from-internal:4] Set("SIP/425-b4f177d8", "ITER=1") in new stack
    -- Executing [sstate@from-internal:5] Set("SIP/425-b4f177d8", "DEVSTATE(Custom:FOLLOWME425)=BUSY") in new stack

At this point a show hints only displays Follow me as InUse? ??

Should this not be setting the following to inuse ?

425@ext-local           : SIP/425&Custom:DND42  State:Idle            Watchers  3

The only way I can get the DND hint to be Inuse is by dialling the full number being *76xxx. Isn't the idea behind the devstate thing, is that when user sets dnd on or off, they can subscribe to the Custom devstate option ??

Change History

10/12/08 21:00:49 changed by p_lindheimer

  • owner deleted.
  • priority changed from minor to major.
  • confirmation changed from Unreviewed to Need testing.
  • component changed from Core to Do-Not-Disturb (DND).
  • description changed.

Well that's an interesting bug which does not happen on my system but it appears that the result of calling gosub(sstate,1) when you just press *76, which takes place in the from-internal context, is choosing to go to the Follow-Me version of that subroutine instead of the dnd version. When you dial *76xxx, you end up with a goto so you are then 'officially' in the dnd context.

I'll post a patch momentarily which will close this ticket. Please test and confirm that it fixes the issue and then we'll push out the module. It will be for both the donnotdisturb and findmefollow module's - you can apply the patch or just copy the entire functions.inc.php for each and try them.

10/12/08 21:02:16 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [6972]) fixes #3274 add context in the gosub() calls for sstate as some usage of the feature codes are falling through to the wrong subroutine

10/12/08 22:44:37 changed by brettm

Applied patches and all is working fine. Thanks for that.

Executing [*76@from-internal:4] GotoIf?("SIP/425-b4f35b20", "1?activate:deactivate") in new stack

-- Goto (from-internal,*76,5) -- Executing [*76@from-internal:5] Set("SIP/425-b4f35b20", "DB(DND/425)=YES") in new stack -- Executing [*76@from-internal:6] Set("SIP/425-b4f35b20", "STATE=BUSY") in new stack -- Executing [*76@from-internal:7] Gosub("SIP/425-b4f35b20", "app-dnd-toggle|sstate|1") in new stack -- Executing [sstate@app-dnd-toggle:1] Set("SIP/425-b4f35b20", "DEVSTATE(Custom:DND425)=BUSY") in new stack -- Executing [sstate@app-dnd-toggle:2] Set("SIP/425-b4f35b20", "DEVICES=425") in new stack -- Executing [sstate@app-dnd-toggle:3] GotoIf?("SIP/425-b4f35b20", "0?return") in new stack -- Executing [sstate@app-dnd-toggle:4] Set("SIP/425-b4f35b20", "LOOPCNT=1") in new stack -- Executing [sstate@app-dnd-toggle:5] Set("SIP/425-b4f35b20", "ITER=1") in new stack -- Executing [sstate@app-dnd-toggle:6] Set("SIP/425-b4f35b20", "DEVSTATE(Custom:DEVDND425)=BUSY") in new stack -- Executing [sstate@app-dnd-toggle:7] Set("SIP/425-b4f35b20", "ITER=2") in new stack -- Executing [sstate@app-dnd-toggle:8] GotoIf?("SIP/425-b4f35b20", "0?begin") in new stack -- Executing [sstate@app-dnd-toggle:9] Return("SIP/425-b4f35b20", "") in new stack -- Executing [*76@from-internal:8] Playback("SIP/425-b4f35b20", "do-not-disturb&activated") in new sta

10/12/08 22:49:08 changed by brettm

Errr but .... when deactivating DND the hint is not changed for follow me ?

*21425@ext-findmefollow : Custom:FOLLOWME425 State:Busy Watchers 0

Hints work fine when DND is activated, but only the DND hint is removed when using either *76 Toggle or *79 DND Off.

10/12/08 23:59:57 changed by p_lindheimer

brettm, the Follow-Me hint was set by the bug, you will have to use the Follow-Me code to turn it back off unless you are saying that you still have something strange going on.

10/13/08 00:34:05 changed by brettm

Trying to use *21 for follow me toggle and get the following ? No sstate options used ? Not sure what's happening here.

-- Executing [*21@from-internal:1] Goto("SIP/425-0a1274c0", "app-fmf-toggle|s|start") in new stack

-- Goto (app-fmf-toggle,s,1) -- Executing [s@app-fmf-toggle:1] Answer("SIP/425-0a1274c0", "") in new stack -- Executing [s@app-fmf-toggle:2] Wait("SIP/425-0a1274c0", "1") in new stack

== Manager 'admin' logged off from 127.0.0.1

-- Executing [s@app-fmf-toggle:3] Macro("SIP/425-0a1274c0", "user-callerid|") in new stack -- Executing [s@macro-user-callerid:1] Set("SIP/425-0a1274c0", "AMPUSER=425") in new stack -- Executing [s@macro-user-callerid:2] GotoIf?("SIP/425-0a1274c0", "0?report") in new stack -- Executing [s@macro-user-callerid:3] ExecIf?("SIP/425-0a1274c0", "1|Set|REALCALLERIDNUM=425") in new stack -- Executing [s@macro-user-callerid:4] Set("SIP/425-0a1274c0", "AMPUSER=425") in new stack -- Executing [s@macro-user-callerid:5] Set("SIP/425-0a1274c0", "AMPUSERCIDNAME=Brett Matthews") in new stack -- Executing [s@macro-user-callerid:6] GotoIf?("SIP/425-0a1274c0", "0?report") in new stack -- Executing [s@macro-user-callerid:7] Set("SIP/425-0a1274c0", "AMPUSERCID=425") in new stack -- Executing [s@macro-user-callerid:8] Set("SIP/425-0a1274c0", "CALLERID(all)="Brett Matthews" <425>") in new stack -- Executing [s@macro-user-callerid:9] Set("SIP/425-0a1274c0", "REALCALLERIDNUM=425") in new stack -- Executing [s@macro-user-callerid:10] ExecIf?("SIP/425-0a1274c0", "0|Set|CHANNEL(language)=") in new stack -- Executing [s@macro-user-callerid:11] GotoIf?("SIP/425-0a1274c0", "0?continue") in new stack -- Executing [s@macro-user-callerid:12] Set("SIP/425-0a1274c0", "TTL=64") in new stack -- Executing [s@macro-user-callerid:13] GotoIf?("SIP/425-0a1274c0", "1?continue") in new stack -- Goto (macro-user-callerid,s,20) -- Executing [s@macro-user-callerid:20] NoOp?("SIP/425-0a1274c0", "Using CallerID "Brett Matthews" <425>") in new stack -- Executing [s@app-fmf-toggle:4] GotoIf?("SIP/425-0a1274c0", "0?activate") in new stack -- Executing [s@app-fmf-toggle:5] GotoIf?("SIP/425-0a1274c0", "0?deactivate:end") in new stack -- Goto (app-fmf-toggle,s,10) -- Executing [s@app-fmf-toggle:10] Macro("SIP/425-0a1274c0", "hangupcall|") in new stack.

Looks like logic is busted ?

10/13/08 10:41:21 changed by p_lindheimer

looks like that extension does not have a follow-me setup to me. Also, please try to remember to enclose your CLI/log dumps between triple curly braces, e.g.:
{ { {
your log here
} } }
but no spaces between the braces.