in lua you call methods with a colon :
e:addBody(blah);
calling with a . implies you are going to supply the obj too
e.addBody(e, blah);
Hi Guys,
I'm having real problems doing something trivial, and there doesn't seem to be any docs on this issue
In js I do this
//Disposition = disp;
//Create Custom event
custom_msg =
"call_disposition: " + Disposition + "\n" +
"called_number: " + dial_num + "\n" ;
e = new Event("custom", "dialer::dialer-result");
e.addBody(custom_msg);
e.fire();
And it works
In lua I try this
--Disposition = disp;
--Create Custom event
custom_msg = "call_disposition: " .. Disposition .. "\n" ..
"called_number: " .. dial_num .."\n" ;
local e = freeswitch.Event("custom", "dialer::dialer-result");
e.addBody(custom_msg);
e:fire(e);
This doesn't work, I get an error : Error in addBody expected 2..2 args, got 1
What are the arguments? It seems to be looking for a pointer for the first one, but there's nothing on the wiki on this.
Regards,
_______________________________________________
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