[Freeswitch-users] problems in Using Embedded FreeSWITCH

xl127 x.liu at hw.ac.uk
Mon Nov 21 22:12:19 MSK 2011


Hello,

Following the instructions in
http://wiki.freeswitch.org/wiki/Embedding_FreeSWITCH
I am trying to use Embedded FreeSwitch.

I installed FS in Fedora linux as a root user in /usr/local/freeswitch. 
Now as non-root user,
I compiled following codes:

#include <switch.h>
int main(int argc, char** argv)
{
     switch_core_flag_t flags = SCF_USE_SQL;
     bool console = true;
     const char *err = NULL;
     switch_core_set_globals();
     switch_core_init_and_modload(flags, console ? SWITCH_TRUE : 
SWITCH_FALSE, &err);
     switch_core_runtime_loop(!console);
     return 0;
}

And copy the executable and conf, mod, contents of lib of the installed 
FS to my $MyWorkingDir.

My directory structure looks like:
    MyWorkingDir--bin/  (contains my executable: FS_Embed)
                         --conf/
                         --mod/
                         --lib/
                         --grammars
                         --sounds
                         --scripts
                         --log
(I also tried to copy the contents of lib directory into MyWorkingDir)

When I run my embedded FS: ./FS_Embed, I got error

2011-11-21 18:46:26.606783 [INFO] switch_event.c:631 Activate Eventing 
Engine.
2011-11-21 18:46:26.617941 [DEBUG] switch_event.c:610 Create event 
dispatch thread 0
FS_Embed: src/switch_xml.c:2225: switch_xml_open_cfg: Assertion 
`MAIN_XML_ROOT != ((void *)0)' failed.
Aborted (core dumped)

and occasionally on another run, I got error:

2011-11-21 16:56:51.756040 [INFO] switch_event.c:631 Activate Eventing 
Engine.
2011-11-21 16:56:51.767198 [DEBUG] switch_event.c:610 Create event 
dispatch thread 0
Segmentation fault (core dumped)

It looks like there are some things wrong with my Environment Setup for 
Embedded FS,
but after a while of checking/trying/googling I couldn't find what's wrong.

Any advice please?

Many thanks!
Xing



-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.

Heriot-Watt University is the Sunday Times
Scottish University of the Year 2011-2012





Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list