I would try something "simpler". This will always play the file, though, no matter the response from the othersipgw.


<extension name="1212">
       <action application="set" data="hangup_after_bridge=false"/>
       <action application="bridge"
data="sofia/external/sip:user.name@sip.othersipgw.ip.address.com;${effective_caller_id_number}"/>
       <action application="transfer" data="1213"/>
 </condition>
</extension>

<!-- What to do after othersipgw drops the connection-->
<extension name="1213">
  <condition field="destination_number" expression="1213">
    <action application="playback" data="ivr/ivr-thank_you.wav"/>
   </condition>
</extension>