1

Closed

Problem in UpdateConfigAction

description

When i want update config i cant use UpdateConfigAction  because it has bug.So i update the code:
Please change to it.
            int i = actionCounter++;
            var index = i.ToString().PadLeft(6, '0');
            if (!string.IsNullOrEmpty(action))
                actions.Add("Action-" + index, action);

            if (!string.IsNullOrEmpty(category))
                actions.Add("Cat-" + index, category);

            if (!string.IsNullOrEmpty(variable))
                actions.Add("Var-" + index, variable);

            if (!string.IsNullOrEmpty(value))
                actions.Add("Value-" + index, value);

            if (!string.IsNullOrEmpty(match))
                actions.Add("Match-" + index, match);
Closed Aug 6, 2014 at 10:50 AM by skrusty

comments

Shahrooze wrote Mar 18, 2014 at 10:29 AM

Action-000000:append
Cat-000000: ami-test
Var-000000:exten
Value-000000:>999,1,Dial(SIP/Bob)

000000 is should be 6 digit.

skrusty wrote Mar 18, 2014 at 12:36 PM

Could you please submit a patch using the git repo? pull down the latest version, make your change, commit and make a pull request.

Shahrooze wrote Mar 25, 2014 at 8:07 AM

Done.I forked and update

skrusty wrote Mar 25, 2014 at 12:37 PM

Thanks, but oddly I don't see any forks of the code? You forked it here on codeplex yeah?

skrusty wrote Mar 25, 2014 at 2:23 PM

You've submitted your patch to github, on a version of asternet that's a) old and b) has nothing to do with the official asternet project. Please use codeplex!