Open GordoWien opened 2 weeks ago
Presence where exactly? The presence functionality in Asterisk that is shown is only supported for D and P series hardware phones. No other endpoints support it.
The device state value (busy) gets turned into a representation in the NOTIFY when sent over SIP, which how it is done depends on what the endpoint supports and subscribes using (there are multiple different formats).
Hi also the sangoma connect app supported it. If you use sangoma connect app D and P telefons and e.g Yealink Telefons When on an Yealink Phone DND is pressed , ther is no Presence:dnd and on the D and P and Sangoma Connect the presence is wrong fpr the BLF of the yealink phone.
As I wrote using the codes 72,73 etc. does not change the presence. Clints using sangoma connect apps and other phones as D and P have wrong state on the sangoma connect apps
so we modify for this clients
exten => _*72.,n,Set(STATE1=away) exten => sstate,n,Set(PRESENCE_STATE(CustomPresence:${fromext})=${STATE1})
best regards
FreePBX Version
FreePBX 17
Issue Description
Hallo This is also für freepbx 16 but I hope you change it now for freepbx17
An update of the Dialplan for feature codes is needed as using 72 , or 78 only changes the state but not the presence.
Putting a Yealink phone to DND with *78 chnges state to busy but Presence stays available and the Sangoma app will show wrong state or Sangoma phones
We change the code in extensions_overridefreepbx.conf Like this exten => 72.,n,Set(STATE=BUSY) exten => _72.,n,Set(STATE1=away) exten => *72.,n,Gosub(app-cf-on,sstate,1()) exten => 72.,n,Gosub(app-cf-on,lang-playback,1(hook3)) exten => 72.,n,Gosub(macro-hangupcall,s,1())
exten => sstate,1,Set(DEVICE_STATE(Custom:CF${fromext})=${STATE}) exten => sstate,n,Set(PRESENCE_STATE(CustomPresence:${fromext})=${STATE1}) exten => sstate,n,Set(DEVICES=${DB(AMPUSER/${fromext}/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:DEVCF${CUT(DEVICES,&,${ITER})})=${STATE}) exten => sstate,n,Set(ITER=$[${ITER} + 1]) exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin) exten => sstate,n(return),Return()
best regards
Marcelo
Operating Environment
New freepbx17
Relevant log output