One touch recording file name and debug

Hello all,

context is like this, people call a queue, dynamic agents answer the call and decide to record the call by pressing *1 on the phone.

file get recorder with this name : ondemand-Unknown-2789-20210423-160920-1619186960.466.gsm

2789 is the extension dialing the queue, however, Unknown should have the agent extension that answered the call.

by checking the php script, Unknown is set when $dst variable is empty :

    ot_debug("Initial dest value : $dst");
    if(empty($dst)){
            ot_debug("Dest not found");
            $dst = _("Unknown");

$dst is initialised this way

$dst = getVariable($channel, “DIALEDPEERNUMBER”);
$bpeer = getVariable($channel, “BRIDGEPEER”);
if(!$dst){
$dst = $bpeer;
}
if (strpos($dst, ‘@’) !== false) {
$dstNum = $dst;
$dstValue = explode(’@’,$dstNum);
$dstData = $dstValue[0];
if (strpos($dstData, ‘-’) !== false){
$dstExp = explode(’-’,$dstData);
}
if (strpos($dstData, ‘/’) !== false){
$dstExp = explode(’/’,$dstData);
}
$dst = trim($dstExp[1]);

}
if (strpos($dst, ‘/’) !== false){
$dstVal = explode(’/’,$dst);
$dst = trim($dstVal[1]);

So I would like to debug, but I don’t know where to find the information set in ot_debug

ot_debug is set to true at the beginning of the file

any help is welcome :slight_smile:

OK, found this

https://wiki.freepbx.org/display/FOP/PHP+Console+and+Debugging

I’m able to do some debugging now :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.