fo2 problems with updates on user log on/off (solved)

Just to let others know…

I am using FreePBX 2.6.0.RC2.1 with fop2.

Original code in 'user_login_out.agi’
agi->exec(“UserEvent”, ““UserDeviceRemoved|Data: {$current_user},{$device}””);

Asterisk seems to have broken support for pipe ‘|’ as delimiter. So this is what will come on the socket:
"
Event: UserEvent
Privilege: user,all
UserEvent: UserDeviceRemoved|Data: 378
115
"
Note the UserEvent line, all is merged into one, including the ‘|’.

This solved my problems:
agi->exec(“UserEvent”, ““UserDeviceRemoved,Data: {$current_user},{$device}””);

… Maybe something to consider and to branch on like

$ast_version14 = version_compare($ast_version, “1.4”, “ge”);

using ‘|’ or ‘,’ accordingly.