<?xml version="1.0" encoding="utf-8"?>
<include>
  <context name="ingress-$${profile_name}">

    <extension name="unloop">
      <condition field="${unroll_loops}" expression="^true$"/>
      <condition field="${sip_looped_call}" expression="^true$">
        <action application="deflect" data="${destination_number}"/>
      </condition>
    </extension>

    <extension name="redirect">
      <condition field="destination_number" expression="^(\d+)$">
        <action application="pre_answer"/> <!-- 183: lock the SDP here -->
        <action application="gentones" data="%(2000,4000,440,480)"/> <!-- ringback -->
        <action application="set" data="ccnq_account=${regex(${sip_req_params}|account=([^;]*)|%1)}"/>
        <action application="set" data="ccnq_account_sub=${regex(${sip_req_params}|account_sub=([^;]*)|%1)}"/>
        <action application="bridge" data="sofia/sbc-$${profile_name}/${destination_number}@$${egress_target};account=${ccnq_account};account_sub=${ccnq_account_sub}"/>
      </condition>
    </extension>

  </context>
</include>

<?xml version="1.0" encoding="utf-8"?>
<include>
  <context name="ingress-$${profile_name}">

    <extension name="unloop">
      <condition field="${unroll_loops}" expression="^true$"/>
      <condition field="${sip_looped_call}" expression="^true$">
        <action application="deflect" data="${destination_number}"/>
      </condition>
    </extension>

    <extension name="redirect">
      <condition field="destination_number" expression="^(\d+)$">
        <action application="pre_answer"/> <!-- 183: lock the SDP here -->
        <action application="gentones" data="%(2000,4000,440,480)"/> <!-- ringback -->
        <action application="set" data="ccnq_account=${regex(${sip_req_params}|account=([^;]*)|%1)}"/>
        <action application="set" data="ccnq_account_sub=${regex(${sip_req_params}|account_sub=([^;]*)|%1)}"/>
        <action application="set" data="instant_ringback=true"/>
        <action application="set" data="ringback=$${us-ring}"/>
        <action application="bridge" data="sofia/sbc-$${profile_name}/${destination_number}@$${egress_target};account=${ccnq_account};account_sub=${ccnq_account_sub}"/>
      </condition>
    </extension>

  </context>
</include>

Work around lack of ringback issue. When receiving a 180 from the far-end, bridge would stop the ringback tone.
Work around lack of ringback issue. When receiving a 180 from the far-end, bridge would stop the ringback tone.
