-
Type:
Task
-
Status: Closed
-
Priority:
Minor
-
Resolution: Not an issue
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Asterisk Configuration, Presence State
-
Labels:None
-
ToDo:
-
Story Points:5
-
Asterisk Version:13.11.12
-
Distro Version:FreePBX 13.0.194.10
Hi, Im trying to set device state based on presence state but freepbx does not retrieve the presence state and also can not set dev-state.
Im altering Extensions_custom: [ext-local-custom]
I tried to use this code from Wiki but also did not work:
[ext-local-custom]
exten => 2000,1,Answer()
same =>n,Set(CURRENT_PRESENCE=${PRESENCE_STATE(CustomPresence:Bob,value)})
same => n,GotoIf($[${CURRENT_PRESENCE}=available]?set_unavailable:set_available)
same => n(set_available),Set(PRESENCE_STATE(CustomPresence:Bob)=available,,)
same => n,Goto(finished)
same => n(set_unavailable),Set(PRESENCE_STATE(CustomPresence:Bob)=unavailable,,)
same => n(finished),Playback(queue-thankyou)
same => n,Hangup
exten => 2001,1,GotoIf($[${PRESENCE_STATE(CustomPresence:Bob,value)}!=available]?voicemail)
same => n,Dial(SIP/Bob)
same => n(voicemail)VoiceMail(Bob@default)