Custom features

Hi
While checking FOP2 FAQ I found interesting feature: custom_popup()
This function can popup some window based on phone number or name. This feature looks good, but I need a bit different one: is it possible to show custom block on my agent's FOP panel, that will show some info, which my custom script will pass? Like caller ID lookup results from my custom CRM or agent script, based on what DID this number comes to.
This is extremely useful, as I found no ways to show the info above to my agents.

Comments

  • Yes, you can do that using the same checkdir.php and its custom_popup. If you look at the included checkdir.php , there is a commented block that will update a div contents on the fop2 page. There is also another one that queries vtiger crm. You can use both techniques and get information from your own crm or whatever application you have and update a fop2 div with their results.

    I have done that, I wrote a short integration with HIGHRISE.

    If you need help you can always buy support/consultancy time from us if you have problems getting started with it.

    Best regards,
  • I was able to add a custom block and to show some info there, however there are still 2 issues I can't fix:
    1. When the call is hanged up I still have info in my custom block, there should be some js function, handling call hangup, which I can use to "clean" the block? Can you gimme the function name or any other way I can clean the block.

    2. I didn't find any way to show the DID my customers are calling to. I have several DIDs and I wanna show something like +18001234567 (DID 1) in this block, so my agent will know which DID this customer is calling to. I belive there should be some var, which has some DID info?
  • The best way to look for possible events is to start fop2_server in debug mode 15, and look for lines like this one for commands sent to flash clients:
    127.0.0.1    => { "btn": "5@GENERAL", "cmd": "state", "data": "DOWN", "slot": "0" }
    

    You can edit jcallback.js and add a method to JCallBack to handle the "state" command. If the data is DOWN, the call is finished for the first line appearance (slot 0).

    Regarding the DID, that is probably set as a variable in the dialplan, things gets more complicated there as you should put hook on the server/ami side via FOP2Callbacks.pm, etc. The easiest way to handle this is to set the callerid name to be the did number inside the dialplan, so you will see it in regular ami events.

    Best regards,
Sign In or Register to comment.