I am installing a SIP proxy in a Linux machine in the local network of my office. I have implemented a SIP proxy with SER 0.8.10. The function of the SIP proxy is to let users talk each other without knowing the IP where each one is reachable. My problem appears when the caller wants to cancel the call because the callee does not answer. Since I want the calle's phone to stop ringing, and I haven't received a final response, the caller's phone has to send a CANCEL request. When the proxy server receives the CANCEL, it replies with a 487 "Request cancelled". SER does this before forwarding the CANCEL to the callee's phone. These 487 response generated by SER makes the INVITE client transaction of the caller finish. When the INVITE server transaction finishes in the callee's phone, it sends another 487 response, which is forwarded by SER, but the caller's transaction is already finished, so it doesn't send the corresponding ACK.
I would like to know how to solve this problem, since SER should wait for the callee's phone to send the 487 and then forward this response to the caller's phone.
Best regards,
Esteban.