Thanks for the response, I should have been clearer.

Yes, local is a profile on which all registered devices are connecting. sip.test.com is just an alias, but for some reason when calling via the local profile it doesn't ring, but instead dies with a NORMAL_TEMPORARY_FAILURE, while when dialing via the sip.test.com alias, it works just fine.

 

About the condition variables, I ended up with another variable, because some users are allowed to make local calls but are actually trying to ring a international number which triggers the anti-action as the toll evaluates as true, but the destination number doesn't.

Thanks again!

 

Kind regards,

--

Iskren Hadzhinedev

 


On Thursday 22 May 2014 03:05:09 Francis wrote:

If my understanding is correct(TM), the first line is attempting to dial 1000@sip.test.com via a profile called 'local', whereas the second line is attempting to dial 1000 via a profile called sip.test.com.

 

For the second question, you can swap the two statements like this:

<condition field="${toll_allow}" expression="local"/>

<condition field="${destination_number}" expression="^([0-9]{6})$">

 

<action application="set" data="hangup_after_bridge=true"/>

<action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>

<anti-action application="answer"/>

<anti-action application="speak" data="Local calls are not allowed!"/>

 

</condition>

 

Which will preserve $1 for use in the condition statement without having to explicitly set it as a variable.

Francis

 

 

On 2014-05-22 01:11, Iskren Hadzhinedev wrote:

Hello,

I'm having some trouble understanding a couple of things.

 

First is what's the difference between:

<action application="bridge" data="sofia/local/1000@sip.test.com"/>

and

<action application="bridge" data="sofia/sip.test.com/1000"/> ?

 

The other question:

With these dialplan rules:

<condition field="${destination_number}" expression="^([0-9]{6})$"/>

<condition field="${toll_allow}" expression="local">

<action application="set" data="hangup_after_bridge=true"/>

<action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>

<anti-action application="answer"/>

<anti-action application="speak" data="Local calls are not allowed!"/>

</condition>

 

The variable $1 doesn't get expanded to the captured expression. Is it possible to retain it somehow without setting a temporary variable?

Thanks!

 

Kind regards,

--

Iskren Hadzhinedev

 


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.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