End of call notification

  1. 15 years ago

    Hi,

    How do you trigger a php script when call ends. I have seen that when incoming call, checkdir.php is called and parameters like callerid and name is passed to it. Can FOP2 do the same thing when call ends?

    Thanks,

    ali

  2. admin

    10 Oct 2009 Administrator

    FOP2 upcoming version will include some hooks for interfacing with both the client side and server side. What is exactly the script you want to run when a call ends? Just to be sure the hooks I am designing are good enough.

    As an example, the next version lets you add some hooks in perl and intercept commands received from flash clients as well as ami commands. I am using them to add HOLD and UNHOLD events in queue_log. It can also be used to make FOP2 presence interact with the dialplan and viceversa. But It cannot be used to call a php script on the client, as the hooks are server side.

    Best regards,

  3. 14 years ago

    Could you please give me some hints where these server side hooks are?
    I am, too, thinking about launching a perl script on start and at the end of call activities. E.g. I want to wake up the screen from screensaver on call start or incoming call and keep it on until the call progresses, then only allow screensaver activate after the hangup.
    So, where can I connect/call my perl scripts on the server?
    Many thanks.

  4. admin

    2 Nov 2010 Administrator

    FOP2Callbacks.pm

    I do not understand exactly what you say about screen savers... the perl code is on the server, not on the client.

  5. Yep, the monitor is connected to the server, i.e. the client screen is the same as the server screen.
    I found this perl module and the hangup ami command part, thanks.
    Could you also tell me what ami command is sent on call initiation?

  6. admin

    4 Nov 2010 Administrator

    There is no particular event for call initiation... depends on your dialplan setup and what you consider to be a call initiation.. you can look at the "DIAL" event that is fired when the dial application is called. Or you can try with NEWCHANNEL, NEWEXTEN, etc.. But perhaps the DIAL one is what you are looking for.

    Best regards,

or Sign Up to reply!