Freeswitch dialplan issue
Good day to you. I have strange issue. I would like to set the ext in dialplan in that way: if there is local registered ext in freeswitch fs should route the call there,else route the call outside, i wrote this in dialplan: <extension name="fs3_outbound"> <condition field="destination_number" expression="^([123][012345]\d\d\d)$"> <action application="set" data="ext=$1"/> <action application="set"data="domain_name=${domain}"/> </condition> <condition field="${sofia_contact(*/${ext}@${domain_name})}" expression="error/user_not_registered"> <action application="bridge" data="sofia/internal/${ext}@10.160.1.21"/> <anti-action application="bridge" data="user/${ext}@${domain_name}"/> </condition> </extension> But it seems,that anti-action is not match at all( Thank you for your time,best regards. -- Nick Zaitsev
Is the first condition matching? On 20 August 2014 13:20, Nick Zaitsev <nick.zaitsev@mail.ru> wrote:
Good day to you. I have strange issue. I would like to set the ext in dialplan in that way: if there is local registered ext in freeswitch fs should route the call there,else route the call outside, i wrote this in dialplan:
<extension name="fs3_outbound"> <condition field="destination_number" expression="^([123][012345]\d\d\d)$"> <action application="set" data="ext=$1"/> <action application="set"data="domain_name=${domain}"/> </condition> <condition field="${sofia_contact(*/${ext}@${domain_name})}" expression="error/user_not_registered"> <action application="bridge" data="sofia/internal/${ext}@10.160.1.21"/> <anti-action application="bridge" data="user/${ext}@${domain_name}"/> </condition> </extension>
But it seems,that anti-action is not match at all( Thank you for your time,best regards.
-- Nick Zaitsev
_________________________________________________________________________ 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-powered IP PBX: The CudaTel Communication Server http://www.cudatel.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
secondly you may also need to set the actions as inline to use a variable you've just set. add inline="true" to you actions. On 20 August 2014 15:03, Steven Ayre <steveayre@gmail.com> wrote:
Is the first condition matching?
On 20 August 2014 13:20, Nick Zaitsev <nick.zaitsev@mail.ru> wrote:
Good day to you. I have strange issue. I would like to set the ext in dialplan in that way: if there is local registered ext in freeswitch fs should route the call there,else route the call outside, i wrote this in dialplan:
<extension name="fs3_outbound"> <condition field="destination_number" expression="^([123][012345]\d\d\d)$"> <action application="set" data="ext=$1"/> <action application="set"data="domain_name=${domain}"/> </condition> <condition field="${sofia_contact(*/${ext}@${domain_name})}" expression="error/user_not_registered"> <action application="bridge" data="sofia/internal/${ext}@10.160.1.21"/> <anti-action application="bridge" data="user/${ext}@${domain_name}"/> </condition> </extension>
But it seems,that anti-action is not match at all( Thank you for your time,best regards.
-- Nick Zaitsev
_________________________________________________________________________ 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-powered IP PBX: The CudaTel Communication Server http://www.cudatel.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-powered IP PBX: The CudaTel Communication Server http://www.cudatel.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
-- *Andrew Cassidy BSc (Hons) MBCS SSCA* Managing Director *T <info@cassidywebservices.co.uk> *03300 100 960 *F <info@cassidywebservices.co.uk> *03300 100 961 *E <info@cassidywebservices.co.uk> *andrew@cassidywebservices.co.uk *W <info@cassidywebservices.co.uk> *www.cassidywebservices.co.uk
participants (3)
-
Andrew Cassidy
-
Nick Zaitsev
-
Steven Ayre