I figured it out. import works with a comma separated list of variables. So instead of defining them each line, line of comma separated works.

On Sun, Jul 1, 2012 at 12:56 AM, Muhammad Naseer Bhatti <nbhatti@gmail.com> wrote:

I have gone nuts trying to figure out what is going on. Using xml_cdr to post CDR(s) to webserver, The Bridge is done outside the lua script, and all vars are set in lua and exported.

....
session:setVariable("import", "gateway")
session:setVariable("import", "admin_rate_group")
session:setVariable("import", "sell_rate")
session:setVariable("import", "cost_rate")
....

The problem is that if I set sell_rate and cost_rate both variables together, who ever is in the end disapears from the XML POST. If I change their order, for example set cost_rate first and then sell_rate, then sell_rate works fine and cost_rate goes off. Looks like some sort of variable overlapping. I am HEAD with latest/latest.

freeswitch.consoleLog(FREESWITCH_CONSOLE_LOG_LEVEL, "\n cost_rate ".. cost_rate .." \n");
freeswitch.consoleLog(FREESWITCH_CONSOLE_LOG_LEVEL, "\n sell_rate ".. sell_rate .." \n");

This works fine. There is data in these two variables. I am setting up these session variables along with other variables for the bridge. log-b-leg is false in the config for xml_cdr.

http://pastebin.freeswitch.org/19408 is the complete PB for the call log.
http://pastebin.freeswitch.org/19409 is the complete XML CDR debug.

cdr_csv shows the same

"Bhatti","2.10000","0.19280","415591","9198","default","2012-06-28 03:32:29","2012-06-28 03:32:29","2012-06-28 03:32:32","3","3","NORMAL_CLEARING","be292014-c0b8-11e1-ae74-2bc60749f960","","","",""

"Bhatti","2.10000","","415591","9198","default","2012-06-28 03:32:29","2012-06-28 03:32:29","2012-06-28 03:32:32","3","3","NORMAL_CLEARING","be2782fe-c0b8-11e1-ae6f-2bc60749f960","be292014-c0b8-11e1-ae74-2bc60749f960","","",""

Sometimes it works sometimes it wont. All the variables are seen in the call log. Am I doing something wrong or we hit some sort of a bug?


Thank.