FreePBX Presence Refresh Issues

Hello,

I have set up a new Trixbox 2.8.0.4 server which is upgraded to run FreePBX 2.10.1.2. The problem is that when I set DND, either through FOP, ARI, or the phone, I need to manually refresh the FOP page (F5) before it will update the user's button with the DND status. All the other custom presences in FOP have the same issue; you can set these statuses, but need to manually refresh the page before they show up.

I have run generate_override_contexts.pl -w and have confirmed the proper database values are being set in and out of FOP. I have also confirmed that when setting DND outside of FOP the proper user events are being sent in the asterisk logs.

All other call events are showing up properly in FOP, so this appears to be strictly related to the visual refresh of the presence display on the user button.

Any assistance would be appreciated, because as far as I can tell from logs, etc, this should be working.

Thanks,

Comments

  • Hi,

    Trixbox has a bug where the "user" manager permission is not honored. You must edit /etc/asterisk/manager.conf and be sure you have "all" both in the read and write lines.

    The DND state is propagated using Asterisk Manager User Events, you can only see those in trixbox when having "hud" or "all" permissions. (this is a trixbox bug, normal asterisk is not affected).


    Best regards,
  • Hi,

    Sorry, I somehow missed the response to this post.

    I have set the read/write to "all" and it doesn't help. I have also tried "all,hud" for kicks and it didn't work either. To confirm I checked the user rights directly in CLI and see:
    username: admin
             secret: <Set>
                acl: no
          read perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,hud,all
         write perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,hud,all
    displayconnects: no
    

    And actually, after further studying the issue, I have to restart the FOP2 service, not just refresh the page, to get it to update the status when I set DND via phone or ARI.

    In CLI logs, the following user event is getting set:
    UserEvent("SIP/ext-xxxxxxx", "FOP2ASTDB,Family: fop2state,Channel: SIP/ext,Value: Do not Disturb")
    
    Which after scanning through the FOP2 freePBX overrides is correct and I have verified that it is following the overide commands and not the native FreePBX ones.

    Finally, I checked the FOP2 logging (verbosity 511) as best as I could given how verbose it is, and I get the following when I set DND:
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3337
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 4
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: DB(DND/9998)=YES
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: hud,all
    127.0.0.1       <- SequenceNumber: 3338
    127.0.0.1       <- File: db.c
    127.0.0.1       <- Line: 146
    127.0.0.1       <- Func: ast_db_put
    127.0.0.1       <- UserEvent: DBPut
    127.0.0.1       <- Family: DND
    127.0.0.1       <- Key: 9998
    127.0.0.1       <- Value: YES
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: UserEvent)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE USEREVENT 0
    
    Not a reference at all
    Not a reference at all
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3339
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 5
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: CHAN=SIP/9998
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3340
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: CHAN
    127.0.0.1       <- Value: SIP/9998
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3341
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 6
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: DB(fop2state/SIP/9998)=Do not Disturb
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: hud,all
    127.0.0.1       <- SequenceNumber: 3342
    127.0.0.1       <- File: db.c
    127.0.0.1       <- Line: 146
    127.0.0.1       <- Func: ast_db_put
    127.0.0.1       <- UserEvent: DBPut
    127.0.0.1       <- Family: fop2state
    127.0.0.1       <- Key: SIP/9998
    127.0.0.1       <- Value: Do not Disturb
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: UserEvent)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE USEREVENT 0
    
    Not a reference at all
    Not a reference at all
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3343
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 7
    127.0.0.1       <- Application: UserEvent
    127.0.0.1       <- AppData: FOP2ASTDB,Family: fop2state,Channel: SIP/9998,Value: Do not Disturb
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: user,all
    127.0.0.1       <- SequenceNumber: 3344
    127.0.0.1       <- File: app_userevent.c
    127.0.0.1       <- Line: 79
    127.0.0.1       <- Func: userevent_exec
    127.0.0.1       <- UserEvent: FOP2ASTDB
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Family: fop2state
    127.0.0.1       <- Channel: SIP/9998
    127.0.0.1       <- Value: Do not Disturb
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: UserEvent)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE USEREVENT 0
    
    GET CHANNEL input (ARRAY(0xf136770)) - output (ARRAY(0xf136770))
    
    Not a reference at all
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3345
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 8
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: DB(DND/9998)=YES
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: hud,all
    127.0.0.1       <- SequenceNumber: 3346
    127.0.0.1       <- File: db.c
    127.0.0.1       <- Line: 146
    127.0.0.1       <- Func: ast_db_put
    127.0.0.1       <- UserEvent: DBPut
    127.0.0.1       <- Family: DND
    127.0.0.1       <- Key: 9998
    127.0.0.1       <- Value: YES
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: UserEvent)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE USEREVENT 0
    
    Not a reference at all
    Not a reference at all
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3347
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 9
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: STATE=BUSY
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3348
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: STATE
    127.0.0.1       <- Value: BUSY
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3349
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 10
    127.0.0.1       <- Application: Gosub
    127.0.0.1       <- AppData: app-dnd-on,sstate,1()
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3350
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 1
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: DEVICE_STATE(Custom:DND9998)=BUSY
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    It's blessed into class Extension
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: hud,all
    127.0.0.1       <- SequenceNumber: 3351
    127.0.0.1       <- File: db.c
    127.0.0.1       <- Line: 146
    127.0.0.1       <- Func: ast_db_put
    127.0.0.1       <- UserEvent: DBPut
    127.0.0.1       <- Family: CustomDevstate
    127.0.0.1       <- Key: DND9998
    127.0.0.1       <- Value: BUSY
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: UserEvent)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE USEREVENT 0
    
    Not a reference at all
    Not a reference at all
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3352
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: DB_RESULT
    127.0.0.1       <- Value: 9998
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3353
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 2
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: DEVICES=9998
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3354
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: DEVICES
    127.0.0.1       <- Value: 9998
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: ExtensionStatus
    127.0.0.1       <- Privilege: call,all
    127.0.0.1       <- SequenceNumber: 3355
    127.0.0.1       <- File: manager.c
    127.0.0.1       <- Line: 3381
    127.0.0.1       <- Func: manager_state_cb
    127.0.0.1       <- Exten: 9998
    127.0.0.1       <- Context: ext-local
    127.0.0.1       <- Hint: SIP/9998&Custom:DND9998
    127.0.0.1       <- Status: 2
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: ExtensionStatus)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE EXTENSIONSTATUS 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3356
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 3
    127.0.0.1       <- Application: GotoIf
    127.0.0.1       <- AppData: 0?return
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3357
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 4
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: LOOPCNT=1
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3358
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: LOOPCNT
    127.0.0.1       <- Value: 1
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3359
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 5
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: ITER=1
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3360
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: ITER
    127.0.0.1       <- Value: 1
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3361
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 6
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: DEVICE_STATE(Custom:DEVDND9998)=BUSY
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: hud,all
    127.0.0.1       <- SequenceNumber: 3362
    127.0.0.1       <- File: db.c
    127.0.0.1       <- Line: 146
    127.0.0.1       <- Func: ast_db_put
    127.0.0.1       <- UserEvent: DBPut
    127.0.0.1       <- Family: CustomDevstate
    127.0.0.1       <- Key: DEVDND9998
    127.0.0.1       <- Value: BUSY
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: UserEvent)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE USEREVENT 0
    
    Not a reference at all
    Not a reference at all
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3363
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 7
    127.0.0.1       <- Application: Set
    127.0.0.1       <- AppData: ITER=2
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3364
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: ITER
    127.0.0.1       <- Value: 2
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: ExtensionStatus
    127.0.0.1       <- Privilege: call,all
    127.0.0.1       <- SequenceNumber: 3365
    127.0.0.1       <- File: manager.c
    127.0.0.1       <- Line: 3381
    127.0.0.1       <- Func: manager_state_cb
    127.0.0.1       <- Exten: *769998
    127.0.0.1       <- Context: ext-dnd-hints
    127.0.0.1       <- Hint: Custom:DEVDND9998
    127.0.0.1       <- Status: 2
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: ExtensionStatus)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE EXTENSIONSTATUS 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3366
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 8
    127.0.0.1       <- Application: GotoIf
    127.0.0.1       <- AppData: 0?begin
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3367
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: app-dnd-on
    127.0.0.1       <- Extension: sstate
    127.0.0.1       <- Priority: 9
    127.0.0.1       <- Application: Return
    127.0.0.1       <- AppData:
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: Newexten)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE NEWEXTEN 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: VarSet
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3368
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 8186
    127.0.0.1       <- Func: pbx_builtin_setvar_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Variable: GOSUB_RETVAL
    127.0.0.1       <- Value:
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    
    ** MAIN AMI event received...
    ** MAIN There's an 'Event' in the event block
    ** MAIN Event detected block_count = 1 (Event: VarSet)
    ** MAIN There are 1 blocks for processing
    ** MAIN Answer block cleared
    
    ** DIGEST_EVENT: start
    
    ** PROCESA_BLOQUE  0
    ** PROCESA_BLOQUE VARSET 0
    
    ** MAIN End of block from localhost
    
    127.0.0.1       <- Event: Newexten
    127.0.0.1       <- Privilege: dialplan,all
    127.0.0.1       <- SequenceNumber: 3369
    127.0.0.1       <- File: pbx.c
    127.0.0.1       <- Line: 3144
    127.0.0.1       <- Func: pbx_extension_helper
    127.0.0.1       <- Channel: SIP/9998-00000251
    127.0.0.1       <- Context: from-internal
    127.0.0.1       <- Extension: *78
    127.0.0.1       <- Priority: 11
    127.0.0.1       <- Application: Playback
    127.0.0.1       <- AppData: do-not-disturb&activated
    127.0.0.1       <- Uniqueid: 1350360483.735
    127.0.0.1       <- Server: 0
    

    It carries on for a bit before and after that, but those parts seem more with the handling of the call display on the button and don't appear to relate to DND. Really not sure why it isn't working or why I would have to restart the FOP2 service to display presence changes via phone/ARI, but yet changes via FOP2 directly work fine.
  • The asterisk version that comes with Trixbox has a bug where the UserEvent includes a Channel header that it should not be there. FOP2 then receives the userevent (the one that notifies about a state change) with mixed and incorrect channels. You have to patch Asterisk 1.6-phonecore or upgrade it to 1.8. It is an asterisk bug.

    Best regards,
Sign In or Register to comment.