Queue agent status updates

  1. 13 years ago

    On the dev box I setup, I initially had issues getting the agent to update successfully on logon/off. Now that I'm setting up the production systems I cannot seem to resolve the issue. Previously, it required modifying the user_login_out.agi as per the post [url:3nci2ste]http://www.fop2.com/forum/View Post 129[/url:3nci2ste]. Didn't help this time.

    FOP2.20 final
    FreePBX 2.9.0.7
    Asterisk 1.8.3.3
    Debian squeeze

    Running fop2 in debug (./fop2_server -X 15), I do see the user events that, I believe, should be updating the client.

    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: user,all
    127.0.0.1       <- UserEvent: UserDeviceRemoved|Data: 219
    127.0.0.1       <- 3219
    127.0.0.1       <- Server: 0
    
    
    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: user,all
    127.0.0.1       <- UserEvent: UserDeviceAdded|Data: 219
    127.0.0.1       <- 3219
    127.0.0.1       <- Server: 0

    Any help would be great.
    Thanks

  2. admin

    21 Jun 2011 Administrator

    Hi,

    Running fop2 in debug (./fop2_server -X 15), I do see the user events that, I believe, should be updating the client.

    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: user,all
    127.0.0.1       <- UserEvent: UserDeviceRemoved|Data: 219
    127.0.0.1       <- 3219
    127.0.0.1       <- Server: 0

    Any help would be great.
    Thanks

    The event is not correct, your user_login_out.agi is broken, The correct output from the event should be:

    127.0.0.1       <- Event: UserEvent
    127.0.0.1       <- Privilege: user,all
    127.0.0.1       <- UserEvent: UserDeviceRemoved
    127.0.0.1       <- Data: 219,3219
    127.0.0.1       <- Server: 0

    Previously, it required modifying the user_login_out.agi as per the post [url:36smhqro]http://www.fop2.com/forum/View Post 129[/url:36smhqro]. Didn't help this time.

    I would try with the user_login_out.agi script you had on the other server (backup your current one just in case). But that .agi is still broken. I think it does not work for asterisk 1.8. That should be reported to FreePBX. It is a FreePBX bug.

  3. Yes, I had to try a few variations with the user_login_out.agi to get the data formatted correctly for fop2. It seems that under this version of freePBX, the line for asterisk 1.6.0 is correct.

    //if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {
    //      $user_event_body = "\"UserDeviceAdded|Data: {$user}\\,{$device}\"";
    //} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {
    //      $user_event_body = "UserDeviceAdded,\"Data: {$user}\\\\,{$device}\"";
    //} else {
    //      $user_event_body = "\"UserDeviceAdded|Data: {$user},{$device}\"";
    //}
    $user_event_body = "UserDeviceAdded,\"Data: {$user}\\\\,{$device}\"";
    
    ...
    
    //if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {
    //     $user_event_body = "\"UserDeviceRemoved|Data: {$current_user}\\,{$device}\"";
    //} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {
    //     $user_event_body = "UserDeviceRemoved,\"Data: {$current_user}\\\\,{$device}\"";
    //} else {
    //     $user_event_body = "\"UserDeviceRemoved|Data: {$current_user},{$device}\"";
    //}
    $user_event_body = "UserDeviceRemoved,\"Data: {$current_user}\\\\,{$device}\"";

    Now I just have to remember to replicate this change for any core FreePBX updates.

    Thanks Nicolás.

or Sign Up to reply!