hi,

i have a requirement where i need to generate a different ringtone if that ext is on another call and i do it using limit by setting a counter for the caller and callee and then checking the counter if it has a value of 1 which would mean that ext is on anohter call so generate a different ringtone and this work fine.

The problem being if A calls B and B attended transfers the call to C then the counter for C is incremented in the features dialplan but it doesnt reflect in the internal dialplan and i read that active limits dont remain global across dialplans so is there anyway to keep the limit counter active. i tried limit_ignore_transfer but that doesnt seem to work, im on the FS master

Below is my internal and features dialplan, any pointers would be helpful


INTERNAL DIALPLAN

    <extension name="general_stuff1" continue="true">
      <condition>
          <action application="set" data="rtp_negotiate_near_match=true"/>
          <action application="set" data="inherit_codec=true"/>
          <action application="set" data="suppress_cng=true"/>
          <action application="set" data="limit_ignore_transfer=true" />
          <action application="limit" data="hash max_calls ${sip_from_user} -1" />
      </condition>
    </extension>

    <extension name="ChangeRingBack">
      <condition field="destination_number" expression="^ChangeRingBack$"/>
      <condition field="rdnis" expression="^(.*$)">
          <action application="set" data="transfer_ringback=%(250,250,400);%(250,3500,400)"/>
          <action application="set" data="ringback=%(250,250,400);%(250,3500,400)"/>
          <action application="bridge" data="sofia/internal/$1%$${domain}"/>
      </condition>
    </extension>

    <extension name="local_user_calling">
      <condition field="destination_number" expression="^(.*)$">
          <action application="limit" data="hash max_calls ${destination_number} -1" />
          <action application="bind_meta_app" data="3 b s execute_extension::att_xfer XML features"/>
          <action application="set" data="transfer_ringback=%(400,200,400,375);%(400,2000,400,375)"/>
          <action application="set" data="hold_music=$${hold_music}" />
          <action application="set" data="ringback=%(400,200,400,375);%(400,2000,400,375)"/>
          <action application="set" data="call_timeout=30"/>
          <action application="set" data="hangup_after_bridge=true"/>
          <action application="set" data="continue_on_fail=true"/>
          <action application="limit" data="hash max_calls ${destination_number} 1 ChangeRingBack"/>
          <action application="bridge" data="sofia/internal/$1%$${domain}"/>
      </condition>
    </extension>

FEATURES DIALPLAN

    <extension name="att_xfer">
      <condition field="destination_number" expression="^att_xfer$">
          <action application="set" data="transfer_ringback=%(400,200,400,375);%(400,2000,400,375)"/>
          <action application="set" data="hold_music=$${hold_music}" />
          <action application="set" data="ringback=%(400,200,400,375);%(400,2000,400,375)"/>
          <action application="set" data="continue_on_fail=true"/>
          <action application="read" data="2 11 ivr/ivr-enter_ext.wav digits 30000 #"/>
          <action application="set" data="origination_cancel_key=#"/>
          <action application="limit" data="hash max_calls ${digits} -1" />
          <action application="att_xfer" data="sofia/internal/${digits}%$${domain}"/>
      </condition>
    </extension>


--
Regards,
Bipin