[Freeswitch-users] keep limit counter active across dialplans when used in attended transfers

Vallimamod Abdullah vma at vallimamod.org
Sun Jun 25 16:41:14 UTC 2017


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.

https://freeswitch.org/confluence/display/FREESWITCH/mod_hash

Best Regards,
-- 
Vallimamod Abdullah
SIP Solutions
vma at sipsolutions.fr
.


> On 25 Jun 2017, at 17:10, Bipin Patel <bipin at 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 at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org <http://www.freeswitch.org/>
> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
> http://www.cluecon.com <http://www.cluecon.com/>
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org <http://www.freeswitch.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170625/e8129635/attachment-0001.html>


More information about the FreeSWITCH-users mailing list