VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
woodydickson at gmail.com Guest
|
Posted: Tue Dec 02, 2008 7:07 am Post subject: [Freeswitch-users] Question about wrapping libfreeswitch |
|
|
Hi,
I am sorry again for sending another email to the group again. I am working on embedding libfreeswitch to provide better monitoring. The first thing I attempt to do is to run the sample code provided in the website:
#include <switch.h>
int main(int argc, char **argv)
{
switch_core_flag_t flags = SCF_USE_SQL;
int nc=0; /* this is for 'no console' mode, FALSE console is there, TRUE it isnt */
const char **err = NULL; /* error value for return from freeswitch initialization */
#define LOGFILE "freeswitch.log"
static char *lfile = LOGFILE; /* if NULL no logfile is generated */
switch_core_init_and_modload(*lfile,flags,err);
switch_core_runtime_loop(nc);
switch_core_destroy();
return (0); /* per C89 spec */
}
But this code gives me segmentation fault when executing it. This piece of code is supposed to start up freeswitch and run it is a loop. Does anyone see what is wrong with it? Does anyone have any working example that I can refer to?
Thanks,
Woody |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Tue Dec 02, 2008 8:22 am Post subject: [Freeswitch-users] Question about wrapping libfreeswitch |
|
|
I think the api changed a little bit for this. The easiest starting
point would be to just clone switch.c and chop out any of the stuff
you don't need, it's mostly argument handling code in there.
Mike
On Dec 2, 2008, at 7:05 AM, "Woody Dickson" <woodydickson@gmail.com>
wrote:
Quote: | Hi,
I am sorry again for sending another email to the group again. I am
working on embedding libfreeswitch to provide better monitoring.
The first thing I attempt to do is to run the sample code provided
in the website:
#include <switch.h>
int main(int argc, char **argv)
{
switch_core_flag_t flags = SCF_USE_SQL;
int nc=0; /* this is for 'no console' mode, FALSE console is
there, TRUE it isnt */
const char **err = NULL; /* error value for return from
freeswitch initialization */
#define LOGFILE "freeswitch.log"
static char *lfile = LOGFILE; /* if NULL no logfile is generated */
switch_core_init_and_modload(*lfile,flags,err);
switch_core_runtime_loop(nc);
switch_core_destroy();
return (0); /* per C89 spec */
}
But this code gives me segmentation fault when executing it. This
piece of code is supposed to start up freeswitch and run it is a
loop. Does anyone see what is wrong with it? Does anyone have any
working example that I can refer to?
Thanks,
Woody
_______________________________________________
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
|
_______________________________________________
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 |
|
Back to top |
|
|
|
|
|
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
|