文档介绍:1 The eXtented eXosip stack
How-To initialize libeXosip2.
When using eXosip, your first task is to initialize both eXosip context and libosip
library (parser and state machines). This must be done prior to any use of libeXosip2.
include <eXosip2/>
int i;
TRACE_INITIALIZE (6, stdout);
i=eXosip_init();
if (i!=0)
return -1;
i = eXosip_listen_addr (IPPROTO_UDP, NULL, port, , 0);
if (i!=0)
{
eXosip_quit();
fprintf (stderr, "could not initialize transport layer\n");
return -1;
}
... then you have to send messages and wait for eXosip events...
In the previous code, you've learned how to:
? Initialize the osip trace (compile this code with -DENABLE_TRACE)
? Initialize eXosip (and osip) stack
? Open a socket for signalling (only UDP with initial eXosip2 version)
Now you have to handle eXosip e