No DND status after service reboot
FOP 2.24 license
Centos 64
Asterisk 1.8
Freepbx 2.7 and 2.9
after service fop2 restart ..fop doesn't show DND status.. But I can see
CLI: database show
/DND/0032 : YES
/DND/0310 : YES
/DND/0327 : YES
/DND/0330 : YES
/DND/0351 : YES
/DND/8000 : YES
/fop2state/SIP/0075 : Do not Disturb
/fop2state/SIP/0310 : Do not Disturb
/fop2state/SIP/0311 : Do not Disturb
/fop2state/SIP/0327 : Do not Disturb
/fop2state/SIP/0330 : Do not Disturb
/fop2state/SIP/0351 : Do not Disturb
/fop2state/SIP/0503 : Do not Disturb
/fop2state/SIP/8000 : Do not Disturb
any help would be fine.
Centos 64
Asterisk 1.8
Freepbx 2.7 and 2.9
after service fop2 restart ..fop doesn't show DND status.. But I can see
CLI: database show
/DND/0032 : YES
/DND/0310 : YES
/DND/0327 : YES
/DND/0330 : YES
/DND/0351 : YES
/DND/8000 : YES
/fop2state/SIP/0075 : Do not Disturb
/fop2state/SIP/0310 : Do not Disturb
/fop2state/SIP/0311 : Do not Disturb
/fop2state/SIP/0327 : Do not Disturb
/fop2state/SIP/0330 : Do not Disturb
/fop2state/SIP/0351 : Do not Disturb
/fop2state/SIP/0503 : Do not Disturb
/fop2state/SIP/8000 : Do not Disturb
any help would be fine.
Comments
Best regards,
Here is my buttons.cfg
[USER/0226]
type=extension
extension=0226
label=Smith
mailbox=2226@default
context=from-internal
queuecontext=from-queue
extenvoicemail=*2226@from-internal
group=work
which i created by autoconfig-buttons-freepbx.sh
Also i have all permissions to /etc/asterisk/manager.conf
After I started ./generate_override_contexts.pl -write
got a new extensions_override_fop2.conf which looks like:
[app-dnd-off]
include => app-dnd-off-custom
exten => 79,1,Answer
exten => 79,n,Wait(1)
exten => 79,n,Macro(user-callerid,)
; added for fop2
exten => 79,n,Set(CHAN=${CUT(CHANNEL,-,1)})
exten => 79,n,dbDel(fop2state/${CHAN})
exten => 79,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: ${CHAN},Value: )
; end fop2 addition
exten => 79,n,Noop(Deleting: DND/${AMPUSER} ${DB_DELETE(DND/${AMPUSER})})
exten => 79,n,Set(STATE=NOT_INUSE)
exten => 79,n,Gosub(app-dnd-off,sstate,1)
exten => 79,n(hook_1),Playback(do-not-disturb&de-activated)
exten => 79,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVICE_STATE(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(DEVICE_STATE(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()
here I changed a standart meaning *78 -> 78 by manual...guess it was my fault.
Now I've repeated ./generate_override_contexts.pl -write and everything works fine!
fop2 is located on asterisk server.
But I have another fop2 which separated from asterisk and this one doesn't show DND status.
Any suggestions would be great.
Yea, it works fine..
but after service fop2 restart ..fop2 doesn't show DND status unfortunately
If you do not see dnd status on boot, then you have a misconfiguration somewhere, as it works perfectly fine. You *must* configure the customastdb entry in your button.cfg, something like
customastdb=CF/600
Not sure why you are configuring buttons manually? If you use freepbx, you should let the autoconfig scripts do their job.
Best regards,
I'm using a FreePBX based distro Elastix. Freepbx
I used autoconfig-buttons-freepbx.sh
[USER/0226]
type=extension
extension=0226
label=Smith
mailbox=2226@default
context=from-internal
queuecontext=from-queue
extenvoicemail=*2226@from-internal
group=work
here is my manager_additional.conf
[fopp2]
secret = fop2secret
deny=0.0.0.0/0.0.0.0
permit=0.0.0.0/0.0.0.0
read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
in button.cfg I added : customastdb=DND/0226
1. so it shows me blue arrow on the button. click on it sad "Yes"...after that I swithed DND off, still see the same "Yes"
2. After "service fop2 restart" I see nothing!?
besides that, I installed fop2admin, than uninstalled it. Second installation showed me a mistake - exit: 1
[FATAL] SELECT if(`defaultlot`='no',concat('PARK/parkinglot_',id),'PARK/default') AS channel,parkext AS exten FROM parkplus [nativecode=1146 ** Table 'asterisk.parkplus' doesn't exist]SQL -
SELECT if(`defaultlot`='no',concat('PARK/parkinglot_',id),'PARK/default') AS channel,parkext AS exten FROM parkplus
Trace Back:
/var/www/html/admin/libraries/sql.functions.php:11 die_freepbx()
[0]: SELECT if(`defaultlot`='no',concat('PARK/parkinglot_',id),'PARK/default') AS channel,parkext AS exten FROM parkplus [nativecode=1146 ** Table 'asterisk.parkplus' doesn't exist]SQL -
SELECT if(`defaultlot`='no',concat('PARK/parkinglot_',id),'PARK/default') AS channel,parkext AS exten FROM parkplus
/var/www/html/admin/modules/fop2admin/functions.inc.php:70 sql()
[0]: SELECT if(`defaultlot`='no',concat('PARK/parkinglot_',id),'PARK/default') AS channel,parkext AS exten FROM parkplus
[1]: getAll
[2]: 2
/var/lib/asterisk/bin/retrieve_conf:606 fop2admin_get_config()
[0]: asterisk
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.
For the presence box in fop2 to show Do not Disturb, you must have a database entry
fop2state with the channel name as family, something like
fop2state/SIP/606
What do you see if you do
asterisk -rx "database show fop2state"
when you set yourself in DND from fop2?
and when you set DND from the freepbx feature code?
And about fop2admin, what version did you install? You must have the park module installed for it to work.
First of all, Yes I have /fop2state/SIP/0226 : Do not Disturb
my first post in this topic about dnd status in database.
Secondly, fop2admin had been installed succesfuly after module Parking Lot installing.
Regards,
Ok, I think the problem is that you have SIP/0226 instead of USER/0226 as the family. You might need to change the override context so it uses that instead of the channel name. I have not tested this, but perhaps it works, it should be something similar to this:
exten => 79,n,dbDel(fop2state/USER/${AMPUSER})
exten => 79,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: USER/${AMPUSER},Value: )
Best regards,
[app-dnd-off]
include => app-dnd-off-custom
exten => 79,1,Answer
exten => 79,n,Wait(1)
exten => 79,n,Macro(user-callerid,)
; added for fop2
exten => 79,n,Set(CHAN=${CUT(CHANNEL,-,1)})
exten => 79,n,dbDel(fop2state/${CHAN})
exten => 79,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: ${CHAN},Value: )
; end fop2 addition
exten => 79,n,Noop(Deleting: DND/${AMPUSER} ${DB_DELETE(DND/${AMPUSER})})
exten => 79,n,Set(STATE=NOT_INUSE)
exten => 79,n,Gosub(app-dnd-off,sstate,1)
exten => 79,n(hook_1),Playback(agent-loginok)
exten => 79,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVICE_STATE(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(DEVICE_STATE(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()
[app-dnd-on]
include => app-dnd-on-custom
exten => 78,1,Answer
exten => 78,n,Wait(1)
exten => 78,n,Macro(user-callerid,)
; added for fop2
exten => 78,n,Set(DB(DND/${AMPUSER})=YES)
exten => 78,n,Set(CHAN=${CUT(CHANNEL,-,1)})
exten => 78,n,Set(DB(fop2state/${CHAN})=Do not Disturb)
exten => 78,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: ${CHAN},Value: Do not Disturb)
; end fop2 addition
exten => 78,n,Set(DB(DND/${AMPUSER})=YES)
exten => 78,n,Set(STATE=BUSY)
exten => 78,n,Gosub(app-dnd-on,sstate,1)
exten => 78,n(hook_1),Playback(agent-loggedoff)
exten => 78,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVICE_STATE(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(DEVICE_STATE(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()
a new one, after source was changed:
[app-dnd-off]
include => app-dnd-off-custom
exten => 79,1,Answer
exten => 79,n,Wait(1)
exten => 79,n,Macro(user-callerid,)
; added for fop2
exten => 79,n,Set(CHAN=${CUT(CHANNEL,-,1)})
exten => 79,n,dbDel(fop2state/USER/${AMPUSER})
exten => 79,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: USER/${AMPUSER},Value: )
; end fop2 addition
exten => 79,n,Noop(Deleting: DND/${AMPUSER} ${DB_DELETE(DND/${AMPUSER})})
exten => 79,n,Set(STATE=NOT_INUSE)
exten => 79,n,Gosub(app-dnd-off,sstate,1)
exten => 79,n(hook_1),Playback(do-not-disturb&de-activated)
exten => 79,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVICE_STATE(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(DEVICE_STATE(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()
[app-dnd-on]
include => app-dnd-on-custom
exten => 78,1,Answer
exten => 78,n,Wait(1)
exten => 78,n,Macro(user-callerid,)
; added for fop2
exten => 78,n,Set(DB(DND/${AMPUSER})=YES)
exten => 78,n,Set(CHAN=${CUT(CHANNEL,-,1)}) ; guess we don't need this one???
exten => 78,n,Set(DB(fop2state/USER/${AMPUSER})=Do not Disturb)
exten => 78,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: USER/${AMPUSER},Value: Do not Disturb)
; end fop2 addition
exten => 78,n,Set(DB(DND/${AMPUSER})=YES)
exten => 78,n,Set(STATE=BUSY)
exten => 78,n,Gosub(app-dnd-on,sstate,1)
exten => 78,n(hook_1),Playback(do-not-disturb&activated)
exten => 78,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVICE_STATE(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(DEVICE_STATE(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()
Unfortunately it still doesn't show DND
asterisk -rx "database show fop2state"
What is the output?
/fop2state/SIP/0352 : Do not Disturb
/fop2state/SIP/0503 : Do not Disturb
/fop2state/USER/0352 : Do not Disturb
after service fop2 restart
I see DND status on 0352..
so ..it looks like everything is fine now..?!
I read this message before posting View Post 601
Probably we need put a code which is a simular to DND and CF codes, don't we?
exten => 781,n,Set(DB(fop2state/USER/${AMPUSER})=Out to Lunch)
exten => 781,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: USER/${AMPUSER},Value: Out to Lunch)
Chose an extension that will not overlap with your current dialplan.
Best regards,