[Freeswitch-users] Question about wrapping libfreeswitch

Michael Jerris mike at jerris.com
Tue Dec 2 04:29:13 PST 2008


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 at gmail.com>  
wrote:

> 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org




More information about the FreeSWITCH-users mailing list