MT#8071	fix api subscriber termination

response was handled wrong on patch/put
primary number was not freed in case of pbx

(cherry picked from commit 7b3080f45b310f3efc924d3ce4001aded88753ca)