Custom button color and/or text and/or icon when memberadd
Hi,
Ive worked with fop1 for a long time, and now i am working with fop2 in some costumers where i give assistance.
Its a lot more lightweight than fop1 , but it seems quite restrictive.
For example, when a extension enters a queue, i need to capture the "ADDMEMBER" event to change the text, the icon or the button background color.
Also , i want to capture "REMOVEMEMBER" to change things back to normal.
For example, if i pause a person from a queue, it shows a clock. What i need is as simple as showing a person using sprites01.png, however, the button does not change when extensions are added or removed to queues.
Its probably just configuration , but i can't find any documentation about this.
Ive worked with fop1 for a long time, and now i am working with fop2 in some costumers where i give assistance.
Its a lot more lightweight than fop1 , but it seems quite restrictive.
For example, when a extension enters a queue, i need to capture the "ADDMEMBER" event to change the text, the icon or the button background color.
Also , i want to capture "REMOVEMEMBER" to change things back to normal.
For example, if i pause a person from a queue, it shows a clock. What i need is as simple as showing a person using sprites01.png, however, the button does not change when extensions are added or removed to queues.
Its probably just configuration , but i can't find any documentation about this.
Comments
We talked on the chat. You can have some control on behaviour by modifying both FOP2Callbacks.pm and jcallbacks.js
It is not easy, it is not documented, but you can create custom behaviors this way.
The way fop2 marks a button as part of a queue right now is this: click on the queue button, it will filter out all extensions that are not members. However this filter is a dumb filter, it just performs the filter by name. So if you have queue members all with the same names, it won't work. (I have seen several intallations where every agent is named "Agent" for example, in these cases, the filter will not work as all are named the same).
So, in FOP2Callbacks.pm you can capture the ADDMEMBER event, and fire a UserEvent to set a fop2state that can then be intercepted in jcallback.js in order to change the style or do whatever javascript can do.
We offer paid support/development services if you want a kickstart, some code to intercept the events and change style as you want. But as we discussed via chat, some things are not possible to do, it depends heavily in your asterisk configuration and versions.
Best regards,
Thank you. I took your advice and there is a possibility to change some buttons they way you said it.
However is not as flexible as i need. I have queues and agents being created dinamically by ami by other processes.
Its more complicated environment for telemarketing.
I can track events easely , but to change info on fop2 regarging that its just very difficult. So we are just developing a custom panel that we can change code as we need.
But, thank you anyway and congrats for fop2. Its really a great application.