[Freeswitch-dev] Absolute conditions are not changing the proceed variable... (mod_dialplan_xml.c)

Anthony Minessale anthony.minessale at gmail.com
Wed Feb 1 21:05:19 MSK 2012


can you use jira for this going forward its against our policy to do
patches on the mailing list.


On Wed, Feb 1, 2012 at 11:26 AM, Rafael Vargas <vargas at khomp.com.br> wrote:
> Hi again,
>
> There were still cases in the function that needed to change the proceed
> variable.
>
> Please find attached the git diff output with the changes.
>
> Rafael Scheffer Vargas
> desenvolvimento                         KHOMP - 15 Anos
>
> R. Joe Collaço, 253                    www.khomp.com.br
> Florianópolis | SC
> +55 48 3722-2916 | 9612-0276 | USA: +1 213-943-1535
> vargas at khomp.com.br
>
>
>
> On Tue, Jan 31, 2012 at 19:31, Anthony Minessale
> <anthony.minessale at gmail.com> wrote:
>>
>> this appears to be a regression from a recent change.
>>
>> Fixed:
>>
>> commit e00a61c48bce26cb96f3d615bd0f08091d7143e1
>> Author: Anthony Minessale <anthm at freeswitch.org>
>> Date:   Tue Jan 31 15:31:08 2012 -0600
>>
>>
>> On Tue, Jan 31, 2012 at 2:31 PM, Rafael Vargas <vargas at khomp.com.br>
>> wrote:
>> > Hi,
>> >
>> > I've noticed that when I have an extension containing only an absolute
>> > condition, the proceed variable in mod_dialplan_xml.c:parse_exten(...)
>> > is
>> > not changed and the next extension is also executed, thus ignoring the
>> > first
>> > extension's "continue" attribute, which was set to "false".
>> >
>> > I'm referring to this code: (mod_dialplan.c:221 in today's GIT)
>> > ...
>> > } else if (time_match == -1) {
>> > switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session),
>> > SWITCH_LOG_DEBUG,
>> >   "Dialplan: %s Absolute Condition [%s] match=%s\n",
>> > switch_channel_get_name(channel), exten_name, all ? "all" : "any");
>> > pass++;
>> > if (!all && !xor) break;
>> > } else if (time_match == 1) {
>> > ...
>> >
>> > Shouldn't this set the proceed variable to 1, just like the regex
>> > condition
>> > a few lines above (line 208 in today's GIT)?
>> >
>> > I just made a quick test and it worked as (I) expected.
>> >
>> > What I'm proposing is to change the code above to the following:
>> >
>> > ...
>> > } else if (time_match == -1) {
>> > switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session),
>> > SWITCH_LOG_DEBUG,
>> >   "Dialplan: %s Absolute Condition [%s] match=%s\n",
>> > switch_channel_get_name(channel), exten_name, all ? "all" : "any");
>> > proceed = 1;
>> > pass++;
>> > if (!all && !xor) break;
>> > } else if (time_match == 1) {
>> > ...
>> >
>> > Sorry if this was already discussed, I've searched this list and the
>> > users
>> > list to no avail...
>> >
>> > Best regards,
>> >
>> > Rafael Scheffer Vargas
>> > desenvolvimento                         KHOMP - 15 Anos
>> >
>> > R. Joe Collaço, 253                    www.khomp.com.br
>> > Florianópolis | SC
>> > +55 48 3722-2916 | 9612-0276 | USA: +1 213-943-1535
>> > vargas at khomp.com.br
>> >
>> >
>> >
>> > _________________________________________________________________________
>> > 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
>> >
>> > FreeSWITCH-dev mailing list
>> > FreeSWITCH-dev at lists.freeswitch.org
>> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> > http://www.freeswitch.org
>> >
>>
>>
>>
>> --
>> Anthony Minessale II
>>
>> FreeSWITCH http://www.freeswitch.org/
>> ClueCon http://www.cluecon.com/
>> Twitter: http://twitter.com/FreeSWITCH_wire
>>
>> AIM: anthm
>> MSN:anthony_minessale at hotmail.com
>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>> IRC: irc.freenode.net #freeswitch
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org
>> googletalk:conf+888 at conference.freeswitch.org
>> pstn:+19193869900
>>
>> _________________________________________________________________________
>> 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
>>
>> FreeSWITCH-dev mailing list
>> FreeSWITCH-dev at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> 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
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



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