PRESENCE_STATE unknown error

I have a new FreePBX setup and I decided to test a SIP second phone tonight. Coincidentally I also did all the upgrades that FPBS found…so not sure if that’s a factore.

When I pick the phone and dial the CLI loops endlessly with the message below (and never connects). Have I set something wrong?

[2014-03-03 21:02:04] WARNING[22667][C-00000065]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
[2014-03-03 21:02:04] WARNING[22667][C-00000065]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
[2014-03-03 21:02:04] WARNING[22667][C-00000065]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
[2014-03-03 21:02:04] WARNING[22667][C-00000065]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
[2014-03-03 21:02:04] WARNING[22667][C-00000065]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
[2014-03-03 21:02:04] WARNING[22667][C-00000065]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown

1 Like

Hoping to make this post more useful, I increased the verbosity and then captured the above again. I grabbed some console text right as the dialplan enters the loop. Looks like func_presencestate has a an error, returns nothing, and then subsequent goto is using an unset variable (causing the loop). Note 100% sure if I configured something wrong or this is a new bug? (It happens only when calling an internal extension).

-- Executing [[email protected]:38] GotoIf("SIP/230002-00000074", "0?godial") in new stack
-- Executing [[email protected]:39] Gosub("SIP/230002-00000074", "sub-presencestate-display,s,1(290)") in new stack

[2014-03-03 21:32:12] WARNING[24862][C-00000068]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
– Executing [[email protected]:1] Goto(“SIP/230002-00000074”, “s-,1”) in new stack
– Goto (sub-presencestate-display,s-,1)
[2014-03-03 21:32:12] WARNING[24862][C-00000068]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown

I’m not familiar enough with the PRESENCE_STATE function but obviously the dialplan is stuck in an endless loop because the PRESENCE_STATE(CustomPresence:${ARG1},value) is unset. So as a workaround to this bug - for anyone else experiencing it - is to add the line below to the top of the sub-presencestate-display subroutine. (of course this will be wiped out with the next update to your dialplan - but at least your phones will work)

[sub-presencestate-display]
include => sub-presencestate-display-custom
exten => s,1,GotoIF($[ ${PRESENCE_STATE(CustomPresence:${ARG1},value)} = “” ]?s-available)

How do i edit the sub-presensestate as i have the same issue when i did all the updates.

same problem here. Eager to know what is wrong.

Download the newest core. 2.11.0.15

download core 2.11.0.15

how do you do that?

nevermind, module admin of the web-interface

I’m already at core 2.11.0-17. still having the PRESENCE_STATE error

You need to update framework as well.

really appreciate the prompt response.
current versions:
core 2.11.0.17
framework 2.11.0.27
we are still experiencing the PRESENCE_STATE unknown error

Any update regarding this?. system seems to be processing calls just fine. Is this a warning message I can ignore until a core update clears it?

Just wanted to bump this thread a little. I have all the latest modules installed and I see these messages regularly on the console:

[2014-04-04 10:28:50] WARNING[20542][C-000639de]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
[2014-04-04 10:29:20] WARNING[20549][C-000639df]: ccss.c:1000 ast_set_cc_callback_macro: Usage of cc_callback_macro is deprecated. Please use cc_callback_sub inste

It means you have no presence set. Its a warning not a error just like the hundreds of other warnings that are outputted.