FOP 2.28 includes part of the patch, you will only need to change the condition bits:
} else if($mifilt=="inbound") {
$condstring ="(dst='$extension' OR dstchannel LIKE 'SIP/$extension-________' ) ";
} else {
$condstring="(src='$extension' OR channel LIKE 'SIP/$extension-________' ) ";
}