Dear all,

  I am writting a voip widget. The idea is to modify sofsip_cli (reusing the 
functionality in C), writing python bindings for these C functions, then call 
python from Javascript.

  Everything went well, but one problem remains. Even though I exclude the code 
to start terminal, the terminal starts somehow anyway. Anyone can tell me in 
which function the termial is invoked? Is it in ssc_create() or 
su_root_create()? I have tried to my best, but still could not figure out where 
the termianl is invoked.

  Thanks for your help (the C code is attached below).

BR,
Xing


*******************************my 
code*************************************************

typedef struct cli_s {
     su_home_t     cli_home[1];    /*  memory home */
     void         *cli_main;       /*  pointer to mainloop */
     su_root_t    *cli_root;       /*  Pointer to application root object */
     nua_t        *cli_nua;        /*  Pointer to nua stack object */
     ssc_conf_t    cli_conf[1];    /*  Config settings for ssc_sip.h */
     ssc_t        *cli_ssc;        /*  pointer to signaling subsystem */
} cli_t ;

static cli_t *global_cli_p = NULL;

static cli_t cli[1] = {{{{sizeof(cli)}}}};

static void ssc_msg(ssc_t *ssc, char *destination, char *msg);
static void sofsip_deinit(cli_t *cli);

int main()
{
  initVoip();
  runLoop();
  makeCall("sip: 111.256.34.72")
  sipCleanup
}

              
int initVoip()
{
  global_cli_p = cli;

  su_init(); 
  su_home_init(cli->cli_home);  
  g_type_init();
  {
    guint major, minor, micro, nano;
    gst_init (NULL, NULL);
    gst_version (&major, &minor, &micro, &nano);
    g_message ("This program is linked against GStreamer %d.%d.%d\n", major, 
minor, micro);
  }

  cli->cli_root = su_root_create(cli);  //Create a application root object. 
  
  cli->cli_ssc = ssc_create(cli->cli_home, cli->cli_root, cli->cli_conf);
  
  return 0;
}

int runLoop()
{

if ( cli->cli_ssc) {

       su_root_run(cli->cli_root);  
       ssc_destroy(cli->cli_ssc), cli->cli_ssc = NULL;
 }
 return 0;

}

int sipCleanup()
{
  ssc_shutdown(cli->cli_ssc);
  su_root_destroy(cli->cli_root), cli->cli_root = NULL; // Destroy a root 
object. 
  su_home_deinit(cli->cli_home);  // deinitialize memory handling
  su_deinit();  //deinitializes sockets
 
  return 0;

}
  

int makeCall(const char *destination)
 {
   
      ssc_invite(cli->cli_ssc, destination);
      return 0;
}







_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to