[Freeswitch-users] Best place to set variables?

Avi Marcus avi at avimarcus.net
Fri Jun 15 18:40:49 MSD 2012


No. They do persist for the whole <condition> just they aren't
necessarily checked by each bridge line.
-Avi


On Fri, Jun 15, 2012 at 5:30 PM, ocset <ocset at the800group.com> wrote:
> Thanks for your answer.
>
> What you are saying is that the "continue_on_fail=true" and
> "hangup_after_bridge=true" variables are set back to their default
> values in the"B" leg of the dailplan. I thought the variable that are
> set would persist for the whole <condition> section.
>
> Regards
> O
>
> On 15/06/12 21:47, Avi Marcus wrote:
>> Short answer: some variables are for the A leg, and some are for the B leg.
>> The two in their own set tags are for the A leg's execution of the
>> bridge.. whether it should keep trying or not.
>> The one inside the bridge is specific to that leg and bridge attempt
>> of how it should behave.
>>
>> Perhaps someone wants to give the longer answer, but I don't have time
>> right now.
>>
>> -Avi
>>
>>
>> On Fri, Jun 15, 2012 at 4:12 PM, ocset<ocset at the800group.com>  wrote:
>>> Hi
>>>
>>> In the FreeSWITCH-Cookbook, there is the following example
>>>
>>> <extension name="ring_sequentially">
>>> <condition field="destination_number" expression="^(2001)$">
>>> <action application="set" data="continue_on_fail=true"/>
>>> <action application="set" data="hangup_after_bridge=true"/>
>>> <action application="bridge"
>>> data={ignore_early_media=true}sofia/internal/userA at local.pbx.com"/>
>>> <action application="bridge"
>>> data={ignore_early_media=true}sofia/internal/userB at local.pbx.com"/>
>>> </condition>
>>> </extension>
>>>
>>> Is there any reason why the "ignore_early_media=true" was not set before
>>> the bridge commands as is done with the "continue_on_fail"  and
>>> "hangup_after_bridge" variables?
>>>
>>> Example:
>>>
>>> <extension name="ring_sequentially">
>>> <condition field="destination_number" expression="^(2001)$">
>>> <action application="set" data="continue_on_fail=true"/>
>>> <action application="set" data="hangup_after_bridge=true"/>
>>> <action application="set" data="ignore_early_media=true"/>
>>> <action application="bridge" data=sofia/internal/userA at local.pbx.com"/>
>>> <action application="bridge" data=sofia/internal/userB at local.pbx.com"/>
>>> </condition>
>>> </extension>
>>>
>>> Thanks
>>> O
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> 
>>> 
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> Join Us At ClueCon - Aug 7-9, 2012
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at 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 at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> Join Us At ClueCon - Aug 7-9, 2012
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list