Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] AddBody to events in lua


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
nik.middleton at noble...
Guest





PostPosted: Tue Feb 17, 2009 6:14 pm    Post subject: [Freeswitch-users] AddBody to events in lua Reply with quote

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,
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services