DND issues

I have just updated to the latest version on 2 systems and one system DND is working somewhat:
it works ok if one uses *78 and *79 to turn it on and off BUT it does not work if one uses *76 to toggle.
If one uses *78 to turn it on and *76 to togle it off the panel will continue to show it is ON and a restart of the panel wont show the correct setting.

ON the second box I just cant get it to work at all.
I have copied the extensions_override_freepbx.conf the the /etc/asterisk/
I restarted the panel and reloaded asterisk but no joy...
what could I have missed on the second box?
Thanks

Comments

  • Similar thing that i cannot get going.

    DND activated all OK using *78 - FOP shows user as DND and phone rejects calls.
    DND deactivated all OK using *79 - FOP shows user and Available now and accepts calls.

    Using the Toggle - *76 - it will not work.

    The reason this does not work is within the extensions_override_freepbx.conf - it has a dialplan for *78 and *79 which will override the default freepbx/asterisk ones - however you also need a dialplan in there for *76 which i lack the brain power to work out.

    Anyone that can provide a dialplan for *76 DND toggle so that it works with FOP would be awesome !
  • [app-dnd-toggle]
    include => app-dnd-toggle-custom
    exten => *76,1,Answer
    exten => *76,n,Wait(1)
    exten => *76,n,Macro(user-callerid,)
    exten => *76,n,GotoIf($["${DB(DND/${AMPUSER})}" = ""]?activate:deactivate)
    exten => *76,n(activate),Set(DB(DND/${AMPUSER})=YES)
    exten => *76,n,Set(CHAN=${CUT(CHANNEL,-,1)})
    exten => *76,n,Set(DB(fop2state/${CHAN})=Do not Disturb)
    exten => *76,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: ${CHAN},Value: Do not Disturb)
    exten => *76,n,Set(STATE=BUSY)
    exten => *76,n,Gosub(app-dnd-toggle,sstate,1)
    exten => *76,n,Playback(do-not-disturb&activated)
    exten => *76,n,Macro(hangupcall,)
    exten => *76,n(deactivate),dbDel(DND/${AMPUSER})
    exten => *76,n,Set(CHAN=${CUT(CHANNEL,-,1)})
    exten => *76,n,dbDel(fop2state/${CHAN})
    exten => *76,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: ${CHAN},Value: )
    exten => *76,n,Set(STATE=NOT_INUSE)
    exten => *76,n,Gosub(app-dnd-toggle,sstate,1)
    exten => *76,n,Playback(do-not-disturb&de-activated)
    exten => *76,n,Macro(hangupcall,)
    exten => sstate,1,Set(DEVSTATE(Custom:DND${AMPUSER})=${STATE})
    exten => sstate,n,Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)})
    exten => sstate,n,GotoIf($["${DEVICES}" = "" ]?return)
    exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
    exten => sstate,n,Set(ITER=1)
    exten => sstate,n(begin),Set(DEVSTATE(Custom:DEVDND${CUT(DEVICES,&,${ITER})})=${STATE})
    exten => sstate,n,Set(ITER=$[${ITER} + 1])
    exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin)
    exten => sstate,n(return),Return()
    
  • THANKYOU THANKYOU THANKYOU.... :)
    that is a joy......
    Also when I added this to the box that never worked I found my problem... I missed the very first line when I copied at installation.
    thanks again..
Sign In or Register to comment.