[Freeswitch-users] Question about wrapping libfreeswitch

Woody Dickson woodydickson at gmail.com
Tue Dec 2 04:05:33 PST 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081202/160bd4e8/attachment-0002.html 


More information about the FreeSWITCH-users mailing list