Not loading checkdir.php

  1. 12 years ago

    I have been playing with the call notification checkdir.php

    Using the standard example, and watching the apache log when a call comes in the checkdir.php is not even being requested by the webserver. Is there some setting in config.php that I have to change to have it run?

    I am logged into fop2 and my extension rings when a call comes in.

    /usr/local/fop2/fop2.cfg:
    notify_on_ringing = 1
    notify_on_connect = 0

    /etc/asterisk/queues_additional.conf
    [1000]
    ....
    eventmemberstatus=yes
    eventwhencalled=yes
    ...

    • Using the stock checkdir.php
    • Asterisk 1.6.0.26-FONCORE-r78 currently running on trixbox

    It used to work, and I could see it in the access-log of it being run. Not sure if I changed a setting by accident somewhere.
    Now not even the default notifications work. I see no call notification popup at all.

    Is there somewhere else I can log to, in order to see why its being passed over? Or do you have a really simple example that I can debug with?

  2. admin

    21 Feb 2012 Administrator

    I have seen some trixboxs where extensions do not enter state RINGING, so you won't get the notification. I do not remember exactly why did that happen. If your extension is in state RINGING, you see the phone shaking when you get a call, then checkdir.php will be called. Aha! Now I remember when I type this what happened on those cases that it did not work, the notification/popup is only called when the callerid is different from your own extensions. On those cases I have seen, the incoming call had the same callerid as the extension ringing, thus skipping the popup. Perhaps you are having that problem.

  3. The phone icon shakes when a call comes in, the caller ID is listed as well without any extension.

    In fop2, when a call comes in the Queue, it displays on the queue like so..

    1. <7885551234> TechAnchorage, AK
                          00:00:36

    It puts the queuename next to the caller's city. Not sure if I understood your having the same callerid as the extension thing.

    When a call came in before, I used to see the checkdir.php being called by apache, now it does not show up at all, like it isnt being used. Can you think of any other setting I can check in asterisk or fop2?

    One other issue, when I remove a extension from buttons.cfg it messes fop2 up, it wont show extensions in use, and when a call comes in and someone answers it. The call stays in the queue display like it has not been answered. When I put the extension block I removed back in, the issue resolves.

    I do not use the auto configurated users or buttons, I manually have a buttons.cfg and user list in fop2.cfg

    So my question is there some cache or file I should delete if I make changes to a button.cfg.

  4. admin

    21 Feb 2012 Administrator

    Hi,

    If you change a configuration in the buttons.cfg file, you must restart fop2 server, otherwise you will see incorrect status.

    Regarding the checkdir.php, it is called on state RINGING and only if the callerid does not match the extension number you are logged as. There is nothing else to check. You can install firebug for firefox and debug on the client, as this will happen on the client side.

  5. I played around with firebug, however I am not sure what I am looking for.

    Watching the console does not tell me anything that I can go on. I dont speak spanish, so I am not sure what some of these mean. and google translate says something about a tail, so I am sure that isnt right.

    Ejecutando Callback Comando link
    received link command from server with 7785551234 , button number4 in slot 1
    cola 12 quedo con llamados: 0
    Comando link no implementado
    Ejecutando Callback Comando link
    received link command from server with 7785551234 TechSeattle,WA, button number10 in slot 1
    flash send <msg data="1|ping||" />
    Comando link no implementado
    Ejecutando Callback Comando link
    received link command from server with 7785551234 TechSeattle,WA, button number10 in slot 1

    Any hints on how to debug why no popups are working?

  6. admin

    21 Feb 2012 Administrator

    There are lot of LINKS and no RINGING. You should see some ringing over there..

  7. I see, so is there any reason its sending links and not ringing events?

    Is this the dircheck.php that sends the ringing events to fop2? Or is the ringing events not configured properly on asterisk?

    It would be nice to know where I should start looking to debug where it is failing.

  8. admin

    21 Feb 2012 Administrator

    Debug is complicated as you have a server and a client. You can start fop2 server in debug mode and look at the ami events (and state ringing or not), and try to correlate that with the logs that you will get on the client side via a javascript debugger

    cd /usr/local/fop2
    service fop2 stop
    script capture.log
    /usr/local/fop2/fop2_server -X 15
    (lots of debug, hit ctrl-C to stop)
    exit (to stop capture.log)

    You can inspect the AMI events and the data sent to the js clients in that log file, but then the js client will decide to fire a popup or not based on the conditions I mentioned before.

  9. Thanks for bearing with me, the manager.conf needed read=all and write=all

    Its calling the script now at least. Now to get the thing to actually pop something up.

    Thanks again.

or Sign Up to reply!