Custom Presence FOP2.
Hi FOP2
If i check config presence.js the default as below :
var presence = new Object();
presence = '#6094AB'; --> AVAILABLE as default VALUE
presence = '#FF8A8A';
presence = '#57BCD9';
presence = '#6094DB';
presence = '#CDD11B';
If value presence "AVAILABLE" , ext can received in and out call.
If value presence other than "available", we can't received incoming call, but we can outgoing call.
How can i change default value "available" to other value", i want every user/agent that login to fop2 can't receive call. If agent/user want to receive incoming call, they should be change presence to "available"
And more powerful if we can set default value presence for group extension fop2 like :
presence status after login to fop2
presence status after call on hook/hangup
presence status after call parking
presence status after call blind tranfer, supervised tranfer
presence status after transfer to mobile
presence status after spy
presence status after hangup conference
Thanks
If i check config presence.js the default as below :
var presence = new Object();
presence = '#6094AB'; --> AVAILABLE as default VALUE
presence = '#FF8A8A';
presence = '#57BCD9';
presence = '#6094DB';
presence = '#CDD11B';
If value presence "AVAILABLE" , ext can received in and out call.
If value presence other than "available", we can't received incoming call, but we can outgoing call.
How can i change default value "available" to other value", i want every user/agent that login to fop2 can't receive call. If agent/user want to receive incoming call, they should be change presence to "available"
And more powerful if we can set default value presence for group extension fop2 like :
presence status after login to fop2
presence status after call on hook/hangup
presence status after call parking
presence status after call blind tranfer, supervised tranfer
presence status after transfer to mobile
presence status after spy
presence status after hangup conference
Thanks
Comments
That must be done at the dialplan level. It can be done, but you must modify your outbound dial macros. That modification is not done with FOP2, it is a core modification in your backend (and FOP2 is just a frontend).
The presence in FOP2, as is, does absolutely nothing in your dialplan or asterisk setup. In order to tied the presence to your dialplan, you must use a plugin. For FreePBX you have the presence DND plugin, that as the name implies, will set the entry in the asterisk database signaling an extension is on DND. But you might very well NOT have that plugin installed, in that case, changing presence in FOP2 won't affect extensions in any way, it will just be a visual representation of a state in the FOP2 display and nothing else.
Now, if you want to use the DND entry to prevent users being able to dial out, then you should modify the FreePBX dialplan, you could do so by using the macro-dialout-trunk-predial-hook provided by FreePBX, that lets you intercept outbound trunk calls before they are placed, and you can add your logic there, like checking to see if the ASTDB "DND" value is set, and if so abort/exit without dialing.
Now, to make FOP2 change an extension to DND on login, you can write a plugin that performs that action (on login, change presence automatically).
So, you can do what you want, but requires a bit of programming in all sides of your installation.
Best regards,
"Now, to make FOP2 change an extension to DND on login, you can write a plugin that performs that action (on login, change presence automatically)."
Can you give me sample plugin (how to write on fop2) so i can try do develop.
Thanks
There is also a plugins directory in the fop2 tarball, with a sampleplugin that is like a skeleton for a new plugin.
Best regards,