Hi,<br><br>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:<br>
<br> #include <switch.h><br> int main(int argc, char **argv)<br> {<br> switch_core_flag_t flags = SCF_USE_SQL;<br> int nc=0; /* this is for 'no console' mode, FALSE console is there, TRUE it isnt */<br> const char **err = NULL; /* error value for return from freeswitch initialization */<br>
#define LOGFILE "freeswitch.log"<br> static char *lfile = LOGFILE; /* if NULL no logfile is generated */<br> <br> switch_core_init_and_modload(*lfile,flags,err);<br> switch_core_runtime_loop(nc);<br> switch_core_destroy();<br>
<br> return (0); /* per C89 spec */<br> }<br><br>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?<br>
<br>Thanks,<br>Woody<br>