I have been doing a lot of research on how to do keep alive on the sip sessions , but from what I understood , if we use the qualify on the sip trunk , it prevent the incoming from reaching the trunk if it is marked as unreachable , but what I need to understand what effect will it have on the active calls , do asterisk terminate the calls automatically since the out trunk is unreachable
The setup that I mean, If you have an incoming trunk [ used to do inbound routes so I can redirect a call to another number , using outbound trunk [ if I put qualify on the out trunk , how will asterisk behave ?? ] ]
It will only do so if the underlying problem causes a re-invite (e.g. a session timer one) to fail. In that case, the resulting BYE transaction will probably also fail, leaving the session down for Asterisk, but up for the peer.
The qualify and active calls are completely unrelated and do not impact each other. If the qualify fails then nothing happens to the calls. It’s only if something relating to the call fails that it is terminated.
canreinvite is deprecated, and has no effect on session timers. If you want the signalling channel monitored during a call, you need to enable session timers with a short interval. Note that very short intervals may be rejected by the peer. The peer can also refuse timers.
The Asterisk end of the call will be taken down even if qualify is not enabled. It will be taken down when the session timer times out, not when any qualify fails.
The remote end will likely not be taken down unless the peer also uses similar mechanisms. The exception would be if there was one way routing towards the peer, in which case the BYE would still reach the peer.