In Issabel 5 after PJSIP Trunk creation. Once it is disabled in the UI, it still shows in the trunk list and still active. Unlike SIP Trunk, it's gone after disabled.
In the /var/www/html/admin/modules/core/functions.inc.php, I modify it to solve the disable problem.
Original :
$sql = "SELECT channelid,keyword,data FROM trunks LEFT JOIN sip ON CONCAT('pjsip-',trunkid)=sip.id WHERE tech='pjsip' UNION ";
$sql .= "SELECT channelid,keyword,data FROM trunks LEFT JOIN sip ON CONCAT('tr-reg-',trunkid)=sip.id WHERE tech='pjsip' ";
Modified :
$sql = "SELECT channelid,keyword,data FROM trunks LEFT JOIN sip ON CONCAT('pjsip-',trunkid)=sip.id WHERE tech='pjsip' AND sip.flags <> 1 UNION ";
$sql .= "SELECT channelid,keyword,data FROM trunks LEFT JOIN sip ON CONCAT('tr-reg-',trunkid)=sip.id WHERE tech='pjsip' AND sip.flags <> 1 ";
Then the PJSIP Trunk can be disabled properly.