Hi,
Well I could use it but with limit the counter decrementing etc is automatic so it's much simpler and reduces the dialplan required.
In the dialplan I provided how do you think I could use it directly without adding any more extensions in the two dialplan, any help would be appreciated. What I need to do is increment counter for caller and callee as well as callee transferred to and check that counter before bridging so change ring back can be called.
On June 25, 2017 8:43:29 PM Vallimamod Abdullah <vma@vallimamod.org> wrote:
Hi,
Is there any reason why you don't use the hash application directly instead of limit?IMHO it is more suited to your use case.
_________________________________________________________________________
On 25 Jun 2017, at 17:10, Bipin Patel <bipin@xbipin.com> wrote:
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
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org