Hung SIP channel between conferences

Hi everyone,
I have two Asterisk boxes connected through a trunk,
[ul]Asterisk 11.4.0 ( ip = 10.9.1.8 )
Asterisk 1.8.15.0 ( ip = 10.9.40.251 )[/ul]
on both ones there are extensions that add to a conference room 31 ( on 10.9.40.251 ) and 0000995 ( on 10.9.1.8 ).
At startup of 10.9.40.251 I send an originate to merge the two conferences (I add the partecipants of 31 to 0000995)

The originate is done in a script that gets executed only if there is no channel up on 10.9.40.251 with the other box

Channel Location State Application(Data) SIP/0000-main-000000 31@from-internal:3 Up Konference(31,RVx)
Everything works smoothly at the beginning, but I noticed that if for some reason the conference 0000995 hungs up on 10.9.1.8 (it happened a Retransmission timeout reached on transmission :question: ) the channel on the other side (10.9.40.251) keeps staying and so the script doesn’t get executed.
The channel stays there until it expires a timeout that I can’t find how to customise (I’ve already tried with sip session and rtp-timeout)
Anyone can help me? :frowning: