When call is terminated from one end still waiting in other end

Hi there,
I am new in freepbx and dial plan. any help is very welcome.
I’ve set the Wait application for 45s then if the side A for example hangup, B wait until the end of the 45s.

Thanks